Class CompositeDataBean
- java.lang.Object
-
- org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean
-
- org.alfresco.repo.management.subsystems.CompositeDataBean
-
- All Implemented Interfaces:
java.util.EventListener,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>
public class CompositeDataBean extends AbstractPropertyBackedBean
A class that wraps an instance of a Java Bean class declared as a composite property type onChildApplicationContextFactorymaking it configurable, either through alfresco-global.properties or a JMX console.- Author:
- dward
- See Also:
ChildApplicationContextFactory
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classCompositeDataBean.CompositeDataBeanStateThe Class CompositeDataBeanState.-
Nested classes/interfaces inherited from class org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean
AbstractPropertyBackedBean.DefaultResolver, AbstractPropertyBackedBean.RuntimeState
-
-
Field Summary
-
Fields inherited from class org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean
DEFAULT_INSTANCE_NAME, lock, runtimeState
-
-
Constructor Summary
Constructors Constructor Description CompositeDataBean(org.springframework.context.ApplicationContext parent, PropertyBackedBean owner, PropertyBackedBeanRegistry registry, java.util.Properties propertyDefaults, java.lang.String category, java.lang.Class<?> type, java.util.List<java.lang.String> instancePath)Constructor for dynamically created instances, e.g.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()protected PropertyBackedBeanStatecreateInitialState()Creates the initial state.protected java.lang.ObjectgetBean()Gets the wrapped Java bean.booleanisUpdateable(java.lang.String name)Checks if a property is updateable.protected java.lang.StringresolveDefault(java.lang.String name)Resolves the default value of a property, if there is one, expanding placholders as necessary.protected voidstop(boolean broadcast)Stops the bean, optionally broadcasting the event to remote nodes.-
Methods inherited from class org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean
applyDefaultOverrides, destroy, destroy, doInit, getCategory, getDescription, getEncryptedPropertyDefaults, getId, getInstancePath, getParent, getProperty, getPropertyDefaults, getPropertyNames, getRegistry, getState, init, onApplicationEvent, performEarlyPropertyChecks, removeProperties, removeProperty, revert, setApplicationContext, setAutoStart, setBeanName, setCategory, setEarlyPropertyCheckers, setEncryptedPropertyDefaults, setInstancePath, setProperties, setProperty, setPropertyDefaults, setRegistry, setSaveSetProperty, start, start, stop
-
-
-
-
Constructor Detail
-
CompositeDataBean
public CompositeDataBean(org.springframework.context.ApplicationContext parent, PropertyBackedBean owner, PropertyBackedBeanRegistry registry, java.util.Properties propertyDefaults, java.lang.String category, java.lang.Class<?> type, java.util.List<java.lang.String> instancePath) throws java.io.IOExceptionConstructor for dynamically created instances, e.g. throughChildApplicationContextFactory.- Parameters:
parent- the parent application contextregistry- the registry of property backed beanspropertyDefaults- property defaults provided by the installer or System propertiescategory- the categoryinstancePath- the instance path within the categoryowner- the owning beantype- the class of Java bean to be wrapped- Throws:
java.io.IOException- Signals that an I/O exception has occurred.
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.ExceptionDescription copied from class:AbstractPropertyBackedBean- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Overrides:
afterPropertiesSetin classAbstractPropertyBackedBean- Throws:
java.lang.Exception
-
resolveDefault
protected java.lang.String resolveDefault(java.lang.String name)
Description copied from class:AbstractPropertyBackedBeanResolves the default value of a property, if there is one, expanding placholders as necessary.- Overrides:
resolveDefaultin classAbstractPropertyBackedBean- Parameters:
name- the property name- Returns:
- the resolved default value or
nullif there isn't one
-
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.
-
isUpdateable
public boolean isUpdateable(java.lang.String name)
Description copied from class:AbstractPropertyBackedBeanChecks if a property is updateable.- Specified by:
isUpdateablein interfacePropertyBackedBean- Overrides:
isUpdateablein classAbstractPropertyBackedBean- Parameters:
name- the property name- Returns:
trueif the property is updateable
-
getBean
protected java.lang.Object getBean()
Gets the wrapped Java bean.- Returns:
- the Java bean
-
stop
protected void stop(boolean broadcast)
Description copied from class:AbstractPropertyBackedBeanStops the bean, optionally broadcasting the event to remote nodes.- Overrides:
stopin classAbstractPropertyBackedBean- Parameters:
broadcast- Should the event be broadcast?
-
-