Packagemvcexpress.mvc
Classpublic dynamic class Command
InheritanceCommand Inheritance Object
Subclasses PooledCommand

Command, handles business logic of your application. Commands can get proxies injected and can send messages

It MUST contain custom execute(params:Object) function. Parameter can be typed as you wish. It is best practice to use same type as you use in message, that triggers this command. If message does not send any parameter object - you still must have singe parameter that will get null value, for example: execute(blank:Object).



Public Properties
 PropertyDefined By
  commandMap : CommandMap
Handles application Commands.
Command
  mediatorMap : MediatorMap
Handles application Mediators.
Command
  proxyMap : ProxyMap
Handles application Proxies.
Command
Public Methods
 MethodDefined By
  
Type of message that executed this command.
Command
Protected Methods
 MethodDefined By
  
sendMessage(type:String, params:Object = null):void
Sends a message with optional params object
Command
Property Detail
commandMapproperty
public var commandMap:CommandMap

Handles application Commands.

mediatorMapproperty 
public var mediatorMap:MediatorMap

Handles application Mediators.

proxyMapproperty 
public var proxyMap:ProxyMap

Handles application Proxies.

Method Detail
getMessageType()method
public function getMessageType():String

Type of message that executed this command. (If command is not executed by message it set to null.)

Returns
String — message type
sendMessage()method 
protected function sendMessage(type:String, params:Object = null):void

Sends a message with optional params object

Parameters

type:String — type of the message for Commands or Mediator's handle function to react to.
 
params:Object (default = null) — Object that will be passed to Command execute() function or to handle functions.