Packageorg.mvcexpress.base
Classpublic class CommandMap
InheritanceCommandMap Inheritance Object

Handles command mappings, and executes them on messages



Public Methods
 MethodDefined By
  
CommandMap(messenger:Messenger, proxyMap:ProxyMap, mediatorMap:MediatorMap)
CONSTRUCTOR
CommandMap
  
execute(commandClass:Class, params:Object = null):void
Instantiates and executes provided command class, and sends params to it.
CommandMap
  
isMapped(type:String, commandClass:Class):Boolean
Checks if Command class is already added to message type
CommandMap
  
listMappings():String
Returns text of all command classes that are mapped to messages.
CommandMap
  
map(type:String, commandClass:Class):void
Map a class to be executed then message with type provied is sent.
CommandMap
  
unmap(type:String, commandClass:Class):void
Unap a class to be executed then message with type provied is sent.
CommandMap
Constructor Detail
CommandMap()Constructor
public function CommandMap(messenger:Messenger, proxyMap:ProxyMap, mediatorMap:MediatorMap)

CONSTRUCTOR

Parameters
messenger:Messenger
 
proxyMap:ProxyMap
 
mediatorMap:MediatorMap
Method Detail
execute()method
public function execute(commandClass:Class, params:Object = null):void

Instantiates and executes provided command class, and sends params to it.

Parameters

commandClass:Class — Command class to be instantiated and executed.
 
params:Object (default = null) — Object to be sent to execute() function.

isMapped()method 
public function isMapped(type:String, commandClass:Class):Boolean

Checks if Command class is already added to message type

Parameters

type:String — Message type for command class to react to.
 
commandClass:Class — Command class that will bi instantiated and executed.

Returns
Boolean — true if Command class is already mapped to message
listMappings()method 
public function listMappings():String

Returns text of all command classes that are mapped to messages.

Returns
String — Text with all mapped commands.
listMessageCommands()method 
pureLegsCore function listMessageCommands(messageType:String):Vector.<Class>

Parameters

messageType:String

Returns
Vector.<Class>
map()method 
public function map(type:String, commandClass:Class):void

Map a class to be executed then message with type provied is sent.

Parameters

type:String — Message type for command class to react to.
 
commandClass:Class — Command class that will bi instantiated and executed.

unmap()method 
public function unmap(type:String, commandClass:Class):void

Unap a class to be executed then message with type provied is sent.

Parameters

type:String — Message type for command class to react to.
 
commandClass:Class — Command class that will bi instantiated and executed.