Class AbstractAuditWebScript
- java.lang.Object
-
- org.springframework.extensions.webscripts.AbstractWebScript
-
- org.springframework.extensions.webscripts.DeclarativeWebScript
-
- org.alfresco.repo.web.scripts.audit.AbstractAuditWebScript
-
- All Implemented Interfaces:
org.springframework.extensions.webscripts.WebScript
- Direct Known Subclasses:
AuditClearPost
,AuditControlGet
,AuditControlPost
,AuditEntryDelete
,AuditQueryGet
public abstract class AbstractAuditWebScript extends org.springframework.extensions.webscripts.DeclarativeWebScript
Abstract implementation for scripts that access theAuditService
.- Since:
- 3.4
- Author:
- Derek Hulley
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description AbstractAuditWebScript()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getI18NMessage(String key, Object... args)
Return an I18N'd message for the given key or the key itself if not presentprotected Long
getId(org.springframework.extensions.webscripts.WebScriptRequest req)
Get the entry id from the request.protected String
getParamAppName(org.springframework.extensions.webscripts.WebScriptRequest req)
Get the application name from the request.protected boolean
getParamEnableDisable(org.springframework.extensions.webscripts.WebScriptRequest req)
protected boolean
getParamForward(org.springframework.extensions.webscripts.WebScriptRequest req)
protected Long
getParamFromId(org.springframework.extensions.webscripts.WebScriptRequest req)
protected Long
getParamFromTime(org.springframework.extensions.webscripts.WebScriptRequest req)
protected int
getParamLimit(org.springframework.extensions.webscripts.WebScriptRequest req)
protected String
getParamPath(org.springframework.extensions.webscripts.WebScriptRequest req)
Get the path from the request.protected Long
getParamToId(org.springframework.extensions.webscripts.WebScriptRequest req)
protected Long
getParamToTime(org.springframework.extensions.webscripts.WebScriptRequest req)
protected String
getParamUser(org.springframework.extensions.webscripts.WebScriptRequest req)
protected String
getParamValue(org.springframework.extensions.webscripts.WebScriptRequest req)
protected String
getParamValueType(org.springframework.extensions.webscripts.WebScriptRequest req)
protected boolean
getParamVerbose(org.springframework.extensions.webscripts.WebScriptRequest req)
void
setAuditService(org.alfresco.service.cmr.audit.AuditService auditService)
-
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
-
PARAM_APPLICATION
public static final String PARAM_APPLICATION
- See Also:
- Constant Field Values
-
PARAM_PATH
public static final String PARAM_PATH
- See Also:
- Constant Field Values
-
PARAM_ENABLE
public static final String PARAM_ENABLE
- See Also:
- Constant Field Values
-
PARAM_VALUE
public static final String PARAM_VALUE
- See Also:
- Constant Field Values
-
PARAM_VALUE_TYPE
public static final String PARAM_VALUE_TYPE
- See Also:
- Constant Field Values
-
PARAM_FROM_TIME
public static final String PARAM_FROM_TIME
- See Also:
- Constant Field Values
-
PARAM_TO_TIME
public static final String PARAM_TO_TIME
- See Also:
- Constant Field Values
-
PARAM_FROM_ID
public static final String PARAM_FROM_ID
- See Also:
- Constant Field Values
-
PARAM_TO_ID
public static final String PARAM_TO_ID
- See Also:
- Constant Field Values
-
PARAM_USER
public static final String PARAM_USER
- See Also:
- Constant Field Values
-
PARAM_FORWARD
public static final String PARAM_FORWARD
- See Also:
- Constant Field Values
-
PARAM_LIMIT
public static final String PARAM_LIMIT
- See Also:
- Constant Field Values
-
PARAM_VERBOSE
public static final String PARAM_VERBOSE
- See Also:
- Constant Field Values
-
DEFAULT_FROM_TIME
public static final Long DEFAULT_FROM_TIME
-
DEFAULT_TO_TIME
public static final Long DEFAULT_TO_TIME
-
DEFAULT_FROM_ID
public static final Long DEFAULT_FROM_ID
-
DEFAULT_TO_ID
public static final Long DEFAULT_TO_ID
-
DEFAULT_USER
public static final String DEFAULT_USER
-
DEFAULT_FORWARD
public static final boolean DEFAULT_FORWARD
- See Also:
- Constant Field Values
-
DEFAULT_LIMIT
public static final int DEFAULT_LIMIT
- See Also:
- Constant Field Values
-
DEFAULT_VERBOSE
public static final boolean DEFAULT_VERBOSE
- See Also:
- Constant Field Values
-
DEFAULT_ENABLE
public static final boolean DEFAULT_ENABLE
- See Also:
- Constant Field Values
-
JSON_KEY_ENABLED
public static final String JSON_KEY_ENABLED
- See Also:
- Constant Field Values
-
JSON_KEY_APPLICATIONS
public static final String JSON_KEY_APPLICATIONS
- See Also:
- Constant Field Values
-
JSON_KEY_NAME
public static final String JSON_KEY_NAME
- See Also:
- Constant Field Values
-
JSON_KEY_PATH
public static final String JSON_KEY_PATH
- See Also:
- Constant Field Values
-
JSON_KEY_CLEARED
public static final String JSON_KEY_CLEARED
- See Also:
- Constant Field Values
-
JSON_KEY_DELETED
public static final String JSON_KEY_DELETED
- See Also:
- Constant Field Values
-
JSON_KEY_ENTRY_COUNT
public static final String JSON_KEY_ENTRY_COUNT
- See Also:
- Constant Field Values
-
JSON_KEY_ENTRIES
public static final String JSON_KEY_ENTRIES
- See Also:
- Constant Field Values
-
JSON_KEY_ENTRY_ID
public static final String JSON_KEY_ENTRY_ID
- See Also:
- Constant Field Values
-
JSON_KEY_ENTRY_APPLICATION
public static final String JSON_KEY_ENTRY_APPLICATION
- See Also:
- Constant Field Values
-
JSON_KEY_ENTRY_USER
public static final String JSON_KEY_ENTRY_USER
- See Also:
- Constant Field Values
-
JSON_KEY_ENTRY_TIME
public static final String JSON_KEY_ENTRY_TIME
- See Also:
- Constant Field Values
-
JSON_KEY_ENTRY_VALUES
public static final String JSON_KEY_ENTRY_VALUES
- See Also:
- Constant Field Values
-
logger
protected final org.apache.commons.logging.Log logger
Logger that can be used by subclasses.
-
auditService
protected org.alfresco.service.cmr.audit.AuditService auditService
-
-
Method Detail
-
setAuditService
public void setAuditService(org.alfresco.service.cmr.audit.AuditService auditService)
- Parameters:
auditService
- the service that provides the actual data
-
getI18NMessage
protected String getI18NMessage(String key, Object... args)
Return an I18N'd message for the given key or the key itself if not present- Parameters:
args
- arguments to replace the variables in the message
-
getParamAppName
protected final String getParamAppName(org.springframework.extensions.webscripts.WebScriptRequest req)
Get the application name from the request.- Returns:
- Returns the application name or null if not present
-
getId
protected Long getId(org.springframework.extensions.webscripts.WebScriptRequest req)
Get the entry id from the request.- Returns:
- Returns the id or null if not present
-
getParamPath
protected String getParamPath(org.springframework.extensions.webscripts.WebScriptRequest req)
Get the path from the request.- Returns:
- Returns the path or null if not present
-
getParamEnableDisable
protected boolean getParamEnableDisable(org.springframework.extensions.webscripts.WebScriptRequest req)
-
getParamValue
protected String getParamValue(org.springframework.extensions.webscripts.WebScriptRequest req)
-
getParamValueType
protected String getParamValueType(org.springframework.extensions.webscripts.WebScriptRequest req)
-
getParamFromTime
protected Long getParamFromTime(org.springframework.extensions.webscripts.WebScriptRequest req)
- See Also:
DEFAULT_FROM_TIME
-
getParamToTime
protected Long getParamToTime(org.springframework.extensions.webscripts.WebScriptRequest req)
- See Also:
DEFAULT_TO_TIME
-
getParamFromId
protected Long getParamFromId(org.springframework.extensions.webscripts.WebScriptRequest req)
- See Also:
DEFAULT_FROM_ID
-
getParamToId
protected Long getParamToId(org.springframework.extensions.webscripts.WebScriptRequest req)
- See Also:
DEFAULT_TO_ID
-
getParamUser
protected String getParamUser(org.springframework.extensions.webscripts.WebScriptRequest req)
- See Also:
DEFAULT_USER
-
getParamForward
protected boolean getParamForward(org.springframework.extensions.webscripts.WebScriptRequest req)
- See Also:
DEFAULT_FORWARD
-
getParamLimit
protected int getParamLimit(org.springframework.extensions.webscripts.WebScriptRequest req)
- See Also:
DEFAULT_LIMIT
-
getParamVerbose
protected boolean getParamVerbose(org.springframework.extensions.webscripts.WebScriptRequest req)
- See Also:
DEFAULT_VERBOSE
-
-