public class DefaultChildApplicationContextManager extends AbstractPropertyBackedBean implements ChildApplicationContextManager
ChildApplicationContextManager
implementation that manages a 'chain' of
ChildApplicationContextFactory
objects, perhaps corresponding to the components of a chained subsystem such
as authentication. As with other PropertyBackedBean
s, can be stopped, reconfigured, started and tested. Its
one special chain
property allows an ordered list of ChildApplicationContextFactory
objects to
be managed. This property is a comma separated list with the format:
ChildApplicationContextManager
for the meanings of <id> and <typeName>. In the enterprise edition,
this property is editable at runtime via JMX. If a new <id> is included in the list then a new
ChildApplicationContextFactory
will be brought into existence. Similarly, if one is removed from the list,
then the corresponding instance will be destroyed. For Alfresco community edition, the chain is best configured
through the method via Spring configuration.Modifier and Type | Class and Description |
---|---|
protected class |
DefaultChildApplicationContextManager.ApplicationContextManagerState
The Class ApplicationContextManagerState.
|
AbstractPropertyBackedBean.DefaultResolver, AbstractPropertyBackedBean.RuntimeState
DEFAULT_INSTANCE_NAME, lock, runtimeState
Constructor and Description |
---|
DefaultChildApplicationContextManager()
Instantiates a new default child application context manager.
|
Modifier and Type | Method and Description |
---|---|
protected PropertyBackedBeanState |
createInitialState()
Creates the initial state.
|
void |
destroy(boolean permanent)
Releases any resources held by this component.
|
org.springframework.context.ApplicationContext |
getApplicationContext(String id)
Gets the application context with the given identifier.
|
ChildApplicationContextFactory |
getChildApplicationContextFactory(String id) |
String |
getDescription(String name)
Gets a Human readable description of the property, e.g.
|
Collection<String> |
getInstanceIds()
Gets the ordered collection of identifiers, indicating the ordering of the chain.
|
void |
setDefaultChain(String defaultChain)
Configures the default chain of
ChildApplicationContextFactory instances. |
void |
setDefaultTypeName(String defaultTypeName)
Sets the default type name.
|
afterPropertiesSet, applyDefaultOverrides, destroy, doInit, getCategory, 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
public DefaultChildApplicationContextManager()
public void setDefaultTypeName(String defaultTypeName)
defaultTypeName
- the new default type namepublic void setDefaultChain(String defaultChain)
ChildApplicationContextFactory
instances. May be set on initialization by
the Spring container.defaultChain
- a comma separated list in the following format:
public String getDescription(String name)
AbstractPropertyBackedBean
getDescription
in interface PropertyBackedBean
getDescription
in class AbstractPropertyBackedBean
name
- the namepublic void destroy(boolean permanent)
AbstractPropertyBackedBean
destroy
in class AbstractPropertyBackedBean
permanent
- is the component being destroyed forever, i.e. should persisted values be removed? On server shutdown,
this value would be false
, whereas on the removal of a dynamically created instance, this
value would be true
.protected PropertyBackedBeanState createInitialState() throws IOException
AbstractPropertyBackedBean
createInitialState
in class AbstractPropertyBackedBean
IOException
- Signals that an I/O exception has occurred.public Collection<String> getInstanceIds()
ChildApplicationContextManager
getInstanceIds
in interface ChildApplicationContextManager
public org.springframework.context.ApplicationContext getApplicationContext(String id)
ChildApplicationContextManager
getApplicationContext
in interface ChildApplicationContextManager
id
- the identifier of the application context to retrievepublic ChildApplicationContextFactory getChildApplicationContextFactory(String id)
Copyright © 2005–2017 Alfresco Software. All rights reserved.