Class ResourceWebScriptHelper
- java.lang.Object
-
- org.alfresco.rest.framework.webscripts.ResourceWebScriptHelper
-
public class ResourceWebScriptHelper extends java.lang.Object
Helps a Webscript with various tasks- Author:
- Gethin James, janv
-
-
Constructor Summary
Constructors Constructor Description ResourceWebScriptHelper()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
processAdditionsToTheResponse(org.springframework.extensions.webscripts.WebScriptResponse res, Api api, java.lang.String entityCollectionName, Params params, java.lang.Object objectToWrap)
Looks at the object passed in and recursively expands any @EmbeddedEntityResource annotations or related relationship.void
setExecutor(ActionExecutor executor)
void
setLocator(ResourceLocator locator)
static void
setUniqueId(java.lang.Object theObj, java.lang.String uniqueId)
Set the id of theObj to the uniqueId.
-
-
-
Method Detail
-
setUniqueId
public static void setUniqueId(java.lang.Object theObj, java.lang.String uniqueId)
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 java.lang.Object processAdditionsToTheResponse(org.springframework.extensions.webscripts.WebScriptResponse res, Api api, java.lang.String entityCollectionName, Params params, java.lang.Object objectToWrap)
Looks at the object passed in and recursively expands any @EmbeddedEntityResource annotations or related relationship.EmbeddedEntityResource
is 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
public void setLocator(ResourceLocator locator)
-
setExecutor
public void setExecutor(ActionExecutor executor)
-
-