Packageorg.spicefactory.lib.command.builder
Classpublic class CommandLinkBuilder
InheritanceCommandLinkBuilder Inheritance Object

Builder for specifying link conditions in a command flow.



Public Methods
 MethodDefined By
  
link(link:CommandLink):void
Specifies a custom link to invoke after the command finished executing.
CommandLinkBuilder
  
Creates a link that executes for all types of results produced by the command in the flow.
CommandLinkBuilder
  
linkFunction(link:Function):void
Specifies a link function to invoke after the command finished executing.
CommandLinkBuilder
  
linkResultProperty(name:String, value:Object):LinkTargetBuilder
Creates a link that only executes if the result produced by the command in the flow has the specified property value.
CommandLinkBuilder
  
Creates a link that only executes if the result produced by the command in the flow is of the specified type.
CommandLinkBuilder
  
Creates a link that only executes if the result produced by the command in the flow equals the specified value.
CommandLinkBuilder
Method Detail
link()method
public function link(link:CommandLink):void

Specifies a custom link to invoke after the command finished executing.

Parameters

link:CommandLink — a link to invoke after the command finished executing

linkAllResults()method 
public function linkAllResults():LinkTargetBuilder

Creates a link that executes for all types of results produced by the command in the flow.

Returns
LinkTargetBuilder — a builder to specify the action to perform
linkFunction()method 
public function linkFunction(link:Function):void

Specifies a link function to invoke after the command finished executing. The signature of the funciton must be (result: CommandResult, processor: CommandLinkProcessor): void.

Parameters

link:Function — a link function to invoke after the command finished executing

linkResultProperty()method 
public function linkResultProperty(name:String, value:Object):LinkTargetBuilder

Creates a link that only executes if the result produced by the command in the flow has the specified property value.

Parameters

name:String — the name of the property
 
value:Object — the value the property must have for this link to have an effect

Returns
LinkTargetBuilder — a builder to specify the action to perform when the link condition is met
linkResultType()method 
public function linkResultType(type:Class):LinkTargetBuilder

Creates a link that only executes if the result produced by the command in the flow is of the specified type.

Parameters

type:Class — the type of result the command must produce for this link to have an effect

Returns
LinkTargetBuilder — a builder to specify the action to perform when the link condition is met
linkResultValue()method 
public function linkResultValue(value:Object):LinkTargetBuilder

Creates a link that only executes if the result produced by the command in the flow equals the specified value.

Parameters

value:Object — the result the command must produce for this link to have an effect

Returns
LinkTargetBuilder — a builder to specify the action to perform when the link condition is met