Packageorg.spicefactory.lib.xml.mapper.metadata
Classpublic class ChoiceIdDecorator
InheritanceChoiceIdDecorator Inheritance Object
Implements MetadataMapperDecorator

Represents a Metadata tag that can be used on properties that should map to a choice of child elements with a specific string identifier. The tag can be used on Array properties, too. In this case multiple child elements are allowed in the mapped XML. The choice is specified through an id in this case, and the elements which represent valid options for that choice have to be specified with XmlObjectMappings.choicId.



Public Properties
 PropertyDefined By
  id : String
The id of the choice as specified in the corresponding XmlObjectMappings instance.
ChoiceIdDecorator
  property : String
The name of the property.
ChoiceIdDecorator
Public Methods
 MethodDefined By
  
Method to be invoked by the framework for each occurence of a metadata tag on each mapped class.
ChoiceIdDecorator
Property Detail
idproperty
public var id:String

The id of the choice as specified in the corresponding XmlObjectMappings instance.

propertyproperty 
public var property:String

The name of the property.

Method Detail
decorate()method
public function decorate(builder:MetadataMapperBuilder):void

Method to be invoked by the framework for each occurence of a metadata tag on each mapped class. It allows to validate and process the attributes of that tag and to modifiy the specified mapper builder accordingly. All existing builtin metadata tags like [Attribute] or [ChoiceId] implement this interface, too.

Parameters

builder:MetadataMapperBuilder — the builder that can be modified for the mapping of the property the metadata tag was placed upon