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
Direct Known Subclasses:
HoldPost, HoldPut

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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected Map<String,Object>
    executeImpl(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.Status status, org.springframework.extensions.webscripts.Cache cache)
     
    protected List<NodeRef>
    getHolds(org.json.JSONObject json)
    Helper method to get the list of NodeRef(s) for the hold(s) which will contain the item (record / record folder / active content)
    protected HoldService
    Returns the hold service
    protected List<NodeRef>
    getItemNodeRefs(org.json.JSONObject json)
    Helper method to get the NodeRefs 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 request
    void
    Set the hold service
    void
     
    void
     
    void
     

    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • BaseHold

      public BaseHold()
  • Method Details

    • setHoldService

      public void setHoldService(HoldService holdService)
      Set the hold service
      Parameters:
      holdService - the hold service
    • setRecordFolderService

      public void setRecordFolderService(RecordFolderService recordFolderService)
      Parameters:
      recordFolderService - record folder service
    • setNodeService

      public void setNodeService(NodeService nodeService)
      Parameters:
      nodeService - node service
    • setNodeTypeUtility

      public void setNodeTypeUtility(NodeTypeUtility nodeTypeUtility)
      Parameters:
      nodeTypeUtility - node type utility
    • getHoldService

      protected HoldService 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 class org.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

      protected List<NodeRef> getItemNodeRefs(org.json.JSONObject json)
      Helper method to get the NodeRefs 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 NodeRefs which will be added to the hold(s)
    • getHolds

      protected List<NodeRef> getHolds(org.json.JSONObject json)
      Helper method to get the list of NodeRef(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)