Package org.kiwiproject.config
Class UrlRewriteConfiguration
- java.lang.Object
-
- org.kiwiproject.config.UrlRewriteConfiguration
-
public class UrlRewriteConfiguration extends Object
Specifies URL rewriting configuration used byEndpointConfiguration. Currently supports only a URL path prefix.As this is a configuration class generally intended to be populated from external configuration, it is mutable and supports construction in a variety of ways - no argument constructor and setter methods, all-arguments constructor, or a builder. Once constructed, it is intended to be read-only, though this cannot be enforced and still have setter methods.
-
-
Constructor Summary
Constructors Constructor Description UrlRewriteConfiguration()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static UrlRewriteConfigurationnone()Returns and instance that will not perform any URL rewriting.booleanshouldRewrite()Whether URL rewrites will be performed.
-
-
-
Method Detail
-
none
public static UrlRewriteConfiguration none()
Returns and instance that will not perform any URL rewriting. Useful as a default value.- Returns:
- a new "no-rewriting" UrlRewriteConfiguration
-
shouldRewrite
public boolean shouldRewrite()
Whether URL rewrites will be performed.- Returns:
- true if there is a path prefix, false otherwise
-
-