Skip to content
Browse files

renames CommandMap to CommandCenter

  • Loading branch information...
1 parent 6fa7925 commit 8bbbf9ea7938da7a540f12b2879cb3718f5efbfe @darscan committed
Showing with 193 additions and 187 deletions.
  1. +1 −1 src/robotlegs/bender/bundles/mvcs/Command.as
  2. +2 −2 src/robotlegs/bender/bundles/mvcs/MVCSBundle.as
  3. +6 −6 ...s/bender/extensions/{commandMap/CommandMapExtension.as → commandCenter/CommandCenterExtension.as}
  4. +1 −1 src/robotlegs/bender/extensions/{commandMap → commandCenter}/api/ICommand.as
  5. +5 −5 ...robotlegs/bender/extensions/{commandMap/api/ICommandMap.as → commandCenter/api/ICommandCenter.as}
  6. +1 −1 src/robotlegs/bender/extensions/{commandMap → commandCenter}/api/ICommandMapping.as
  7. +1 −1 src/robotlegs/bender/extensions/{commandMap → commandCenter}/api/ICommandTrigger.as
  8. +1 −1 src/robotlegs/bender/extensions/{commandMap → commandCenter}/dsl/ICommandMapper.as
  9. +1 −1 src/robotlegs/bender/extensions/{commandMap → commandCenter}/dsl/ICommandMappingConfig.as
  10. +1 −1 src/robotlegs/bender/extensions/{commandMap → commandCenter}/dsl/ICommandMappingFinder.as
  11. +1 −1 src/robotlegs/bender/extensions/{commandMap → commandCenter}/dsl/ICommandUnmapper.as
  12. +7 −7 ...robotlegs/bender/extensions/{commandMap/impl/CommandMap.as → commandCenter/impl/CommandCenter.as}
  13. +7 −7 src/robotlegs/bender/extensions/{commandMap → commandCenter}/impl/CommandMapper.as
  14. +3 −3 src/robotlegs/bender/extensions/{commandMap → commandCenter}/impl/CommandMapping.as
  15. +16 −0 src/robotlegs/bender/extensions/commandCenter/readme.md
  16. +0 −16 src/robotlegs/bender/extensions/commandMap/readme.md
  17. +3 −3 src/robotlegs/bender/extensions/eventCommandMap/api/IEventCommandMap.as
  18. +2 −2 src/robotlegs/bender/extensions/eventCommandMap/impl/EventCommandExecutor.as
  19. +1 −1 src/robotlegs/bender/extensions/eventCommandMap/impl/EventCommandFactory.as
  20. +14 −11 src/robotlegs/bender/extensions/eventCommandMap/impl/EventCommandMap.as
  21. +2 −2 src/robotlegs/bender/extensions/eventCommandMap/impl/EventCommandTrigger.as
  22. +3 −3 src/robotlegs/bender/extensions/eventCommandMap/readme.md
  23. +3 −3 src/robotlegs/bender/extensions/messageCommandMap/api/IMessageCommandMap.as
  24. +14 −11 src/robotlegs/bender/extensions/messageCommandMap/impl/MessageCommandMap.as
  25. +2 −2 src/robotlegs/bender/extensions/messageCommandMap/impl/MessageCommandTrigger.as
  26. +3 −3 src/robotlegs/bender/extensions/messageCommandMap/readme.md
  27. +2 −2 test/robotlegs/bender/extensions/ExtensionsTestSuite.as
  28. +6 −6 .../extensions/{commandMap/CommandMapExtensionTest.as → commandCenter/CommandCenterExtensionTest.as}
  29. +6 −6 ...s/{commandMap/CommandMapExtensionTestSuite.as → commandCenter/CommandCenterExtensionTestSuite.as}
  30. +23 −23 ...s/bender/extensions/{commandMap/impl/CommandMapTest.as → commandCenter/impl/CommandCenterTest.as}
  31. +2 −2 test/robotlegs/bender/extensions/{commandMap → commandCenter}/impl/CommandMappingTest.as
  32. +1 −1 test/robotlegs/bender/extensions/{commandMap → commandCenter}/support/CallbackCommand.as
  33. +1 −1 test/robotlegs/bender/extensions/{commandMap → commandCenter}/support/CallbackCommand2.as
  34. +3 −3 test/robotlegs/bender/extensions/{commandMap → commandCenter}/support/CallbackCommandTrigger.as
  35. +1 −1 test/robotlegs/bender/extensions/{commandMap → commandCenter}/support/NullCommand.as
  36. +3 −3 test/robotlegs/bender/extensions/{commandMap → commandCenter}/support/NullCommandTrigger.as
  37. +1 −1 .../robotlegs/bender/extensions/{commandMap → commandCenter}/support/SelfReportingCallbackCommand.as
  38. +1 −1 ...robotlegs/bender/extensions/{commandMap → commandCenter}/support/SelfReportingCallbackCommand2.as
  39. +1 −1 test/robotlegs/bender/extensions/{commandMap → commandCenter}/support/SelfReportingCallbackGuard.as
  40. +1 −1 test/robotlegs/bender/extensions/{commandMap → commandCenter}/support/SelfReportingCallbackHook.as
  41. +2 −2 test/robotlegs/bender/extensions/eventCommandMap/EventCommandMapExtensionTest.as
  42. +6 −6 test/robotlegs/bender/extensions/eventCommandMap/impl/EventCommandMapTest.as
  43. +12 −12 test/robotlegs/bender/extensions/eventCommandMap/impl/EventCommandTriggerTest.as
  44. +1 −1 test/robotlegs/bender/extensions/eventCommandMap/support/CascadingCommand.as
  45. +2 −2 test/robotlegs/bender/extensions/messageCommandMap/MessageCommandMapExtensionTest.as
  46. +6 −6 test/robotlegs/bender/extensions/messageCommandMap/impl/MessageCommandMapTest.as
  47. +11 −11 test/robotlegs/bender/extensions/messageCommandMap/impl/MessageCommandTriggerTest.as
View
2 src/robotlegs/bender/bundles/mvcs/Command.as
@@ -7,7 +7,7 @@
package robotlegs.bender.bundles.mvcs
{
- import robotlegs.bender.extensions.commandMap.api.ICommand;
+ import robotlegs.bender.extensions.commandCenter.api.ICommand;
/**
* Abstract command implementation
View
4 src/robotlegs/bender/bundles/mvcs/MVCSBundle.as
@@ -8,7 +8,7 @@
package robotlegs.bender.bundles.mvcs
{
import robotlegs.bender.bundles.shared.configs.ContextViewListenerConfig;
- import robotlegs.bender.extensions.commandMap.CommandMapExtension;
+ import robotlegs.bender.extensions.commandCenter.CommandCenterExtension;
import robotlegs.bender.extensions.contextView.ContextViewExtension;
import robotlegs.bender.extensions.eventCommandMap.EventCommandMapExtension;
import robotlegs.bender.extensions.eventDispatcher.EventDispatcherExtension;
@@ -45,7 +45,7 @@ package robotlegs.bender.bundles.mvcs
ContextViewExtension,
EventDispatcherExtension,
ModularityExtension,
- CommandMapExtension,
+ CommandCenterExtension,
EventCommandMapExtension,
LocalEventMapExtension,
ViewManagerExtension,
View
12 ...ensions/commandMap/CommandMapExtension.as → ...s/commandCenter/CommandCenterExtension.as
@@ -5,22 +5,22 @@
// in accordance with the terms of the license agreement accompanying it.
//------------------------------------------------------------------------------
-package robotlegs.bender.extensions.commandMap
+package robotlegs.bender.extensions.commandCenter
{
- import robotlegs.bender.extensions.commandMap.api.ICommandMap;
- import robotlegs.bender.extensions.commandMap.impl.CommandMap;
+ import robotlegs.bender.extensions.commandCenter.api.ICommandCenter;
+ import robotlegs.bender.extensions.commandCenter.impl.CommandCenter;
import robotlegs.bender.framework.api.IContext;
import robotlegs.bender.framework.api.IExtension;
import robotlegs.bender.framework.impl.UID;
- public class CommandMapExtension implements IExtension
+ public class CommandCenterExtension implements IExtension
{
/*============================================================================*/
/* Private Properties */
/*============================================================================*/
- private const _uid:String = UID.create(CommandMapExtension);
+ private const _uid:String = UID.create(CommandCenterExtension);
/*============================================================================*/
/* Public Functions */
@@ -28,7 +28,7 @@ package robotlegs.bender.extensions.commandMap
public function extend(context:IContext):void
{
- context.injector.map(ICommandMap).toSingleton(CommandMap);
+ context.injector.map(ICommandCenter).toSingleton(CommandCenter);
}
public function toString():String
View
2 ...der/extensions/commandMap/api/ICommand.as → .../extensions/commandCenter/api/ICommand.as
@@ -5,7 +5,7 @@
// in accordance with the terms of the license agreement accompanying it.
//------------------------------------------------------------------------------
-package robotlegs.bender.extensions.commandMap.api
+package robotlegs.bender.extensions.commandCenter.api
{
public interface ICommand
View
10 .../extensions/commandMap/api/ICommandMap.as → ...sions/commandCenter/api/ICommandCenter.as
@@ -5,13 +5,13 @@
// in accordance with the terms of the license agreement accompanying it.
//------------------------------------------------------------------------------
-package robotlegs.bender.extensions.commandMap.api
+package robotlegs.bender.extensions.commandCenter.api
{
- import robotlegs.bender.extensions.commandMap.dsl.ICommandMapper;
- import robotlegs.bender.extensions.commandMap.dsl.ICommandMappingFinder;
- import robotlegs.bender.extensions.commandMap.dsl.ICommandUnmapper;
+ import robotlegs.bender.extensions.commandCenter.dsl.ICommandMapper;
+ import robotlegs.bender.extensions.commandCenter.dsl.ICommandMappingFinder;
+ import robotlegs.bender.extensions.commandCenter.dsl.ICommandUnmapper;
- public interface ICommandMap
+ public interface ICommandCenter
{
function map(trigger:ICommandTrigger):ICommandMapper;
View
2 ...ensions/commandMap/api/ICommandMapping.as → ...ions/commandCenter/api/ICommandMapping.as
@@ -5,7 +5,7 @@
// in accordance with the terms of the license agreement accompanying it.
//------------------------------------------------------------------------------
-package robotlegs.bender.extensions.commandMap.api
+package robotlegs.bender.extensions.commandCenter.api
{
public interface ICommandMapping
View
2 ...ensions/commandMap/api/ICommandTrigger.as → ...ions/commandCenter/api/ICommandTrigger.as
@@ -5,7 +5,7 @@
// in accordance with the terms of the license agreement accompanying it.
//------------------------------------------------------------------------------
-package robotlegs.bender.extensions.commandMap.api
+package robotlegs.bender.extensions.commandCenter.api
{
public interface ICommandTrigger
View
2 ...tensions/commandMap/dsl/ICommandMapper.as → ...sions/commandCenter/dsl/ICommandMapper.as
@@ -5,7 +5,7 @@
// in accordance with the terms of the license agreement accompanying it.
//------------------------------------------------------------------------------
-package robotlegs.bender.extensions.commandMap.dsl
+package robotlegs.bender.extensions.commandCenter.dsl
{
public interface ICommandMapper
View
2 ...s/commandMap/dsl/ICommandMappingConfig.as → ...ommandCenter/dsl/ICommandMappingConfig.as
@@ -5,7 +5,7 @@
// in accordance with the terms of the license agreement accompanying it.
//------------------------------------------------------------------------------
-package robotlegs.bender.extensions.commandMap.dsl
+package robotlegs.bender.extensions.commandCenter.dsl
{
public interface ICommandMappingConfig
View
2 ...s/commandMap/dsl/ICommandMappingFinder.as → ...ommandCenter/dsl/ICommandMappingFinder.as
@@ -5,7 +5,7 @@
// in accordance with the terms of the license agreement accompanying it.
//------------------------------------------------------------------------------
-package robotlegs.bender.extensions.commandMap.dsl
+package robotlegs.bender.extensions.commandCenter.dsl
{
public interface ICommandMappingFinder
View
2 ...nsions/commandMap/dsl/ICommandUnmapper.as → ...ons/commandCenter/dsl/ICommandUnmapper.as
@@ -5,7 +5,7 @@
// in accordance with the terms of the license agreement accompanying it.
//------------------------------------------------------------------------------
-package robotlegs.bender.extensions.commandMap.dsl
+package robotlegs.bender.extensions.commandCenter.dsl
{
public interface ICommandUnmapper
View
14 .../extensions/commandMap/impl/CommandMap.as → ...sions/commandCenter/impl/CommandCenter.as
@@ -5,16 +5,16 @@
// in accordance with the terms of the license agreement accompanying it.
//------------------------------------------------------------------------------
-package robotlegs.bender.extensions.commandMap.impl
+package robotlegs.bender.extensions.commandCenter.impl
{
import flash.utils.Dictionary;
- import robotlegs.bender.extensions.commandMap.api.ICommandMap;
- import robotlegs.bender.extensions.commandMap.dsl.ICommandMapper;
- import robotlegs.bender.extensions.commandMap.dsl.ICommandMappingFinder;
- import robotlegs.bender.extensions.commandMap.api.ICommandTrigger;
- import robotlegs.bender.extensions.commandMap.dsl.ICommandUnmapper;
+ import robotlegs.bender.extensions.commandCenter.api.ICommandCenter;
+ import robotlegs.bender.extensions.commandCenter.dsl.ICommandMapper;
+ import robotlegs.bender.extensions.commandCenter.dsl.ICommandMappingFinder;
+ import robotlegs.bender.extensions.commandCenter.api.ICommandTrigger;
+ import robotlegs.bender.extensions.commandCenter.dsl.ICommandUnmapper;
- public class CommandMap implements ICommandMap
+ public class CommandCenter implements ICommandCenter
{
/*============================================================================*/
View
14 ...tensions/commandMap/impl/CommandMapper.as → ...sions/commandCenter/impl/CommandMapper.as
@@ -5,15 +5,15 @@
// in accordance with the terms of the license agreement accompanying it.
//------------------------------------------------------------------------------
-package robotlegs.bender.extensions.commandMap.impl
+package robotlegs.bender.extensions.commandCenter.impl
{
import flash.utils.Dictionary;
- import robotlegs.bender.extensions.commandMap.dsl.ICommandMapper;
- import robotlegs.bender.extensions.commandMap.api.ICommandMapping;
- import robotlegs.bender.extensions.commandMap.dsl.ICommandMappingConfig;
- import robotlegs.bender.extensions.commandMap.dsl.ICommandMappingFinder;
- import robotlegs.bender.extensions.commandMap.api.ICommandTrigger;
- import robotlegs.bender.extensions.commandMap.dsl.ICommandUnmapper;
+ import robotlegs.bender.extensions.commandCenter.dsl.ICommandMapper;
+ import robotlegs.bender.extensions.commandCenter.api.ICommandMapping;
+ import robotlegs.bender.extensions.commandCenter.dsl.ICommandMappingConfig;
+ import robotlegs.bender.extensions.commandCenter.dsl.ICommandMappingFinder;
+ import robotlegs.bender.extensions.commandCenter.api.ICommandTrigger;
+ import robotlegs.bender.extensions.commandCenter.dsl.ICommandUnmapper;
public class CommandMapper implements ICommandMapper, ICommandMappingFinder, ICommandUnmapper
{
View
6 ...ensions/commandMap/impl/CommandMapping.as → ...ions/commandCenter/impl/CommandMapping.as
@@ -5,10 +5,10 @@
// in accordance with the terms of the license agreement accompanying it.
//------------------------------------------------------------------------------
-package robotlegs.bender.extensions.commandMap.impl
+package robotlegs.bender.extensions.commandCenter.impl
{
- import robotlegs.bender.extensions.commandMap.api.ICommandMapping;
- import robotlegs.bender.extensions.commandMap.dsl.ICommandMappingConfig;
+ import robotlegs.bender.extensions.commandCenter.api.ICommandMapping;
+ import robotlegs.bender.extensions.commandCenter.dsl.ICommandMappingConfig;
public class CommandMapping implements ICommandMapping, ICommandMappingConfig
{
View
16 src/robotlegs/bender/extensions/commandCenter/readme.md
@@ -0,0 +1,16 @@
+# CommandCenter
+
+This extension is used by command based extensions such as the Event Command Map and the Message Command Map.
+
+It is not intended to be used directly. It is included in the MVCS Bundle.
+
+## Installation
+
+### During Context Construction
+
+ _context = new Context()
+ .extend(CommandCenterExtension);
+
+### At Runtime
+
+ _context.extend(CommandCenterExtension);
View
16 src/robotlegs/bender/extensions/commandMap/readme.md
@@ -1,16 +0,0 @@
-# CommandMap
-
-The Command Map Extension is the basis for command map based extensions such as the Event Command Map and the Message Command Map.
-
-It is not intended to be used directly.
-
-## Installation
-
-### During Context Construction
-
- _context = new Context()
- .extend(CommandMapExtension);
-
-### At Runtime
-
- _context.extend(CommandMapExtension);
View
6 src/robotlegs/bender/extensions/eventCommandMap/api/IEventCommandMap.as
@@ -7,9 +7,9 @@
package robotlegs.bender.extensions.eventCommandMap.api
{
- import robotlegs.bender.extensions.commandMap.dsl.ICommandMapper;
- import robotlegs.bender.extensions.commandMap.dsl.ICommandMappingFinder;
- import robotlegs.bender.extensions.commandMap.dsl.ICommandUnmapper;
+ import robotlegs.bender.extensions.commandCenter.dsl.ICommandMapper;
+ import robotlegs.bender.extensions.commandCenter.dsl.ICommandMappingFinder;
+ import robotlegs.bender.extensions.commandCenter.dsl.ICommandUnmapper;
public interface IEventCommandMap
{
View
4 src/robotlegs/bender/extensions/eventCommandMap/impl/EventCommandExecutor.as
@@ -9,8 +9,8 @@ package robotlegs.bender.extensions.eventCommandMap.impl
{
import flash.events.Event;
import org.swiftsuspenders.Injector;
- import robotlegs.bender.extensions.commandMap.api.ICommandMapping;
- import robotlegs.bender.extensions.commandMap.api.ICommandTrigger;
+ import robotlegs.bender.extensions.commandCenter.api.ICommandMapping;
+ import robotlegs.bender.extensions.commandCenter.api.ICommandTrigger;
import robotlegs.bender.framework.impl.guardsApprove;
public class EventCommandExecutor
View
2 src/robotlegs/bender/extensions/eventCommandMap/impl/EventCommandFactory.as
@@ -8,7 +8,7 @@
package robotlegs.bender.extensions.eventCommandMap.impl
{
import org.swiftsuspenders.Injector;
- import robotlegs.bender.extensions.commandMap.api.ICommandMapping;
+ import robotlegs.bender.extensions.commandCenter.api.ICommandMapping;
import robotlegs.bender.framework.impl.applyHooks;
public class EventCommandFactory
View
25 src/robotlegs/bender/extensions/eventCommandMap/impl/EventCommandMap.as
@@ -10,11 +10,11 @@ package robotlegs.bender.extensions.eventCommandMap.impl
import flash.events.IEventDispatcher;
import flash.utils.Dictionary;
import org.swiftsuspenders.Injector;
- import robotlegs.bender.extensions.commandMap.api.ICommandMap;
- import robotlegs.bender.extensions.commandMap.api.ICommandTrigger;
- import robotlegs.bender.extensions.commandMap.dsl.ICommandMapper;
- import robotlegs.bender.extensions.commandMap.dsl.ICommandMappingFinder;
- import robotlegs.bender.extensions.commandMap.dsl.ICommandUnmapper;
+ import robotlegs.bender.extensions.commandCenter.api.ICommandCenter;
+ import robotlegs.bender.extensions.commandCenter.api.ICommandTrigger;
+ import robotlegs.bender.extensions.commandCenter.dsl.ICommandMapper;
+ import robotlegs.bender.extensions.commandCenter.dsl.ICommandMappingFinder;
+ import robotlegs.bender.extensions.commandCenter.dsl.ICommandUnmapper;
import robotlegs.bender.extensions.eventCommandMap.api.IEventCommandMap;
public class EventCommandMap implements IEventCommandMap
@@ -30,17 +30,20 @@ package robotlegs.bender.extensions.eventCommandMap.impl
private var _dispatcher:IEventDispatcher;
- private var _commandMap:ICommandMap;
+ private var _commandCenter:ICommandCenter;
/*============================================================================*/
/* Constructor */
/*============================================================================*/
- public function EventCommandMap(injector:Injector, dispatcher:IEventDispatcher, commandMap:ICommandMap)
+ public function EventCommandMap(
+ injector:Injector,
+ dispatcher:IEventDispatcher,
+ commandCenter:ICommandCenter)
{
_injector = injector;
_dispatcher = dispatcher;
- _commandMap = commandMap;
+ _commandCenter = commandCenter;
}
/*============================================================================*/
@@ -52,17 +55,17 @@ package robotlegs.bender.extensions.eventCommandMap.impl
const trigger:ICommandTrigger =
_triggers[type + eventClass] ||=
createTrigger(type, eventClass);
- return _commandMap.map(trigger);
+ return _commandCenter.map(trigger);
}
public function unmap(type:String, eventClass:Class = null):ICommandUnmapper
{
- return _commandMap.unmap(getTrigger(type, eventClass));
+ return _commandCenter.unmap(getTrigger(type, eventClass));
}
public function getMapping(type:String, eventClass:Class = null):ICommandMappingFinder
{
- return _commandMap.getMapping(getTrigger(type, eventClass));
+ return _commandCenter.getMapping(getTrigger(type, eventClass));
}
/*============================================================================*/
View
4 src/robotlegs/bender/extensions/eventCommandMap/impl/EventCommandTrigger.as
@@ -10,8 +10,8 @@ package robotlegs.bender.extensions.eventCommandMap.impl
import flash.events.IEventDispatcher;
import flash.utils.describeType;
import org.swiftsuspenders.Injector;
- import robotlegs.bender.extensions.commandMap.api.ICommandMapping;
- import robotlegs.bender.extensions.commandMap.api.ICommandTrigger;
+ import robotlegs.bender.extensions.commandCenter.api.ICommandMapping;
+ import robotlegs.bender.extensions.commandCenter.api.ICommandTrigger;
public class EventCommandTrigger implements ICommandTrigger
{
View
6 src/robotlegs/bender/extensions/eventCommandMap/readme.md
@@ -26,17 +26,17 @@ This extension requires the following extensions:
## Extension Installation
_context = new Context().extend(
- CommandMapExtension,
+ CommandCenterExtension,
EventDispatcherExtension,
EventCommandMapExtension);
-Or, assuming that the EventDispatcher and CommandMap extensions have already been installed:
+Or, assuming that the EventDispatcher and CommandCenter extensions have already been installed:
_context.extend(EventCommandMapExtension);
## Extension Usage
-An instance of IEventCommandMap is mapped into the context during extension installation. This instance can be injected into clients and used as above.
+An instance of IEventCommandMap is mapped into the context during extension installation. This instance can be injected into clients and used as below.
[Inject]
public var eventCommandMap:IEventCommandMap;
View
6 src/robotlegs/bender/extensions/messageCommandMap/api/IMessageCommandMap.as
@@ -7,9 +7,9 @@
package robotlegs.bender.extensions.messageCommandMap.api
{
- import robotlegs.bender.extensions.commandMap.dsl.ICommandMapper;
- import robotlegs.bender.extensions.commandMap.dsl.ICommandMappingFinder;
- import robotlegs.bender.extensions.commandMap.dsl.ICommandUnmapper;
+ import robotlegs.bender.extensions.commandCenter.dsl.ICommandMapper;
+ import robotlegs.bender.extensions.commandCenter.dsl.ICommandMappingFinder;
+ import robotlegs.bender.extensions.commandCenter.dsl.ICommandUnmapper;
public interface IMessageCommandMap
{
View
25 src/robotlegs/bender/extensions/messageCommandMap/impl/MessageCommandMap.as
@@ -10,11 +10,11 @@ package robotlegs.bender.extensions.messageCommandMap.impl
import flash.utils.Dictionary;
import org.swiftsuspenders.Injector;
import robotlegs.bender.framework.api.IMessageDispatcher;
- import robotlegs.bender.extensions.commandMap.api.ICommandMap;
- import robotlegs.bender.extensions.commandMap.api.ICommandTrigger;
- import robotlegs.bender.extensions.commandMap.dsl.ICommandMapper;
- import robotlegs.bender.extensions.commandMap.dsl.ICommandMappingFinder;
- import robotlegs.bender.extensions.commandMap.dsl.ICommandUnmapper;
+ import robotlegs.bender.extensions.commandCenter.api.ICommandCenter;
+ import robotlegs.bender.extensions.commandCenter.api.ICommandTrigger;
+ import robotlegs.bender.extensions.commandCenter.dsl.ICommandMapper;
+ import robotlegs.bender.extensions.commandCenter.dsl.ICommandMappingFinder;
+ import robotlegs.bender.extensions.commandCenter.dsl.ICommandUnmapper;
import robotlegs.bender.extensions.messageCommandMap.api.IMessageCommandMap;
public class MessageCommandMap implements IMessageCommandMap
@@ -30,17 +30,20 @@ package robotlegs.bender.extensions.messageCommandMap.impl
private var _dispatcher:IMessageDispatcher;
- private var _commandMap:ICommandMap;
+ private var _commandCenter:ICommandCenter;
/*============================================================================*/
/* Constructor */
/*============================================================================*/
- public function MessageCommandMap(injector:Injector, dispatcher:IMessageDispatcher, commandMap:ICommandMap)
+ public function MessageCommandMap(
+ injector:Injector,
+ dispatcher:IMessageDispatcher,
+ commandCenter:ICommandCenter)
{
_injector = injector;
_dispatcher = dispatcher;
- _commandMap = commandMap;
+ _commandCenter = commandCenter;
}
/*============================================================================*/
@@ -52,17 +55,17 @@ package robotlegs.bender.extensions.messageCommandMap.impl
const trigger:ICommandTrigger =
_triggers[message] ||=
createTrigger(message);
- return _commandMap.map(trigger);
+ return _commandCenter.map(trigger);
}
public function unmap(message:Object):ICommandUnmapper
{
- return _commandMap.unmap(getTrigger(message));
+ return _commandCenter.unmap(getTrigger(message));
}
public function getMapping(message:Object):ICommandMappingFinder
{
- return _commandMap.getMapping(getTrigger(message));
+ return _commandCenter.getMapping(getTrigger(message));
}
/*============================================================================*/
View
4 src/robotlegs/bender/extensions/messageCommandMap/impl/MessageCommandTrigger.as
@@ -11,8 +11,8 @@ package robotlegs.bender.extensions.messageCommandMap.impl
import org.swiftsuspenders.Injector;
import robotlegs.bender.framework.impl.safelyCallBack;
import robotlegs.bender.framework.api.IMessageDispatcher;
- import robotlegs.bender.extensions.commandMap.api.ICommandMapping;
- import robotlegs.bender.extensions.commandMap.api.ICommandTrigger;
+ import robotlegs.bender.extensions.commandCenter.api.ICommandMapping;
+ import robotlegs.bender.extensions.commandCenter.api.ICommandTrigger;
import robotlegs.bender.framework.impl.guardsApprove;
import robotlegs.bender.framework.impl.applyHooks;
View
6 src/robotlegs/bender/extensions/messageCommandMap/readme.md
@@ -26,19 +26,19 @@ This extension requires the following extensions:
### During Context Construction
_context = new Context().extend(
- CommandMapExtension,
+ CommandCenterExtension,
MessageDispatcherExtension,
MessageCommandMapExtension);
### At Runtime
-Assuming that the MessageDispatcher and CommandMap extensions have already been installed:
+Assuming that the MessageDispatcher and CommandCenter extensions have already been installed:
_context.extend(MessageCommandMapExtension);
## Extension Usage
-An instance of IMessageCommandMap is mapped into the context during extension installation. This instance can be injected into clients and used as above.
+An instance of IMessageCommandMap is mapped into the context during extension installation. This instance can be injected into clients and used as below.
[Inject]
public var messageCommandMap:IMessageCommandMap;
View
4 test/robotlegs/bender/extensions/ExtensionsTestSuite.as
@@ -7,7 +7,7 @@
package robotlegs.bender.extensions
{
- import robotlegs.bender.extensions.commandMap.CommandMapExtensionTestSuite;
+ import robotlegs.bender.extensions.commandCenter.CommandCenterExtensionTestSuite;
import robotlegs.bender.extensions.contextView.ContextViewExtensionTestSuite;
import robotlegs.bender.extensions.eventCommandMap.EventCommandMapExtensionTestSuite;
import robotlegs.bender.extensions.eventDispatcher.EventDispatcherExtensionTestSuite;
@@ -32,7 +32,7 @@ package robotlegs.bender.extensions
/* Public Properties */
/*============================================================================*/
- public var commandMapExtension:CommandMapExtensionTestSuite;
+ public var commandMapExtension:CommandCenterExtensionTestSuite;
public var contextViewExtension:ContextViewExtensionTestSuite;
View
12 ...ons/commandMap/CommandMapExtensionTest.as → ...mmandCenter/CommandCenterExtensionTest.as
@@ -5,15 +5,15 @@
// in accordance with the terms of the license agreement accompanying it.
//------------------------------------------------------------------------------
-package robotlegs.bender.extensions.commandMap
+package robotlegs.bender.extensions.commandCenter
{
import org.flexunit.assertThat;
import org.hamcrest.object.instanceOf;
- import robotlegs.bender.extensions.commandMap.api.ICommandMap;
+ import robotlegs.bender.extensions.commandCenter.api.ICommandCenter;
import robotlegs.bender.extensions.eventDispatcher.EventDispatcherExtension;
import robotlegs.bender.framework.impl.Context;
- public class CommandMapExtensionTest
+ public class CommandCenterExtensionTest
{
/*============================================================================*/
@@ -30,7 +30,7 @@ package robotlegs.bender.extensions.commandMap
public function before():void
{
context = new Context();
- context.extend(EventDispatcherExtension, CommandMapExtension);
+ context.extend(EventDispatcherExtension, CommandCenterExtension);
}
/*============================================================================*/
@@ -42,10 +42,10 @@ package robotlegs.bender.extensions.commandMap
{
var actual:Object;
context.lifecycle.whenInitializing( function():void {
- actual = context.injector.getInstance(ICommandMap);
+ actual = context.injector.getInstance(ICommandCenter);
});
context.initialize();
- assertThat(actual, instanceOf(ICommandMap));
+ assertThat(actual, instanceOf(ICommandCenter));
}
}
}
View
12 ...ommandMap/CommandMapExtensionTestSuite.as → ...Center/CommandCenterExtensionTestSuite.as
@@ -5,23 +5,23 @@
// in accordance with the terms of the license agreement accompanying it.
//------------------------------------------------------------------------------
-package robotlegs.bender.extensions.commandMap
+package robotlegs.bender.extensions.commandCenter
{
- import robotlegs.bender.extensions.commandMap.impl.CommandMapTest;
- import robotlegs.bender.extensions.commandMap.impl.CommandMappingTest;
+ import robotlegs.bender.extensions.commandCenter.impl.CommandCenterTest;
+ import robotlegs.bender.extensions.commandCenter.impl.CommandMappingTest;
[RunWith("org.flexunit.runners.Suite")]
[Suite]
- public class CommandMapExtensionTestSuite
+ public class CommandCenterExtensionTestSuite
{
/*============================================================================*/
/* Public Properties */
/*============================================================================*/
- public var commandMapExtension:CommandMapExtensionTest;
+ public var commandCenter:CommandCenterTest;
- public var commandMap:CommandMapTest;
+ public var commandCenterExtension:CommandCenterExtensionTest;
public var commandMappingTest:CommandMappingTest;
}
View
46 ...ensions/commandMap/impl/CommandMapTest.as → ...s/commandCenter/impl/CommandCenterTest.as
@@ -5,28 +5,28 @@
// in accordance with the terms of the license agreement accompanying it.
//------------------------------------------------------------------------------
-package robotlegs.bender.extensions.commandMap.impl
+package robotlegs.bender.extensions.commandCenter.impl
{
import org.hamcrest.assertThat;
import org.hamcrest.object.equalTo;
import org.hamcrest.object.notNullValue;
import org.hamcrest.object.nullValue;
import org.swiftsuspenders.Injector;
- import robotlegs.bender.extensions.commandMap.api.ICommandMap;
- import robotlegs.bender.extensions.commandMap.api.ICommandMapping;
- import robotlegs.bender.extensions.commandMap.api.ICommandTrigger;
- import robotlegs.bender.extensions.commandMap.support.CallbackCommandTrigger;
- import robotlegs.bender.extensions.commandMap.support.NullCommand;
- import robotlegs.bender.extensions.commandMap.support.NullCommandTrigger;
-
- public class CommandMapTest
+ import robotlegs.bender.extensions.commandCenter.api.ICommandCenter;
+ import robotlegs.bender.extensions.commandCenter.api.ICommandMapping;
+ import robotlegs.bender.extensions.commandCenter.api.ICommandTrigger;
+ import robotlegs.bender.extensions.commandCenter.support.CallbackCommandTrigger;
+ import robotlegs.bender.extensions.commandCenter.support.NullCommand;
+ import robotlegs.bender.extensions.commandCenter.support.NullCommandTrigger;
+
+ public class CommandCenterTest
{
/*============================================================================*/
/* Protected Properties */
/*============================================================================*/
- protected var commandMap:ICommandMap;
+ protected var commandCenter:ICommandCenter;
protected var injector:Injector;
@@ -40,7 +40,7 @@ package robotlegs.bender.extensions.commandMap.impl
public function before():void
{
injector = new Injector();
- commandMap = new CommandMap();
+ commandCenter = new CommandCenter();
trigger = new NullCommandTrigger(injector);
}
@@ -48,7 +48,7 @@ package robotlegs.bender.extensions.commandMap.impl
public function after():void
{
injector = null;
- commandMap = null;
+ commandCenter = null;
trigger = null;
}
@@ -59,42 +59,42 @@ package robotlegs.bender.extensions.commandMap.impl
[Test]
public function mapTrigger_creates_mapper():void
{
- assertThat(commandMap.map(trigger), notNullValue());
+ assertThat(commandCenter.map(trigger), notNullValue());
}
[Test]
public function mapTrigger_to_command_stores_mapping():void
{
- commandMap.map(trigger).toCommand(NullCommand);
- assertThat(commandMap.getMapping(trigger).forCommand(NullCommand), notNullValue());
+ commandCenter.map(trigger).toCommand(NullCommand);
+ assertThat(commandCenter.getMapping(trigger).forCommand(NullCommand), notNullValue());
}
[Test]
public function unmapTrigger_from_command_removes_mapping():void
{
- commandMap.map(trigger).toCommand(NullCommand);
- commandMap.unmap(trigger).fromCommand(NullCommand);
- assertThat(commandMap.getMapping(trigger).forCommand(NullCommand), nullValue());
+ commandCenter.map(trigger).toCommand(NullCommand);
+ commandCenter.unmap(trigger).fromCommand(NullCommand);
+ assertThat(commandCenter.getMapping(trigger).forCommand(NullCommand), nullValue());
}
[Test]
public function trigger_is_passed_mapping():void
{
- var addedCount:uint;
+ var addedCount:uint = 0;
const trigger:ICommandTrigger = new CallbackCommandTrigger(
injector,
function(mapping:ICommandMapping):void
{
addedCount++;
});
- commandMap.map(trigger).toCommand(NullCommand);
+ commandCenter.map(trigger).toCommand(NullCommand);
assertThat(addedCount, equalTo(1));
}
[Test]
public function trigger_is_passed_mapping_for_removal():void
{
- var removedCount:uint;
+ var removedCount:uint = 0;
const trigger:ICommandTrigger = new CallbackCommandTrigger(
injector,
null,
@@ -102,8 +102,8 @@ package robotlegs.bender.extensions.commandMap.impl
{
removedCount++;
});
- commandMap.map(trigger).toCommand(NullCommand);
- commandMap.unmap(trigger).fromCommand(NullCommand);
+ commandCenter.map(trigger).toCommand(NullCommand);
+ commandCenter.unmap(trigger).fromCommand(NullCommand);
assertThat(removedCount, equalTo(1));
}
}
View
4 ...ons/commandMap/impl/CommandMappingTest.as → .../commandCenter/impl/CommandMappingTest.as
@@ -5,7 +5,7 @@
// in accordance with the terms of the license agreement accompanying it.
//------------------------------------------------------------------------------
-package robotlegs.bender.extensions.commandMap.impl
+package robotlegs.bender.extensions.commandCenter.impl
{
import org.hamcrest.assertThat;
import org.hamcrest.collection.array;
@@ -13,7 +13,7 @@ package robotlegs.bender.extensions.commandMap.impl
import org.hamcrest.object.isFalse;
import org.hamcrest.object.isTrue;
- import robotlegs.bender.extensions.commandMap.support.NullCommand;
+ import robotlegs.bender.extensions.commandCenter.support.NullCommand;
public class CommandMappingTest
{
View
2 ...ons/commandMap/support/CallbackCommand.as → .../commandCenter/support/CallbackCommand.as
@@ -5,7 +5,7 @@
// in accordance with the terms of the license agreement accompanying it.
//------------------------------------------------------------------------------
-package robotlegs.bender.extensions.commandMap.support
+package robotlegs.bender.extensions.commandCenter.support
{
public class CallbackCommand
View
2 ...ns/commandMap/support/CallbackCommand2.as → ...commandCenter/support/CallbackCommand2.as
@@ -5,7 +5,7 @@
// in accordance with the terms of the license agreement accompanying it.
//------------------------------------------------------------------------------
-package robotlegs.bender.extensions.commandMap.support
+package robotlegs.bender.extensions.commandCenter.support
{
public class CallbackCommand2 extends CallbackCommand
View
6 ...mandMap/support/CallbackCommandTrigger.as → ...dCenter/support/CallbackCommandTrigger.as
@@ -5,10 +5,10 @@
// in accordance with the terms of the license agreement accompanying it.
//------------------------------------------------------------------------------
-package robotlegs.bender.extensions.commandMap.support
+package robotlegs.bender.extensions.commandCenter.support
{
- import robotlegs.bender.extensions.commandMap.api.ICommandMapping;
- import robotlegs.bender.extensions.commandMap.api.ICommandTrigger;
+ import robotlegs.bender.extensions.commandCenter.api.ICommandMapping;
+ import robotlegs.bender.extensions.commandCenter.api.ICommandTrigger;
import org.swiftsuspenders.Injector;
public class CallbackCommandTrigger implements ICommandTrigger
View
2 ...ensions/commandMap/support/NullCommand.as → ...ions/commandCenter/support/NullCommand.as
@@ -5,7 +5,7 @@
// in accordance with the terms of the license agreement accompanying it.
//------------------------------------------------------------------------------
-package robotlegs.bender.extensions.commandMap.support
+package robotlegs.bender.extensions.commandCenter.support
{
public class NullCommand
View
6 .../commandMap/support/NullCommandTrigger.as → ...mmandCenter/support/NullCommandTrigger.as
@@ -5,10 +5,10 @@
// in accordance with the terms of the license agreement accompanying it.
//------------------------------------------------------------------------------
-package robotlegs.bender.extensions.commandMap.support
+package robotlegs.bender.extensions.commandCenter.support
{
- import robotlegs.bender.extensions.commandMap.api.ICommandMapping;
- import robotlegs.bender.extensions.commandMap.api.ICommandTrigger;
+ import robotlegs.bender.extensions.commandCenter.api.ICommandMapping;
+ import robotlegs.bender.extensions.commandCenter.api.ICommandTrigger;
import org.swiftsuspenders.Injector;
public class NullCommandTrigger implements ICommandTrigger
View
2 ...p/support/SelfReportingCallbackCommand.as → ...r/support/SelfReportingCallbackCommand.as
@@ -5,7 +5,7 @@
// in accordance with the terms of the license agreement accompanying it.
//------------------------------------------------------------------------------
-package robotlegs.bender.extensions.commandMap.support
+package robotlegs.bender.extensions.commandCenter.support
{
public class SelfReportingCallbackCommand
View
2 .../support/SelfReportingCallbackCommand2.as → .../support/SelfReportingCallbackCommand2.as
@@ -5,7 +5,7 @@
// in accordance with the terms of the license agreement accompanying it.
//------------------------------------------------------------------------------
-package robotlegs.bender.extensions.commandMap.support
+package robotlegs.bender.extensions.commandCenter.support
{
public class SelfReportingCallbackCommand2 extends SelfReportingCallbackCommand
View
2 ...Map/support/SelfReportingCallbackGuard.as → ...ter/support/SelfReportingCallbackGuard.as
@@ -5,7 +5,7 @@
// in accordance with the terms of the license agreement accompanying it.
//------------------------------------------------------------------------------
-package robotlegs.bender.extensions.commandMap.support
+package robotlegs.bender.extensions.commandCenter.support
{
public class SelfReportingCallbackGuard
View
2 ...dMap/support/SelfReportingCallbackHook.as → ...nter/support/SelfReportingCallbackHook.as
@@ -5,7 +5,7 @@
// in accordance with the terms of the license agreement accompanying it.
//------------------------------------------------------------------------------
-package robotlegs.bender.extensions.commandMap.support
+package robotlegs.bender.extensions.commandCenter.support
{
public class SelfReportingCallbackHook
View
4 test/robotlegs/bender/extensions/eventCommandMap/EventCommandMapExtensionTest.as
@@ -9,7 +9,7 @@ package robotlegs.bender.extensions.eventCommandMap
{
import org.flexunit.assertThat;
import org.hamcrest.object.instanceOf;
- import robotlegs.bender.extensions.commandMap.CommandMapExtension;
+ import robotlegs.bender.extensions.commandCenter.CommandCenterExtension;
import robotlegs.bender.extensions.eventCommandMap.api.IEventCommandMap;
import robotlegs.bender.extensions.eventDispatcher.EventDispatcherExtension;
import robotlegs.bender.framework.impl.Context;
@@ -31,7 +31,7 @@ package robotlegs.bender.extensions.eventCommandMap
public function before():void
{
context = new Context();
- context.extend(EventDispatcherExtension, CommandMapExtension);
+ context.extend(EventDispatcherExtension, CommandCenterExtension);
}
/*============================================================================*/
View
12 test/robotlegs/bender/extensions/eventCommandMap/impl/EventCommandMapTest.as
@@ -12,9 +12,9 @@ package robotlegs.bender.extensions.eventCommandMap.impl
import org.hamcrest.object.notNullValue;
import org.hamcrest.object.nullValue;
import org.swiftsuspenders.Injector;
- import robotlegs.bender.extensions.commandMap.api.ICommandMap;
- import robotlegs.bender.extensions.commandMap.impl.CommandMap;
- import robotlegs.bender.extensions.commandMap.support.NullCommand;
+ import robotlegs.bender.extensions.commandCenter.api.ICommandCenter;
+ import robotlegs.bender.extensions.commandCenter.impl.CommandCenter;
+ import robotlegs.bender.extensions.commandCenter.support.NullCommand;
import robotlegs.bender.extensions.eventCommandMap.api.IEventCommandMap;
import robotlegs.bender.extensions.eventCommandMap.support.SupportEvent;
@@ -29,7 +29,7 @@ package robotlegs.bender.extensions.eventCommandMap.impl
private var dispatcher:EventDispatcher;
- private var commandMap:ICommandMap;
+ private var commandCenter:ICommandCenter;
private var eventCommandMap:IEventCommandMap;
@@ -42,8 +42,8 @@ package robotlegs.bender.extensions.eventCommandMap.impl
{
injector = new Injector();
dispatcher = new EventDispatcher();
- commandMap = new CommandMap();
- eventCommandMap = new EventCommandMap(injector, dispatcher, commandMap);
+ commandCenter = new CommandCenter();
+ eventCommandMap = new EventCommandMap(injector, dispatcher, commandCenter);
}
/*============================================================================*/
View
24 test/robotlegs/bender/extensions/eventCommandMap/impl/EventCommandTriggerTest.as
@@ -14,14 +14,14 @@ package robotlegs.bender.extensions.eventCommandMap.impl
import org.hamcrest.collection.array;
import org.hamcrest.object.equalTo;
import org.swiftsuspenders.Injector;
- import robotlegs.bender.extensions.commandMap.api.ICommandMap;
- import robotlegs.bender.extensions.commandMap.impl.CommandMap;
- import robotlegs.bender.extensions.commandMap.support.CallbackCommand;
- import robotlegs.bender.extensions.commandMap.support.CallbackCommand2;
- import robotlegs.bender.extensions.commandMap.support.NullCommand;
- import robotlegs.bender.extensions.commandMap.support.SelfReportingCallbackCommand;
- import robotlegs.bender.extensions.commandMap.support.SelfReportingCallbackCommand2;
- import robotlegs.bender.extensions.commandMap.support.SelfReportingCallbackHook;
+ import robotlegs.bender.extensions.commandCenter.api.ICommandCenter;
+ import robotlegs.bender.extensions.commandCenter.impl.CommandCenter;
+ import robotlegs.bender.extensions.commandCenter.support.CallbackCommand;
+ import robotlegs.bender.extensions.commandCenter.support.CallbackCommand2;
+ import robotlegs.bender.extensions.commandCenter.support.NullCommand;
+ import robotlegs.bender.extensions.commandCenter.support.SelfReportingCallbackCommand;
+ import robotlegs.bender.extensions.commandCenter.support.SelfReportingCallbackCommand2;
+ import robotlegs.bender.extensions.commandCenter.support.SelfReportingCallbackHook;
import robotlegs.bender.extensions.eventCommandMap.api.IEventCommandMap;
import robotlegs.bender.extensions.eventCommandMap.support.CascadingCommand;
import robotlegs.bender.extensions.eventCommandMap.support.EventInjectedCallbackCommand;
@@ -41,7 +41,7 @@ package robotlegs.bender.extensions.eventCommandMap.impl
private var dispatcher:IEventDispatcher;
- private var commandMap:ICommandMap;
+ private var commandCenter:ICommandCenter;
private var eventCommandMap:IEventCommandMap;
@@ -54,8 +54,8 @@ package robotlegs.bender.extensions.eventCommandMap.impl
{
injector = new Injector();
dispatcher = new EventDispatcher();
- commandMap = new CommandMap();
- eventCommandMap = new EventCommandMap(injector, dispatcher, commandMap);
+ commandCenter = new CommandCenter();
+ eventCommandMap = new EventCommandMap(injector, dispatcher, commandCenter);
}
/*============================================================================*/
@@ -65,7 +65,7 @@ package robotlegs.bender.extensions.eventCommandMap.impl
[Test(expects="Error")]
public function mapping_nonCommandClass_to_event_should_throw_error():void
{
- // NOTE: we do this here, not in the CommandMap itself
+ // NOTE: we do this here, not in the CommandCenter itself
// Some triggers don't require an execute() method
eventCommandMap.map(SupportEvent.TYPE1).toCommand(Object);
}
View
2 test/robotlegs/bender/extensions/eventCommandMap/support/CascadingCommand.as
@@ -9,7 +9,7 @@ package robotlegs.bender.extensions.eventCommandMap.support
{
import flash.events.Event;
import flash.events.IEventDispatcher;
- import robotlegs.bender.extensions.commandMap.support.NullCommand;
+ import robotlegs.bender.extensions.commandCenter.support.NullCommand;
import robotlegs.bender.extensions.eventCommandMap.api.IEventCommandMap;
public class CascadingCommand
View
4 test/robotlegs/bender/extensions/messageCommandMap/MessageCommandMapExtensionTest.as
@@ -9,7 +9,7 @@ package robotlegs.bender.extensions.messageCommandMap
{
import org.flexunit.assertThat;
import org.hamcrest.object.instanceOf;
- import robotlegs.bender.extensions.commandMap.CommandMapExtension;
+ import robotlegs.bender.extensions.commandCenter.CommandCenterExtension;
import robotlegs.bender.extensions.messageCommandMap.api.IMessageCommandMap;
import robotlegs.bender.extensions.messageDispatcher.MessageDispatcherExtension;
import robotlegs.bender.framework.impl.Context;
@@ -31,7 +31,7 @@ package robotlegs.bender.extensions.messageCommandMap
public function before():void
{
context = new Context();
- context.extend(MessageDispatcherExtension, CommandMapExtension);
+ context.extend(MessageDispatcherExtension, CommandCenterExtension);
}
/*============================================================================*/
View
12 test/robotlegs/bender/extensions/messageCommandMap/impl/MessageCommandMapTest.as
@@ -12,9 +12,9 @@ package robotlegs.bender.extensions.messageCommandMap.impl
import org.hamcrest.object.nullValue;
import org.swiftsuspenders.Injector;
import robotlegs.bender.framework.impl.MessageDispatcher;
- import robotlegs.bender.extensions.commandMap.api.ICommandMap;
- import robotlegs.bender.extensions.commandMap.impl.CommandMap;
- import robotlegs.bender.extensions.commandMap.support.NullCommand;
+ import robotlegs.bender.extensions.commandCenter.api.ICommandCenter;
+ import robotlegs.bender.extensions.commandCenter.impl.CommandCenter;
+ import robotlegs.bender.extensions.commandCenter.support.NullCommand;
import robotlegs.bender.extensions.messageCommandMap.api.IMessageCommandMap;
public class MessageCommandMapTest
@@ -28,7 +28,7 @@ package robotlegs.bender.extensions.messageCommandMap.impl
private var dispatcher:MessageDispatcher;
- private var commandMap:ICommandMap;
+ private var commandCenter:ICommandCenter;
private var messageCommandMap:IMessageCommandMap;
@@ -43,8 +43,8 @@ package robotlegs.bender.extensions.messageCommandMap.impl
{
injector = new Injector();
dispatcher = new MessageDispatcher();
- commandMap = new CommandMap();
- messageCommandMap = new MessageCommandMap(injector, dispatcher, commandMap);
+ commandCenter = new CommandCenter();
+ messageCommandMap = new MessageCommandMap(injector, dispatcher, commandCenter);
message = {};
}
View
22 test/robotlegs/bender/extensions/messageCommandMap/impl/MessageCommandTriggerTest.as
@@ -14,13 +14,13 @@ package robotlegs.bender.extensions.messageCommandMap.impl
import org.swiftsuspenders.Injector;
import robotlegs.bender.framework.api.IMessageDispatcher;
import robotlegs.bender.framework.impl.MessageDispatcher;
- import robotlegs.bender.extensions.commandMap.api.ICommandMap;
- import robotlegs.bender.extensions.commandMap.impl.CommandMap;
- import robotlegs.bender.extensions.commandMap.support.CallbackCommand;
- import robotlegs.bender.extensions.commandMap.support.CallbackCommand2;
- import robotlegs.bender.extensions.commandMap.support.SelfReportingCallbackCommand;
- import robotlegs.bender.extensions.commandMap.support.SelfReportingCallbackCommand2;
- import robotlegs.bender.extensions.commandMap.support.SelfReportingCallbackHook;
+ import robotlegs.bender.extensions.commandCenter.api.ICommandCenter;
+ import robotlegs.bender.extensions.commandCenter.impl.CommandCenter;
+ import robotlegs.bender.extensions.commandCenter.support.CallbackCommand;
+ import robotlegs.bender.extensions.commandCenter.support.CallbackCommand2;
+ import robotlegs.bender.extensions.commandCenter.support.SelfReportingCallbackCommand;
+ import robotlegs.bender.extensions.commandCenter.support.SelfReportingCallbackCommand2;
+ import robotlegs.bender.extensions.commandCenter.support.SelfReportingCallbackHook;
import robotlegs.bender.extensions.messageCommandMap.api.IMessageCommandMap;
import robotlegs.bender.extensions.messageCommandMap.support.CallbackConsumingCommand;
import robotlegs.bender.extensions.messageCommandMap.support.SupportMessage;
@@ -38,7 +38,7 @@ package robotlegs.bender.extensions.messageCommandMap.impl
private var dispatcher:IMessageDispatcher;
- private var commandMap:ICommandMap;
+ private var commandCenter:ICommandCenter;
private var messageCommandMap:IMessageCommandMap;
@@ -51,8 +51,8 @@ package robotlegs.bender.extensions.messageCommandMap.impl
{
injector = new Injector();
dispatcher = new MessageDispatcher();
- commandMap = new CommandMap();
- messageCommandMap = new MessageCommandMap(injector, dispatcher, commandMap);
+ commandCenter = new CommandCenter();
+ messageCommandMap = new MessageCommandMap(injector, dispatcher, commandCenter);
}
/*============================================================================*/
@@ -62,7 +62,7 @@ package robotlegs.bender.extensions.messageCommandMap.impl
[Test(expects="Error")]
public function mapping_nonCommandClass_should_throw_error():void
{
- // NOTE: we do this here, not in the CommandMap itself
+ // NOTE: we do this here, not in the CommandCenter itself
// Some triggers don't require an execute() method
messageCommandMap.map(SupportMessage).toCommand(Object);
}

0 comments on commit 8bbbf9e

Please sign in to comment.
Something went wrong with that request. Please try again.