Packageorg.springextensions.actionscript.ioc.factory.config
SVN browsingRequiredMetadataObjectPostProcessor.as
FisheyeRequiredMetadataObjectPostProcessor.as
Classpublic class RequiredMetadataObjectPostProcessor
ImplementsIObjectFactoryAware, IObjectPostProcessor

ObjectPostProcessor implementation that enforces required properties to have been configured. A property is marked as required by adding [Required] metadata to the property definition:
 [Required]
 public var myProperty:Type;
 

In order to add this post processor to you configuration add the following line to the xml:

<object class="org.springextensions.actionscript.ioc.factory.config.RequiredMetadataObjectPostProcessor" />

Author: Christophe Herreman
Version: $Revision: 21 $, $Date: 2008-11-01 22:58:42 +0100 (za, 01 nov 2008) $, $Author: dmurat $
Since: 0.1



Documentation reference: enforcing required property injections


Public Properties
 PropertyDefined by
  objectFactory : IObjectFactory
[write-only]
RequiredMetadataObjectPostProcessor
Public Methods
 MethodDefined by
  
Constructs RequiredMetadataObjectPostProcessor
RequiredMetadataObjectPostProcessor
  
postProcessAfterInitialization(object:*, objectName:String):*
This method has not been implemented This method is invoked right after the IInitializingObject and initMethod logic is invoked in the wiring pipeline.
RequiredMetadataObjectPostProcessor
  
postProcessBeforeInitialization(object:*, objectName:String):*
Will check the metadata of the given object to see if any property contains [Required] metadata.
RequiredMetadataObjectPostProcessor
Property detail
objectFactoryproperty
objectFactory:IObjectFactory  [write-only]

Implementation
    public function set objectFactory(value:IObjectFactory):void
Constructor detail
RequiredMetadataObjectPostProcessor()constructor
public function RequiredMetadataObjectPostProcessor()

Constructs RequiredMetadataObjectPostProcessor

Method detail
postProcessAfterInitialization()method
public function postProcessAfterInitialization(object:*, objectName:String):*

This method has not been implemented This method is invoked right after the IInitializingObject and initMethod logic is invoked in the wiring pipeline.

Parameters
object:* — The instance that is being configured by the object factory
 
objectName:String — The name of the object definition as found in the IObjectFactory's configuration

Returns
*
postProcessBeforeInitialization()method 
public function postProcessBeforeInitialization(object:*, objectName:String):*

Will check the metadata of the given object to see if any property contains [Required] metadata. If it has this type of metadata and is not available in the object definition an error will be thrown. This method is invoked right before the IInitializingObject and initMethod logic is invoked in the wiring pipeline.

Parameters
object:* — The object that has been instantiated
 
objectName:String — The name of the object

Returns
*

Throws
— If the property was required but not defined.