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 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
-
Field Summary
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanvoidsetDefaultBinding(I defaultBinding) Sets the default component bindingvoidsetProxyInterface(Class<I> proxyInterface) Sets the proxy interfacevoidsetRedirectedProtocolBindings(Map<String, I> protocolBindings) Sets the binding of store type (protocol string) to componentvoidsetRedirectedStoreBindings(Map<String, I> storeBindings) Sets the binding of store type (protocol string) to component
-
Constructor Details
-
StoreRedirectorProxyFactory
public StoreRedirectorProxyFactory()
-
-
Method Details
-
setProxyInterface
Sets the proxy interface- Parameters:
proxyInterface- the proxy interface
-
setDefaultBinding
Sets the default component binding- Parameters:
defaultBinding- the component to call by default
-
setRedirectedProtocolBindings
Sets the binding of store type (protocol string) to component- Parameters:
protocolBindings- the bindings
-
setRedirectedStoreBindings
Sets the binding of store type (protocol string) to component- Parameters:
storeBindings- the bindings
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
ServiceException
-
getObject
- Specified by:
getObjectin interfaceorg.springframework.beans.factory.FactoryBean<I>
-
getObjectType
- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean<I>
-
isSingleton
public boolean isSingleton()- Specified by:
isSingletonin interfaceorg.springframework.beans.factory.FactoryBean<I>
-