Class CompositeDataBean
java.lang.Object
org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean
org.alfresco.repo.management.subsystems.CompositeDataBean
- All Implemented Interfaces:
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>
A class that wraps an instance of a Java Bean class declared as a composite property type on
ChildApplicationContextFactory making it configurable, either through alfresco-global.properties or a JMX
console.- Author:
- dward
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classThe 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
ConstructorsConstructorDescriptionCompositeDataBean(org.springframework.context.ApplicationContext parent, PropertyBackedBean owner, PropertyBackedBeanRegistry registry, Properties propertyDefaults, String category, Class<?> type, List<String> instancePath) Constructor for dynamically created instances, e.g. throughChildApplicationContextFactory. -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected PropertyBackedBeanStateCreates the initial state.protected ObjectgetBean()Gets the wrapped Java bean.booleanisUpdateable(String name) Checks if a property is updateable.protected StringresolveDefault(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, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationListener
supportsAsyncExecution
-
Constructor Details
-
CompositeDataBean
public CompositeDataBean(org.springframework.context.ApplicationContext parent, PropertyBackedBean owner, PropertyBackedBeanRegistry registry, Properties propertyDefaults, String category, Class<?> type, List<String> instancePath) throws IOException Constructor 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:
IOException- Signals that an I/O exception has occurred.
-
-
Method Details
-
afterPropertiesSet
Description copied from class:AbstractPropertyBackedBean- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Overrides:
afterPropertiesSetin classAbstractPropertyBackedBean- Throws:
Exception
-
resolveDefault
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
Description copied from class:AbstractPropertyBackedBeanCreates the initial state.- Specified by:
createInitialStatein classAbstractPropertyBackedBean- Returns:
- the property backed bean state
- Throws:
IOException- Signals that an I/O exception has occurred.
-
isUpdateable
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
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?
-