Packageorg.spicefactory.parsley.dsl.core.impl
Classpublic class DefaultPropertyBuilder
InheritanceDefaultPropertyBuilder Inheritance Object
Implements PropertyBuilder

Default PropertyBuilder implementation.



Public Methods
 MethodDefined By
  
Creates a new instance.
DefaultPropertyBuilder
  
Sets this propety as the target for a binding to a command status.
DefaultPropertyBuilder
  
injectById(id:String, optional:Boolean = false):void
Sets a reference by id to another object in the registry to be injected into this property.
DefaultPropertyBuilder
  
injectByType(type:Class = null, optional:Boolean = false):void
Sets a reference by type to another object in the registry to be injected into this property.
DefaultPropertyBuilder
  
Adds a definition of an object to be created at runtime to the list of constructor arguments.
DefaultPropertyBuilder
  
Sets this propety as the target for a message binding.
DefaultPropertyBuilder
  
messageDispatcher(scope:String = null):void
Instructs the framework to inject a message dispatcher function into this property.
DefaultPropertyBuilder
  
resourceBinding(bundle:String, key:String):void
Sets this propety as the target for a binding to a resource.
DefaultPropertyBuilder
  
value(value:*):void
Sets the value of this property.
DefaultPropertyBuilder
Constructor Detail
DefaultPropertyBuilder()Constructor
public function DefaultPropertyBuilder(property:Property, context:ObjectDefinitionContext)

Creates a new instance.

Parameters
property:Property — the property to configure
 
context:ObjectDefinitionContext — the context for this builder
Method Detail
commandStatus()method
public function commandStatus():MessageReceiverBuilder

Sets this propety as the target for a binding to a command status. The builder returned by this method should be used to specify further options of the binding.

Returns
MessageReceiverBuilder — a builder to specify the options for the command status binding
injectById()method 
public function injectById(id:String, optional:Boolean = false):void

Sets a reference by id to another object in the registry to be injected into this property.

Parameters

id:String — the id of the referenced object
 
optional:Boolean (default = false)

injectByType()method 
public function injectByType(type:Class = null, optional:Boolean = false):void

Sets a reference by type to another object in the registry to be injected into this property. If the type parameter is omitted it will be deduced by reflecting on the property type. Using this feature requires that only one object of a matching type is regisrered for the Context.

Parameters

type:Class (default = null) — the type of the referenced object
 
optional:Boolean (default = false)

injectFromDefinition()method 
public function injectFromDefinition(definition:DynamicObjectDefinition):void

Adds a definition of an object to be created at runtime to the list of constructor arguments. For each injection a new instance will be created from that definition.

Parameters

definition:DynamicObjectDefinition — the definition of the object

messageBinding()method 
public function messageBinding():MessageBindingBuilder

Sets this propety as the target for a message binding. The builder returned by this method should be used to specify further options of the binding.

Returns
MessageBindingBuilder — a builder to specify the options for the message binding
messageDispatcher()method 
public function messageDispatcher(scope:String = null):void

Instructs the framework to inject a message dispatcher function into this property. If the scope paremeter is omitted, which is the preferrable option in most cases, then the messages will be dispatched through all scopes available for the Context the configured object belongs to

Parameters

scope:String (default = null) — the scope to dispatch messages through

resourceBinding()method 
public function resourceBinding(bundle:String, key:String):void

Sets this propety as the target for a binding to a resource. The builder returned by this method should be used to specify further options of the binding, like bundle and resource name.

Parameters

bundle:String
 
key:String

value()method 
public function value(value:*):void

Sets the value of this property. This may be a simple value or an instance that implements ResolvableValue to be resolved at the time the value will be injected into the method.

Parameters

value:* — the property value