Packageorg.spicefactory.parsley.core.command
Interfacepublic interface CommandManager
Implementors DefaultCommandManager

Responsible for managing all active commands for a single scope. Since each scope has its own manager, instances can be obtained through the Scope.commandManager property.



Public Methods
 MethodDefined By
  
getActiveCommandsByTrigger(messageType:Class, selector:*):Array
Returns all active commands triggered by a message that matches the specified type and selector in this scope.
CommandManager
  
getActiveCommandsByType(commandType:Class, id:String = null):Array
Returns all active commands of the specified type.
CommandManager
  
hasActiveCommandsForTrigger(messageType:Class, selector:*):Boolean
Indicates whether this scope has any active commands triggered by a message that matches the specified type and selector.
CommandManager
  
hasActiveCommandsOfType(commandType:Class, id:String = null):Boolean
Indicates whether this scope has any active commands that matches the specified command type and id.
CommandManager
Method Detail
getActiveCommandsByTrigger()method
public function getActiveCommandsByTrigger(messageType:Class, selector:*):Array

Returns all active commands triggered by a message that matches the specified type and selector in this scope.

Parameters

messageType:Class — the type of the message that triggered the commands
 
selector:* (default = NaN) — the selector of the message that triggered the commands

Returns
Array — all matching ObservableCommand instances.
getActiveCommandsByType()method 
public function getActiveCommandsByType(commandType:Class, id:String = null):Array

Returns all active commands of the specified type. If an id is specified it refers to the id the command is registered with in the Context.

Parameters

commandType:Class — the type of the command
 
id:String (default = null) — the id the command is registered with in the Context

Returns
Array — all matching ObservableCommand instances
hasActiveCommandsForTrigger()method 
public function hasActiveCommandsForTrigger(messageType:Class, selector:*):Boolean

Indicates whether this scope has any active commands triggered by a message that matches the specified type and selector.

Parameters

messageType:Class — the type of the message that triggered the commands
 
selector:* (default = NaN) — the selector of the message that triggered the commands

Returns
Boolean — true if there is at least one matching command in this scope.
hasActiveCommandsOfType()method 
public function hasActiveCommandsOfType(commandType:Class, id:String = null):Boolean

Indicates whether this scope has any active commands that matches the specified command type and id.

Parameters

commandType:Class — the type of the command
 
id:String (default = null) — the id the command is registered with in the Context

Returns
Boolean — true if there is at least one matching command in this scope.