org.alfresco.repo.audit
Class BeanIdentifierImpl

java.lang.Object
  extended by org.alfresco.repo.audit.BeanIdentifierImpl
All Implemented Interfaces:
BeanIdentifier, org.springframework.beans.factory.BeanFactoryAware

public class BeanIdentifierImpl
extends java.lang.Object
implements BeanIdentifier, org.springframework.beans.factory.BeanFactoryAware

Lookup the name of a bean that is being audited by AuditMethodInterceptor.

Originally used to look up public services annotated with @PublicService, but has now been relaxed to be any bean that uses a proxy. For the method to be audited it still needs to be annotated with @Auditable.


Constructor Summary
BeanIdentifierImpl()
           
 
Method Summary
 java.lang.String getBeanName(org.aopalliance.intercept.MethodInvocation mi)
          Get the name of the bean (normally a service) for the method invocation.
 void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanIdentifierImpl

public BeanIdentifierImpl()
Method Detail

setBeanFactory

public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
                    throws org.springframework.beans.BeansException
Specified by:
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
Throws:
org.springframework.beans.BeansException

getBeanName

public java.lang.String getBeanName(org.aopalliance.intercept.MethodInvocation mi)
Get the name of the bean (normally a service) for the method invocation. Cache service name look up.

Specified by:
getBeanName in interface BeanIdentifier
Parameters:
mi - the method invocation
Returns:
Returns the name of the bean or null if it is not recognized


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