Packageorg.spicefactory.lib.command.group
Classpublic class CommandSequence
InheritanceCommandSequence Inheritance AbstractCommandExecutor Inheritance AbstractSuspendableCommand Inheritance AbstractCancellableCommand Inheritance AbstractAsyncCommand Inheritance flash.events.EventDispatcher
Implements CommandGroup

A CommandGroup implementation that executes its child commands sequentially. When the last child command has completed its operation this sequence will fire its COMPLETE event. If the sequence gets cancelled or suspended the currently active child command will also be cancelled or suspended in turn. If a child command throws an ERROR event and the skipErrors property of this sequence is set to false, then the sequence will fire an ERROR event and will not execute its remaining child commands.



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
  
CommandSequence(description:String = null, skipErrors:Boolean = false, skipCancelllations:Boolean = false)
Creates a new sequence.
CommandSequence
  
addCommand(command:Command):void
Adds a command to this group.
CommandSequence
 Inherited
addData(value:Object):void
Adds a value to this executor that can get passed to any command executed by this instance.
AbstractCommandExecutor
 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
 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
CommandSequence()Constructor
public function CommandSequence(description:String = null, skipErrors:Boolean = false, skipCancelllations:Boolean = false)

Creates a new sequence.

Parameters
description:String (default = null) — a description of this command sequence
 
skipErrors:Boolean (default = false) — if true an error in a command executed by this instance leads to commandComplete getting called, if false the executor will stop with an error result
 
skipCancelllations:Boolean (default = false) — if true the cancelleation of a command executed by this instance leads to commandComplete getting called, if false the executor will stop with an error result
Method Detail
addCommand()method
public function addCommand(command:Command):void

Adds a command to this group.

Parameters

command:Command — the command to add to this group