Packageorg.spicefactory.lib.command.flow
Classpublic class DefaultCommandFlow
InheritanceDefaultCommandFlow Inheritance AbstractCommandExecutor Inheritance AbstractSuspendableCommand Inheritance AbstractCancellableCommand Inheritance AbstractAsyncCommand Inheritance flash.events.EventDispatcher
Implements CommandFlow

Default implementation of the CommandFlow interface.



Public Properties
 PropertyDefined By
 Inheritedactive : Boolean
[read-only] Indicates whether this command is currently executing.
AbstractAsyncCommand
 Inheritedcancellable : Boolean
[read-only] Indicates whether this executor can be cancelled.
AbstractCommandExecutor
 Inheriteddomain : ApplicationDomain
The domain to use in case reflection on the command classes this exeutor deals with is required.
AbstractCommandExecutor
 Inheritedsuspendable : Boolean
[read-only] Indicates whether this executor can be suspended.
AbstractCommandExecutor
 Inheritedsuspended : Boolean
[read-only] Indicates whether this command is currently suspended.
AbstractSuspendableCommand
Protected Properties
 PropertyDefined By
 Inheriteddata : CommandData
[read-only] The data associated with this executor.
AbstractCommandExecutor
 Inheritedlifecycle : CommandLifecycle
[read-only] The lifecycle hook to use for the commands executed by this instance.
AbstractCommandExecutor
Public Methods
 MethodDefined By
  
DefaultCommandFlow(description:String = null)
Creates a new flow instance.
DefaultCommandFlow
 Inherited
addData(value:Object):void
Adds a value to this executor that can get passed to any command executed by this instance.
AbstractCommandExecutor
  
addLink(command:Command, link:CommandLink):void
Adds a command and associated link to this flow.
DefaultCommandFlow
 Inherited
cancel():void
Cancels the command.
AbstractCancellableCommand
 Inherited
execute():void
Starts the execution of this command.
AbstractAsyncCommand
 Inherited
prepare(lifecycle:CommandLifecycle, data:CommandData):void
Method that may be called by frameworks before executing this command to hook into the lifecycle and data handling of this executor.
AbstractCommandExecutor
 Inherited
resume():void
Resumes the command.
AbstractSuspendableCommand
  
Sets the default link to use when a command in the flow has no matching link.
DefaultCommandFlow
 Inherited
suspend():void
Suspends the command.
AbstractSuspendableCommand
Protected Methods
 MethodDefined By
 Inherited
Invoked when a child command has completed its operation successfully.
AbstractCommandExecutor
 Inherited
complete(result:Object = null):void
Signals that this command has completed.
AbstractAsyncCommand
 Inherited
Creates a new instance holding the data commands executed by this instance will produce.
AbstractCommandExecutor
 Inherited
Creates a new instance of the lifecycle hook.
AbstractCommandExecutor
 Inherited
doCancel():void
Invoked when this command gets cancelled.
AbstractCancellableCommand
 Inherited
doExecute():void
Invoked when the command starts executing.
AbstractAsyncCommand
 Inherited
doResume():void
Invoked when this command gets resumed.
AbstractSuspendableCommand
 Inherited
doSuspend():void
Invoked when this command gets suspended.
AbstractSuspendableCommand
 Inherited
error(cause:Object = null):void
Signals an error condition and cancels the command.
AbstractAsyncCommand
 Inherited
Executes the specified command.
AbstractCommandExecutor
Constructor Detail
DefaultCommandFlow()Constructor
public function DefaultCommandFlow(description:String = null)

Creates a new flow instance.

Parameters
description:String (default = null) — a description of the flow
Method Detail
addLink()method
public function addLink(command:Command, link:CommandLink):void

Adds a command and associated link to this flow. The link is invoked after the specified command finished executing and should determine the next command to execute (or end the flow execution).

The first invocation of this method also specifies the first command to execute in this flow.

Parameters

command:Command — the command to add to the flow
 
link:CommandLink — the link associated with the command

setDefaultLink()method 
public function setDefaultLink(link:CommandLink):void

Sets the default link to use when a command in the flow has no matching link.

Parameters

link:CommandLink — the default link to use when a command in the flow has no matching link