public final class RouteMatchers extends Object
Modifier and Type | Method and Description |
---|---|
static ResourceApiVersionBehaviourManager |
newResourceApiVersionBehaviourManager()
Creates a new
ResourceApiVersionBehaviourManager which is responsibly
for managing whether warning headers are returned and the default
version behaviour when the Accept-API-Version header is not
present on the request. |
static RouteMatcher<Request> |
requestResourceApiVersionMatcher(Version version)
Creates a
RouteMatcher instance that matches the request
resource API version with the provided version. |
static RouteMatcher<Request> |
requestUriMatcher(RoutingMode mode,
String template)
Creates a
RouteMatcher instance that matches Request s
with the provided mode and template. |
static Filter |
resourceApiVersionContextFilter(ResourceApiVersionBehaviourManager behaviourManager)
Creates a
Filter which MUST be placed, in the route, before any
API Version routing takes place. |
static RouteMatcher<Version> |
resourceApiVersionMatcher(Version version)
Creates a
RouteMatcher instance that matches the request
resource API version with the provided version. |
static RouteMatcher<Request> |
selfApiMatcher()
A matcher to check if the request is for all versions of the API descriptor of the current path.
|
static RouteMatcher<List<String>> |
uriMatcher(RoutingMode mode,
String template)
Creates a
RouteMatcher instance that matches
ResourcePath s with the provided mode and
template. |
public static RouteMatcher<List<String>> uriMatcher(RoutingMode mode, String template)
RouteMatcher
instance that matches
ResourcePath
s with the provided mode and
template.mode
- The routing mode.template
- The uri template.RouteMatcher
instance.public static RouteMatcher<Request> requestUriMatcher(RoutingMode mode, String template)
RouteMatcher
instance that matches Request
s
with the provided mode and template.mode
- The routing mode.template
- The uri template.RouteMatcher
instance.public static ResourceApiVersionBehaviourManager newResourceApiVersionBehaviourManager()
ResourceApiVersionBehaviourManager
which is responsibly
for managing whether warning headers are returned and the default
version behaviour when the Accept-API-Version header is not
present on the request.ResourceApiVersionBehaviourManager
.public static Filter resourceApiVersionContextFilter(ResourceApiVersionBehaviourManager behaviourManager)
Filter
which MUST be placed, in the route, before any
API Version routing takes place.
The filter will add the required Context
s, default version
behaviour and response headers.
behaviourManager
- A ResourceApiVersionBehaviourManager
instance.Filter
instance.public static RouteMatcher<Version> resourceApiVersionMatcher(Version version)
RouteMatcher
instance that matches the request
resource API version with the provided version.version
- The API version of the resource.RouteMatcher
instance.public static RouteMatcher<Request> requestResourceApiVersionMatcher(Version version)
RouteMatcher
instance that matches the request
resource API version with the provided version.version
- The API version of the resource.RouteMatcher
instance.public static RouteMatcher<Request> selfApiMatcher()
RouteMatcher
instance.Copyright © 2010-2018, ForgeRock All Rights Reserved.