jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1367583 - /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeDelegate.java
Date Tue, 31 Jul 2012 14:48:08 GMT
Author: angela
Date: Tue Jul 31 14:48:08 2012
New Revision: 1367583

URL: http://svn.apache.org/viewvc?rev=1367583&view=rev
Log:
minor improvement:
- fix indention
- use constant instead of hardcoded property string
- verbose todo

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeDelegate.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeDelegate.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeDelegate.java?rev=1367583&r1=1367582&r2=1367583&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeDelegate.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeDelegate.java
Tue Jul 31 14:48:08 2012
@@ -30,6 +30,7 @@ import javax.annotation.Nonnull;
 import javax.jcr.InvalidItemStateException;
 import javax.jcr.ItemNotFoundException;
 
+import org.apache.jackrabbit.JcrConstants;
 import org.apache.jackrabbit.oak.api.CoreValue;
 import org.apache.jackrabbit.oak.api.CoreValueFactory;
 import org.apache.jackrabbit.oak.api.PropertyState;
@@ -96,12 +97,13 @@ public class NodeDelegate extends ItemDe
 
     @Nonnull
     public String getIdentifier() throws InvalidItemStateException {
-        PropertyDelegate pd = getProperty("jcr:uuid");
+        PropertyDelegate pd = getProperty(JcrConstants.JCR_UUID);
         if (pd == null) {
-            // TODO should find the closest referenceable parent, and build an identifier
based on that and the relative path
+            // TODO delegated to the OAK-API to calculate the identifier
+            // TODO consisting of closest referenceable parent and a relative path
+            // TODO irrespective of the accessibility of the parent node(s)
             return getPath();
-        }
-        else {
+        } else {
             return pd.getValue().toString();
         }
     }



Mime
View raw message