You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by md...@apache.org on 2012/04/23 15:44:36 UTC
svn commit: r1329237 -
/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/ContentTree.java
Author: mduerig
Date: Mon Apr 23 13:44:35 2012
New Revision: 1329237
URL: http://svn.apache.org/viewvc?rev=1329237&view=rev
Log:
OAK-18: Define Oak API
- Javadoc
Modified:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/ContentTree.java
Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/ContentTree.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/ContentTree.java?rev=1329237&r1=1329236&r2=1329237&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/ContentTree.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/ContentTree.java Mon Apr 23 13:44:35 2012
@@ -42,7 +42,32 @@ import java.util.List;
*
*/
public interface ContentTree {
- enum Status {EXISTING, NEW, MODIFIED, REMOVED}
+
+ /**
+ * Status of an item in a {@code ContentTree}
+ */
+ enum Status {
+ /**
+ * Item is persisted
+ */
+ EXISTING,
+
+ /**
+ * Item is new
+ */
+ NEW,
+
+ /**
+ * Item is modified: has added or removed children or added, removed or modified
+ * properties.
+ */
+ MODIFIED,
+
+ /**
+ * Item is removed
+ */
+ REMOVED
+ }
/**
* @return the name of this {@code ContentTree} instance.
@@ -67,6 +92,12 @@ public interface ContentTree {
*/
PropertyState getProperty(String name);
+ /**
+ * Get the {@code Status} of a property state
+ * @param name name of the property state
+ * @return the status of the property state with the given {@code name}
+ * or {@code null} in no such property state exists.
+ */
Status getPropertyStatus(String name);
/**
@@ -100,6 +131,12 @@ public interface ContentTree {
*/
ContentTree getChild(String name);
+ /**
+ * Get the {@code Status} of a child tree
+ * @param name name of the child
+ * @return the status of the child with the given {@code name} or {@code null} in
+ * no such child exists.
+ */
Status getChildStatus(String name);
/**