Class ResourceConverterContext

java.lang.Object
com.adobe.granite.rest.converter.ResourceConverterContext

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

    • DEFAULT_LIMIT

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

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

      public static final boolean DEFAULT_SHOW_ALL_PROPERTIES
      Default show all properties flag.
      See Also:
  • Constructor Details

  • Method Details

    • getRootContextPath

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

      public void setRootContextPath(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
    • setFilter

      public ResourceConverterContext setFilter(Filter<Resource> filter)
      Sets the filter.
      Parameters:
      filter - A filter
      Returns:
      reference to self
    • getScheme

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

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

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

      public ResourceConverterContext setServerName(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 String getContextPath()
      Returns the portion of the request URI that indicates the context.
      Returns:
      Context path
    • setContextPath

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

      public RequestPathInfo getRequestPathInfo()
      Returns the RequestPathInfo.
      Returns:
      RequestPathInfo
    • setRequestPathInfo

      public ResourceConverterContext setRequestPathInfo(RequestPathInfo requestPathInfo)
      Sets the RequestPathInfo.
      Parameters:
      requestPathInfo - A RequestPathInfo
      Returns:
      reference to self
    • getParameters

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

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

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

      public ResourceConverterContext setQuery(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 String[] getShowProperties()
      Retrieves the properties to show.
      Returns:
      A list of property names to show.
    • setShowProperties

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

      public Map<String,String[]> getModelFilters()
    • setModelFilters

      public void setModelFilters(Map<String,String[]> filters)