Class StoreRedirectorProxyFactory<I>

java.lang.Object
org.alfresco.repo.service.StoreRedirectorProxyFactory<I>
Type Parameters:
I - The component interface class
All Implemented Interfaces:
org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.InitializingBean

public class StoreRedirectorProxyFactory<I> extends Object implements org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.InitializingBean
This factory provides component redirection based on Store or Node References passed into the component. Redirection is driven by StoreRef and NodeRef parameters. If none are given in the method call, the default component is called. Otherwise, the store type is extracted from these parameters and the appropriate component called for the store type. An error is thrown if multiple store types are found.
Author:
David Caruana
  • Constructor Details

    • StoreRedirectorProxyFactory

      public StoreRedirectorProxyFactory()
  • Method Details

    • setProxyInterface

      public void setProxyInterface(Class<I> proxyInterface)
      Sets the proxy interface
      Parameters:
      proxyInterface - the proxy interface
    • setDefaultBinding

      public void setDefaultBinding(I defaultBinding)
      Sets the default component binding
      Parameters:
      defaultBinding - the component to call by default
    • setRedirectedProtocolBindings

      public void setRedirectedProtocolBindings(Map<String,I> protocolBindings)
      Sets the binding of store type (protocol string) to component
      Parameters:
      protocolBindings - the bindings
    • setRedirectedStoreBindings

      public void setRedirectedStoreBindings(Map<String,I> storeBindings)
      Sets the binding of store type (protocol string) to component
      Parameters:
      storeBindings - the bindings
    • afterPropertiesSet

      public void afterPropertiesSet() throws ServiceException
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      ServiceException
    • getObject

      public I getObject()
      Specified by:
      getObject in interface org.springframework.beans.factory.FactoryBean<I>
    • getObjectType

      public Class getObjectType()
      Specified by:
      getObjectType in interface org.springframework.beans.factory.FactoryBean<I>
    • isSingleton

      public boolean isSingleton()
      Specified by:
      isSingleton in interface org.springframework.beans.factory.FactoryBean<I>