Class AbstractArchivedNodeWebScript

  • All Implemented Interfaces:
    org.springframework.extensions.webscripts.WebScript
    Direct Known Subclasses:
    ArchivedNodePut, ArchivedNodesDelete, ArchivedNodesGet

    public abstract class AbstractArchivedNodeWebScript
    extends org.springframework.extensions.webscripts.DeclarativeWebScript
    This class is an abstract base class for the various webscript controllers in the NodeArchiveService.
    Since:
    3.5
    Author:
    Neil McErlean, Jamal Kaabi-Mofrad
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.springframework.extensions.webscripts.AbstractWebScript

        org.springframework.extensions.webscripts.AbstractWebScript.ScriptDetails
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.alfresco.query.PagingResults<org.alfresco.service.cmr.repository.NodeRef> getArchivedNodesFrom​(org.alfresco.service.cmr.repository.StoreRef storeRef, org.alfresco.util.ScriptPagingDetails paging, java.lang.String filter)
      * This method gets all nodes from the archive which were originally contained within the specified StoreRef.
      protected int getIntParameter​(org.springframework.extensions.webscripts.WebScriptRequest req, java.lang.String paramName, int defaultValue)
      Retrieves the named parameter as an integer, if the parameter is not present the default value is returned
      protected org.alfresco.service.cmr.repository.NodeRef parseRequestForNodeRef​(org.springframework.extensions.webscripts.WebScriptRequest req)  
      protected org.alfresco.service.cmr.repository.StoreRef parseRequestForStoreRef​(org.springframework.extensions.webscripts.WebScriptRequest req)  
      void setMaxSizeView​(int maxSizeView)
      Sets the maxSizeView
      void setNodeArchiveService​(org.alfresco.repo.node.archive.NodeArchiveService nodeArchiveService)
      Sets the nodeArchiveService instance
      void setServiceRegistry​(org.alfresco.service.ServiceRegistry serviceRegistry)
      Sets the serviceRegistry instance
      protected void validatePermission​(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.String currentUser)  
      • Methods inherited from class org.springframework.extensions.webscripts.DeclarativeWebScript

        execute, executeFinallyImpl, executeImpl, 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 Detail

      • AbstractArchivedNodeWebScript

        public AbstractArchivedNodeWebScript()
    • Method Detail

      • setServiceRegistry

        public void setServiceRegistry​(org.alfresco.service.ServiceRegistry serviceRegistry)
        Sets the serviceRegistry instance
        Parameters:
        serviceRegistry - the serviceRegistry to set
      • setNodeArchiveService

        public void setNodeArchiveService​(org.alfresco.repo.node.archive.NodeArchiveService nodeArchiveService)
        Sets the nodeArchiveService instance
        Parameters:
        nodeArchiveService - the nodeArchiveService to set
      • setMaxSizeView

        public void setMaxSizeView​(int maxSizeView)
        Sets the maxSizeView
        Parameters:
        maxSizeView - the maxSizeView
      • parseRequestForStoreRef

        protected org.alfresco.service.cmr.repository.StoreRef parseRequestForStoreRef​(org.springframework.extensions.webscripts.WebScriptRequest req)
      • parseRequestForNodeRef

        protected org.alfresco.service.cmr.repository.NodeRef parseRequestForNodeRef​(org.springframework.extensions.webscripts.WebScriptRequest req)
      • getIntParameter

        protected int getIntParameter​(org.springframework.extensions.webscripts.WebScriptRequest req,
                                      java.lang.String paramName,
                                      int defaultValue)
        Retrieves the named parameter as an integer, if the parameter is not present the default value is returned
        Parameters:
        req - The WebScript request
        paramName - The name of parameter to look for
        defaultValue - The default value that should be returned if parameter is not present in request or if it is not positive
        Returns:
        The request parameter or default value
      • getArchivedNodesFrom

        protected org.alfresco.query.PagingResults<org.alfresco.service.cmr.repository.NodeRef> getArchivedNodesFrom​(org.alfresco.service.cmr.repository.StoreRef storeRef,
                                                                                                                     org.alfresco.util.ScriptPagingDetails paging,
                                                                                                                     java.lang.String filter)
        * This method gets all nodes from the archive which were originally contained within the specified StoreRef.
        Parameters:
        storeRef - mandatory store ref
        paging - mandatory paging
        filter - optional filter
      • validatePermission

        protected void validatePermission​(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                                          java.lang.String currentUser)