Class SubsystemProxyFactory

java.lang.Object
org.springframework.aop.framework.ProxyConfig
org.springframework.aop.framework.AdvisedSupport
org.springframework.aop.framework.ProxyCreatorSupport
org.springframework.aop.framework.ProxyFactoryBean
org.alfresco.repo.management.subsystems.SubsystemProxyFactory
All Implemented Interfaces:
Serializable, org.springframework.aop.framework.Advised, org.springframework.aop.TargetClassAware, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.FactoryBean<Object>, org.springframework.context.ApplicationContextAware
Direct Known Subclasses:
CryptodocSubsystemProxyFactory

public class SubsystemProxyFactory extends org.springframework.aop.framework.ProxyFactoryBean implements org.springframework.context.ApplicationContextAware
A factory bean, normally used in conjunction with ChildApplicationContextFactory allowing selected interfaces in a child application context to be proxied by a bean in the parent application context. This allows 'hot-swapping' and reconfiguration of entire subsystems.
See Also:
  • Field Summary

    Fields inherited from class org.springframework.aop.framework.ProxyFactoryBean

    GLOBAL_SUFFIX, logger

    Fields inherited from class org.springframework.aop.framework.AdvisedSupport

    EMPTY_TARGET_SOURCE

    Fields inherited from interface org.springframework.beans.factory.FactoryBean

    OBJECT_TYPE_ATTRIBUTE
  • Constructor Summary

    Constructors
    Constructor
    Description
    Instantiates a new managed subsystem proxy factory.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected Object
    locateBean(org.aopalliance.intercept.MethodInvocation mi)
     
    void
    setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
     
    void
    setDefaultBean(Object defaultBean)
    Sets an optional default bean to be used if the target bean is not found.
    void
    setInterfaces(Class... interfaces)
     
    void
    Sets the source application context factory by reference
    void
    setSourceApplicationContextFactoryName(String sourceApplicationContextFactoryName)
    Sets the source application context factory by name.
    void
    setSourceBeanName(String sourceBeanName)
    Sets an optional bean name to target all calls to in the source application context.

    Methods inherited from class org.springframework.aop.framework.ProxyFactoryBean

    adviceChanged, getObject, getObjectType, getProxy, isSingleton, setAdvisorAdapterRegistry, setAutodetectInterfaces, setBeanClassLoader, setBeanFactory, setFrozen, setInterceptorNames, setProxyClassLoader, setProxyInterfaces, setSingleton, setTargetName

    Methods inherited from class org.springframework.aop.framework.ProxyCreatorSupport

    addListener, createAopProxy, getAopProxyFactory, isActive, removeListener, setAopProxyFactory

    Methods inherited from class org.springframework.aop.framework.AdvisedSupport

    addAdvice, addAdvice, addAdvisor, addAdvisor, addAdvisors, addAdvisors, addInterface, adviceIncluded, copyConfigurationFrom, copyConfigurationFrom, countAdvicesOfType, getAdvisorChainFactory, getAdvisorCount, getAdvisors, getAdvisorsInternal, getInterceptorsAndDynamicInterceptionAdvice, getProxiedInterfaces, getTargetClass, getTargetSource, indexOf, indexOf, isInterfaceProxied, isPreFiltered, removeAdvice, removeAdvisor, removeAdvisor, removeInterface, replaceAdvisor, setAdvisorChainFactory, setPreFiltered, setTarget, setTargetClass, setTargetSource, toProxyConfigString, toString

    Methods inherited from class org.springframework.aop.framework.ProxyConfig

    copyFrom, isExposeProxy, isFrozen, isOpaque, isOptimize, isProxyTargetClass, setExposeProxy, setOpaque, setOptimize, setProxyTargetClass

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.springframework.aop.framework.Advised

    isExposeProxy, isFrozen, isProxyTargetClass, setExposeProxy
  • Constructor Details

    • SubsystemProxyFactory

      public SubsystemProxyFactory()
      Instantiates a new managed subsystem proxy factory.
  • Method Details

    • setInterfaces

      public void setInterfaces(Class... interfaces)
      Overrides:
      setInterfaces in class org.springframework.aop.framework.AdvisedSupport
    • setSourceApplicationContextFactoryName

      public void setSourceApplicationContextFactoryName(String sourceApplicationContextFactoryName)
      Sets the source application context factory by name.
      Parameters:
      sourceApplicationContextFactoryName - the name of the sourceApplicationContextFactory to set
    • setSourceApplicationContextFactory

      public void setSourceApplicationContextFactory(ApplicationContextFactory sourceApplicationContextFactory)
      Sets the source application context factory by reference
      Parameters:
      sourceApplicationContextFactory - the sourceApplicationContextFactory to set
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • setSourceBeanName

      public void setSourceBeanName(String sourceBeanName)
      Sets an optional bean name to target all calls to in the source application context. If not set, an appropriate bean is looked up based on method class.
      Parameters:
      sourceBeanName - the sourceBeanName to set
    • setDefaultBean

      public void setDefaultBean(Object defaultBean)
      Sets an optional default bean to be used if the target bean is not found. Generally used when a subsystem does not exist.
      Parameters:
      defaultBean - the defaultBean to set
    • locateBean

      protected Object locateBean(org.aopalliance.intercept.MethodInvocation mi)