jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1335169 - in /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr: ItemDelegate.java NodeDelegate.java PropertyDelegate.java
Date Mon, 07 May 2012 18:17:34 GMT
Author: mduerig
Date: Mon May  7 18:17:33 2012
New Revision: 1335169

URL: http://svn.apache.org/viewvc?rev=1335169&view=rev
Log:
OAK-84: Delegates for Session, Node, Property and Item
- make *Delegate methods public in order for them to be accessible from sub-packages

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

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/ItemDelegate.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/ItemDelegate.java?rev=1335169&r1=1335168&r2=1335169&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/ItemDelegate.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/ItemDelegate.java
Mon May  7 18:17:33 2012
@@ -34,35 +34,35 @@ public abstract class ItemDelegate {
      * Get the name of this item
      * @return oak name of this item
      */
-    abstract String getName();
+    public abstract String getName();
 
     /**
      * Get the path of this item
      * @return oak path of this item
      */
-    abstract String getPath();
+    public abstract String getPath();
 
     /**
      * Get the parent of this item
      * @return  parent of this item or {@code null} for root
      */
-    abstract NodeDelegate getParent();
+    public abstract NodeDelegate getParent();
 
     /**
      * Determine whether this item is stale
      * @return  {@code true} iff stale
      */
-    abstract boolean isStale();
+    public abstract boolean isStale();
 
     /**
      * Get the status of this item
      * @return  {@link Status} of this item
      */
-    abstract Status getStatus();
+    public abstract Status getStatus();
 
     /**
      * Get the session delegate with which this item is associated
      * @return  {@link SessionDelegate} to which this item belongs
      */
-    abstract SessionDelegate getSessionDelegate();
+    public abstract SessionDelegate getSessionDelegate();
 }

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=1335169&r1=1335168&r2=1335169&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
Mon May  7 18:17:33 2012
@@ -50,28 +50,28 @@ public class NodeDelegate extends ItemDe
     }
 
     @Override
-    String getName() {
+    public String getName() {
         return getTree().getName();
     }
 
     @Override
-    String getPath() {
+    public String getPath() {
         return '/' + getTree().getPath();
     }
 
     @Override
-    NodeDelegate getParent() {
+    public NodeDelegate getParent() {
         Tree parent = getParentTree();
         return parent == null ? null : new NodeDelegate(sessionDelegate, parent);
     }
 
     @Override
-    boolean isStale() {
+    public boolean isStale() {
         return getTree() == null;
     }
 
     @Override
-    Status getStatus() {
+    public Status getStatus() {
         Tree parent = getParentTree();
         if (parent == null) {
             return Status.EXISTING;  // FIXME: return correct status for root
@@ -82,7 +82,7 @@ public class NodeDelegate extends ItemDe
     }
 
     @Override
-    SessionDelegate getSessionDelegate() {
+    public SessionDelegate getSessionDelegate() {
         return sessionDelegate;
     }
 
@@ -90,7 +90,7 @@ public class NodeDelegate extends ItemDe
      * Determine whether this is the root node
      * @return  {@code true} iff this is the root node
      */
-    boolean isRoot() {
+    public boolean isRoot() {
         return getParentTree() == null;
     }
 
@@ -98,7 +98,7 @@ public class NodeDelegate extends ItemDe
      * Get the number of properties of the node
      * @return  number of properties of the node
      */
-    long getPropertyCount() {
+    public long getPropertyCount() {
         return getTree().getPropertyCount();
     }
 
@@ -108,7 +108,7 @@ public class NodeDelegate extends ItemDe
      * @return  property at the path given by {@code relPath} or {@code null} if
      * no such property exists
      */
-    PropertyDelegate getProperty(String relPath) {
+    public PropertyDelegate getProperty(String relPath) {
         Tree parent = getTree(PathUtils.getParentPath(relPath));
         if (parent == null) {
             return null;
@@ -125,7 +125,7 @@ public class NodeDelegate extends ItemDe
      * Get the properties of the node
      * @return  properties of the node
      */
-    Iterator<PropertyDelegate> getProperties() {
+    public Iterator<PropertyDelegate> getProperties() {
         return propertyDelegateIterator(getTree().getProperties().iterator());
     }
 
@@ -133,7 +133,7 @@ public class NodeDelegate extends ItemDe
      * Get the number of child nodes
      * @return  number of child nodes of the node
      */
-    long getChildCount() {
+    public long getChildCount() {
         return getTree().getChildrenCount();
     }
 
@@ -143,7 +143,7 @@ public class NodeDelegate extends ItemDe
      * @return  node at the path given by {@code relPath} or {@code null} if
      * no such node exists
      */
-    NodeDelegate getChild(String relPath) {
+    public NodeDelegate getChild(String relPath) {
         Tree tree = getTree(relPath);
         return tree == null ? null : new NodeDelegate(sessionDelegate, tree);
     }
@@ -152,7 +152,7 @@ public class NodeDelegate extends ItemDe
      * Get child nodes
      * @return  child nodes of the node
      */
-    Iterator<NodeDelegate> getChildren() {
+    public Iterator<NodeDelegate> getChildren() {
         return nodeDelegateIterator(getTree().getChildren().iterator());
     }
 
@@ -162,7 +162,7 @@ public class NodeDelegate extends ItemDe
      * @param value
      * @return  the set property
      */
-    PropertyDelegate setProperty(String name, CoreValue value) {
+    public PropertyDelegate setProperty(String name, CoreValue value) {
         PropertyState propertyState = getTree().setProperty(name, value);
         return new PropertyDelegate(sessionDelegate, getTree(), propertyState);
     }
@@ -173,7 +173,7 @@ public class NodeDelegate extends ItemDe
      * @param value
      * @return  the set property
      */
-    PropertyDelegate setProperty(String name, List<CoreValue> value) {
+    public PropertyDelegate setProperty(String name, List<CoreValue> value) {
         PropertyState propertyState = getTree().setProperty(name, value);
         return new PropertyDelegate(sessionDelegate, getTree(), propertyState);
     }
@@ -183,7 +183,7 @@ public class NodeDelegate extends ItemDe
      * @param name  oak name
      * @return  the added node or {@code null} if such a node already exists
      */
-    NodeDelegate addChild(String name) {
+    public NodeDelegate addChild(String name) {
         Tree tree = getTree();
         return tree.hasChild(name)
             ? null
@@ -193,7 +193,7 @@ public class NodeDelegate extends ItemDe
     /**
      * Remove the node
      */
-    void remove() {
+    public void remove() {
         getParentTree().removeChild(getName());
     }
 

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyDelegate.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyDelegate.java?rev=1335169&r1=1335168&r2=1335169&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyDelegate.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyDelegate.java
Mon May  7 18:17:33 2012
@@ -58,32 +58,32 @@ public class PropertyDelegate extends It
     }
 
     @Override
-    String getName() {
+    public String getName() {
         return getPropertyState().getName();
     }
 
     @Override
-    String getPath() {
+    public String getPath() {
         return getParent().getPath() + '/' + getName();
     }
 
     @Override
-    NodeDelegate getParent() {
+    public NodeDelegate getParent() {
         return new NodeDelegate(sessionDelegate, getParentTree());
     }
 
     @Override
-    boolean isStale() {
+    public boolean isStale() {
         return getPropertyState() == null;
     }
 
     @Override
-    Status getStatus() {
+    public Status getStatus() {
         return getParentTree().getPropertyStatus(getName());
     }
 
     @Override
-    SessionDelegate getSessionDelegate() {
+    public SessionDelegate getSessionDelegate() {
         return sessionDelegate;
     }
 
@@ -91,7 +91,7 @@ public class PropertyDelegate extends It
      * Get the value of the property
      * @return  value or {@code null} if multi values
      */
-    CoreValue getValue() {
+    public CoreValue getValue() {
         return getPropertyState().getValue();
     }
 
@@ -99,7 +99,7 @@ public class PropertyDelegate extends It
      * Get the value of the property
      * @return  value or {@code null} if single valued
      */
-    Iterable<CoreValue> getValues() {
+    public Iterable<CoreValue> getValues() {
         return getPropertyState().getValues();
     }
 
@@ -107,7 +107,7 @@ public class PropertyDelegate extends It
      * Determine whether the property is multi valued
      * @return  {@code true} if multi valued
      */
-    boolean isMultivalue() {
+    public boolean isMultivalue() {
         return getPropertyState().isArray();
     }
 
@@ -115,7 +115,7 @@ public class PropertyDelegate extends It
      * Get the property definition of the property
      * @return
      */
-    PropertyDefinition getDefinition() {
+    public PropertyDefinition getDefinition() {
         // TODO
         return new PropertyDefinition() {
 
@@ -202,7 +202,7 @@ public class PropertyDelegate extends It
      * Set the value of the property
      * @param value
      */
-    void setValue(CoreValue value) {
+    public void setValue(CoreValue value) {
         getParentTree().setProperty(getName(), value);
     }
 
@@ -210,14 +210,14 @@ public class PropertyDelegate extends It
      * Set the values of the property
      * @param values
      */
-    void setValues(List<CoreValue> values) {
+    public void setValues(List<CoreValue> values) {
         getParentTree().setProperty(getName(), values);
     }
 
     /**
      * Remove the property
      */
-    void remove() {
+    public void remove() {
         getParentTree().removeProperty(getName());
     }
 



Mime
View raw message