Class ResourceWebScriptHelper
java.lang.Object
org.alfresco.rest.framework.webscripts.ResourceWebScriptHelper
Helps a Webscript with various tasks
- Author:
- Gethin James, janv
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprocessAdditionsToTheResponse(org.springframework.extensions.webscripts.WebScriptResponse res, Api api, String entityCollectionName, Params params, Object objectToWrap) Looks at the object passed in and recursively expands any @EmbeddedEntityResource annotations or related relationship.voidsetExecutor(ActionExecutor executor) voidsetLocator(ResourceLocator locator) static voidsetUniqueId(Object theObj, String uniqueId) Set the id of theObj to the uniqueId.
-
Constructor Details
-
ResourceWebScriptHelper
public ResourceWebScriptHelper()
-
-
Method Details
-
setUniqueId
Set the id of theObj to the uniqueId. Attempts to find a set method and invoke it. If it fails it just swallows the exceptions and doesn't throw them further.- Parameters:
theObj- ObjectuniqueId- String
-
processAdditionsToTheResponse
public Object processAdditionsToTheResponse(org.springframework.extensions.webscripts.WebScriptResponse res, Api api, String entityCollectionName, Params params, Object objectToWrap) Looks at the object passed in and recursively expands any @EmbeddedEntityResource annotations or related relationship.EmbeddedEntityResourceis expanded by calling the ReadById method for this entity. Either returns a ExecutionResult object or a CollectionWithPagingInfo containing a collection of ExecutionResult objects.- Parameters:
api- ApientityCollectionName- Stringparams- ParamsobjectToWrap- Object- Returns:
- Object - Either ExecutionResult or CollectionWithPagingInfo
-
setLocator
-
setExecutor
-