org.alfresco.repo.web.scripts.audit
Class AbstractAuditWebScript

java.lang.Object
  extended by org.springframework.extensions.webscripts.AbstractWebScript
      extended by org.springframework.extensions.webscripts.DeclarativeWebScript
          extended by org.alfresco.repo.web.scripts.audit.AbstractAuditWebScript
All Implemented Interfaces:
org.springframework.extensions.webscripts.WebScript
Direct Known Subclasses:
AuditClearPost, AuditControlGet, AuditControlPost, AuditQueryGet

public abstract class AbstractAuditWebScript
extends org.springframework.extensions.webscripts.DeclarativeWebScript

Abstract implementation for scripts that access the AuditService.

Since:
3.4

Nested Class Summary
 
Nested classes/interfaces inherited from class org.springframework.extensions.webscripts.AbstractWebScript
org.springframework.extensions.webscripts.AbstractWebScript.ScriptDetails
 
Field Summary
protected  org.alfresco.service.cmr.audit.AuditService auditService
           
static boolean DEFAULT_FORWARD
           
static java.lang.Long DEFAULT_FROM_ID
           
static java.lang.Long DEFAULT_FROM_TIME
           
static int DEFAULT_LIMIT
           
static java.lang.Long DEFAULT_TO_ID
           
static java.lang.Long DEFAULT_TO_TIME
           
static java.lang.String DEFAULT_USER
           
static boolean DEFAULT_VERBOSE
           
static java.lang.String JSON_KEY_APPLICATIONS
           
static java.lang.String JSON_KEY_CLEARED
           
static java.lang.String JSON_KEY_ENABLED
           
static java.lang.String JSON_KEY_ENTRIES
           
static java.lang.String JSON_KEY_ENTRY_APPLICATION
           
static java.lang.String JSON_KEY_ENTRY_COUNT
           
static java.lang.String JSON_KEY_ENTRY_ID
           
static java.lang.String JSON_KEY_ENTRY_TIME
           
static java.lang.String JSON_KEY_ENTRY_USER
           
static java.lang.String JSON_KEY_ENTRY_VALUES
           
static java.lang.String JSON_KEY_NAME
           
static java.lang.String JSON_KEY_PATH
           
protected  org.apache.commons.logging.Log logger
          Logger that can be used by subclasses.
static java.lang.String PARAM_APPLICATION
           
static java.lang.String PARAM_ENABLE
           
static java.lang.String PARAM_FORWARD
           
static java.lang.String PARAM_FROM_ID
           
static java.lang.String PARAM_FROM_TIME
           
static java.lang.String PARAM_LIMIT
           
static java.lang.String PARAM_PATH
           
static java.lang.String PARAM_TO_ID
           
static java.lang.String PARAM_TO_TIME
           
static java.lang.String PARAM_USER
           
static java.lang.String PARAM_VALUE
           
static java.lang.String PARAM_VALUE_TYPE
           
static java.lang.String PARAM_VERBOSE
           
 
Constructor Summary
AbstractAuditWebScript()
           
 
Method Summary
protected  java.lang.String getI18NMessage(java.lang.String key, java.lang.Object[] args)
          Return an I18N'd message for the given key or the key itself if not present
protected  java.lang.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  java.lang.Long getParamFromId(org.springframework.extensions.webscripts.WebScriptRequest req)
           
protected  java.lang.Long getParamFromTime(org.springframework.extensions.webscripts.WebScriptRequest req)
           
protected  int getParamLimit(org.springframework.extensions.webscripts.WebScriptRequest req)
           
protected  java.lang.String getParamPath(org.springframework.extensions.webscripts.WebScriptRequest req)
          Get the path from the request.
protected  java.lang.Long getParamToId(org.springframework.extensions.webscripts.WebScriptRequest req)
           
protected  java.lang.Long getParamToTime(org.springframework.extensions.webscripts.WebScriptRequest req)
           
protected  java.lang.String getParamUser(org.springframework.extensions.webscripts.WebScriptRequest req)
           
protected  java.lang.String getParamValue(org.springframework.extensions.webscripts.WebScriptRequest req)
           
protected  java.lang.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
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
 

Field Detail

PARAM_APPLICATION

public static final java.lang.String PARAM_APPLICATION
See Also:
Constant Field Values

PARAM_PATH

public static final java.lang.String PARAM_PATH
See Also:
Constant Field Values

PARAM_ENABLE

public static final java.lang.String PARAM_ENABLE
See Also:
Constant Field Values

PARAM_VALUE

public static final java.lang.String PARAM_VALUE
See Also:
Constant Field Values

PARAM_VALUE_TYPE

public static final java.lang.String PARAM_VALUE_TYPE
See Also:
Constant Field Values

PARAM_FROM_TIME

public static final java.lang.String PARAM_FROM_TIME
See Also:
Constant Field Values

PARAM_TO_TIME

public static final java.lang.String PARAM_TO_TIME
See Also:
Constant Field Values

PARAM_FROM_ID

public static final java.lang.String PARAM_FROM_ID
See Also:
Constant Field Values

PARAM_TO_ID

public static final java.lang.String PARAM_TO_ID
See Also:
Constant Field Values

PARAM_USER

public static final java.lang.String PARAM_USER
See Also:
Constant Field Values

PARAM_FORWARD

public static final java.lang.String PARAM_FORWARD
See Also:
Constant Field Values

PARAM_LIMIT

public static final java.lang.String PARAM_LIMIT
See Also:
Constant Field Values

PARAM_VERBOSE

public static final java.lang.String PARAM_VERBOSE
See Also:
Constant Field Values

DEFAULT_FROM_TIME

public static final java.lang.Long DEFAULT_FROM_TIME

DEFAULT_TO_TIME

public static final java.lang.Long DEFAULT_TO_TIME

DEFAULT_FROM_ID

public static final java.lang.Long DEFAULT_FROM_ID

DEFAULT_TO_ID

public static final java.lang.Long DEFAULT_TO_ID

DEFAULT_USER

public static final java.lang.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

JSON_KEY_ENABLED

public static final java.lang.String JSON_KEY_ENABLED
See Also:
Constant Field Values

JSON_KEY_APPLICATIONS

public static final java.lang.String JSON_KEY_APPLICATIONS
See Also:
Constant Field Values

JSON_KEY_NAME

public static final java.lang.String JSON_KEY_NAME
See Also:
Constant Field Values

JSON_KEY_PATH

public static final java.lang.String JSON_KEY_PATH
See Also:
Constant Field Values

JSON_KEY_CLEARED

public static final java.lang.String JSON_KEY_CLEARED
See Also:
Constant Field Values

JSON_KEY_ENTRY_COUNT

public static final java.lang.String JSON_KEY_ENTRY_COUNT
See Also:
Constant Field Values

JSON_KEY_ENTRIES

public static final java.lang.String JSON_KEY_ENTRIES
See Also:
Constant Field Values

JSON_KEY_ENTRY_ID

public static final java.lang.String JSON_KEY_ENTRY_ID
See Also:
Constant Field Values

JSON_KEY_ENTRY_APPLICATION

public static final java.lang.String JSON_KEY_ENTRY_APPLICATION
See Also:
Constant Field Values

JSON_KEY_ENTRY_USER

public static final java.lang.String JSON_KEY_ENTRY_USER
See Also:
Constant Field Values

JSON_KEY_ENTRY_TIME

public static final java.lang.String JSON_KEY_ENTRY_TIME
See Also:
Constant Field Values

JSON_KEY_ENTRY_VALUES

public static final java.lang.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
Constructor Detail

AbstractAuditWebScript

public AbstractAuditWebScript()
Method Detail

setAuditService

public void setAuditService(org.alfresco.service.cmr.audit.AuditService auditService)
Parameters:
auditService - the service that provides the actual data

getI18NMessage

protected java.lang.String getI18NMessage(java.lang.String key,
                                          java.lang.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 java.lang.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

getParamPath

protected java.lang.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 java.lang.String getParamValue(org.springframework.extensions.webscripts.WebScriptRequest req)

getParamValueType

protected java.lang.String getParamValueType(org.springframework.extensions.webscripts.WebScriptRequest req)

getParamFromTime

protected java.lang.Long getParamFromTime(org.springframework.extensions.webscripts.WebScriptRequest req)
See Also:
AbstractAuditWebScript.DEFAULT_FROM_TIME

getParamToTime

protected java.lang.Long getParamToTime(org.springframework.extensions.webscripts.WebScriptRequest req)
See Also:
AbstractAuditWebScript.DEFAULT_TO_TIME

getParamFromId

protected java.lang.Long getParamFromId(org.springframework.extensions.webscripts.WebScriptRequest req)
See Also:
AbstractAuditWebScript.DEFAULT_FROM_ID

getParamToId

protected java.lang.Long getParamToId(org.springframework.extensions.webscripts.WebScriptRequest req)
See Also:
AbstractAuditWebScript.DEFAULT_TO_ID

getParamUser

protected java.lang.String getParamUser(org.springframework.extensions.webscripts.WebScriptRequest req)
See Also:
AbstractAuditWebScript.DEFAULT_USER

getParamForward

protected boolean getParamForward(org.springframework.extensions.webscripts.WebScriptRequest req)
See Also:
AbstractAuditWebScript.DEFAULT_FORWARD

getParamLimit

protected int getParamLimit(org.springframework.extensions.webscripts.WebScriptRequest req)
See Also:
AbstractAuditWebScript.DEFAULT_LIMIT

getParamVerbose

protected boolean getParamVerbose(org.springframework.extensions.webscripts.WebScriptRequest req)
See Also:
AbstractAuditWebScript.DEFAULT_VERBOSE


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.