Packagesystem.ioc
Classpublic class ObjectDefinitionContainer
InheritanceObjectDefinitionContainer Inheritance CoreAction Inheritance Task Inheritance Object
Implements IObjectDefinitionContainer
Subclasses ObjectFactory

Creates a container to register all the Object define by the corresponding IObjectDefinition objects.

Example :

     import flash.text.TextField ;
     import flash.text.TextFormat ;
     
     import system.ioc.ObjectDefinition ;
     import system.ioc.ObjectDefinitionContainer ;
     import system.ioc.ObjectFactory ;
     
     var container:ObjectDefinitionContainer = new ObjectFactory();
     
     var context:Object =
     {
         id         : "my_field" ,
         type       : "flash.text.TextField" ,
         properties :
         [
             { name:"defaultTextFormat" , value:new TextFormat("Verdana", 11) } ,
             { name:"selectable"        , value:false                         } ,
             { name:"text"              , value:"hello world"                 } ,
             { name:"textColor"         , value:0xF7F744                      } ,
             { name:"x"                 , value:100                           } ,
             { name:"y"                 , value:100                           }
         ]
     }
     
     var definition:ObjectDefinition = ObjectDefinition.create( context ) ;
     
     container.addObjectDefinition( definition );
     
     var field:TextField = (container as ObjectFactory).getObject("my_field") as TextField ;
     
     addChild(field) ;
     



Public Properties
 PropertyDefined By
 InheritedchangeIt : Signaler
This signal emit when the notifyChanged method is invoked.
CoreAction
 InheritedclearIt : Signaler
This signal emit when the notifyCleared method is invoked.
CoreAction
 InheritedfinishIt : Signaler
This signal emit when the notifyFinished method is invoked.
Task
 InheritedinfoIt : Signaler
This signal emit when the notifyInfo method is invoked.
CoreAction
 Inheritedlogger : Logger
Determinates the internal Logger reference of this Loggable object.
Task
 Inheritedlooping : Boolean
The flag to determinate if the Action object is looped.
CoreAction
 InheritedloopIt : Signaler
This signal emit when the notifyLooped method is invoked.
CoreAction
  numObjectDefinitions : uint
[read-only] Indicates the numbers of object definitions registered in the container.
ObjectDefinitionContainer
 InheritedpauseIt : Signaler
This signal emit when the notifyPause method is invoked.
CoreAction
 Inheritedphase : String
[read-only] The current phase of the action.
Task
 InheritedprogressIt : Signaler
This signal emit when the notifyProgress method is invoked.
CoreAction
 InheritedresumeIt : Signaler
This signal emit when the notifyResumed method is invoked.
CoreAction
 Inheritedrunning : Boolean
[read-only] Indicates true if the process is in progress.
Task
 InheritedstartIt : Signaler
This signal emit when the notifyStarted method is invoked.
Task
 InheritedstopIt : Signaler
This signal emit when the notifyStopped method is invoked.
CoreAction
 InheritedtimeoutIt : Signaler
This signal emit when the notifyTimeOut method is invoked.
CoreAction
Public Methods
 MethodDefined By
  
Creates a new ObjectDefinitionContainer instance.
ObjectDefinitionContainer
  
Registers a new object definition in the container.
ObjectDefinitionContainer
  
Removes all the object definitions register in the container.
ObjectDefinitionContainer
  
clone():*
[override] Returns a shallow copy of this object.
ObjectDefinitionContainer
  
containsObjectDefinition(id:String):Boolean
Returns true if the object defines with the specified id is register in the container.
ObjectDefinitionContainer
  
Returns the IObjectDefinition object register in the container with the specified id.
ObjectDefinitionContainer
 Inherited
isLocked():Boolean
Returns true if the object is locked.
Task
 Inherited
lock():void
Locks the object.
Task
 Inherited
Notify when the process is changed.
CoreAction
 Inherited
Notify when the process is cleared.
CoreAction
 Inherited
Notify an ActionEvent when the process is finished.
Task
 Inherited
notifyInfo(info:*):void
Notify a specific information when the process is changed.
CoreAction
 Inherited
Notify when the process is looped.
CoreAction
 Inherited
Notify when the process is paused.
CoreAction
 Inherited
Notify when the process is in progress.
CoreAction
 Inherited
Notify when the process is resumed.
CoreAction
 Inherited
Notify an ActionEvent when the process is started.
Task
 Inherited
Notify when the process is stopped.
CoreAction
 Inherited
Notify when the process is out of time.
CoreAction
  
removeObjectDefinition(id:String):void
Unregisters an object definition in the container.
ObjectDefinitionContainer
 Inherited
run(... arguments):void
Run the process.
Task
 Inherited
unlock():void
Unlocks the display.
Task
Protected Methods
 MethodDefined By
 Inherited
setRunning(b:Boolean):void
Changes the running property value.
Task
Property Detail
numObjectDefinitionsproperty
numObjectDefinitions:uint  [read-only]

Indicates the numbers of object definitions registered in the container.


Implementation
    public function get numObjectDefinitions():uint
Constructor Detail
ObjectDefinitionContainer()Constructor
public function ObjectDefinitionContainer()

Creates a new ObjectDefinitionContainer instance.

Method Detail
addObjectDefinition()method
public function addObjectDefinition(definition:IObjectDefinition):void

Registers a new object definition in the container.

Parameters

definition:IObjectDefinition — The Identifiable ObjectDefinition reference to register in the container.


Throws
ArgumentError — If the specified object definition is null or if this id attribut is null.
clearObjectDefinition()method 
public function clearObjectDefinition():void

Removes all the object definitions register in the container.

clone()method 
override public function clone():*

Returns a shallow copy of this object.

Returns
* — a shallow copy of this object.
containsObjectDefinition()method 
public function containsObjectDefinition(id:String):Boolean

Returns true if the object defines with the specified id is register in the container.

Parameters

id:String — The id of the ObjectDefinition to search.

Returns
Booleantrue if the object defines with the specified id is register in the container.
getObjectDefinition()method 
public function getObjectDefinition(id:String):IObjectDefinition

Returns the IObjectDefinition object register in the container with the specified id.

Parameters

id:String — the id name of the ObjectDefinition to return.

Returns
IObjectDefinition — the IObjectDefinition object register in the container with the specified id.

Throws
ArgumentError — If the specified object definition don't exist in the container.
removeObjectDefinition()method 
public function removeObjectDefinition(id:String):void

Unregisters an object definition in the container.

Parameters

id:String — The id of the object definition to remove.


Throws
ArgumentError — If the specified object definition don't exist in the container.