You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by fm...@apache.org on 2008/01/29 14:37:09 UTC

svn commit: r616308 - /incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java

Author: fmeschbe
Date: Tue Jan 29 05:37:08 2008
New Revision: 616308

URL: http://svn.apache.org/viewvc?rev=616308&view=rev
Log:
Allow access to properties of the node as Resource instances

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

Modified: incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java?rev=616308&r1=616307&r2=616308&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java (original)
+++ incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java Tue Jan 29 05:37:08 2008
@@ -176,6 +176,9 @@
             if (node.hasNode(relPath)) {
                 return new JcrNodeResource(resourceProvider,
                     node.getNode(relPath));
+            } else if (node.hasProperty(relPath)) {
+                return new JcrPropertyResource(resourceProvider, getPath()
+                    + "/" + relPath, node.getProperty(relPath));
             }
 
             log.error("getResource: There is no node at {} below {}", path,