jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1330809 - /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
Date Thu, 26 Apr 2012 12:25:53 GMT
Author: reschke
Date: Thu Apr 26 12:25:53 2012
New Revision: 1330809

URL: http://svn.apache.org/viewvc?rev=1330809&view=rev
Log:
OAK-6: add a stub for getNodeDefinition so that the test cleanup in AbstractJCRTest can happen

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

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java?rev=1330809&r1=1330808&r2=1330809&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
Thu Apr 26 12:25:53 2012
@@ -41,6 +41,7 @@ import javax.jcr.lock.Lock;
 import javax.jcr.nodetype.NodeDefinition;
 import javax.jcr.nodetype.NodeType;
 import javax.jcr.nodetype.NodeTypeManager;
+import javax.jcr.version.OnParentVersionAction;
 import javax.jcr.version.Version;
 import javax.jcr.version.VersionHistory;
 
@@ -627,7 +628,67 @@ public class NodeImpl extends ItemImpl i
     @Override
     public NodeDefinition getDefinition() throws RepositoryException {
         checkStatus();
-        throw new UnsupportedRepositoryOperationException("TODO: Node.getDefinition");
+        
+        // TODO
+        return new NodeDefinition() {
+ 
+            // This is a workaround to make AbstractJCRTest.cleanup happy
+            
+            @Override
+            public boolean isProtected() {
+                return false;
+            }
+            
+            @Override
+            public boolean isMandatory() {
+                return false;
+            }
+            
+            @Override
+            public boolean isAutoCreated() {
+                return false;
+            }
+            
+            @Override
+            public int getOnParentVersion() {
+                return OnParentVersionAction.COPY;
+            }
+            
+            @Override
+            public String getName() {
+                return "default";
+            }
+            
+            @Override
+            public NodeType getDeclaringNodeType() {
+                return null;
+            }
+            
+            @Override
+            public NodeType[] getRequiredPrimaryTypes() {
+                return null;
+            }
+            
+            @Override
+            public String[] getRequiredPrimaryTypeNames() {
+                return null;
+            }
+            
+            @Override
+            public String getDefaultPrimaryTypeName() {
+                return null;
+            }
+            
+            @Override
+            public NodeType getDefaultPrimaryType() {
+                return null;
+            }
+            
+            @Override
+            public boolean allowsSameNameSiblings() {
+                return false;
+            }
+        };
     }
 
 



Mime
View raw message