incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r688975 - /incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java
Date Tue, 26 Aug 2008 06:56:22 GMT
Author: fmeschbe
Date: Mon Aug 25 23:56:21 2008
New Revision: 688975

URL: http://svn.apache.org/viewvc?rev=688975&view=rev
Log:
SLING-627 Provide the new sling.resolutionPathInfo property in the metadata

Modified:
    incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java

Modified: incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java?rev=688975&r1=688974&r2=688975&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java
(original)
+++ incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java
Mon Aug 25 23:56:21 2008
@@ -287,7 +287,7 @@
 
     }
 
-    private Resource scanPath(String uriPath)
+    private Resource scanPath(final String uriPath)
             throws SlingException {
         Resource resource = null;
         String curPath = uriPath;
@@ -302,6 +302,14 @@
                 + " for request path " + uriPath, ex);
         }
 
+        // SLING-627: set the part cut off from the uriPath as
+        // sling.resolutionPathInfo property such that
+        // uriPath = curPath + sling.resolutionPathInfo
+        if (resource != null) {
+            String rpi = uriPath.substring(curPath.length());
+            resource.getResourceMetadata().setResolutionPathInfo(rpi);
+        }
+        
         return resource;
     }
 



Mime
View raw message