org.alfresco.repo.audit
Class AuditComponentImpl

java.lang.Object
  extended by org.alfresco.repo.audit.AuditComponentImpl
All Implemented Interfaces:
AuditComponent

public class AuditComponentImpl
extends java.lang.Object
implements AuditComponent

The default audit component implementation. TODO: Implement before, after and exception filtering. At the moment these filters are ignored. TODO: Respect audit internal - at the moment audit internal is fixed to false.


Constructor Summary
AuditComponentImpl()
          Default constructor
 
Method Summary
 java.lang.Object audit(org.aopalliance.intercept.MethodInvocation mi)
          Audit entry point for method interceptors.
 void audit(java.lang.String source, java.lang.String description, NodeRef key, java.lang.Object[] args)
          A simple audit entry Currently we ignore filtering here.
 java.lang.Object auditImpl(org.aopalliance.intercept.MethodInvocation mi)
          Internal audit of a method invocation
 java.util.List getAuditTrail(NodeRef nodeRef)
          Get the audit trail for a node.
 void setAuditConfiguration(AuditConfiguration auditConfiguration)
          Set the audit configuration.
 void setAuditDAO(AuditDAO auditDAO)
          Set the DAO for recording auditable information when no exception occurs.
 void setAuditModel(AuditModel auditModel)
          Set the audit model.
 void setNamespacePrefixResolver(NamespacePrefixResolver namespacePrefixResolver)
          Set the namespacePrefixResolver.
 void setNodeService(NodeService nodeService)
          Set the NodeService for path extracting.
 void setPublicServiceIdentifier(PublicServiceIdentifier publicServiceIdentifier)
          Set the helper used to identify public services
 void setTransactionService(TransactionService transactionService)
          Set the DAO for recording failed actions - this is done in another transaction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuditComponentImpl

public AuditComponentImpl()
Default constructor

Method Detail

setAuditDAO

public void setAuditDAO(AuditDAO auditDAO)
Set the DAO for recording auditable information when no exception occurs.

Parameters:
auditDAO -

setTransactionService

public void setTransactionService(TransactionService transactionService)
Set the DAO for recording failed actions - this is done in another transaction.

Parameters:
auditFailedDAO -

setNodeService

public void setNodeService(NodeService nodeService)
Set the NodeService for path extracting.

Parameters:
nodeService -

setAuditConfiguration

public void setAuditConfiguration(AuditConfiguration auditConfiguration)
Set the audit configuration.

Parameters:
auditConfiguration -

setPublicServiceIdentifier

public void setPublicServiceIdentifier(PublicServiceIdentifier publicServiceIdentifier)
Set the helper used to identify public services

Parameters:
publicServiceIdentifier -

setAuditModel

public void setAuditModel(AuditModel auditModel)
Set the audit model.

Parameters:
auditModel -

setNamespacePrefixResolver

public void setNamespacePrefixResolver(NamespacePrefixResolver namespacePrefixResolver)
Set the namespacePrefixResolver.

Parameters:
namespacePrefixResolver -

audit

public java.lang.Object audit(org.aopalliance.intercept.MethodInvocation mi)
                       throws java.lang.Throwable
Description copied from interface: AuditComponent
Audit entry point for method interceptors.

Specified by:
audit in interface AuditComponent
Returns:
- the return onbject from the normal invocation of the audited method.
Throws:
java.lang.Throwable

auditImpl

public java.lang.Object auditImpl(org.aopalliance.intercept.MethodInvocation mi)
                           throws java.lang.Throwable
Internal audit of a method invocation

Parameters:
mi - - the method to audit
Returns:
- the return object from the audited method
Throws:
java.lang.Throwable - - any Throwable that can be thrown by th audtied method.

audit

public void audit(java.lang.String source,
                  java.lang.String description,
                  NodeRef key,
                  java.lang.Object[] args)
A simple audit entry Currently we ignore filtering here.

Specified by:
audit in interface AuditComponent
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

public java.util.List getAuditTrail(NodeRef nodeRef)
Description copied from interface: AuditComponent
Get the audit trail for a node.

Specified by:
getAuditTrail in interface AuditComponent
Parameters:
nodeRef - - the node ref for which we want the audit trail
Returns:
- a list of AuditInfo objects that represent the audit trail for the given node reference.


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