org.oddjob.arooa.deploy
Class LinkedDescriptor

java.lang.Object
  extended by org.oddjob.arooa.deploy.LinkedDescriptor
All Implemented Interfaces:
ArooaDescriptor, BeanDescriptorProvider

public class LinkedDescriptor
extends Object
implements ArooaDescriptor

Combine two ArooaDescriptors. The two descriptors are treated as a primary and a secondary. Combination is as follows:

  • First a primary then a secondary BeanDescriptor is sought. Should BeanDescriptors be chained to allow 'global' intercepts to be applied?
  • Component and Value mappings are searched such that any match in the primary is used before searching the secondary.

    Author:
    rob

    Constructor Summary
    LinkedDescriptor(ArooaDescriptor primary, ArooaDescriptor secondary)
              Constructor.
     
    Method Summary
     ArooaBeanDescriptor getBeanDescriptor(ArooaClass forClass, PropertyAccessor accessor)
               
     ClassResolver getClassResolver()
              Provide a ClassResolver.
     ConversionProvider getConvertletProvider()
              Provide type conversions.
     ElementMappings getElementMappings()
              Provide element to class name mappings for components.
     String getPrefixFor(URI namespace)
              Provide the default prefix for a URI.
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    LinkedDescriptor

    public LinkedDescriptor(ArooaDescriptor primary,
                            ArooaDescriptor secondary)
    Constructor.

    Parameters:
    primary -
    secondary -
    Method Detail

    getConvertletProvider

    public ConversionProvider getConvertletProvider()
    Description copied from interface: ArooaDescriptor
    Provide type conversions.

    Specified by:
    getConvertletProvider in interface ArooaDescriptor
    Returns:
    A ConvertletProvider. May be null.

    getBeanDescriptor

    public ArooaBeanDescriptor getBeanDescriptor(ArooaClass forClass,
                                                 PropertyAccessor accessor)
    Specified by:
    getBeanDescriptor in interface BeanDescriptorProvider
    Parameters:
    forClass - The class.
    accessor - Used to access the bean properties for default types.
    Returns:
    The bean descriptor, null if this provider isn't capable of providing it.

    getElementMappings

    public ElementMappings getElementMappings()
    Description copied from interface: ArooaDescriptor
    Provide element to class name mappings for components.

    Specified by:
    getElementMappings in interface ArooaDescriptor
    Returns:
    ElementMappings. Must not be null.

    getPrefixFor

    public String getPrefixFor(URI namespace)
    Description copied from interface: ArooaDescriptor
    Provide the default prefix for a URI. This is required when building an ArooaConfiguration using a ArooaDesigner so that the correct XML namespace mappings can defined.

    Specified by:
    getPrefixFor in interface ArooaDescriptor
    Parameters:
    namespace - The namespace.
    Returns:
    The prefix.

    getClassResolver

    public ClassResolver getClassResolver()
    Description copied from interface: ArooaDescriptor
    Provide a ClassResolver. The resolver will typically be able to resolve classes returned from the ElementMappings provided by this descriptor.

    Specified by:
    getClassResolver in interface ArooaDescriptor
    Returns:
    A ClassResolver. Must not be null.