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 mr...@apache.org on 2012/09/06 14:37:08 UTC
svn commit: r1381574 - /jackrabbit/oak/trunk/oak-core/README.md
Author: mreutegg
Date: Thu Sep 6 12:37:08 2012
New Revision: 1381574
URL: http://svn.apache.org/viewvc?rev=1381574&view=rev
Log:
Update README to reflect current API.
Modified:
jackrabbit/oak/trunk/oak-core/README.md
Modified: jackrabbit/oak/trunk/oak-core/README.md
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/README.md?rev=1381574&r1=1381573&r2=1381574&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/README.md (original)
+++ jackrabbit/oak/trunk/oak-core/README.md Thu Sep 6 12:37:08 2012
@@ -46,7 +46,7 @@ snapshot of the current state of the con
ContentSession session = ...;
Root root = session.getCurrentRoot();
- Tree tree = root.getTree();
+ Tree tree = root.getTree("/");
The returned `Tree` instance belongs to the client and its state is only
modified in response to method calls made by the client. `Tree` instances
@@ -59,11 +59,11 @@ Content trees are recursive data structu
and subtrees that share the same namespace, but are accessed through separate
methods like outlined below:
- ContentTree tree = ...;
+ Tree tree = ...;
for (PropertyState property : tree.getProperties()) {
...;
}
- for (Tree subtree : tree.getSubtrees()) {
+ for (Tree subtree : tree.getChildren()) {
...;
}
@@ -71,9 +71,9 @@ The repository content snapshot exposed
invalid over time due to garbage collection of old content, at which point
an outdated snapshot will start throwing `IllegalStateExceptions` to
indicate that the snapshot is no longer available. To access more recent
-content, a client should either call `getCurrentRoot()` to acquire a fresh
-new content snapshot or use the `refresh()` method to update a given `Root`
-to the latest state of the content repository:
+content, a client should either call `ContentSession.getCurrentRoot()` to
+acquire a fresh new content snapshot or use the `refresh()` method to update
+a given `Root` to the latest state of the content repository:
Root root = ...;
root.refresh();