Class 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 the AuditService.
    Since:
    3.4
    Author:
    Derek Hulley
    • 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 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.Long getId​(org.springframework.extensions.webscripts.WebScriptRequest req)
      Get the entry id from the request.
      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

        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
    • Field Detail

      • PARAM_APPLICATION

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

        public static final java.lang.String PARAM_VALUE_TYPE
        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
      • 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_CLEARED

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

        public static final java.lang.String JSON_KEY_DELETED
        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
      • getId

        protected java.lang.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 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:
        DEFAULT_FROM_TIME
      • getParamToTime

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

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

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

        protected java.lang.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