sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1719887 - in /sling/trunk/bundles/commons/resourcebuilder/src: main/java/org/apache/sling/resourcebuilder/api/ main/java/org/apache/sling/resourcebuilder/impl/ test/java/org/apache/sling/resourcebuilder/impl/
Date Mon, 14 Dec 2015 12:17:34 GMT
Author: bdelacretaz
Date: Mon Dec 14 12:17:34 2015
New Revision: 1719887

URL: http://svn.apache.org/viewvc?rev=1719887&view=rev
Log:
SLING-5356 - better name for atParent() method

Modified:
    sling/trunk/bundles/commons/resourcebuilder/src/main/java/org/apache/sling/resourcebuilder/api/ResourceBuilder.java
    sling/trunk/bundles/commons/resourcebuilder/src/main/java/org/apache/sling/resourcebuilder/impl/ResourceBuilderImpl.java
    sling/trunk/bundles/commons/resourcebuilder/src/test/java/org/apache/sling/resourcebuilder/impl/ResourceBuilderImplTest.java

Modified: sling/trunk/bundles/commons/resourcebuilder/src/main/java/org/apache/sling/resourcebuilder/api/ResourceBuilder.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/resourcebuilder/src/main/java/org/apache/sling/resourcebuilder/api/ResourceBuilder.java?rev=1719887&r1=1719886&r2=1719887&view=diff
==============================================================================
--- sling/trunk/bundles/commons/resourcebuilder/src/main/java/org/apache/sling/resourcebuilder/api/ResourceBuilder.java
(original)
+++ sling/trunk/bundles/commons/resourcebuilder/src/main/java/org/apache/sling/resourcebuilder/api/ResourceBuilder.java
Mon Dec 14 12:17:34 2015
@@ -86,5 +86,5 @@ public interface ResourceBuilder {
     
     /** Reset the current parent Resource to the original one.
      *  Also activates hierarchyMode which is the default mode. */ 
-    ResourceBuilder resetParent();
+    ResourceBuilder atParent();
 }
\ No newline at end of file

Modified: sling/trunk/bundles/commons/resourcebuilder/src/main/java/org/apache/sling/resourcebuilder/impl/ResourceBuilderImpl.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/resourcebuilder/src/main/java/org/apache/sling/resourcebuilder/impl/ResourceBuilderImpl.java?rev=1719887&r1=1719886&r2=1719887&view=diff
==============================================================================
--- sling/trunk/bundles/commons/resourcebuilder/src/main/java/org/apache/sling/resourcebuilder/impl/ResourceBuilderImpl.java
(original)
+++ sling/trunk/bundles/commons/resourcebuilder/src/main/java/org/apache/sling/resourcebuilder/impl/ResourceBuilderImpl.java
Mon Dec 14 12:17:34 2015
@@ -56,7 +56,7 @@ public class ResourceBuilderImpl impleme
         originalParent = parent;
         resourceResolver = originalParent.getResourceResolver();
         withIntermediatePrimaryType(null);
-        resetParent();
+        atParent();
     }
 
     @Override
@@ -65,7 +65,7 @@ public class ResourceBuilderImpl impleme
     }
 
     @Override
-    public ResourceBuilder resetParent() {
+    public ResourceBuilder atParent() {
         currentParent = originalParent;
         hierarchyMode();
         return this;

Modified: sling/trunk/bundles/commons/resourcebuilder/src/test/java/org/apache/sling/resourcebuilder/impl/ResourceBuilderImplTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/resourcebuilder/src/test/java/org/apache/sling/resourcebuilder/impl/ResourceBuilderImplTest.java?rev=1719887&r1=1719886&r2=1719887&view=diff
==============================================================================
--- sling/trunk/bundles/commons/resourcebuilder/src/test/java/org/apache/sling/resourcebuilder/impl/ResourceBuilderImplTest.java
(original)
+++ sling/trunk/bundles/commons/resourcebuilder/src/test/java/org/apache/sling/resourcebuilder/impl/ResourceBuilderImplTest.java
Mon Dec 14 12:17:34 2015
@@ -144,7 +144,7 @@ public class ResourceBuilderImplTest {
             .siblingsMode()
             .resource("one")
             .resource("two")
-            .resetParent()  // also sets hierarchyMode
+            .atParent()  // also sets hierarchyMode
             .resource("d/e")
             .resource("f/g")
             .siblingsMode()
@@ -223,12 +223,12 @@ public class ResourceBuilderImplTest {
             .siblingsMode()
             .file("models.js", getClass().getResourceAsStream("/files/models.js"), "MT1",
42)
             .file("text.html", getClass().getResourceAsStream("/files/text.html"), "MT2",
43)
-            .resetParent()
+            .atParent()
             .resource("apps")
             .file("myapp.json", getClass().getResourceAsStream("/files/myapp.json"), "MT3",
44)
-            .resetParent()
+            .atParent()
             .resource("apps/content/myapp/resource")
-            .resetParent()
+            .atParent()
             .resource("apps/content", "title", "foo")
             .file("myapp.json", getClass().getResourceAsStream("/files/myapp.json"), "MT4",
45)
             .commit()



Mime
View raw message