Package org.forgerock.json.resource
Class RouteMatchers
- java.lang.Object
- 
- org.forgerock.json.resource.RouteMatchers
 
- 
 public final class RouteMatchers extends Object A utility class that contains methods for creating route matchers.
- 
- 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static ResourceApiVersionBehaviourManagernewResourceApiVersionBehaviourManager()Creates a newResourceApiVersionBehaviourManagerwhich 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 aRouteMatcherinstance that matches the request resource API version with the provided version.static RouteMatcher<Request>requestUriMatcher(RoutingMode mode, String template)Creates aRouteMatcherinstance that matchesRequests with the provided mode and template.static FilterresourceApiVersionContextFilter(ResourceApiVersionBehaviourManager behaviourManager)Creates aFilterwhich MUST be placed, in the route, before any API Version routing takes place.
 
- 
- 
- 
Method Detail- 
requestUriMatcherpublic static RouteMatcher<Request> requestUriMatcher(RoutingMode mode, String template) Creates aRouteMatcherinstance that matchesRequests with the provided mode and template.- Parameters:
- mode- The routing mode.
- template- The uri template.
- Returns:
- A RouteMatcherinstance.
 
 - 
newResourceApiVersionBehaviourManagerpublic static ResourceApiVersionBehaviourManager newResourceApiVersionBehaviourManager() Creates a newResourceApiVersionBehaviourManagerwhich 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.- Returns:
- A new ResourceApiVersionBehaviourManager.
 
 - 
resourceApiVersionContextFilterpublic static Filter resourceApiVersionContextFilter(ResourceApiVersionBehaviourManager behaviourManager) Creates aFilterwhich MUST be placed, in the route, before any API Version routing takes place.The filter will add the required Contexts, default version behaviour and response headers.- Parameters:
- behaviourManager- A- ResourceApiVersionBehaviourManagerinstance.
- Returns:
- A Filterinstance.
 
 - 
requestResourceApiVersionMatcherpublic static RouteMatcher<Request> requestResourceApiVersionMatcher(Version version) Creates aRouteMatcherinstance that matches the request resource API version with the provided version.- Parameters:
- version- The API version of the resource.
- Returns:
- A RouteMatcherinstance.
 
 
- 
 
-