Commits

Anonymous committed 9685db5

Refactoring. Version 1.0.5

Comments (0)

Files changed (13)

as3snapi-core/pom.xml

     <parent>
         <groupId>as3snapi</groupId>
         <artifactId>as3snapi</artifactId>
-        <version>1.0.4-SNAPSHOT</version>
+        <version>1.0.5-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 

as3snapi-core/src/as3snapi/ConnectionFactory.as

 import as3snapi.base.features.log.IFeatureLog;
 import as3snapi.base.features.requester.FeatureHttpRequester;
 import as3snapi.base.features.requester.IFeatureHttpRequester;
-import as3snapi.plugins.BusFactoryEvent;
-import as3snapi.plugins.IBusModule;
+import as3snapi.base.plugins.BusFactoryEvent;
+import as3snapi.base.plugins.IBusModule;
 import as3snapi.utils.EnumUtils;
 import as3snapi.utils.bus.BusImpl;
 import as3snapi.utils.bus.IMutableBus;

as3snapi-core/src/as3snapi/base/plugins/BusFactoryEvent.as

+package as3snapi.base.plugins {
+import flash.events.Event;
+
+/**
+ * События различных стадий жизненного цикла шины
+ * @see ConnectionFactory
+ */
+public class BusFactoryEvent extends Event {
+
+    public static const BASIC_FEATURES_ADDED:String = "BASIC_FEATURES_ADDED";
+    public static const SOCIAL_NETWORK_FEATURES_ADDED:String = "SOCIAL_NETWORK_FEATURES_ADDED";
+    public static const FEATURES_READY:String = "FEATURES_READY";
+
+    public function BusFactoryEvent(type:String) {
+        super(type);
+    }
+
+    override public function clone():Event {
+        return new BusFactoryEvent(type);
+    }
+}
+}

as3snapi-core/src/as3snapi/base/plugins/IBusModule.as

+package as3snapi.base.plugins {
+import as3snapi.utils.bus.IMutableBus;
+
+/**
+ * Модуль для навешивания на шину дополнительных функций, либо замены уже подключенных
+ * @see IMutableBus, BusEvent
+ */
+public interface IBusModule {
+
+    /**
+     * Подключить новые функции к шине
+     * @param bus
+     */
+    function install(bus:IMutableBus):void;
+
+}
+}

as3snapi-core/src/as3snapi/base/plugins/logs/BusModuleLogHook.as

+package as3snapi.base.plugins.logs {
+import as3snapi.base.features.log.*;
+import as3snapi.base.plugins.IBusModule;
+import as3snapi.utils.bus.IMutableBus;
+
+public class BusModuleLogHook implements IBusModule {
+    private var logHook:Function;
+    private var apiLogHook:Function;
+    private var eventLogHook:Function;
+
+    public function BusModuleLogHook(logHook:Function, apiLogHook:Function, eventLogHook:Function) {
+        this.logHook = logHook;
+        this.apiLogHook = apiLogHook;
+        this.eventLogHook = eventLogHook;
+    }
+
+    public function install(bus:IMutableBus):void {
+        bus.addFeature(IFeatureLog, new FeatureLogHook(logHook, apiLogHook, eventLogHook));
+    }
+
+}
+}

as3snapi-core/src/as3snapi/base/plugins/logs/BusModuleLogTrace.as

+package as3snapi.base.plugins.logs {
+import as3snapi.base.features.log.FeatureLogTrace;
+import as3snapi.base.features.log.IFeatureLog;
+import as3snapi.base.plugins.IBusModule;
+import as3snapi.utils.bus.IMutableBus;
+
+public class BusModuleLogTrace implements IBusModule {
+    public function BusModuleLogTrace() {
+    }
+
+    public function install(bus:IMutableBus):void {
+        bus.addFeature(IFeatureLog, new FeatureLogTrace())
+    }
+
+
+}
+}

as3snapi-core/src/as3snapi/plugins/BusFactoryEvent.as

-package as3snapi.plugins {
-import flash.events.Event;
-
-/**
- * События различных стадий жизненного цикла шины
- * @see ConnectionFactory
- */
-public class BusFactoryEvent extends Event {
-
-    public static const BASIC_FEATURES_ADDED:String = "BASIC_FEATURES_ADDED";
-    public static const SOCIAL_NETWORK_FEATURES_ADDED:String = "SOCIAL_NETWORK_FEATURES_ADDED";
-    public static const FEATURES_READY:String = "FEATURES_READY";
-
-    public function BusFactoryEvent(type:String) {
-        super(type);
-    }
-
-    override public function clone():Event {
-        return new BusFactoryEvent(type);
-    }
-}
-}

as3snapi-core/src/as3snapi/plugins/IBusModule.as

-package as3snapi.plugins {
-import as3snapi.utils.bus.IMutableBus;
-
-/**
- * Модуль для навешивания на шину дополнительных функций, либо замены уже подключенных
- * @see IMutableBus, BusEvent
- */
-public interface IBusModule {
-
-    /**
-     * Подключить новые функции к шине
-     * @param bus
-     */
-    function install(bus:IMutableBus):void;
-
-}
-}

as3snapi-core/src/as3snapi/plugins/logs/BusModuleLogHook.as

-package as3snapi.plugins.logs {
-import as3snapi.base.features.log.*;
-import as3snapi.plugins.IBusModule;
-import as3snapi.utils.bus.IMutableBus;
-
-public class BusModuleLogHook implements IBusModule {
-    private var logHook:Function;
-    private var apiLogHook:Function;
-    private var eventLogHook:Function;
-
-    public function BusModuleLogHook(logHook:Function, apiLogHook:Function, eventLogHook:Function) {
-        this.logHook = logHook;
-        this.apiLogHook = apiLogHook;
-        this.eventLogHook = eventLogHook;
-    }
-
-    public function install(bus:IMutableBus):void {
-        bus.addFeature(IFeatureLog, new FeatureLogHook(logHook, apiLogHook, eventLogHook));
-    }
-
-}
-}

as3snapi-core/src/as3snapi/plugins/logs/BusModuleLogTrace.as

-package as3snapi.plugins.logs {
-import as3snapi.base.features.log.FeatureLogTrace;
-import as3snapi.base.features.log.IFeatureLog;
-import as3snapi.plugins.IBusModule;
-import as3snapi.utils.bus.IMutableBus;
-
-public class BusModuleLogTrace implements IBusModule {
-    public function BusModuleLogTrace() {
-    }
-
-    public function install(bus:IMutableBus):void {
-        bus.addFeature(IFeatureLog, new FeatureLogTrace())
-    }
-
-
-}
-}

as3snapi-sandbox/pom.xml

     <parent>
         <groupId>as3snapi</groupId>
         <artifactId>as3snapi</artifactId>
-        <version>1.0.4-SNAPSHOT</version>
+        <version>1.0.5-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 

as3snapi-sandbox/src/sandbox/AppController.as

 import as3snapi.networks.vkcom.ModuleVkcom;
 import as3snapi.networks.vkcom.features.IFeatureVkcomApiCore;
 import as3snapi.networks.vkcom.features.IFeatureVkcomApiUi;
-import as3snapi.plugins.IBusModule;
-import as3snapi.plugins.logs.BusModuleLogHook;
+import as3snapi.base.plugins.IBusModule;
+import as3snapi.base.plugins.logs.BusModuleLogHook;
 
 import flash.events.MouseEvent;
 
     <modelVersion>4.0.0</modelVersion>
     <groupId>as3snapi</groupId>
     <artifactId>as3snapi</artifactId>
-    <version>1.0.4-SNAPSHOT</version>
+    <version>1.0.5-SNAPSHOT</version>
     <packaging>pom</packaging>
     <name>as3snapi - All</name>