Package org.alfresco.repo.service
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 java.lang.Object implements org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.InitializingBeanThis 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 Summary
Constructors Constructor Description StoreRedirectorProxyFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()IgetObject()java.lang.ClassgetObjectType()booleanisSingleton()voidsetDefaultBinding(I defaultBinding)Sets the default component bindingvoidsetProxyInterface(java.lang.Class<I> proxyInterface)Sets the proxy interfacevoidsetRedirectedProtocolBindings(java.util.Map<java.lang.String,I> protocolBindings)Sets the binding of store type (protocol string) to componentvoidsetRedirectedStoreBindings(java.util.Map<java.lang.String,I> storeBindings)Sets the binding of store type (protocol string) to component
-
-
-
Method Detail
-
setProxyInterface
public void setProxyInterface(java.lang.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(java.util.Map<java.lang.String,I> protocolBindings)
Sets the binding of store type (protocol string) to component- Parameters:
protocolBindings- the bindings
-
setRedirectedStoreBindings
public void setRedirectedStoreBindings(java.util.Map<java.lang.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:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
ServiceException
-
getObject
public I getObject()
- Specified by:
getObjectin interfaceorg.springframework.beans.factory.FactoryBean<I>
-
getObjectType
public java.lang.Class getObjectType()
- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean<I>
-
isSingleton
public boolean isSingleton()
- Specified by:
isSingletonin interfaceorg.springframework.beans.factory.FactoryBean<I>
-
-