Package org.oddjob.arooa.deploy
Class LinkedDescriptor
java.lang.Object
org.oddjob.arooa.deploy.LinkedDescriptor
- All Implemented Interfaces:
ArooaDescriptor,BeanDescriptorProvider,NamespaceMappings,PrefixMapping,UriMapping
Combine two
ArooaDescriptors. The two descriptors are
treated as a primary and a secondary. Combination is as follows:
- Both primary and secondary conversions are registered with primary conversions overriding any identical secondary conversions.
- 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
ConstructorsConstructorDescriptionLinkedDescriptor(ArooaDescriptor primary, ArooaDescriptor secondary) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetBeanDescriptor(ArooaClass forClass, PropertyAccessor accessor) Provide the descriptor.Provide aClassResolver.Provide type conversions.Provide element to class name mappings for components.String[]Get all the prefixes mapped.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, waitMethods inherited from interface org.oddjob.arooa.parsing.PrefixMapping
elementFor, qTagForMethods inherited from interface org.oddjob.arooa.parsing.UriMapping
getQName
-
Constructor Details
-
LinkedDescriptor
Constructor.- Parameters:
primary-secondary-
-
-
Method Details
-
getConvertletProvider
Description copied from interface:ArooaDescriptorProvide type conversions.- Specified by:
getConvertletProviderin interfaceArooaDescriptor- Returns:
- A ConvertletProvider. May be null.
-
getBeanDescriptor
Description copied from interface:BeanDescriptorProviderProvide the descriptor.- Specified by:
getBeanDescriptorin interfaceBeanDescriptorProvider- 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
Description copied from interface:ArooaDescriptorProvide element to class name mappings for components.- Specified by:
getElementMappingsin interfaceArooaDescriptor- Returns:
- ElementMappings. Must not be null.
-
getPrefixFor
Description copied from interface:ArooaDescriptorProvide 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:
getPrefixForin interfaceArooaDescriptor- Specified by:
getPrefixForin interfaceUriMapping- Parameters:
namespace- The namespace.- Returns:
- The prefix.
-
getPrefixes
Description copied from interface:NamespaceMappingsGet all the prefixes mapped.- Specified by:
getPrefixesin interfaceNamespaceMappings- Returns:
- The prefixes. Maybe be empt but never null.
-
getUriFor
- Specified by:
getUriForin interfacePrefixMapping
-
getClassResolver
Description copied from interface:ArooaDescriptorProvide aClassResolver. The resolver will typically be able to resolve classes returned from theElementMappingsprovided by this descriptor.- Specified by:
getClassResolverin interfaceArooaDescriptor- Returns:
- A ClassResolver. Must not be null.
-