Class BeanIdentifierImpl

  • All Implemented Interfaces:
    BeanIdentifier, org.springframework.beans.factory.Aware, 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.

    Author:
    Andy Hind, David Ward, Alan Davis
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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