Packagecom.asfusion.mate.actions.builders
Classpublic class ObjectBuilder
InheritanceObjectBuilder Inheritance BaseAction Inheritance AbstractAction
ImplementsIAction, IBuilder
SubclassesCommandInvoker, EventAnnouncer, MethodInvoker, PropertySetter

ObjectBuilder is the base class for all the classes that use the generator property to create instances. The generator is the class template to use to instantiate new objects.



Public Properties
 PropertyDefined by
  cache : String
The cache attribute lets you specify whether this newly created object should be kept live so that the next time an instance of this class is requested, this already created object is returned instead.
ObjectBuilder
  constructorArguments : *
The constructorArgs allows you to pass an Object or an Array of objects to the contructor when the instance is created.
ObjectBuilder
  generator : Class
The generator attribute specifies what class should be instantiated.
ObjectBuilder
 Inheritedproperties : Array
Properties allows you to add properties to the currentInstance.
BaseAction
  registerTarget : Boolean
Registers the newly created object as an injector target.
ObjectBuilder
Protected Properties
 PropertyDefined by
 InheritedcurrentInstance : * = null
The currentInstance is the Object that this class will use and modify to do its work.
AbstractAction
 Inheriteddocument : Object
A reference to the document object associated with the IActionList that contains this action item.
AbstractAction
Public Methods
 MethodDefined by
 Inherited
initialized(document:Object, id:String):void
Called automatically by the MXML compiler if the AbstractAction is set up by using a tag.
AbstractAction
 Inherited
trigger(scope:IScope):void
This method gets called when the IActionList (ex: EventHandlers) is running.
AbstractAction
Protected Methods
 MethodDefined by
 Inherited
complete(scope:IScope):void
The last method that trigger calls.
AbstractAction
  
createInstance(scope:IScope):Object
Where the currentInstance is created using the generator class as the template, passing arguments to the constructor as specified by the constructorArgs (if any).
ObjectBuilder
  
prepare(scope:IScope):void
The first method that trigger calls.
ObjectBuilder
  
run(scope:IScope):void
Where all the action occurs.
ObjectBuilder
 Inherited
setProperties(scope:IScope):void
Where all the properties are set into the currentInstance.
BaseAction
Property detail
cacheproperty
cache:String  [read-write]

The cache attribute lets you specify whether this newly created object should be kept live so that the next time an instance of this class is requested, this already created object is returned instead.

The default value is inherit.

Implementation
    public function get cache():String
    public function set cache(value:String):void
constructorArgumentsproperty 
constructorArguments:*  [read-write]

The constructorArgs allows you to pass an Object or an Array of objects to the contructor when the instance is created.

You can use an array to pass multiple arguments or use a simple Object if your signature has only one parameter.

The default value is undefined.

Implementation
    public function get constructorArguments():*
    public function set constructorArguments(value:*):void
generatorproperty 
generator:Class  [read-write]

The generator attribute specifies what class should be instantiated.

Implementation
    public function get generator():Class
    public function set generator(value:Class):void
registerTargetproperty 
registerTarget:Boolean  [read-write]

Registers the newly created object as an injector target. If true, this allows this object to be injected with properties using the Injectors tags.

Implementation
    public function get registerTarget():Boolean
    public function set registerTarget(value:Boolean):void
Method detail
createInstance()method
protected function createInstance(scope:IScope):Object

Where the currentInstance is created using the generator class as the template, passing arguments to the constructor as specified by the constructorArgs (if any).

Parameters
scope:IScope

Returns
Object
prepare()method 
protected override function prepare(scope:IScope):void

The first method that trigger calls. Usually, this is where the currentInstance is created or set if needed. In this method you can also perform any code that must be done first.

Parameters
scope:IScope
run()method 
protected override function run(scope:IScope):void

Where all the action occurs. At this moment, the currentInstance is already instantiated and all the properties are already set.

Parameters
scope:IScope