Class AbstractArchivedNodeWebScript
- java.lang.Object
-
- org.springframework.extensions.webscripts.AbstractWebScript
-
- org.springframework.extensions.webscripts.DeclarativeWebScript
-
- org.alfresco.repo.web.scripts.archive.AbstractArchivedNodeWebScript
-
- All Implemented Interfaces:
org.springframework.extensions.webscripts.WebScript
- Direct Known Subclasses:
ArchivedNodePut,ArchivedNodesDelete,ArchivedNodesGet
public abstract class AbstractArchivedNodeWebScript extends org.springframework.extensions.webscripts.DeclarativeWebScriptThis class is an abstract base class for the various webscript controllers in the NodeArchiveService.- Since:
- 3.5
- Author:
- Neil McErlean, Jamal Kaabi-Mofrad
-
-
Field Summary
Fields Modifier and Type Field Description static StringARCHIVED_BYstatic StringARCHIVED_DATEstatic intDEFAULT_MAX_ITEMS_PER_PAGEstatic StringDELETED_NODESstatic StringDESCRIPTIONstatic StringDISPLAY_PATHstatic StringFIRST_NAMEstatic StringLAST_NAMEprotected intmaxSizeViewstatic StringNAMEstatic StringNODE_TYPEprotected org.alfresco.repo.node.archive.NodeArchiveServicenodeArchiveServicestatic StringNODEREFprotected org.alfresco.service.ServiceRegistryserviceRegistrystatic StringTITLEstatic StringUSER_NAME
-
Constructor Summary
Constructors Constructor Description AbstractArchivedNodeWebScript()
-
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, String filter)* This method gets all nodes from the archive which were originally contained within the specified StoreRef.protected intgetIntParameter(org.springframework.extensions.webscripts.WebScriptRequest req, String paramName, int defaultValue)Retrieves the named parameter as an integer, if the parameter is not present the default value is returnedprotected org.alfresco.service.cmr.repository.NodeRefparseRequestForNodeRef(org.springframework.extensions.webscripts.WebScriptRequest req)protected org.alfresco.service.cmr.repository.StoreRefparseRequestForStoreRef(org.springframework.extensions.webscripts.WebScriptRequest req)voidsetMaxSizeView(int maxSizeView)Sets the maxSizeViewvoidsetNodeArchiveService(org.alfresco.repo.node.archive.NodeArchiveService nodeArchiveService)Sets the nodeArchiveService instancevoidsetServiceRegistry(org.alfresco.service.ServiceRegistry serviceRegistry)Sets the serviceRegistry instanceprotected voidvalidatePermission(org.alfresco.service.cmr.repository.NodeRef nodeRef, 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
-
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
TITLE
public static final String TITLE
- See Also:
- Constant Field Values
-
DESCRIPTION
public static final String DESCRIPTION
- See Also:
- Constant Field Values
-
NODEREF
public static final String NODEREF
- See Also:
- Constant Field Values
-
ARCHIVED_BY
public static final String ARCHIVED_BY
- See Also:
- Constant Field Values
-
ARCHIVED_DATE
public static final String ARCHIVED_DATE
- See Also:
- Constant Field Values
-
DISPLAY_PATH
public static final String DISPLAY_PATH
- See Also:
- Constant Field Values
-
USER_NAME
public static final String USER_NAME
- See Also:
- Constant Field Values
-
FIRST_NAME
public static final String FIRST_NAME
- See Also:
- Constant Field Values
-
LAST_NAME
public static final String LAST_NAME
- See Also:
- Constant Field Values
-
NODE_TYPE
public static final String NODE_TYPE
- See Also:
- Constant Field Values
-
DELETED_NODES
public static final String DELETED_NODES
- See Also:
- Constant Field Values
-
DEFAULT_MAX_ITEMS_PER_PAGE
public static final int DEFAULT_MAX_ITEMS_PER_PAGE
- See Also:
- Constant Field Values
-
serviceRegistry
protected org.alfresco.service.ServiceRegistry serviceRegistry
-
nodeArchiveService
protected org.alfresco.repo.node.archive.NodeArchiveService nodeArchiveService
-
maxSizeView
protected int maxSizeView
-
-
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, 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 requestparamName- The name of parameter to look fordefaultValue- 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, String filter)* This method gets all nodes from the archive which were originally contained within the specified StoreRef.- Parameters:
storeRef- mandatory store refpaging- mandatory pagingfilter- optional filter
-
validatePermission
protected void validatePermission(org.alfresco.service.cmr.repository.NodeRef nodeRef, String currentUser)
-
-