Class BaseTransferWebScript

java.lang.Object
org.springframework.extensions.webscripts.AbstractWebScript
org.alfresco.repo.web.scripts.content.StreamContent
org.alfresco.repo.web.scripts.content.StreamACP
org.alfresco.module.org_alfresco_module_rm.script.BaseTransferWebScript
All Implemented Interfaces:
RecordsManagementCustomModel, RecordsManagementModel, org.springframework.extensions.webscripts.WebScript
Direct Known Subclasses:
TransferGet, TransferReportGet, TransferReportPost

public abstract class BaseTransferWebScript extends StreamACP implements RecordsManagementModel
Abstract base class for transfer related web scripts.
Author:
Gavin Cornwell
  • Field Details

  • Constructor Details

    • BaseTransferWebScript

      public BaseTransferWebScript()
  • Method Details

    • setFilePlanService

      public void setFilePlanService(FilePlanService filePlanService)
    • execute

      public void execute(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.WebScriptResponse res) throws IOException
      Specified by:
      execute in interface org.springframework.extensions.webscripts.WebScript
      Overrides:
      execute in class StreamACP
      Throws:
      IOException
      See Also:
      • DeclarativeWebScript.executeImpl(org.springframework.extensions.webscripts.WebScriptRequest, org.springframework.extensions.webscripts.Status, org.springframework.extensions.webscripts.Cache)
    • executeTransfer

      protected abstract File executeTransfer(NodeRef transferNode, org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.WebScriptResponse res, org.springframework.extensions.webscripts.Status status, org.springframework.extensions.webscripts.Cache cache) throws IOException
      Abstract method subclasses implement to perform the actual logic required.
      Parameters:
      transferNode - The transfer node
      req - The request
      res - The response
      status - Status object
      cache - Cache object
      Returns:
      File object representing the file containing the JSON of the report
      Throws:
      IOException
    • findTransferNode

      protected NodeRef findTransferNode(NodeRef filePlan, String transferId)
      Finds a transfer object with the given id in the given file plan. This method returns null if a transfer with the given id is not found.
      Parameters:
      filePlan - The file plan to search
      transferId - The id of the transfer being requested
      Returns:
      The transfer node or null if not found
    • getTransferNodes

      protected NodeRef[] getTransferNodes(NodeRef transferNode)
      Returns an array of NodeRefs representing the items to be transferred.
      Parameters:
      transferNode - The transfer object
      Returns:
      Array of NodeRefs