Packagecom.bourre.ioc.context.processor
Classpublic class AttributeAsPropertyProcessor
ImplementsContextProcessor

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Transforms node attributes value to IoC property node.


Example
Simple context
  
  <beans>
   <heading id="test1" fontFamily="Arial" fontSize="100" type="Object">
   <property name="rank" value="First" />
   </heading>
  </beans>
  

Adds processor to context loader.
   
   loader.addProcessor( new AttributeAsPropertyProcessor( "test1" ) );
  

Processing result.
   
  <beans>
   <heading id="test1" type="Object">
   <property name="rank" value="First" />
   <property name="fontFamily" value="Arial" />
   <property name="fontSize" value="100" />
   </heading>
  </beans>
  



Public Methods
 MethodDefined by
  
AttributeAsPropertyProcessor(id:String, ... args)
Creates new AttributeAsPropertyProcessor instance.
AttributeAsPropertyProcessor
  
process(xml:XML):XML
Transforms passed-in xml content using conrete implementation in this method.
AttributeAsPropertyProcessor
Protected Methods
 MethodDefined by
  
addAttributeName(attributeName:String, value:*):void
Adds a new attribute name.
AttributeAsPropertyProcessor
  
init():void
Initializes attribute names hashmap with default values.
AttributeAsPropertyProcessor
  
isReserved(attributeName:*):Boolean
Returns true if passed-in attributeName is a protected attribute name.
AttributeAsPropertyProcessor
  
processNode(id:String):void
AttributeAsPropertyProcessor
Constructor detail
AttributeAsPropertyProcessor()constructor
public function AttributeAsPropertyProcessor(id:String, ... args)

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Creates new AttributeAsPropertyProcessor instance.

Parameters
id:String — Node identifier to search for
 
... args — Additionnal nodes identifiers
Method detail
addAttributeName()method
protected function addAttributeName(attributeName:String, value:*):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Adds a new attribute name.

Parameters
attributeName:String — Attribute name to add.
 
value:* — Value associated with new attribute name.
init()method 
protected function init():void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Initializes attribute names hashmap with default values.

isReserved()method 
protected function isReserved(attributeName:*):Boolean

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns true if passed-in attributeName is a protected attribute name.

Parameters
attributeName:*

Returns
Boolean
process()method 
public function process(xml:XML):XML

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Transforms passed-in xml content using conrete implementation in this method.

Parameters
xml:XML — Original xml content

Returns
XML — The new xml content
processNode()method 
protected function processNode(id:String):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Parameters
id:String