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.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
-
-
Field Summary
Fields Modifier and Type Field Description static String
ARCHIVED_BY
static String
ARCHIVED_DATE
static int
DEFAULT_MAX_ITEMS_PER_PAGE
static String
DELETED_NODES
static String
DESCRIPTION
static String
DISPLAY_PATH
static String
FIRST_NAME
static String
LAST_NAME
protected int
maxSizeView
static String
NAME
static String
NODE_TYPE
protected NodeArchiveService
nodeArchiveService
static String
NODEREF
protected ServiceRegistry
serviceRegistry
static String
TITLE
static String
USER_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<NodeRef>
getArchivedNodesFrom(StoreRef storeRef, ScriptPagingDetails paging, 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, String paramName, int defaultValue)
Retrieves the named parameter as an integer, if the parameter is not present the default value is returnedprotected NodeRef
parseRequestForNodeRef(org.springframework.extensions.webscripts.WebScriptRequest req)
protected StoreRef
parseRequestForStoreRef(org.springframework.extensions.webscripts.WebScriptRequest req)
void
setMaxSizeView(int maxSizeView)
Sets the maxSizeViewvoid
setNodeArchiveService(NodeArchiveService nodeArchiveService)
Sets the nodeArchiveService instancevoid
setServiceRegistry(ServiceRegistry serviceRegistry)
Sets the serviceRegistry instanceprotected void
validatePermission(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 ServiceRegistry serviceRegistry
-
nodeArchiveService
protected NodeArchiveService nodeArchiveService
-
maxSizeView
protected int maxSizeView
-
-
Method Detail
-
setServiceRegistry
public void setServiceRegistry(ServiceRegistry serviceRegistry)
Sets the serviceRegistry instance- Parameters:
serviceRegistry
- the serviceRegistry to set
-
setNodeArchiveService
public void setNodeArchiveService(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 StoreRef parseRequestForStoreRef(org.springframework.extensions.webscripts.WebScriptRequest req)
-
parseRequestForNodeRef
protected 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<NodeRef> getArchivedNodesFrom(StoreRef storeRef, 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
-
-