tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject svn commit: r948274 - in /tapestry/tapestry5/trunk: tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ajax/ tapestry-core/src/main/java/org/apache/tapestry5/internal/t...
Date Wed, 26 May 2010 00:40:29 GMT
Author: hlship
Date: Wed May 26 00:40:28 2010
New Revision: 948274

URL: http://svn.apache.org/viewvc?rev=948274&view=rev
Log:
Rename Operation to Worker

Added:
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/func/Worker.java
  (contents, props changed)
      - copied, changed from r948273, tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/func/Operation.java
Removed:
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/func/Operation.java
Modified:
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentMessagesSourceImpl.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DocumentLinkerImpl.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ajax/JavascriptSupportImpl.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/ImportWorker.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/func/F.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/util/func/FuncTest.java

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentMessagesSourceImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentMessagesSourceImpl.java?rev=948274&r1=948273&r2=948274&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentMessagesSourceImpl.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentMessagesSourceImpl.java
Wed May 26 00:40:28 2010
@@ -26,7 +26,7 @@ import org.apache.tapestry5.ioc.Resource
 import org.apache.tapestry5.ioc.annotations.Symbol;
 import org.apache.tapestry5.ioc.internal.util.CollectionFactory;
 import org.apache.tapestry5.ioc.services.ClasspathURLConverter;
-import org.apache.tapestry5.ioc.util.func.Operation;
+import org.apache.tapestry5.ioc.util.func.Worker;
 import org.apache.tapestry5.model.ComponentModel;
 import org.apache.tapestry5.services.InvalidationEventHub;
 import org.apache.tapestry5.services.UpdateListener;

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DocumentLinkerImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DocumentLinkerImpl.java?rev=948274&r1=948273&r2=948274&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DocumentLinkerImpl.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DocumentLinkerImpl.java
Wed May 26 00:40:28 2010
@@ -22,7 +22,7 @@ import org.apache.tapestry5.dom.Element;
 import org.apache.tapestry5.dom.Node;
 import org.apache.tapestry5.ioc.internal.util.CollectionFactory;
 import org.apache.tapestry5.ioc.util.func.F;
-import org.apache.tapestry5.ioc.util.func.Operation;
+import org.apache.tapestry5.ioc.util.func.Worker;
 import org.apache.tapestry5.json.JSONObject;
 import org.apache.tapestry5.services.javascript.InitializationPriority;
 import org.apache.tapestry5.services.javascript.StylesheetLink;
@@ -236,9 +236,9 @@ public class DocumentLinkerImpl implemen
 
         final Element scriptContainer = container.element("script-container");
 
-        Operation<String> addScript = new Operation<String>()
+        Worker<String> addScript = new Worker<String>()
         {
-            public void op(String scriptURL)
+            public void work(String scriptURL)
             {
                 scriptContainer.element("script", "type", "text/javascript", "src", scriptURL);
             }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ajax/JavascriptSupportImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ajax/JavascriptSupportImpl.java?rev=948274&r1=948273&r2=948274&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ajax/JavascriptSupportImpl.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ajax/JavascriptSupportImpl.java
Wed May 26 00:40:28 2010
@@ -28,7 +28,7 @@ import org.apache.tapestry5.ioc.internal
 import org.apache.tapestry5.ioc.internal.util.IdAllocator;
 import org.apache.tapestry5.ioc.services.Coercion;
 import org.apache.tapestry5.ioc.util.func.F;
-import org.apache.tapestry5.ioc.util.func.Operation;
+import org.apache.tapestry5.ioc.util.func.Worker;
 import org.apache.tapestry5.json.JSONArray;
 import org.apache.tapestry5.json.JSONObject;
 import org.apache.tapestry5.services.javascript.InitializationPriority;
@@ -92,17 +92,17 @@ public class JavascriptSupportImpl imple
 
     public void commit()
     {
-        F.each(new Operation<StylesheetLink>()
+        F.each(new Worker<StylesheetLink>()
         {
-            public void op(StylesheetLink value)
+            public void work(StylesheetLink value)
             {
                 linker.addStylesheetLink(value);
             }
         }, stylesheetLinks);
 
-        Operation<String> linkLibrary = new Operation<String>()
+        Worker<String> linkLibrary = new Worker<String>()
         {
-            public void op(String value)
+            public void work(String value)
             {
                 linker.addScriptLink(value);
             }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/ImportWorker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/ImportWorker.java?rev=948274&r1=948273&r2=948274&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/ImportWorker.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/ImportWorker.java
Wed May 26 00:40:28 2010
@@ -26,7 +26,7 @@ import org.apache.tapestry5.ioc.Resource
 import org.apache.tapestry5.ioc.services.Coercion;
 import org.apache.tapestry5.ioc.services.SymbolSource;
 import org.apache.tapestry5.ioc.util.func.F;
-import org.apache.tapestry5.ioc.util.func.Operation;
+import org.apache.tapestry5.ioc.util.func.Worker;
 import org.apache.tapestry5.model.MutableComponentModel;
 import org.apache.tapestry5.services.AssetSource;
 import org.apache.tapestry5.services.ClassTransformation;
@@ -52,17 +52,17 @@ public class ImportWorker implements Com
 
     private final AssetSource assetSource;
 
-    private final Operation<Asset> importLibrary = new Operation<Asset>()
+    private final Worker<Asset> importLibrary = new Worker<Asset>()
     {
-        public void op(Asset asset)
+        public void work(Asset asset)
         {
             javascriptSupport.importJavascriptLibrary(asset);
         }
     };
 
-    private final Operation<Asset> importStylesheet = new Operation<Asset>()
+    private final Worker<Asset> importStylesheet = new Worker<Asset>()
     {
-        public void op(Asset asset)
+        public void work(Asset asset)
         {
             javascriptSupport.importStylesheet(asset);
         };
@@ -152,7 +152,7 @@ public class ImportWorker implements Com
     }
 
     private void decorateMethodWithOperation(ClassTransformation transformation, MutableComponentModel
model,
-            TransformMethod method, String[] paths, Operation<Asset> operation)
+            TransformMethod method, String[] paths, Worker<Asset> operation)
     {
         if (paths.length == 0)
             return;
@@ -215,7 +215,7 @@ public class ImportWorker implements Com
     }
 
     private void addMethodAssetOperationAdvice(TransformMethod method, final FieldAccess
access,
-            final Operation<Asset> operation)
+            final Worker<Asset> operation)
     {
         ComponentMethodAdvice advice = new ComponentMethodAdvice()
         {

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/func/F.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/func/F.java?rev=948274&r1=948273&r2=948274&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/func/F.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/func/F.java
Wed May 26 00:40:28 2010
@@ -83,11 +83,11 @@ public class F
     /**
      * Performs an operation on each element of the source collection.
      */
-    public static <T> void each(Operation<T> operation, Collection<T> source)
+    public static <T> void each(Worker<T> operation, Collection<T> source)
     {
         for (T t : source)
         {
-            operation.op(t);
+            operation.work(t);
         }
     }
 

Copied: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/func/Worker.java
(from r948273, tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/func/Operation.java)
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/func/Worker.java?p2=tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/func/Worker.java&p1=tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/func/Operation.java&r1=948273&r2=948274&rev=948274&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/func/Operation.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/func/Worker.java
Wed May 26 00:40:28 2010
@@ -18,12 +18,12 @@ package org.apache.tapestry5.ioc.util.fu
  * An operational function used with a collection.
  * 
  * @since 5.2.0
- * @see F#each(Operation, java.util.Collection)
+ * @see F#each(Worker, java.util.Collection)
  */
-public interface Operation<T>
+public interface Worker<T>
 {
     /**
      * Perform the operation on some object of type T.
      */
-    void op(T value);
+    void work(T value);
 }

Propchange: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/func/Worker.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/util/func/FuncTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/util/func/FuncTest.java?rev=948274&r1=948273&r2=948274&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/util/func/FuncTest.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/util/func/FuncTest.java
Wed May 26 00:40:28 2010
@@ -22,7 +22,7 @@ import org.apache.tapestry5.ioc.Predicat
 import org.apache.tapestry5.ioc.services.Coercion;
 import org.apache.tapestry5.ioc.test.TestBase;
 import org.apache.tapestry5.ioc.util.func.F;
-import org.apache.tapestry5.ioc.util.func.Operation;
+import org.apache.tapestry5.ioc.util.func.Worker;
 import org.testng.annotations.Test;
 
 public class FuncTest extends TestBase
@@ -86,9 +86,9 @@ public class FuncTest extends TestBase
 
         final StringBuffer buffer = new StringBuffer();
 
-        Operation<String> op = new Operation<String>()
+        Worker<String> op = new Worker<String>()
         {
-            public void op(String value)
+            public void work(String value)
             {
                 if (buffer.length() > 0)
                     buffer.append(" ");



Mime
View raw message