Interface ConverterContext

  • All Superinterfaces:
    Adaptable

    @ProviderType
    public interface ConverterContext
    extends Adaptable
    A context object providing useful information from the request. Can be adapted to ResourceConverterContext.
    • Field Detail

      • DEFAULT_USE_ABSOLUTE_URIS

        static final boolean DEFAULT_USE_ABSOLUTE_URIS
        Default indicator if absolute URIs should be used.
        See Also:
        Constant Field Values
    • Method Detail

      • getRootContextPath

        @CheckForNull
        String getRootContextPath()
        Get the Root Context Path Value as defined in OSGI config for ApiEndpointResourceProviderFactory
        Returns:
        The root context path.
      • getLimit

        int getLimit()
        Returns the limit.
        Returns:
        The limit value
      • getScheme

        @CheckForNull
        String getScheme()
        Returns the name of the scheme.
        Returns:
        Scheme name
      • getServerName

        @CheckForNull
        String getServerName()
        Returns the host name of the server.
        Returns:
        Server host name
      • getServerPort

        int getServerPort()
        Returns the port number.
        Returns:
        Server port
      • getContextPath

        @CheckForNull
        String getContextPath()
        Returns the portion of the request URI that indicates the context.
        Returns:
        Context path
      • isAbsoluteURI

        boolean isAbsoluteURI()
        Indicator if absolute URI's are used.
        Returns:
        true if URIs are absolute, false otherwise
      • getModelFilters

        @Nonnull
        Map<String,​String[]> getModelFilters()
        Retrieves the filters to be applied by the model when getting entities.
        Returns:
        The filters the model must use.
      • getMatchedMediaType

        @CheckForNull
        String getMatchedMediaType()
        Returns the media type that was matched from the request and that the converter is being asked to provide.
        Returns:
        The matched media type
      • setMatchedMediaType

        void setMatchedMediaType​(String mediaType)
        Set the media type that was matched from the request and the converter is being asked to provide.
        Parameters:
        mediaType - The matched media type
      • getRequestMethod

        @CheckForNull
        String getRequestMethod()
        Returns the HTTP method of the request.
        Returns:
        The HTTP method of the request
      • setOffsetValue

        ConverterContext setOffsetValue​(String value)
        Set the offset value. Pagination could assign this value to a number or a string depending on the design of the URL space.
        Parameters:
        value - the value of the url parameter
        Returns:
        the current context
      • getOffsetValue

        String getOffsetValue()
        Get this converters current offset value or the offset if that has been set.
        Returns:
        the offset value
      • getOrderBy

        @CheckForNull
        List<OrderByDetails> getOrderBy()
        Get this converters current list of order by information.
        Returns:
        the list of requested order by details or an empty list if nothing was specified