org.oddjob.arooa.deploy
Class PropertyDefinitionsHelper

java.lang.Object
  extended by org.oddjob.arooa.deploy.PropertyDefinitionsHelper
All Implemented Interfaces:
ArooaBeanDescriptor

public class PropertyDefinitionsHelper
extends Object
implements ArooaBeanDescriptor

Helper class to provide an ArooaBeanDescriptor. This is the main implementation and as such should really have a different name.

See Also:
DefaultBeanDescriptorProvider, AnnotatedBeanDescriptorProvider, ArooaDescriptorBean
Author:
rob

Constructor Summary
PropertyDefinitionsHelper(ArooaClass classFor)
          Constructor
 
Method Summary
 void addAnnotationDefinition(AnnotationDefinition annotation)
          Add an annotation.
 void addPropertyDefinition(PropertyDefinition propertyDefinition)
          Accumulate definitions of the bean.
 ArooaAnnotations getAnnotations()
          Provide annotation information about methods.
 ArooaClass getClassIdentifier()
          Get the class identifier this is the descriptor for.
 String getComponentProperty()
          The name of the component property.
 ConfiguredHow getConfiguredHow(String property)
          How is a property configured.
 String getFlavour(String property)
          Get the property flavour.
 ParsingInterceptor getParsingInterceptor()
          Get The ParsingInterceptor.
 String getTextProperty()
          The name of the property which can be set using the text of an xml element.
 boolean isAuto(String property)
          Indicates that the property should be set automatically from the services.
 void mergeFromBeanDefinition(BeanDefinition beanDef)
          Called to merge an BeanDefinition from an ArooaDescriptorBean into what has been provided already.
 void setAuto(String property)
          Set the auto property.
 void setComponentProperty(String property)
          Set the component property.
 void setFlavour(String property, String flavour)
          Set the flavour for a property.
 void setParsingInterceptor(ParsingInterceptor interceptor)
          Set the parsing interceptor.
 void setPropertyType(String property, PropertyDefinition.PropertyType propertyType)
          Set the property type.
 void setTextProperty(String property)
          Set the text property.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropertyDefinitionsHelper

public PropertyDefinitionsHelper(ArooaClass classFor)
Constructor

Parameters:
classFor -
Method Detail

getClassIdentifier

public ArooaClass getClassIdentifier()
Get the class identifier this is the descriptor for.

Returns:
The class identifier.

addPropertyDefinition

public void addPropertyDefinition(PropertyDefinition propertyDefinition)
Accumulate definitions of the bean.

Parameters:
propertyDefinition -

setPropertyType

public void setPropertyType(String property,
                            PropertyDefinition.PropertyType propertyType)
Set the property type. Used by AnnotatedBeanDescriptorProvider.

Parameters:
property -
propertyType -

setComponentProperty

public void setComponentProperty(String property)
Set the component property.

Parameters:
property -

setTextProperty

public void setTextProperty(String property)
Set the text property.

Parameters:
property -

setAuto

public void setAuto(String property)
Set the auto property. Used by AnnotatedBeanDescriptorProvider.

Parameters:
property - The property name.

setFlavour

public void setFlavour(String property,
                       String flavour)
Set the flavour for a property.

Parameters:
property -
flavour -

setParsingInterceptor

public void setParsingInterceptor(ParsingInterceptor interceptor)
Set the parsing interceptor. Used by AnnotatedBeanDescriptorProvider.

Parameters:
interceptor -

addAnnotationDefinition

public void addAnnotationDefinition(AnnotationDefinition annotation)
Add an annotation.

Parameters:
annotation -

mergeFromBeanDefinition

public void mergeFromBeanDefinition(BeanDefinition beanDef)
Called to merge an BeanDefinition from an ArooaDescriptorBean into what has been provided already.

Parameters:
beanDef -

getComponentProperty

public String getComponentProperty()
Description copied from interface: ArooaBeanDescriptor
The name of the component property.

Specified by:
getComponentProperty in interface ArooaBeanDescriptor
Returns:

getTextProperty

public String getTextProperty()
Description copied from interface: ArooaBeanDescriptor
The name of the property which can be set using the text of an xml element. At most only one property can be set using the text of an element.

The actual property name is required because unlike components and values, the property name can not be derrived from an element name.

Specified by:
getTextProperty in interface ArooaBeanDescriptor
Returns:
The name of the property to be set using the text of the element. Will be null if the class doesn't support setting element text.

getConfiguredHow

public ConfiguredHow getConfiguredHow(String property)
Description copied from interface: ArooaBeanDescriptor
How is a property configured.

Specified by:
getConfiguredHow in interface ArooaBeanDescriptor
Parameters:
property - The property name.
Returns:
How the property is configured. Never null.

getFlavour

public String getFlavour(String property)
Description copied from interface: ArooaBeanDescriptor
Get the property flavour. This is for services.

Specified by:
getFlavour in interface ArooaBeanDescriptor
Parameters:
property - The property name.
Returns:
The flavour. May be null.

isAuto

public boolean isAuto(String property)
Description copied from interface: ArooaBeanDescriptor
Indicates that the property should be set automatically from the services.

Specified by:
isAuto in interface ArooaBeanDescriptor
Parameters:
property - The property name.
Returns:
true if the property can be set automatically, false otherwise.

getParsingInterceptor

public ParsingInterceptor getParsingInterceptor()
Description copied from interface: ArooaBeanDescriptor
Get The ParsingInterceptor.

Specified by:
getParsingInterceptor in interface ArooaBeanDescriptor
Returns:

getAnnotations

public ArooaAnnotations getAnnotations()
Description copied from interface: ArooaBeanDescriptor
Provide annotation information about methods. Used to allow life cycle methods, and any other custom annotation methods to defined separately from the class.

Specified by:
getAnnotations in interface ArooaBeanDescriptor
Returns:
The annotations.

toString

public String toString()
Overrides:
toString in class Object