org.alfresco.service.cmr.audit
Interface AuditService

All Known Implementing Classes:
AuditServiceImpl

@PublicService
public interface AuditService

The public API by which applications can create audit entries. This does not affect auditing using method interceptors. The information recorded can not be confused between the two. This API could be used by an audit action.


Nested Class Summary
static interface AuditService.AuditQueryCallback
          The interface that will be used to give query results to the calling code.
 
Method Summary
 void audit(java.lang.String source, java.lang.String description)
          Add an application audit entry.
 void audit(java.lang.String source, java.lang.String description, NodeRef key)
           
 void audit(java.lang.String source, java.lang.String description, NodeRef key, java.lang.Object[] args)
           
 void audit(java.lang.String source, java.lang.String description, java.lang.Object[] args)
           
 void auditQuery(AuditService.AuditQueryCallback callback, AuditQueryParameters parameters, int maxResults)
          Issue an audit query using the given parameters and consuming results in the callback.
 void auditQuery(AuditService.AuditQueryCallback callback, boolean forward, java.lang.String applicationName, java.lang.String user, java.lang.Long from, java.lang.Long to, int maxResults)
          Deprecated. Use #auditQuery(AuditQueryCallback, AuditQueryParameters)
 void auditQuery(AuditService.AuditQueryCallback callback, boolean forward, java.lang.String applicationName, java.lang.String user, java.lang.Long from, java.lang.Long to, java.lang.String searchKey, java.io.Serializable searchValue, int maxResults)
          Deprecated. Use #auditQuery(AuditQueryCallback, AuditQueryParameters)
 void clearAudit(java.lang.String applicationName)
          Remove all audit entries for the given application
 void disableAudit(java.lang.String applicationName, java.lang.String path)
          Disable auditing for an application path
 void enableAudit(java.lang.String applicationName, java.lang.String path)
          Enable auditing for an application path
 java.util.List getAuditTrail(NodeRef nodeRef)
          Get the audit trail for a node ref.
 boolean isAuditEnabled(java.lang.String applicationName, java.lang.String path)
           
 

Method Detail

audit

@NotAuditable
void audit(java.lang.String source,
                        java.lang.String description)
Add an application audit entry.

Parameters:
source - - a string that represents the application
description - - the audit entry

audit

@NotAuditable
void audit(java.lang.String source,
                        java.lang.String description,
                        NodeRef key)
Parameters:
source - - a string that represents the application
description - - the audit entry
key - - a node ref to use as the key for filtering etc

audit

@NotAuditable
void audit(java.lang.String source,
                        java.lang.String description,
                        java.lang.Object[] args)
Parameters:
source - - a string that represents the application
description - - the audit entry
args - - an arbitrary list of parameters

audit

@NotAuditable
void audit(java.lang.String source,
                        java.lang.String description,
                        NodeRef key,
                        java.lang.Object[] args)
Parameters:
source - - a string that represents the application
description - - the audit entry *
key - - a node ref to use as the key for filtering etc
args - - an arbitrary list of parameters

getAuditTrail

@NotAuditable
java.util.List getAuditTrail(NodeRef nodeRef)
Get the audit trail for a node ref.

Parameters:
nodeRef - - the node ref for which to get the audit trail.
Returns:
- tha audit trail

isAuditEnabled

boolean isAuditEnabled(java.lang.String applicationName,
                       java.lang.String path)
Parameters:
applicationName - the name of the application to check
path - the path to check
Returns:
Returns true if auditing is enabled for the given path
Since:
3.2

enableAudit

void enableAudit(java.lang.String applicationName,
                 java.lang.String path)
Enable auditing for an application path

Parameters:
applicationName - the name of the application to check
path - the path to enable
Since:
3.2

disableAudit

void disableAudit(java.lang.String applicationName,
                  java.lang.String path)
Disable auditing for an application path

Parameters:
applicationName - the name of the application to check
path - the path to disable
Since:
3.2

clearAudit

void clearAudit(java.lang.String applicationName)
Remove all audit entries for the given application

Parameters:
applicationName - the name of the application for which to remove entries
Since:
3.2

auditQuery

void auditQuery(AuditService.AuditQueryCallback callback,
                AuditQueryParameters parameters,
                int maxResults)
Issue an audit query using the given parameters and consuming results in the callback.

Parameters:
callback - the callback that will handle results
parameters - the parameters for the query (may not be null)
maxResults - the maximum number of results to retrieve (zero or negative to ignore)
Since:
3.3

auditQuery

void auditQuery(AuditService.AuditQueryCallback callback,
                boolean forward,
                java.lang.String applicationName,
                java.lang.String user,
                java.lang.Long from,
                java.lang.Long to,
                int maxResults)
Deprecated. Use #auditQuery(AuditQueryCallback, AuditQueryParameters)

Get the audit entries that match the given criteria.

Parameters:
callback - the callback that will handle results
forward - true for results to ordered from first to last, or false to order from last to first
applicationName - if not null, find entries logged against this application
user - if not null, find entries logged against this user
from - the start search time (null to start at the beginning)
to - the end search time (null for no limit)
maxResults - the maximum number of results to retrieve (zero or negative to ignore)
Since:
3.2

auditQuery

void auditQuery(AuditService.AuditQueryCallback callback,
                boolean forward,
                java.lang.String applicationName,
                java.lang.String user,
                java.lang.Long from,
                java.lang.Long to,
                java.lang.String searchKey,
                java.io.Serializable searchValue,
                int maxResults)
Deprecated. Use #auditQuery(AuditQueryCallback, AuditQueryParameters)

Get the audit entries that match the given criteria.

Parameters:
callback - the callback that will handle results
forward - true for results to ordered from first to last, or false to order from last to first
applicationName - if not null, find entries logged against this application
user - if not null, find entries logged against this user
from - the start search time (null to start at the beginning)
to - the end search time (null for no limit)
searchKey - the audit key path that must exist (null to ignore)
searchValue - an audit value that must exist (null to ignore)
maxResults - the maximum number of results to retrieve (zero or negative to ignore)
Since:
3.2


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