org.alfresco.repo.management.subsystems
Class CompositeDataBean

java.lang.Object
  extended by org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean
      extended by org.alfresco.repo.management.subsystems.CompositeDataBean
All Implemented Interfaces:
java.util.EventListener, PropertyBackedBean, PropertyBackedBeanState, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener

public class CompositeDataBean
extends AbstractPropertyBackedBean

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.

See Also:
ChildApplicationContextFactory

Nested Class Summary
protected  class CompositeDataBean.CompositeDataBeanState
          The Class CompositeDataBeanState.
 
Nested classes/interfaces inherited from class org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean
AbstractPropertyBackedBean.DefaultResolver
 
Field Summary
 
Fields inherited from class org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean
DEFAULT_INSTANCE_NAME, lock
 
Constructor Summary
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 instancePath)
          Constructor for dynamically created instances, e.g.
 
Method Summary
 void afterPropertiesSet()
          
protected  PropertyBackedBeanState createInitialState()
          Creates the initial state.
protected  java.lang.Object getBean()
          Gets the wrapped Java bean.
 boolean isUpdateable(java.lang.String name)
          Checks if a property is updateable.
protected  java.lang.String resolveDefault(java.lang.String name)
          Resolves the default value of a property, if there is one, expanding placholders as necessary.
protected  void stop(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, getId, getInstancePath, getParent, getProperty, getPropertyDefaults, getPropertyNames, getRegistry, getState, init, onApplicationEvent, revert, setApplicationContext, setAutoStart, setBeanName, setCategory, setInstancePath, setProperties, setProperty, setPropertyDefaults, setRegistry, start, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 instancePath)
                  throws java.io.IOException
Constructor for dynamically created instances, e.g. through ChildApplicationContextFactory.

Parameters:
parent - the parent application context
registry - the registry of property backed beans
propertyDefaults - property defaults provided by the installer or System properties
category - the category
instancePath - the instance path within the category
owner - the owning bean
type - 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.Exception
Description copied from class: AbstractPropertyBackedBean

Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Overrides:
afterPropertiesSet in class AbstractPropertyBackedBean
Throws:
java.lang.Exception

resolveDefault

protected java.lang.String resolveDefault(java.lang.String name)
Description copied from class: AbstractPropertyBackedBean
Resolves the default value of a property, if there is one, expanding placholders as necessary.

Overrides:
resolveDefault in class AbstractPropertyBackedBean
Parameters:
name - the property name
Returns:
the resolved default value or null if there isn't one

createInitialState

protected PropertyBackedBeanState createInitialState()
                                              throws java.io.IOException
Description copied from class: AbstractPropertyBackedBean
Creates the initial state.

Specified by:
createInitialState in class AbstractPropertyBackedBean
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: AbstractPropertyBackedBean
Checks if a property is updateable.

Specified by:
isUpdateable in interface PropertyBackedBean
Overrides:
isUpdateable in class AbstractPropertyBackedBean
Parameters:
name - the property name
Returns:
true if 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: AbstractPropertyBackedBean
Stops the bean, optionally broadcasting the event to remote nodes.

Overrides:
stop in class AbstractPropertyBackedBean
Parameters:
broadcast - Should the event be broadcast?


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