Package | org.spicefactory.lib.command.builder |
Class | public class CommandFlowBuilder |
Inheritance | CommandFlowBuilder AbstractCommandBuilder Object |
Method | Defined By | ||
---|---|---|---|
add(command:Object):CommandLinkBuilder
Adds a new command instance to this flow. | CommandFlowBuilder | ||
allResults(callback:Function):CommandFlowBuilder
Adds a callback to invoke when the command flow completes successfully. | CommandFlowBuilder | ||
[override]
Builds the target command, applying all configurations specified
through this builder instance. | CommandFlowBuilder | ||
cancel(callback:Function):CommandFlowBuilder
Adds a callback to invoke when the command flow gets cancelled. | CommandFlowBuilder | ||
create(commandType:Class):CommandLinkBuilder
Adds a new command type to this flow. | CommandFlowBuilder | ||
data(value:Object):CommandFlowBuilder
Adds a value that can get passed to any command
executed by the flow this builder creates. | CommandFlowBuilder | ||
Returns a builder to use for specifying the default link in case
a command result is not processed by any of the explicit links specified
for that command. | CommandFlowBuilder | ||
description(description:String, ... params):CommandFlowBuilder
A description of the command flow produced by this builder. | CommandFlowBuilder | ||
domain(domain:ApplicationDomain):CommandFlowBuilder
The domain to use for reflecting on command classes. | CommandFlowBuilder | ||
error(callback:Function):CommandFlowBuilder
Adds a callback to invoke when the command flow produced an error. | CommandFlowBuilder | ||
Builds and executes the target command. | AbstractCommandBuilder | ||
lastResult(callback:Function):CommandFlowBuilder
Adds a callback to invoke when the command flow completes successfully. | CommandFlowBuilder | ||
timeout(milliseconds:uint):CommandFlowBuilder
Sets the timeout for the flow. | CommandFlowBuilder |
add | () | method |
public function add(command:Object):CommandLinkBuilder
Adds a new command instance to this flow.
Parameters
command:Object — the command to add to this flow
|
CommandLinkBuilder — a builder to specify links for this command
|
allResults | () | method |
public function allResults(callback:Function):CommandFlowBuilder
Adds a callback to invoke when the command flow completes successfully.
An instance of CommandResult
will get passed to the callback
holding all results produced by the commands in the flow.
Parameters
callback:Function — the callback to invoke when the command flow completes successfully
|
CommandFlowBuilder — this builder instance for method chaining
|
build | () | method |
override public function build():CommandProxy
Builds the target command, applying all configurations specified through this builder instance.
ReturnsCommandProxy — the command proxy will all configuration of this builder applied
|
cancel | () | method |
public function cancel(callback:Function):CommandFlowBuilder
Adds a callback to invoke when the command flow gets cancelled. The callback should not expect any parameters.
Parameters
callback:Function — the callback to invoke when the command flow gets cancelled
|
CommandFlowBuilder — this builder instance for method chaining
|
create | () | method |
public function create(commandType:Class):CommandLinkBuilder
Adds a new command type to this flow.
Parameters
commandType:Class — the command type to add to this flow
|
CommandLinkBuilder — a builder to specify links for this command type
|
data | () | method |
public function data(value:Object):CommandFlowBuilder
Adds a value that can get passed to any command executed by the flow this builder creates.
Parameters
value:Object — the value to pass to the command flow
|
CommandFlowBuilder — this builder instance for method chaining
|
defaultLink | () | method |
public function defaultLink():DefaultLinkBuilder
Returns a builder to use for specifying the default link in case a command result is not processed by any of the explicit links specified for that command.
ReturnsDefaultLinkBuilder — a builder to use for specifying the default link
|
description | () | method |
public function description(description:String, ... params):CommandFlowBuilder
A description of the command flow produced by this builder.
Parameters
description:String — a description of the command flow produced by this builder
| |
... params — parameters to insert into the description in case in contains placeholders (like {0})
|
CommandFlowBuilder — this builder instance for method chaining
|
domain | () | method |
public function domain(domain:ApplicationDomain):CommandFlowBuilder
The domain to use for reflecting on command classes.
Parameters
domain:ApplicationDomain — the domain to use for reflecting on command classes
|
CommandFlowBuilder — this builder instance for method chaining
|
error | () | method |
public function error(callback:Function):CommandFlowBuilder
Adds a callback to invoke when the command flow produced an error. The cause of the error will get passed to the callback.
Parameters
callback:Function — the callback to invoke when the command flow produced an error
|
CommandFlowBuilder — this builder instance for method chaining
|
lastResult | () | method |
public function lastResult(callback:Function):CommandFlowBuilder
Adds a callback to invoke when the command flow completes successfully. The result produced by the last command in the flow will get passed to the callback.
Parameters
callback:Function — the callback to invoke when the command flow completes successfully
|
CommandFlowBuilder — this builder instance for method chaining
|
timeout | () | method |
public function timeout(milliseconds:uint):CommandFlowBuilder
Sets the timeout for the flow. When the specified amount of time is elapsed the flow execution will abort with an error.
Parameters
milliseconds:uint — the timeout for this flow in milliseconds
|
CommandFlowBuilder — this builder instance for method chaining
|