click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r962597 - in /click/trunk/click: framework/src/org/apache/click/ClickServlet.java framework/src/org/apache/click/ControlRegistry.java mock/src/org/apache/click/MockContext.java mock/test/org/apache/click/MockContextTest.java
Date Fri, 09 Jul 2010 16:27:32 GMT
Author: sabob
Date: Fri Jul  9 16:27:31 2010
New Revision: 962597

URL: http://svn.apache.org/viewvc?rev=962597&view=rev
Log:
renamed dispatcher to registry

Modified:
    click/trunk/click/framework/src/org/apache/click/ClickServlet.java
    click/trunk/click/framework/src/org/apache/click/ControlRegistry.java
    click/trunk/click/mock/src/org/apache/click/MockContext.java
    click/trunk/click/mock/test/org/apache/click/MockContextTest.java

Modified: click/trunk/click/framework/src/org/apache/click/ClickServlet.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/ClickServlet.java?rev=962597&r1=962596&r2=962597&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/ClickServlet.java (original)
+++ click/trunk/click/framework/src/org/apache/click/ClickServlet.java Fri Jul  9 16:27:31
2010
@@ -575,7 +575,7 @@ public class ClickServlet extends HttpSe
     protected void processPageEvents(Page page, Context context) throws Exception {
 
         ActionEventDispatcher eventDispatcher = ActionEventDispatcher.getThreadLocalDispatcher();
-        ControlRegistry controlRegistry = ControlRegistry.getThreadLocalDispatcher();
+        ControlRegistry controlRegistry = ControlRegistry.getThreadLocalRegistry();
 
         boolean errorOccurred = page instanceof ErrorPage;
         // Support direct access of click-error.htm
@@ -1128,7 +1128,7 @@ public class ClickServlet extends HttpSe
 
             // notify callbacks of destroy event
             // TODO check that exceptions don't unnecessarily trigger preDestroy
-            ControlRegistry.getThreadLocalDispatcher().processPreDestroy(page.getContext());
+            ControlRegistry.getThreadLocalRegistry().processPreDestroy(page.getContext());
 
             List<Control> controls = page.getControls();
 
@@ -1772,7 +1772,7 @@ public class ClickServlet extends HttpSe
 
         ActionEventDispatcher eventDispatcher = ActionEventDispatcher.getThreadLocalDispatcher();
 
-        ControlRegistry controlRegistry = ControlRegistry.getThreadLocalDispatcher();
+        ControlRegistry controlRegistry = ControlRegistry.getThreadLocalRegistry();
 
         // TODO Ajax requests shouldn't reach this code path
         // Support direct access of click-error.htm

Modified: click/trunk/click/framework/src/org/apache/click/ControlRegistry.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/ControlRegistry.java?rev=962597&r1=962596&r2=962597&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/ControlRegistry.java (original)
+++ click/trunk/click/framework/src/org/apache/click/ControlRegistry.java Fri Jul  9 16:27:31
2010
@@ -35,7 +35,7 @@ public class ControlRegistry {
 
     // Constants --------------------------------------------------------------
 
-    /** The thread local dispatcher holder. */
+    /** The thread local registry holder. */
     private static final ThreadLocal<RegistryStack> THREAD_LOCAL_REGISTRY =
                     new ThreadLocal<RegistryStack>();
 
@@ -67,12 +67,12 @@ public class ControlRegistry {
      * @param control the control to register
      */
     public static void registerAjaxTarget(Control control) {
-        ControlRegistry instance = getThreadLocalDispatcher();
+        ControlRegistry instance = getThreadLocalRegistry();
         instance.internalRegisterAjaxTarget(control);
     }
 
     public static void registerCallback(Control control, Callback callback) {
-        ControlRegistry instance = getThreadLocalDispatcher();
+        ControlRegistry instance = getThreadLocalRegistry();
         instance.internalRegisterCallback(control, callback);
     }
 
@@ -223,7 +223,7 @@ public class ControlRegistry {
         return callbacks;
     }
 
-    static ControlRegistry getThreadLocalDispatcher() {
+    static ControlRegistry getThreadLocalRegistry() {
         return getDispatcherStack().peek();
     }
 

Modified: click/trunk/click/mock/src/org/apache/click/MockContext.java
URL: http://svn.apache.org/viewvc/click/trunk/click/mock/src/org/apache/click/MockContext.java?rev=962597&r1=962596&r2=962597&view=diff
==============================================================================
--- click/trunk/click/mock/src/org/apache/click/MockContext.java (original)
+++ click/trunk/click/mock/src/org/apache/click/MockContext.java Fri Jul  9 16:27:31 2010
@@ -333,7 +333,7 @@ public class MockContext extends Context
      * Execute the preResponse callback event for all registered callbacks.
      */
     public void executePreResponseCallbackEvent() {
-        ControlRegistry registry = ControlRegistry.getThreadLocalDispatcher();
+        ControlRegistry registry = ControlRegistry.getThreadLocalRegistry();
 
         registry.processPreResponse(this);
     }
@@ -342,7 +342,7 @@ public class MockContext extends Context
      * Execute the preGetHeadElements callback event for all registered callbacks.
      */
     public void executePreGetHeadElementsCallbackEvent() {
-        ControlRegistry registry = ControlRegistry.getThreadLocalDispatcher();
+        ControlRegistry registry = ControlRegistry.getThreadLocalRegistry();
 
         registry.processPreGetHeadElements(this);
     }
@@ -351,7 +351,7 @@ public class MockContext extends Context
      * Execute the preDestroy callback event for all registered callbacks.
      */
     public void executePreDestroyCallbackEvent() {
-        ControlRegistry registry = ControlRegistry.getThreadLocalDispatcher();
+        ControlRegistry registry = ControlRegistry.getThreadLocalRegistry();
 
         registry.processPreDestroy(this);
     }
@@ -373,7 +373,7 @@ public class MockContext extends Context
      * method will remove any references to objects, thus freeing up memory.
      */
     public void reset() {
-        ControlRegistry registry = ControlRegistry.getThreadLocalDispatcher();
+        ControlRegistry registry = ControlRegistry.getThreadLocalRegistry();
         registry.clear();
 
         ActionEventDispatcher actionEventDispatcher = ActionEventDispatcher.getThreadLocalDispatcher();

Modified: click/trunk/click/mock/test/org/apache/click/MockContextTest.java
URL: http://svn.apache.org/viewvc/click/trunk/click/mock/test/org/apache/click/MockContextTest.java?rev=962597&r1=962596&r2=962597&view=diff
==============================================================================
--- click/trunk/click/mock/test/org/apache/click/MockContextTest.java (original)
+++ click/trunk/click/mock/test/org/apache/click/MockContextTest.java Fri Jul  9 16:27:31
2010
@@ -228,7 +228,7 @@ public class MockContextTest extends Tes
             }
         });
 
-        ControlRegistry registry = ControlRegistry.getThreadLocalDispatcher();
+        ControlRegistry registry = ControlRegistry.getThreadLocalRegistry();
 
         // Assert there is one callback registered
         assertEquals(1, registry.getCallbacks().size());
@@ -279,7 +279,7 @@ public class MockContextTest extends Tes
             }
         });
 
-        ControlRegistry registry = ControlRegistry.getThreadLocalDispatcher();
+        ControlRegistry registry = ControlRegistry.getThreadLocalRegistry();
 
         // Assert there is one callback registered
         assertEquals(1, registry.getCallbacks().size());
@@ -353,7 +353,7 @@ public class MockContextTest extends Tes
         // Assert there are no behaviors registered after reset is invoked
         assertEquals(0, eventDispatcher.getBehaviorSourceSet().size());
 
-        ControlRegistry registry = ControlRegistry.getThreadLocalDispatcher();
+        ControlRegistry registry = ControlRegistry.getThreadLocalRegistry();
 
         // Assert that the submit control is registered as a callback
         assertEquals(1, registry.getAjaxTargetControls().size());



Mime
View raw message