Class BaseHold
java.lang.Object
org.springframework.extensions.webscripts.AbstractWebScript
org.springframework.extensions.webscripts.DeclarativeWebScript
org.alfresco.module.org_alfresco_module_rm.script.hold.BaseHold
- All Implemented Interfaces:
org.springframework.extensions.webscripts.WebScript
public abstract class BaseHold
extends org.springframework.extensions.webscripts.DeclarativeWebScript
Base class for the hold webscripts
- Since:
- 2.2
- Author:
- Tuna Aksoy
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.extensions.webscripts.AbstractWebScript
org.springframework.extensions.webscripts.AbstractWebScript.ScriptDetails
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecuteImpl
(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.Status status, org.springframework.extensions.webscripts.Cache cache) getHolds
(org.json.JSONObject json) Helper method to get the list ofNodeRef
(s) for the hold(s) which will contain the item (record / record folder / active content)protected HoldService
Returns the hold servicegetItemNodeRefs
(org.json.JSONObject json) Helper method to get theNodeRef
s for the items(s) (record(s) / record folder(s) / active content(s)) which will be added to the hold(s)protected org.json.JSONObject
getJSONFromContent
(org.springframework.extensions.webscripts.WebScriptRequest req) Helper method the get the json object from the requestvoid
setHoldService
(HoldService holdService) Set the hold servicevoid
setNodeService
(NodeService nodeService) void
setNodeTypeUtility
(NodeTypeUtility nodeTypeUtility) void
setRecordFolderService
(RecordFolderService recordFolderService) Methods inherited from class org.springframework.extensions.webscripts.DeclarativeWebScript
execute, executeFinallyImpl, executeImpl, executeImpl, getTemplateModel, renderFormatTemplate
Methods inherited from class org.springframework.extensions.webscripts.AbstractWebScript
addModuleBundleToCache, checkModuleBundleCache, createArgs, createArgsM, createHeaders, createHeadersM, createScriptParameters, createStatusException, createTemplateParameters, executeScript, getContainer, getDescription, getExecuteScript, getResources, getStatusTemplate, init, renderString, renderString, renderTemplate, sendStatus, setURLModelFactory, toString
-
Constructor Details
-
BaseHold
public BaseHold()
-
-
Method Details
-
setHoldService
Set the hold service- Parameters:
holdService
- the hold service
-
setRecordFolderService
- Parameters:
recordFolderService
- record folder service
-
setNodeService
- Parameters:
nodeService
- node service
-
setNodeTypeUtility
- Parameters:
nodeTypeUtility
- node type utility
-
getHoldService
Returns the hold service- Returns:
- Returns the hold service
-
executeImpl
protected Map<String,Object> executeImpl(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.Status status, org.springframework.extensions.webscripts.Cache cache) - Overrides:
executeImpl
in classorg.springframework.extensions.webscripts.DeclarativeWebScript
- See Also:
-
DeclarativeWebScript.executeImpl(org.springframework.extensions.webscripts.WebScriptRequest, org.springframework.extensions.webscripts.Status, org.springframework.extensions.webscripts.Cache)
-
getJSONFromContent
protected org.json.JSONObject getJSONFromContent(org.springframework.extensions.webscripts.WebScriptRequest req) Helper method the get the json object from the request- Parameters:
req
- The webscript request- Returns:
- The json object which was sent in the request body
-
getItemNodeRefs
Helper method to get theNodeRef
s for the items(s) (record(s) / record folder(s) / active content(s)) which will be added to the hold(s)- Parameters:
json
- The request content as JSON object- Returns:
- List of item
NodeRef
s which will be added to the hold(s)
-
getHolds
Helper method to get the list ofNodeRef
(s) for the hold(s) which will contain the item (record / record folder / active content)- Parameters:
json
- The request content as JSON object- Returns:
- List of
NodeRef
(s) of the hold(s)
-