Class Params
java.lang.Object
org.alfresco.rest.framework.resource.parameters.Params
- All Implemented Interfaces:
Parameters
Parameters passed in from a Rest client for use in calls to the rest api.
- Author:
- Gethin James
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA formal set of params that any rest service could potentially have passed in as request params -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedParams(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) -
Method Summary
Modifier and TypeMethodDescriptionGets the name of the property that was requested.Gets the basic information about content, typically taken from a HTTPServletRequest.Returns aBeanPropertiesFilterfor filtering out properties.A list of property names passed in the request using the json pointer syntax Specified by the "INCLUDE" request parameter.Returns a representation of the Paging of collections of resources, with skip count and max items.getParameter(String parameterName) Gets a single request query parameter passed in by the user.org.apache.poi.ss.formula.functions.TgetParameter(String parameterName, Class<org.apache.poi.ss.formula.functions.T> clazz) Gets a single request parameter passed in by the user.getQuery()Represents a Query specified by the client.org.springframework.extensions.webscripts.WebScriptRequestGets access to the entire webscript request.A list of property names passed in the request using the json pointer syntax Specified by the "SELECT" request parameter.Returns a List ofSortColumnfor sorting properties.booleanhasBinaryProperty(String propertyName) Indicates if the specified property was requested.booleanIndicates if the source entity should be includes in the request.booleantoString()static ParamsvalueOf(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) static ParamsvalueOf(String entityId, String relationshipId, Object passedIn, InputStream stream, String addressedProperty, Params.RecognizedParams recognizedParams, BasicContentInfo contentInfo, org.springframework.extensions.webscripts.WebScriptRequest request) static ParamsvalueOf(String entityId, String relationshipId, Params.RecognizedParams recognizedParams, Object passedIn, org.springframework.extensions.webscripts.WebScriptRequest request) static ParamsvalueOf(String entityId, String relationshipId, org.springframework.extensions.webscripts.WebScriptRequest request) static ParamsvalueOf(String entityId, Params.RecognizedParams recognizedParams, Object passedIn, org.springframework.extensions.webscripts.WebScriptRequest request) static ParamsvalueOf(BeanPropertiesFilter paramFilter, String entityId, org.springframework.extensions.webscripts.WebScriptRequest request) static ParamsvalueOf(Params.RecognizedParams recognizedParams, String entityId, String relationshipId, org.springframework.extensions.webscripts.WebScriptRequest request)
-
Constructor Details
-
Params
protected Params(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)
-
-
Method Details
-
valueOf
public static Params valueOf(BeanPropertiesFilter paramFilter, String entityId, org.springframework.extensions.webscripts.WebScriptRequest request) -
valueOf
-
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
- Specified by:
getEntityIdin interfaceParameters
-
getPassedIn
-
getRelationshipId
- Specified by:
getRelationshipIdin interfaceParameters
-
getRelationship2Id
- Specified by:
getRelationship2Idin interfaceParameters
-
isCollectionResource
public boolean isCollectionResource()- Specified by:
isCollectionResourcein interfaceParameters
-
getQuery
Description copied from interface:ParametersRepresents a Query specified by the client. Specified by the "WHERE" request parameter.- Specified by:
getQueryin interfaceParameters- Returns:
- Query
Query
-
getPaging
Description copied from interface:ParametersReturns a representation of the Paging of collections of resources, with skip count and max items. SeePagingSpecified by the "skipCount" and "maxItems" request parameters.- Specified by:
getPagingin interfaceParameters- Returns:
- Paging Paging information
-
getFilter
Description copied from interface:ParametersReturns aBeanPropertiesFilterfor filtering out properties. Specified by the "properties" request parameter.- Specified by:
getFilterin interfaceParameters- Returns:
- BeanPropertiesFilter
BeanPropertiesFilter
-
includeSource
public boolean includeSource()Description copied from interface:ParametersIndicates 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:
includeSourcein interfaceParameters- Returns:
- true if the source should be included.
-
getRelationsFilter
-
getStream
-
toString
-
getParameter
Description copied from interface:ParametersGets a single request query parameter passed in by the user. Currently doesn't support multiple values.- Specified by:
getParameterin interfaceParameters- 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:ParametersGets 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:
getParameterin interfaceParameters- Parameters:
parameterName- Stringclazz- - type to use for conversion.- Returns:
- The Parameter value
- Throws:
InvalidArgumentException
-
hasBinaryProperty
Description copied from interface:ParametersIndicates if the specified property was requested.- Specified by:
hasBinaryPropertyin interfaceParameters- 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
Description copied from interface:ParametersReturns a List ofSortColumnfor sorting properties. Specified by the "orderBy" request parameter.- Specified by:
getSortingin interfaceParameters- Returns:
- List of
SortColumn
-
getBinaryProperty
Description copied from interface:ParametersGets the name of the property that was requested.- Specified by:
getBinaryPropertyin interfaceParameters- Returns:
- String the propertyName
-
getSelectedProperties
Description copied from interface:ParametersA list of property names passed in the request using the json pointer syntax Specified by the "SELECT" request parameter.- Specified by:
getSelectedPropertiesin interfaceParameters
-
getInclude
Description copied from interface:ParametersA list of property names passed in the request using the json pointer syntax Specified by the "INCLUDE" request parameter.- Specified by:
getIncludein interfaceParameters- Returns:
- the propertyNames
-
getContentInfo
Description copied from interface:ParametersGets the basic information about content, typically taken from a HTTPServletRequest.- Specified by:
getContentInfoin interfaceParameters- Returns:
- BasicContentInfo the content info
-
getRequest
public org.springframework.extensions.webscripts.WebScriptRequest getRequest()Description copied from interface:ParametersGets access to the entire webscript request.- Specified by:
getRequestin interfaceParameters- Returns:
- WebScriptRequest
-