java.lang.Object
org.alfresco.rest.framework.resource.parameters.Params
All Implemented Interfaces:
Parameters

public class Params extends Object implements Parameters
Parameters passed in from a Rest client for use in calls to the rest api.
Author:
Gethin James
  • Constructor Details

  • Method Details

    • valueOf

      public static Params valueOf(BeanPropertiesFilter paramFilter, String entityId, org.springframework.extensions.webscripts.WebScriptRequest request)
    • valueOf

      public static Params valueOf(String entityId, String relationshipId, org.springframework.extensions.webscripts.WebScriptRequest request)
    • valueOf

      public static Params valueOf(Params.RecognizedParams recognizedParams, String entityId, String relationshipId, org.springframework.extensions.webscripts.WebScriptRequest request)
    • valueOf

      public static Params valueOf(String entityId, Params.RecognizedParams recognizedParams, Object passedIn, org.springframework.extensions.webscripts.WebScriptRequest request)
    • valueOf

      public static Params valueOf(String entityId, String relationshipId, Params.RecognizedParams recognizedParams, Object passedIn, org.springframework.extensions.webscripts.WebScriptRequest request)
    • valueOf

      public static Params valueOf(String entityId, String relationshipId, Object passedIn, InputStream stream, String addressedProperty, Params.RecognizedParams recognizedParams, BasicContentInfo contentInfo, org.springframework.extensions.webscripts.WebScriptRequest request)
    • valueOf

      public static Params valueOf(boolean isCollectionResource, String entityId, String relationshipId, String relationship2Id, Object passedIn, InputStream stream, String addressedProperty, Params.RecognizedParams recognizedParams, BasicContentInfo contentInfo, org.springframework.extensions.webscripts.WebScriptRequest request)
    • getEntityId

      public String getEntityId()
      Specified by:
      getEntityId in interface Parameters
    • getPassedIn

      public Object getPassedIn()
    • getRelationshipId

      public String getRelationshipId()
      Specified by:
      getRelationshipId in interface Parameters
    • getRelationship2Id

      public String getRelationship2Id()
      Specified by:
      getRelationship2Id in interface Parameters
    • isCollectionResource

      public boolean isCollectionResource()
      Specified by:
      isCollectionResource in interface Parameters
    • getQuery

      public Query getQuery()
      Description copied from interface: Parameters
      Represents a Query specified by the client. Specified by the "WHERE" request parameter.
      Specified by:
      getQuery in interface Parameters
      Returns:
      Query Query
    • getPaging

      public Paging getPaging()
      Description copied from interface: Parameters
      Returns a representation of the Paging of collections of resources, with skip count and max items. See Paging Specified by the "skipCount" and "maxItems" request parameters.
      Specified by:
      getPaging in interface Parameters
      Returns:
      Paging Paging information
    • getFilter

      public BeanPropertiesFilter getFilter()
      Description copied from interface: Parameters
      Returns a BeanPropertiesFilter for filtering out properties. Specified by the "properties" request parameter.
      Specified by:
      getFilter in interface Parameters
      Returns:
      BeanPropertiesFilter BeanPropertiesFilter
    • includeSource

      public boolean includeSource()
      Description copied from interface: Parameters
      Indicates if the source entity should be includes in the request. This will normally be done by the framework but implentations may prefer to do it themselves.
      Specified by:
      includeSource in interface Parameters
      Returns:
      true if the source should be included.
    • getRelationsFilter

      public Map<String,BeanPropertiesFilter> getRelationsFilter()
    • getStream

      public InputStream getStream()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getParameter

      public String getParameter(String parameterName)
      Description copied from interface: Parameters
      Gets a single request query parameter passed in by the user. Currently doesn't support multiple values.
      Specified by:
      getParameter in interface Parameters
      Parameters:
      parameterName - String
      Returns:
      String The Parameter value
    • getParameter

      public org.apache.poi.ss.formula.functions.T getParameter(String parameterName, Class<org.apache.poi.ss.formula.functions.T> clazz) throws InvalidArgumentException
      Description copied from interface: Parameters
      Gets a single request parameter passed in by the user. Attempts to convert the parameter to the specified type. If unable to convert the parameter to the specified type then throws an InvalidArgumentException. Currently doesn't support multiple values.
      Specified by:
      getParameter in interface Parameters
      Parameters:
      parameterName - String
      clazz - - type to use for conversion.
      Returns:
      The Parameter value
      Throws:
      InvalidArgumentException
    • hasBinaryProperty

      public boolean hasBinaryProperty(String propertyName)
      Description copied from interface: Parameters
      Indicates if the specified property was requested.
      Specified by:
      hasBinaryProperty in interface Parameters
      Parameters:
      propertyName - the property Specified as part of the url request.
      Returns:
      true if the propertyName was specified as part of the url request
    • getSorting

      public List<SortColumn> getSorting()
      Description copied from interface: Parameters
      Returns a List of SortColumn for sorting properties. Specified by the "orderBy" request parameter.
      Specified by:
      getSorting in interface Parameters
      Returns:
      List of SortColumn
    • getBinaryProperty

      public String getBinaryProperty()
      Description copied from interface: Parameters
      Gets the name of the property that was requested.
      Specified by:
      getBinaryProperty in interface Parameters
      Returns:
      String the propertyName
    • getSelectedProperties

      public List<String> getSelectedProperties()
      Description copied from interface: Parameters
      A list of property names passed in the request using the json pointer syntax Specified by the "SELECT" request parameter.
      Specified by:
      getSelectedProperties in interface Parameters
    • getInclude

      public List<String> getInclude()
      Description copied from interface: Parameters
      A list of property names passed in the request using the json pointer syntax Specified by the "INCLUDE" request parameter.
      Specified by:
      getInclude in interface Parameters
      Returns:
      the propertyNames
    • getContentInfo

      public BasicContentInfo getContentInfo()
      Description copied from interface: Parameters
      Gets the basic information about content, typically taken from a HTTPServletRequest.
      Specified by:
      getContentInfo in interface Parameters
      Returns:
      BasicContentInfo the content info
    • getRequest

      public org.springframework.extensions.webscripts.WebScriptRequest getRequest()
      Description copied from interface: Parameters
      Gets access to the entire webscript request.
      Specified by:
      getRequest in interface Parameters
      Returns:
      WebScriptRequest