incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r609603 - in /incubator/sling/whiteboard/fmeschbe/resource/microsling/microsling-core/src: main/java/org/apache/sling/microsling/resource/ test/java/org/apache/sling/microsling/request/helpers/ test/java/org/apache/sling/microsling/scriptin...
Date Mon, 07 Jan 2008 13:34:46 GMT
Author: fmeschbe
Date: Mon Jan  7 05:34:44 2008
New Revision: 609603

URL: http://svn.apache.org/viewvc?rev=609603&view=rev
Log:
Add null-returning Resource.getResourceProvider() implementations. These
methods return null as microsling does not really use the ResourceProvider
mechanism.

Modified:
    incubator/sling/whiteboard/fmeschbe/resource/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/JcrNodeResource.java
    incubator/sling/whiteboard/fmeschbe/resource/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/JcrPropertyResource.java
    incubator/sling/whiteboard/fmeschbe/resource/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/SyntheticResource.java
    incubator/sling/whiteboard/fmeschbe/resource/microsling/microsling-core/src/test/java/org/apache/sling/microsling/request/helpers/MicroslingRequestPathInfoTest.java
    incubator/sling/whiteboard/fmeschbe/resource/microsling/microsling-core/src/test/java/org/apache/sling/microsling/scripting/helpers/ScriptSearchPathsBuilderTest.java

Modified: incubator/sling/whiteboard/fmeschbe/resource/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/JcrNodeResource.java
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/resource/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/JcrNodeResource.java?rev=609603&r1=609602&r2=609603&view=diff
==============================================================================
--- incubator/sling/whiteboard/fmeschbe/resource/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/JcrNodeResource.java
(original)
+++ incubator/sling/whiteboard/fmeschbe/resource/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/JcrNodeResource.java
Mon Jan  7 05:34:44 2008
@@ -38,6 +38,7 @@
 
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceMetadata;
+import org.apache.sling.api.resource.ResourceProvider;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -101,6 +102,11 @@
         return metadata;
     }
 
+    /** Returns null as microsling has no ResourceProviders */
+    public ResourceProvider getResourceProvider() {
+        return null;
+    }
+    
     // --- helpers, public for scripting ----
     
     public Node getNode() {

Modified: incubator/sling/whiteboard/fmeschbe/resource/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/JcrPropertyResource.java
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/resource/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/JcrPropertyResource.java?rev=609603&r1=609602&r2=609603&view=diff
==============================================================================
--- incubator/sling/whiteboard/fmeschbe/resource/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/JcrPropertyResource.java
(original)
+++ incubator/sling/whiteboard/fmeschbe/resource/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/JcrPropertyResource.java
Mon Jan  7 05:34:44 2008
@@ -23,6 +23,7 @@
 
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceMetadata;
+import org.apache.sling.api.resource.ResourceProvider;
 
 /** A Resource that wraps a JCR Property */
 public class JcrPropertyResource implements Resource {
@@ -68,5 +69,10 @@
 
     public String getURI() {
         return path;
+    }
+
+    /** Returns null as microsling has no ResourceProviders */
+    public ResourceProvider getResourceProvider() {
+        return null;
     }
 }

Modified: incubator/sling/whiteboard/fmeschbe/resource/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/SyntheticResource.java
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/resource/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/SyntheticResource.java?rev=609603&r1=609602&r2=609603&view=diff
==============================================================================
--- incubator/sling/whiteboard/fmeschbe/resource/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/SyntheticResource.java
(original)
+++ incubator/sling/whiteboard/fmeschbe/resource/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/SyntheticResource.java
Mon Jan  7 05:34:44 2008
@@ -20,6 +20,7 @@
 
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceMetadata;
+import org.apache.sling.api.resource.ResourceProvider;
 
 /**
  * The <code>SyntheticResource</code> class is a simple implementation of the
@@ -84,4 +85,9 @@
         return null;
     }
 
+    /** Returns null as microsling has no ResourceProviders */
+    public ResourceProvider getResourceProvider() {
+        return null;
+    }
+    
 }

Modified: incubator/sling/whiteboard/fmeschbe/resource/microsling/microsling-core/src/test/java/org/apache/sling/microsling/request/helpers/MicroslingRequestPathInfoTest.java
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/resource/microsling/microsling-core/src/test/java/org/apache/sling/microsling/request/helpers/MicroslingRequestPathInfoTest.java?rev=609603&r1=609602&r2=609603&view=diff
==============================================================================
--- incubator/sling/whiteboard/fmeschbe/resource/microsling/microsling-core/src/test/java/org/apache/sling/microsling/request/helpers/MicroslingRequestPathInfoTest.java
(original)
+++ incubator/sling/whiteboard/fmeschbe/resource/microsling/microsling-core/src/test/java/org/apache/sling/microsling/request/helpers/MicroslingRequestPathInfoTest.java
Mon Jan  7 05:34:44 2008
@@ -21,6 +21,7 @@
 import org.apache.sling.api.request.RequestPathInfo;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceMetadata;
+import org.apache.sling.api.resource.ResourceProvider;
 
 /** Test the MicroslingRequestPathInfo */
 public class MicroslingRequestPathInfoTest extends TestCase {
@@ -266,6 +267,9 @@
             return null;
         }
 
+        public ResourceProvider getResourceProvider() {
+            return null;
+        }
     }
 
 }

Modified: incubator/sling/whiteboard/fmeschbe/resource/microsling/microsling-core/src/test/java/org/apache/sling/microsling/scripting/helpers/ScriptSearchPathsBuilderTest.java
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/resource/microsling/microsling-core/src/test/java/org/apache/sling/microsling/scripting/helpers/ScriptSearchPathsBuilderTest.java?rev=609603&r1=609602&r2=609603&view=diff
==============================================================================
--- incubator/sling/whiteboard/fmeschbe/resource/microsling/microsling-core/src/test/java/org/apache/sling/microsling/scripting/helpers/ScriptSearchPathsBuilderTest.java
(original)
+++ incubator/sling/whiteboard/fmeschbe/resource/microsling/microsling-core/src/test/java/org/apache/sling/microsling/scripting/helpers/ScriptSearchPathsBuilderTest.java
Mon Jan  7 05:34:44 2008
@@ -26,6 +26,7 @@
 import org.apache.sling.api.SlingException;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceMetadata;
+import org.apache.sling.api.resource.ResourceProvider;
 
 /** Test the ScriptSearchPathsBuilder class */
 public class ScriptSearchPathsBuilderTest extends TestCase {
@@ -102,6 +103,10 @@
         
         public <Type> Type adaptTo(Class<Type> type) {
             throw new Error("MockResource does not implement this method");
+        }
+        
+        public ResourceProvider getResourceProvider() {
+            return null;
         }
     }
 }



Mime
View raw message