Interface ResourceApiVersionSpecificationFilter.VersionSpecification

All Known Implementing Classes:
ResourceApiVersionSpecificationFilter.ResourcePathAndVersionSpecification
Enclosing class:
ResourceApiVersionSpecificationFilter

public static interface ResourceApiVersionSpecificationFilter.VersionSpecification
Mechanism supporting specification of a version on the request. The VersionSpecification is expected to be configured with a means of determining the preferred version based on a request. It may also be configured to indicate if a warning should be raised when no version is supplied.
  • Method Details

    • matchVersion

      Optional<Version> matchVersion(Request request)
      Test the request to try to find a match based on version configuration. The matching version is returned if found.
      Parameters:
      request - the request to match
      Returns:
      Optional of any matching Version
    • handleNoApiVersionSupplied

      void handleNoApiVersionSupplied(Context context, ResourcePath resourcePath)
      Support custom handling when no resource API version is supplied on the request.
      Parameters:
      context - the Context
      resourcePath - the requested ResourcePath