Class ResourceConverterContext


  • public class ResourceConverterContext
    extends java.lang.Object
    The ResourceConverterContext provides context information which are necessary or useful for converting a resource.
    • Field Detail

      • DEFAULT_LIMIT

        public static final int DEFAULT_LIMIT
        Default page size limit.
        See Also:
        Constant Field Values
      • DEFAULT_USE_ABSOLUTE_URIS

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

        public static final boolean DEFAULT_SHOW_ALL_PROPERTIES
        Default show all properties flag.
        See Also:
        Constant Field Values
    • Method Detail

      • getRootContextPath

        public java.lang.String getRootContextPath()
        Get the Root Context Path Value as defined in OSGI config for ApiEndpointResourceProviderFactory
        Returns:
        The root context path.
      • setRootContextPath

        public void setRootContextPath​(java.lang.String rootContextPath)
        Set the root context path
        Parameters:
        rootContextPath - The root context path
      • getOffset

        public int getOffset()
        Returns the offset.
        Returns:
        The offset value
      • setOffset

        public ResourceConverterContext setOffset​(int offset)
        Set the offset.
        Parameters:
        offset - Offset value
        Returns:
        reference to self
      • getLimit

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

        public ResourceConverterContext setLimit​(int limit)
        Sets the limit.
        Parameters:
        limit - Limit value
        Returns:
        reference to self
      • getFilter

        public Filter<Resource> getFilter()
        Returns the filter.
        Returns:
        The filter
      • getScheme

        public java.lang.String getScheme()
        Returns the name of the scheme.
        Returns:
        Scheme name
      • setScheme

        public ResourceConverterContext setScheme​(java.lang.String scheme)
        Sets the name of the scheme.
        Parameters:
        scheme - Scheme name
        Returns:
        reference to self
      • getServerName

        public java.lang.String getServerName()
        Returns the host name of the server.
        Returns:
        Server host name
      • setServerName

        public ResourceConverterContext setServerName​(java.lang.String serverName)
        Sets the host name of the server.
        Parameters:
        serverName - Server host name
        Returns:
        reference to self
      • getServerPort

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

        public ResourceConverterContext setServerPort​(int serverPort)
        Sets the port number.
        Parameters:
        serverPort - Server port
        Returns:
        reference to self
      • getContextPath

        public java.lang.String getContextPath()
        Returns the portion of the request URI that indicates the context.
        Returns:
        Context path
      • setContextPath

        public ResourceConverterContext setContextPath​(java.lang.String contextPath)
        Sets the portion of the request URI that indicates the context.
        Parameters:
        contextPath - Context path
        Returns:
        reference to self
      • getParameters

        public java.util.Map<java.lang.String,​java.lang.String[]> getParameters()
        Returns the request parameters.
        Returns:
        A Map of request parameter keys and values
      • setParameters

        public ResourceConverterContext setParameters​(java.util.Map<java.lang.String,​java.lang.String[]> parameters)
        Sets the request parameters.
        Parameters:
        parameters - Request parameters
        Returns:
        reference to self
      • getQuery

        public java.lang.String getQuery()
        Returns the query.
        Returns:
        Query value
      • setQuery

        public ResourceConverterContext setQuery​(java.lang.String query)
        Sets the query.
        Parameters:
        query - Query value
        Returns:
        reference to self
      • isAbsolutURI

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

        public ResourceConverterContext setAbsolutURI​(boolean useAbsoluteURI)
        Sets the property to use absolute URI's.
        Parameters:
        useAbsoluteURI - Indicator to use absolute URIs
        Returns:
        reference to self
      • isShowAllProperties

        public boolean isShowAllProperties()
        Indicator if all properties should be shown.
        Returns:
        the showAllProperties
      • setShowAllProperties

        public ResourceConverterContext setShowAllProperties​(boolean showAllProperties)
        Sets the property to show all properties.
        Parameters:
        showAllProperties - Indicator to show all properties
        Returns:
        reference to self
      • getShowProperties

        public java.lang.String[] getShowProperties()
        Retrieves the properties to show.
        Returns:
        A list of property names to show.
      • setShowProperties

        public ResourceConverterContext setShowProperties​(java.lang.String[] showProperties)
        Sets the properties to show.
        Parameters:
        showProperties - Property names to show.
        Returns:
        references to self
      • getModelFilters

        public java.util.Map<java.lang.String,​java.lang.String[]> getModelFilters()
      • setModelFilters

        public void setModelFilters​(java.util.Map<java.lang.String,​java.lang.String[]> filters)