Package org.forgerock.http.routing
Interface ResourceApiVersionBehaviourManager
public interface ResourceApiVersionBehaviourManager
Implementations of this interface will be responsible for maintaining the
behaviour of API Version routing.
API Version routing can issue a WarningHeader if no
Accept-API-Version header is set on the request. In addition a
default behaviour can be set to determine how the route will compare
matching API Version routes.
-
Method Summary
Modifier and TypeMethodDescriptionGets the default routing behaviour to use when the request does not contain the Accept-API-Version header.booleanReturnstrueif warning headers should be set on the response if no Accept-API-Version header is present on the request.voidSets the default routing behaviour to use when the request does not contain the Accept-API-Version header.voidsetWarningEnabled(boolean warningEnabled) Sets if warning headers should be set on the response if no Accept-API-Version header is present on the request.
-
Method Details
-
setWarningEnabled
void setWarningEnabled(boolean warningEnabled) Sets if warning headers should be set on the response if no Accept-API-Version header is present on the request.- Parameters:
warningEnabled-trueif warning headers should be set.
-
isWarningEnabled
boolean isWarningEnabled()Returnstrueif warning headers should be set on the response if no Accept-API-Version header is present on the request.- Returns:
trueif warning headers should be set.
-
setDefaultVersionBehaviour
Sets the default routing behaviour to use when the request does not contain the Accept-API-Version header.- Parameters:
behaviour- The default routing behaviour when no Accept-API-Version header is present on the request.
-
getDefaultVersionBehaviour
DefaultVersionBehaviour getDefaultVersionBehaviour()Gets the default routing behaviour to use when the request does not contain the Accept-API-Version header.- Returns:
- The default routing behaviour when no Accept-API-Version header is present on the request.
-