incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r591007 - in /incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource: JcrNodeResource.java MicroslingResourceMetadata.java MicroslingResourceResolver.java
Date Thu, 01 Nov 2007 13:45:12 GMT
Author: fmeschbe
Date: Thu Nov  1 06:45:11 2007
New Revision: 591007

URL: http://svn.apache.org/viewvc?rev=591007&view=rev
Log:
Adapt to changes in Sling API regarding ResourceMetadata and NonExistingResource

Removed:
    incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/MicroslingResourceMetadata.java
Modified:
    incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/JcrNodeResource.java
    incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/MicroslingResourceResolver.java

Modified: incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/JcrNodeResource.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/JcrNodeResource.java?rev=591007&r1=591006&r2=591007&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/JcrNodeResource.java
(original)
+++ incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/JcrNodeResource.java
Thu Nov  1 06:45:11 2007
@@ -41,14 +41,14 @@
     JcrNodeResource(javax.jcr.Session s,String path) throws RepositoryException {
         node = (Node)s.getItem(path);
         this.path = node.getPath();
-        metadata = new MicroslingResourceMetadata();
+        metadata = new ResourceMetadata();
         resourceType = getResourceTypeForNode(node);
     }
 
     JcrNodeResource(Node node) throws RepositoryException {
         this.node = node;
         this.path = node.getPath();
-        metadata = new MicroslingResourceMetadata();
+        metadata = new ResourceMetadata();
         metadata.put(ResourceMetadata.RESOLUTION_PATH, path);
         resourceType = getResourceTypeForNode(node);
     }

Modified: incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/MicroslingResourceResolver.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/MicroslingResourceResolver.java?rev=591007&r1=591006&r2=591007&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/MicroslingResourceResolver.java
(original)
+++ incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/MicroslingResourceResolver.java
Thu Nov  1 06:45:11 2007
@@ -34,6 +34,7 @@
 import javax.servlet.http.HttpServletRequest;
 
 import org.apache.sling.api.SlingException;
+import org.apache.sling.api.resource.NonExistingResource;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceMetadata;
 import org.apache.sling.api.resource.ResourceResolver;
@@ -311,44 +312,4 @@
         }
     }
 
-    /**
-     * Resource class used to represent a non existing resource returned by the
-     * {@link MicroslingResourceResolver#resolve(ServletRequest)} method.
-     */
-    private static class NonExistingResource implements Resource {
-
-        /** The path of the missing resource */
-        private final String resourcePath;
-
-        /** The reource meta data just containing the resource path again */
-        private final ResourceMetadata resourceMetadata;
-
-        NonExistingResource(String resourcePath) {
-            this.resourcePath = resourcePath;
-
-            resourceMetadata = new MicroslingResourceMetadata();
-            resourceMetadata.put(ResourceMetadata.RESOLUTION_PATH, resourcePath);
-        }
-
-        public String getURI() {
-            return resourcePath;
-        }
-
-        public String getResourceType() {
-            return RESOURCE_TYPE_NON_EXISTING;
-        }
-
-        public ResourceMetadata getResourceMetadata() {
-            return resourceMetadata;
-        }
-
-        public Object getObject() {
-            return null;
-        }
-
-        public Object getRawData() {
-            return null;
-        }
-
-    }
 }



Mime
View raw message