Packagemvcexpress.modules
Classpublic class ModuleCore
InheritanceModuleCore Inheritance Object

Core Module class, represents single application unit in mvcExpress framework.

It starts framework and lets you set up your application. (or execute Commands to do it) You can create modular application by having more then one module.



Public Properties
 PropertyDefined By
  commandMap : CommandMap
Handles application Commands.
ModuleCore
  moduleName : String
[read-only] Name of the module
ModuleCore
Protected Properties
 PropertyDefined By
  mediatorMap : MediatorMap
Handles application Mediators.
ModuleCore
  proxyMap : ProxyMap
Handles application Proxies.
ModuleCore
Public Methods
 MethodDefined By
  
ModuleCore(moduleName:String = null, extendedMediatorMapClass:Class = null, extendedProxyMapClass:Class = null, extendedCommandMapClass:Class = null, extendedMessengerClass:Class = null)
CONSTRUCTOR
ModuleCore
  
Function to get rid of module.
ModuleCore
  
listMappedCommands(verbose:Boolean = true):String
List all controller mappings.
ModuleCore
  
listMappedMediators(verbose:Boolean = true):String
List all view mappings.
ModuleCore
  
listMappedMessages(verbose:Boolean = true):String
List all message mappings.
ModuleCore
  
listMappedProxies(verbose:Boolean = true):String
List all model mappings.
ModuleCore
  
sendMessage(type:String, params:Object = null):void
Sends message for other framework actors to react to.
ModuleCore
Protected Methods
 MethodDefined By
  
onDispose():void
Function called before module is destroyed.
ModuleCore
  
onInit():void
Function called after framework is initialized.
ModuleCore
Property Detail
commandMapproperty
public var commandMap:CommandMap

Handles application Commands.

mediatorMapproperty 
protected var mediatorMap:MediatorMap

Handles application Mediators.

moduleNameproperty 
moduleName:String  [read-only]

Name of the module


Implementation
    public function get moduleName():String
proxyMapproperty 
protected var proxyMap:ProxyMap

Handles application Proxies.

Constructor Detail
ModuleCore()Constructor
public function ModuleCore(moduleName:String = null, extendedMediatorMapClass:Class = null, extendedProxyMapClass:Class = null, extendedCommandMapClass:Class = null, extendedMessengerClass:Class = null)

CONSTRUCTOR

Parameters
moduleName:String (default = null) — module name that is used for referencing a module. (if not provided - unique name will be generated automatically.)
 
extendedMediatorMapClass:Class (default = null) — OPTIONAL class to change default MediatorMap class. (For advanced use only, like custom extensions.)
 
extendedProxyMapClass:Class (default = null) — OPTIONAL class to change default ProxyMap class. (For advanced use only, like custom extensions.)
 
extendedCommandMapClass:Class (default = null) — OPTIONAL class to change default CommandMap class. (For advanced use only, like custom extensions.)
 
extendedMessengerClass:Class (default = null) — OPTIONAL class to change default Messenger class. (For advanced use only, like custom extensions.)
Method Detail
disposeModule()method
public function disposeModule():void

Function to get rid of module.

- All module commands are unmapped. - All module mediators are unmediated - All module proxies are unmapped - All internals are set to null.

listMappedCommands()method 
public function listMappedCommands(verbose:Boolean = true):String

List all controller mappings.

Parameters

verbose:Boolean (default = true) — if set to true, will return readable string, false will return pairs of message type and command class definition separated by '>', all pairs are separated by ';'.

Returns
String — Text with all mapped commands.
listMappedMediators()method 
public function listMappedMediators(verbose:Boolean = true):String

List all view mappings.

Parameters

verbose:Boolean (default = true) — if set to true, will return readable string, false will return pairs of view class definition and mediator class list(separated by ',') definition separated by '>', all pairs are separated by ';'.

Returns
String — Text with all mapped mediators.
listMappedMessages()method 
public function listMappedMessages(verbose:Boolean = true):String

List all message mappings.

Parameters

verbose:Boolean (default = true) — if set to true, will return readable string, false will return pairs of message strings and list of class names(separated by ',') that will handle it separated by '>', all pairs are separated by ';'.

Returns
String — Text with all masseges, and what will handle it.
listMappedProxies()method 
public function listMappedProxies(verbose:Boolean = true):String

List all model mappings.

Parameters

verbose:Boolean (default = true) — if set to true, will return readable string, false will return pairs of object class name and key it is mapped to separated by '>', all pairs are separated by ';'.

Returns
String — Text string with all mapped proxies.
onDispose()method 
protected function onDispose():void

Function called before module is destroyed. Meant to be overridden.

onInit()method 
protected function onInit():void

Function called after framework is initialized. Meant to be overridden.

sendMessage()method 
public function sendMessage(type:String, params:Object = null):void

Sends message for other framework actors to react to.

Parameters

type:String — type of the message. (Commands and handle functions must be mapped to type to be triggered.)
 
params:Object (default = null) — Object that will be send to Command execute() or to handle function as parameter.