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.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the default routing behaviour to use when the request does not contain the Accept-API-Version header.
    boolean
    Returns true if warning headers should be set on the response if no Accept-API-Version header is present on the request.
    void
    Sets the default routing behaviour to use when the request does not contain the Accept-API-Version header.
    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.
  • 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 - true if warning headers should be set.
    • isWarningEnabled

      boolean isWarningEnabled()
      Returns true if warning headers should be set on the response if no Accept-API-Version header is present on the request.
      Returns:
      true if warning headers should be set.
    • setDefaultVersionBehaviour

      void setDefaultVersionBehaviour(DefaultVersionBehaviour behaviour)
      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.