Class SwitchableApplicationContextFactory
- java.lang.Object
-
- org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean
-
- org.alfresco.repo.management.subsystems.SwitchableApplicationContextFactory
-
- All Implemented Interfaces:
java.util.EventListener,ApplicationContextFactory,PropertyBackedBean,PropertyBackedBeanState,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
- Direct Known Subclasses:
CryptodocSwitchableApplicationContextFactory
public class SwitchableApplicationContextFactory extends AbstractPropertyBackedBean implements ApplicationContextFactory
A configurable proxy for a set ofApplicationContextFactorybeans that allows dynamic selection of one or more alternative subsystems via asourceBeanNameproperty. As with otherPropertyBackedBeans, can be stopped, reconfigured, started and tested.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classSwitchableApplicationContextFactory.SwitchableStateRepresents the state of aSwitchableApplicationContextFactory.-
Nested classes/interfaces inherited from class org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean
AbstractPropertyBackedBean.DefaultResolver, AbstractPropertyBackedBean.RuntimeState
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringsourceBeanNameThe default bean name of the sourceApplicationContextFactory.-
Fields inherited from class org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean
DEFAULT_INSTANCE_NAME, lock, runtimeState
-
-
Constructor Summary
Constructors Constructor Description SwitchableApplicationContextFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PropertyBackedBeanStatecreateInitialState()Creates the initial state.org.springframework.context.ApplicationContextgetApplicationContext()Gets the application context, configured according to the properties of the factory.java.lang.StringgetCurrentSourceBeanName()voidsetSourceBeanName(java.lang.String sourceBeanName)Sets the default bean name of the sourceApplicationContextFactory.-
Methods inherited from class org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean
afterPropertiesSet, applyDefaultOverrides, destroy, destroy, doInit, getCategory, getDescription, getEncryptedPropertyDefaults, getId, getInstancePath, getParent, getProperty, getPropertyDefaults, getPropertyNames, getRegistry, getState, init, isUpdateable, onApplicationEvent, performEarlyPropertyChecks, removeProperties, removeProperty, resolveDefault, revert, setApplicationContext, setAutoStart, setBeanName, setCategory, setEarlyPropertyCheckers, setEncryptedPropertyDefaults, setInstancePath, setProperties, setProperty, setPropertyDefaults, setRegistry, setSaveSetProperty, start, start, stop, stop
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.alfresco.repo.management.subsystems.PropertyBackedBean
getDescription, getId, isUpdateable, removeProperties, revert, setProperties
-
Methods inherited from interface org.alfresco.repo.management.subsystems.PropertyBackedBeanState
getProperty, getPropertyNames, removeProperty, setProperty, start, stop
-
-
-
-
Field Detail
-
sourceBeanName
protected java.lang.String sourceBeanName
The default bean name of the sourceApplicationContextFactory.
-
-
Method Detail
-
setSourceBeanName
public void setSourceBeanName(java.lang.String sourceBeanName)
Sets the default bean name of the sourceApplicationContextFactory.- Parameters:
sourceBeanName- the bean name
-
getCurrentSourceBeanName
public java.lang.String getCurrentSourceBeanName()
-
getApplicationContext
public org.springframework.context.ApplicationContext getApplicationContext()
Description copied from interface:ApplicationContextFactoryGets the application context, configured according to the properties of the factory.- Specified by:
getApplicationContextin interfaceApplicationContextFactory- Returns:
- the application context
-
createInitialState
protected PropertyBackedBeanState createInitialState() throws java.io.IOException
Description copied from class:AbstractPropertyBackedBeanCreates the initial state.- Specified by:
createInitialStatein classAbstractPropertyBackedBean- Returns:
- the property backed bean state
- Throws:
java.io.IOException- Signals that an I/O exception has occurred.
-
-