incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r917944 - in /sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/starresource: FakeNode.java FakeNodeType.java
Date Tue, 02 Mar 2010 10:16:17 GMT
Author: cziegeler
Date: Tue Mar  2 10:16:17 2010
New Revision: 917944

URL: http://svn.apache.org/viewvc?rev=917944&view=rev
Log:
SLING-1420 : Implement JCR 2.0 methods for FakeNode and FakeNodeType

Modified:
    sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/starresource/FakeNode.java
    sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/starresource/FakeNodeType.java

Modified: sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/starresource/FakeNode.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/starresource/FakeNode.java?rev=917944&r1=917943&r2=917944&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/starresource/FakeNode.java
(original)
+++ sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/starresource/FakeNode.java
Tue Mar  2 10:16:17 2010
@@ -19,11 +19,14 @@
 package org.apache.sling.jcr.resource.internal.helper.starresource;
 
 import java.io.InputStream;
+import java.math.BigDecimal;
 import java.util.Calendar;
 import java.util.NoSuchElementException;
 
 import javax.jcr.AccessDeniedException;
+import javax.jcr.Binary;
 import javax.jcr.InvalidItemStateException;
+import javax.jcr.InvalidLifecycleTransitionException;
 import javax.jcr.Item;
 import javax.jcr.ItemExistsException;
 import javax.jcr.ItemNotFoundException;
@@ -59,7 +62,7 @@
 class FakeNode implements Node {
 
     protected final String path;
-    
+
     static class EmptyRangeIterator implements RangeIterator {
         public long getPosition() {
             return 0;
@@ -83,23 +86,23 @@
         public void remove() {
         }
     }
-    
+
     static class EmptyNodeIterator extends EmptyRangeIterator implements NodeIterator {
         public Node nextNode() {
             throw new NoSuchElementException();
         }
     }
-    
+
     static class EmptyPropertyIterator extends EmptyRangeIterator implements PropertyIterator
{
         public Property nextProperty() {
             throw new NoSuchElementException();
         }
     }
-    
+
     FakeNode(String path) {
         this.path = path;
     }
-    
+
     public void addMixin(String mixinName) throws NoSuchNodeTypeException, VersionException,
             ConstraintViolationException, LockException, RepositoryException {
     }
@@ -404,4 +407,70 @@
             InvalidItemStateException, ReferentialIntegrityException, VersionException, LockException,
             NoSuchNodeTypeException, RepositoryException {
     }
+
+    public void followLifecycleTransition(String transition)
+            throws UnsupportedRepositoryOperationException,
+            InvalidLifecycleTransitionException, RepositoryException {
+    }
+
+    public String[] getAllowedLifecycleTransistions()
+            throws UnsupportedRepositoryOperationException, RepositoryException {
+        return null;
+    }
+
+    public String getIdentifier() throws RepositoryException {
+        return null;
+    }
+
+    public NodeIterator getNodes(String[] nameGlobs) throws RepositoryException {
+        return null;
+    }
+
+    public PropertyIterator getProperties(String[] nameGlobs)
+            throws RepositoryException {
+        return null;
+    }
+
+    public PropertyIterator getReferences(String name)
+            throws RepositoryException {
+        return null;
+    }
+
+    public NodeIterator getSharedSet() throws RepositoryException {
+        return null;
+    }
+
+    public PropertyIterator getWeakReferences() throws RepositoryException {
+        return null;
+    }
+
+    public PropertyIterator getWeakReferences(String name)
+            throws RepositoryException {
+        return null;
+    }
+
+    public void removeShare() throws VersionException, LockException,
+            ConstraintViolationException, RepositoryException {
+    }
+
+    public void removeSharedSet() throws VersionException, LockException,
+            ConstraintViolationException, RepositoryException {
+    }
+
+    public void setPrimaryType(String nodeTypeName)
+            throws NoSuchNodeTypeException, VersionException,
+            ConstraintViolationException, LockException, RepositoryException {
+    }
+
+    public Property setProperty(String name, BigDecimal value)
+            throws ValueFormatException, VersionException, LockException,
+            ConstraintViolationException, RepositoryException {
+        return null;
+    }
+
+    public Property setProperty(String name, Binary value)
+            throws ValueFormatException, VersionException, LockException,
+            ConstraintViolationException, RepositoryException {
+        return null;
+    }
 }

Modified: sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/starresource/FakeNodeType.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/starresource/FakeNodeType.java?rev=917944&r1=917943&r2=917944&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/starresource/FakeNodeType.java
(original)
+++ sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/starresource/FakeNodeType.java
Tue Mar  2 10:16:17 2010
@@ -21,6 +21,7 @@
 import javax.jcr.Value;
 import javax.jcr.nodetype.NodeDefinition;
 import javax.jcr.nodetype.NodeType;
+import javax.jcr.nodetype.NodeTypeIterator;
 import javax.jcr.nodetype.PropertyDefinition;
 
 /** Fake NodeType when only some methods work, as needed to support
@@ -29,11 +30,11 @@
 class FakeNodeType implements NodeType {
 
     private final String name;
-    
+
     FakeNodeType(String name) {
         this.name = name;
     }
-    
+
     public boolean canAddChildNode(String arg0) {
         return false;
     }
@@ -97,4 +98,32 @@
     public boolean isNodeType(String arg0) {
         return false;
     }
+
+    public boolean canRemoveNode(String nodeName) {
+        return false;
+    }
+
+    public boolean canRemoveProperty(String propertyName) {
+        return false;
+    }
+
+    public NodeTypeIterator getDeclaredSubtypes() {
+        return null;
+    }
+
+    public NodeTypeIterator getSubtypes() {
+        return null;
+    }
+
+    public String[] getDeclaredSupertypeNames() {
+        return null;
+    }
+
+    public boolean isAbstract() {
+        return false;
+    }
+
+    public boolean isQueryable() {
+        return false;
+    }
 }



Mime
View raw message