org.alfresco.repo.service
Class StoreRedirectorProxyFactory

java.lang.Object
  extended by org.alfresco.repo.service.StoreRedirectorProxyFactory
All Implemented Interfaces:
org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.InitializingBean

public class StoreRedirectorProxyFactory
extends java.lang.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.


Constructor Summary
StoreRedirectorProxyFactory()
           
 
Method Summary
 void afterPropertiesSet()
           
 java.lang.Object getObject()
           
 java.lang.Class getObjectType()
           
 boolean isSingleton()
           
 void setDefaultBinding(java.lang.Object defaultBinding)
          Sets the default component binding
 void setProxyInterface(java.lang.Class proxyInterface)
          Sets the proxy interface
 void setRedirectedProtocolBindings(java.util.Map protocolBindings)
          Sets the binding of store type (protocol string) to component
 void setRedirectedStoreBindings(java.util.Map storeBindings)
          Sets the binding of store type (protocol string) to component
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StoreRedirectorProxyFactory

public StoreRedirectorProxyFactory()
Method Detail

setProxyInterface

public void setProxyInterface(java.lang.Class proxyInterface)
Sets the proxy interface

Parameters:
proxyInterface - the proxy interface

setDefaultBinding

public void setDefaultBinding(java.lang.Object defaultBinding)
Sets the default component binding

Parameters:
binding - the component to call by default

setRedirectedProtocolBindings

public void setRedirectedProtocolBindings(java.util.Map protocolBindings)
Sets the binding of store type (protocol string) to component

Parameters:
bindings - the bindings

setRedirectedStoreBindings

public void setRedirectedStoreBindings(java.util.Map storeBindings)
Sets the binding of store type (protocol string) to component

Parameters:
bindings - the bindings

afterPropertiesSet

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

getObject

public java.lang.Object getObject()
Specified by:
getObject in interface org.springframework.beans.factory.FactoryBean

getObjectType

public java.lang.Class getObjectType()
Specified by:
getObjectType in interface org.springframework.beans.factory.FactoryBean

isSingleton

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


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.