You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by mr...@apache.org on 2015/01/15 15:45:29 UTC
svn commit: r1652115 [1/3] - in /jackrabbit/site/live/oak/docs: ./ META-INF/
architecture/ coldstandby/ nodestore/ oak-mongo-js/ oak-mongo-js/scripts/
oak-mongo-js/scripts/prettify/ oak-mongo-js/styles/ oak_api/ plugins/
query/ security/ security/acces...
Author: mreutegg
Date: Thu Jan 15 14:45:27 2015
New Revision: 1652115
URL: http://svn.apache.org/r1652115
Log:
OAK-301: Document Oak
Added:
jackrabbit/site/live/oak/docs/oak-mongo-js/
jackrabbit/site/live/oak/docs/oak-mongo-js/index.html (with props)
jackrabbit/site/live/oak/docs/oak-mongo-js/oak-mongo.js.html (with props)
jackrabbit/site/live/oak/docs/oak-mongo-js/oak.html (with props)
jackrabbit/site/live/oak/docs/oak-mongo-js/scripts/
jackrabbit/site/live/oak/docs/oak-mongo-js/scripts/linenumber.js (with props)
jackrabbit/site/live/oak/docs/oak-mongo-js/scripts/prettify/
jackrabbit/site/live/oak/docs/oak-mongo-js/scripts/prettify/Apache-License-2.0.txt (with props)
jackrabbit/site/live/oak/docs/oak-mongo-js/scripts/prettify/lang-css.js (with props)
jackrabbit/site/live/oak/docs/oak-mongo-js/scripts/prettify/prettify.js (with props)
jackrabbit/site/live/oak/docs/oak-mongo-js/styles/
jackrabbit/site/live/oak/docs/oak-mongo-js/styles/jsdoc-default.css (with props)
jackrabbit/site/live/oak/docs/oak-mongo-js/styles/prettify-jsdoc.css (with props)
jackrabbit/site/live/oak/docs/oak-mongo-js/styles/prettify-tomorrow.css (with props)
Removed:
jackrabbit/site/live/oak/docs/META-INF/
jackrabbit/site/live/oak/docs/big-picture.png
jackrabbit/site/live/oak/docs/big-picture.uxf
jackrabbit/site/live/oak/docs/blobstore.html
jackrabbit/site/live/oak/docs/differences_accesscontrol.html
jackrabbit/site/live/oak/docs/differences_authentication.html
jackrabbit/site/live/oak/docs/differences_permission.html
jackrabbit/site/live/oak/docs/differences_principal.html
jackrabbit/site/live/oak/docs/differences_privileges.html
jackrabbit/site/live/oak/docs/differences_user.html
jackrabbit/site/live/oak/docs/documentmk.html
jackrabbit/site/live/oak/docs/from_here.html
jackrabbit/site/live/oak/docs/microkernel.html
jackrabbit/site/live/oak/docs/nodestate-r1.png
jackrabbit/site/live/oak/docs/nodestate-r2.png
jackrabbit/site/live/oak/docs/nodestate.html
jackrabbit/site/live/oak/docs/overview.html
jackrabbit/site/live/oak/docs/query.html
jackrabbit/site/live/oak/docs/security/external_login_module.html
jackrabbit/site/live/oak/docs/security/permission_eval.html
jackrabbit/site/live/oak/docs/segmentmk.html
jackrabbit/site/live/oak/docs/when_things_go_wrong.html
Modified:
jackrabbit/site/live/oak/docs/FAQ.html
jackrabbit/site/live/oak/docs/architecture/big-picture.png
jackrabbit/site/live/oak/docs/architecture/nodestate.html
jackrabbit/site/live/oak/docs/architecture/overview.html
jackrabbit/site/live/oak/docs/architecture/transactional-model.html
jackrabbit/site/live/oak/docs/clustering.html
jackrabbit/site/live/oak/docs/coldstandby/coldstandby.html
jackrabbit/site/live/oak/docs/command_line.html
jackrabbit/site/live/oak/docs/construct.html
jackrabbit/site/live/oak/docs/dev_getting_started.html
jackrabbit/site/live/oak/docs/differences.html
jackrabbit/site/live/oak/docs/dos_and_donts.html
jackrabbit/site/live/oak/docs/downloads.html
jackrabbit/site/live/oak/docs/index.html
jackrabbit/site/live/oak/docs/jsop-diff.html
jackrabbit/site/live/oak/docs/known_issues.html
jackrabbit/site/live/oak/docs/license.html
jackrabbit/site/live/oak/docs/nodestore/documentmk.html
jackrabbit/site/live/oak/docs/nodestore/overview.html
jackrabbit/site/live/oak/docs/nodestore/segmentmk.html
jackrabbit/site/live/oak/docs/oak_api/error_codes.html
jackrabbit/site/live/oak/docs/oak_api/overview.html
jackrabbit/site/live/oak/docs/osgi_config.html
jackrabbit/site/live/oak/docs/participating.html
jackrabbit/site/live/oak/docs/plugins/blobstore.html
jackrabbit/site/live/oak/docs/query/lucene-old.html
jackrabbit/site/live/oak/docs/query/lucene.html
jackrabbit/site/live/oak/docs/query/query.html
jackrabbit/site/live/oak/docs/security/accesscontrol.html
jackrabbit/site/live/oak/docs/security/accesscontrol/differences.html
jackrabbit/site/live/oak/docs/security/accesscontrol/editing.html
jackrabbit/site/live/oak/docs/security/accesscontrol/restriction.html
jackrabbit/site/live/oak/docs/security/authentication.html
jackrabbit/site/live/oak/docs/security/authentication/differences.html
jackrabbit/site/live/oak/docs/security/authentication/externalloginmodule.html
jackrabbit/site/live/oak/docs/security/authentication/identitymanagement.html
jackrabbit/site/live/oak/docs/security/authentication/ldap.html
jackrabbit/site/live/oak/docs/security/authentication/preauthentication.html
jackrabbit/site/live/oak/docs/security/authentication/tokenmanagement.html
jackrabbit/site/live/oak/docs/security/authentication/usersync.html
jackrabbit/site/live/oak/docs/security/overview.html
jackrabbit/site/live/oak/docs/security/permission.html
jackrabbit/site/live/oak/docs/security/permission/differences.html
jackrabbit/site/live/oak/docs/security/permission/evaluation.html
jackrabbit/site/live/oak/docs/security/principal.html
jackrabbit/site/live/oak/docs/security/principal/differences.html
jackrabbit/site/live/oak/docs/security/privilege.html
jackrabbit/site/live/oak/docs/security/privilege/differences.html
jackrabbit/site/live/oak/docs/security/user.html
jackrabbit/site/live/oak/docs/security/user/authorizableaction.html
jackrabbit/site/live/oak/docs/security/user/authorizablenodename.html
jackrabbit/site/live/oak/docs/security/user/differences.html
jackrabbit/site/live/oak/docs/security/user/expiry.html
jackrabbit/site/live/oak/docs/security/user/membership.html
jackrabbit/site/live/oak/docs/security/user/query.html
jackrabbit/site/live/oak/docs/use_getting_started.html
Modified: jackrabbit/site/live/oak/docs/FAQ.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/FAQ.html?rev=1652115&r1=1652114&r2=1652115&view=diff
==============================================================================
--- jackrabbit/site/live/oak/docs/FAQ.html (original)
+++ jackrabbit/site/live/oak/docs/FAQ.html Thu Jan 15 14:45:27 2015
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
- | Generated by Apache Maven Doxia at 2014-12-08
+ | Generated by Apache Maven Doxia at 2015-01-15
| Rendered using Apache Maven Fluido Skin 1.3.0
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta name="Date-Revision-yyyymmdd" content="20141208" />
+ <meta name="Date-Revision-yyyymmdd" content="20150115" />
<meta http-equiv="Content-Language" content="en" />
<title>Jackrabbit Oak - Frequently asked questions</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -192,7 +192,7 @@
<ul class="breadcrumb">
- <li id="publishDate">Last Published: 2014-12-08</li>
+ <li id="publishDate">Last Published: 2015-01-15</li>
<li class="divider">|</li> <li id="projectVersion">Version: 1.1-SNAPSHOT</li>
@@ -457,7 +457,7 @@
<footer>
<div class="container-fluid">
- <div class="row span12">Copyright © 2012-2014
+ <div class="row span12">Copyright © 2012-2015
<a href="http://www.apache.org/">The Apache Software Foundation</a>.
All Rights Reserved.
Modified: jackrabbit/site/live/oak/docs/architecture/big-picture.png
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/architecture/big-picture.png?rev=1652115&r1=1652114&r2=1652115&view=diff
==============================================================================
Binary files - no diff available.
Modified: jackrabbit/site/live/oak/docs/architecture/nodestate.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/architecture/nodestate.html?rev=1652115&r1=1652114&r2=1652115&view=diff
==============================================================================
--- jackrabbit/site/live/oak/docs/architecture/nodestate.html (original)
+++ jackrabbit/site/live/oak/docs/architecture/nodestate.html Thu Jan 15 14:45:27 2015
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
- | Generated by Apache Maven Doxia at 2014-12-08
+ | Generated by Apache Maven Doxia at 2015-01-15
| Rendered using Apache Maven Fluido Skin 1.3.0
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta name="Date-Revision-yyyymmdd" content="20141208" />
+ <meta name="Date-Revision-yyyymmdd" content="20150115" />
<meta http-equiv="Content-Language" content="en" />
<title>Jackrabbit Oak - Understanding the node state model</title>
<link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
@@ -192,7 +192,7 @@
<ul class="breadcrumb">
- <li id="publishDate">Last Published: 2014-12-08</li>
+ <li id="publishDate">Last Published: 2015-01-15</li>
<li class="divider">|</li> <li id="projectVersion">Version: 1.1-SNAPSHOT</li>
@@ -583,7 +583,7 @@ assert !barBuilder.exists();
<footer>
<div class="container-fluid">
- <div class="row span12">Copyright © 2012-2014
+ <div class="row span12">Copyright © 2012-2015
<a href="http://www.apache.org/">The Apache Software Foundation</a>.
All Rights Reserved.
Modified: jackrabbit/site/live/oak/docs/architecture/overview.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/architecture/overview.html?rev=1652115&r1=1652114&r2=1652115&view=diff
==============================================================================
--- jackrabbit/site/live/oak/docs/architecture/overview.html (original)
+++ jackrabbit/site/live/oak/docs/architecture/overview.html Thu Jan 15 14:45:27 2015
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
- | Generated by Apache Maven Doxia at 2014-12-08
+ | Generated by Apache Maven Doxia at 2015-01-15
| Rendered using Apache Maven Fluido Skin 1.3.0
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta name="Date-Revision-yyyymmdd" content="20141208" />
+ <meta name="Date-Revision-yyyymmdd" content="20150115" />
<meta http-equiv="Content-Language" content="en" />
<title>Jackrabbit Oak - Oak - The big picture</title>
<link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
@@ -192,7 +192,7 @@
<ul class="breadcrumb">
- <li id="publishDate">Last Published: 2014-12-08</li>
+ <li id="publishDate">Last Published: 2015-01-15</li>
<li class="divider">|</li> <li id="projectVersion">Version: 1.1-SNAPSHOT</li>
@@ -477,7 +477,7 @@
<footer>
<div class="container-fluid">
- <div class="row span12">Copyright © 2012-2014
+ <div class="row span12">Copyright © 2012-2015
<a href="http://www.apache.org/">The Apache Software Foundation</a>.
All Rights Reserved.
Modified: jackrabbit/site/live/oak/docs/architecture/transactional-model.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/architecture/transactional-model.html?rev=1652115&r1=1652114&r2=1652115&view=diff
==============================================================================
--- jackrabbit/site/live/oak/docs/architecture/transactional-model.html (original)
+++ jackrabbit/site/live/oak/docs/architecture/transactional-model.html Thu Jan 15 14:45:27 2015
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
- | Generated by Apache Maven Doxia at 2014-12-08
+ | Generated by Apache Maven Doxia at 2015-01-15
| Rendered using Apache Maven Fluido Skin 1.3.0
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta name="Date-Revision-yyyymmdd" content="20141208" />
+ <meta name="Date-Revision-yyyymmdd" content="20150115" />
<meta http-equiv="Content-Language" content="en" />
<title>Jackrabbit Oak - Transactional model of sessions</title>
<link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
@@ -192,7 +192,7 @@
<ul class="breadcrumb">
- <li id="publishDate">Last Published: 2014-12-08</li>
+ <li id="publishDate">Last Published: 2015-01-15</li>
<li class="divider">|</li> <li id="projectVersion">Version: 1.1-SNAPSHOT</li>
@@ -462,7 +462,7 @@ check(session3);
<footer>
<div class="container-fluid">
- <div class="row span12">Copyright © 2012-2014
+ <div class="row span12">Copyright © 2012-2015
<a href="http://www.apache.org/">The Apache Software Foundation</a>.
All Rights Reserved.
Modified: jackrabbit/site/live/oak/docs/clustering.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/clustering.html?rev=1652115&r1=1652114&r2=1652115&view=diff
==============================================================================
--- jackrabbit/site/live/oak/docs/clustering.html (original)
+++ jackrabbit/site/live/oak/docs/clustering.html Thu Jan 15 14:45:27 2015
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
- | Generated by Apache Maven Doxia at 2014-12-08
+ | Generated by Apache Maven Doxia at 2015-01-15
| Rendered using Apache Maven Fluido Skin 1.3.0
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta name="Date-Revision-yyyymmdd" content="20141208" />
+ <meta name="Date-Revision-yyyymmdd" content="20150115" />
<meta http-equiv="Content-Language" content="en" />
<title>Jackrabbit Oak - Clustering</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -192,7 +192,7 @@
<ul class="breadcrumb">
- <li id="publishDate">Last Published: 2014-12-08</li>
+ <li id="publishDate">Last Published: 2015-01-15</li>
<li class="divider">|</li> <li id="projectVersion">Version: 1.1-SNAPSHOT</li>
@@ -448,7 +448,7 @@
<footer>
<div class="container-fluid">
- <div class="row span12">Copyright © 2012-2014
+ <div class="row span12">Copyright © 2012-2015
<a href="http://www.apache.org/">The Apache Software Foundation</a>.
All Rights Reserved.
Modified: jackrabbit/site/live/oak/docs/coldstandby/coldstandby.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/coldstandby/coldstandby.html?rev=1652115&r1=1652114&r2=1652115&view=diff
==============================================================================
--- jackrabbit/site/live/oak/docs/coldstandby/coldstandby.html (original)
+++ jackrabbit/site/live/oak/docs/coldstandby/coldstandby.html Thu Jan 15 14:45:27 2015
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
- | Generated by Apache Maven Doxia at 2014-12-08
+ | Generated by Apache Maven Doxia at 2015-01-15
| Rendered using Apache Maven Fluido Skin 1.3.0
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta name="Date-Revision-yyyymmdd" content="20141208" />
+ <meta name="Date-Revision-yyyymmdd" content="20150115" />
<meta http-equiv="Content-Language" content="en" />
<title>Jackrabbit Oak - Cold Standby</title>
<link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
@@ -192,7 +192,7 @@
<ul class="breadcrumb">
- <li id="publishDate">Last Published: 2014-12-08</li>
+ <li id="publishDate">Last Published: 2015-01-15</li>
<li class="divider">|</li> <li id="projectVersion">Version: 1.1-SNAPSHOT</li>
@@ -574,7 +574,7 @@
<footer>
<div class="container-fluid">
- <div class="row span12">Copyright © 2012-2014
+ <div class="row span12">Copyright © 2012-2015
<a href="http://www.apache.org/">The Apache Software Foundation</a>.
All Rights Reserved.
Modified: jackrabbit/site/live/oak/docs/command_line.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/command_line.html?rev=1652115&r1=1652114&r2=1652115&view=diff
==============================================================================
--- jackrabbit/site/live/oak/docs/command_line.html (original)
+++ jackrabbit/site/live/oak/docs/command_line.html Thu Jan 15 14:45:27 2015
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
- | Generated by Apache Maven Doxia at 2014-12-08
+ | Generated by Apache Maven Doxia at 2015-01-15
| Rendered using Apache Maven Fluido Skin 1.3.0
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta name="Date-Revision-yyyymmdd" content="20141208" />
+ <meta name="Date-Revision-yyyymmdd" content="20150115" />
<meta http-equiv="Content-Language" content="en" />
<title>Jackrabbit Oak - Command Line Tools</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -192,7 +192,7 @@
<ul class="breadcrumb">
- <li id="publishDate">Last Published: 2014-12-08</li>
+ <li id="publishDate">Last Published: 2015-01-15</li>
<li class="divider">|</li> <li id="projectVersion">Version: 1.1-SNAPSHOT</li>
@@ -461,7 +461,16 @@
<div class="source">
<pre>java -Dtar.memoryMapped=true -mx4g -jar oak-run-*.jar checkpoint <repository>
-</pre></div></div></div></div>
+</pre></div></div></div>
+<div class="section">
+<h3>MongoDB Shell with oak-mongo.js<a name="MongoDB_Shell_with_oak-mongo.js"></a></h3>
+<p>MongoDB comes with a command line shell that can be extended with custom JavaScript. Oak provides a oak-mongo.js file with MongoMK specific extensions. You first need to download the JavaScript file and then start the MongoDB shell with the file.</p>
+
+<div class="source">
+<pre>wget http://s.apache.org/oak-mongo.js
+mongo --shell oak-mongo.js
+</pre></div>
+<p>Now the MongoDB shell has an <tt>oak</tt> namespace with <a href="oak-mongo-js/oak.html">additional functions</a>.</p></div></div>
</div>
</div>
</div>
@@ -470,7 +479,7 @@
<footer>
<div class="container-fluid">
- <div class="row span12">Copyright © 2012-2014
+ <div class="row span12">Copyright © 2012-2015
<a href="http://www.apache.org/">The Apache Software Foundation</a>.
All Rights Reserved.
Modified: jackrabbit/site/live/oak/docs/construct.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/construct.html?rev=1652115&r1=1652114&r2=1652115&view=diff
==============================================================================
--- jackrabbit/site/live/oak/docs/construct.html (original)
+++ jackrabbit/site/live/oak/docs/construct.html Thu Jan 15 14:45:27 2015
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
- | Generated by Apache Maven Doxia at 2014-12-08
+ | Generated by Apache Maven Doxia at 2015-01-15
| Rendered using Apache Maven Fluido Skin 1.3.0
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta name="Date-Revision-yyyymmdd" content="20141208" />
+ <meta name="Date-Revision-yyyymmdd" content="20150115" />
<meta http-equiv="Content-Language" content="en" />
<title>Jackrabbit Oak - Repository Construction</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -192,7 +192,7 @@
<ul class="breadcrumb">
- <li id="publishDate">Last Published: 2014-12-08</li>
+ <li id="publishDate">Last Published: 2015-01-15</li>
<li class="divider">|</li> <li id="projectVersion">Version: 1.1-SNAPSHOT</li>
@@ -480,7 +480,7 @@
<footer>
<div class="container-fluid">
- <div class="row span12">Copyright © 2012-2014
+ <div class="row span12">Copyright © 2012-2015
<a href="http://www.apache.org/">The Apache Software Foundation</a>.
All Rights Reserved.
Modified: jackrabbit/site/live/oak/docs/dev_getting_started.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/dev_getting_started.html?rev=1652115&r1=1652114&r2=1652115&view=diff
==============================================================================
--- jackrabbit/site/live/oak/docs/dev_getting_started.html (original)
+++ jackrabbit/site/live/oak/docs/dev_getting_started.html Thu Jan 15 14:45:27 2015
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
- | Generated by Apache Maven Doxia at 2014-12-08
+ | Generated by Apache Maven Doxia at 2015-01-15
| Rendered using Apache Maven Fluido Skin 1.3.0
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta name="Date-Revision-yyyymmdd" content="20141208" />
+ <meta name="Date-Revision-yyyymmdd" content="20150115" />
<meta http-equiv="Content-Language" content="en" />
<title>Jackrabbit Oak - Getting Started</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -192,7 +192,7 @@
<ul class="breadcrumb">
- <li id="publishDate">Last Published: 2014-12-08</li>
+ <li id="publishDate">Last Published: 2015-01-15</li>
<li class="divider">|</li> <li id="projectVersion">Version: 1.1-SNAPSHOT</li>
@@ -515,7 +515,7 @@
<footer>
<div class="container-fluid">
- <div class="row span12">Copyright © 2012-2014
+ <div class="row span12">Copyright © 2012-2015
<a href="http://www.apache.org/">The Apache Software Foundation</a>.
All Rights Reserved.
Modified: jackrabbit/site/live/oak/docs/differences.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/differences.html?rev=1652115&r1=1652114&r2=1652115&view=diff
==============================================================================
--- jackrabbit/site/live/oak/docs/differences.html (original)
+++ jackrabbit/site/live/oak/docs/differences.html Thu Jan 15 14:45:27 2015
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
- | Generated by Apache Maven Doxia at 2014-12-08
+ | Generated by Apache Maven Doxia at 2015-01-15
| Rendered using Apache Maven Fluido Skin 1.3.0
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta name="Date-Revision-yyyymmdd" content="20141208" />
+ <meta name="Date-Revision-yyyymmdd" content="20150115" />
<meta http-equiv="Content-Language" content="en" />
<title>Jackrabbit Oak - Backward compatibility</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -192,7 +192,7 @@
<ul class="breadcrumb">
- <li id="publishDate">Last Published: 2014-12-08</li>
+ <li id="publishDate">Last Published: 2015-01-15</li>
<li class="divider">|</li> <li id="projectVersion">Version: 1.1-SNAPSHOT</li>
@@ -641,7 +641,7 @@
<footer>
<div class="container-fluid">
- <div class="row span12">Copyright © 2012-2014
+ <div class="row span12">Copyright © 2012-2015
<a href="http://www.apache.org/">The Apache Software Foundation</a>.
All Rights Reserved.
Modified: jackrabbit/site/live/oak/docs/dos_and_donts.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/dos_and_donts.html?rev=1652115&r1=1652114&r2=1652115&view=diff
==============================================================================
--- jackrabbit/site/live/oak/docs/dos_and_donts.html (original)
+++ jackrabbit/site/live/oak/docs/dos_and_donts.html Thu Jan 15 14:45:27 2015
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
- | Generated by Apache Maven Doxia at 2014-12-08
+ | Generated by Apache Maven Doxia at 2015-01-15
| Rendered using Apache Maven Fluido Skin 1.3.0
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta name="Date-Revision-yyyymmdd" content="20141208" />
+ <meta name="Date-Revision-yyyymmdd" content="20150115" />
<meta http-equiv="Content-Language" content="en" />
<title>Jackrabbit Oak - Session refresh behavior</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -192,7 +192,7 @@
<ul class="breadcrumb">
- <li id="publishDate">Last Published: 2014-12-08</li>
+ <li id="publishDate">Last Published: 2015-01-15</li>
<li class="divider">|</li> <li id="projectVersion">Version: 1.1-SNAPSHOT</li>
@@ -456,7 +456,7 @@
<footer>
<div class="container-fluid">
- <div class="row span12">Copyright © 2012-2014
+ <div class="row span12">Copyright © 2012-2015
<a href="http://www.apache.org/">The Apache Software Foundation</a>.
All Rights Reserved.
Modified: jackrabbit/site/live/oak/docs/downloads.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/downloads.html?rev=1652115&r1=1652114&r2=1652115&view=diff
==============================================================================
--- jackrabbit/site/live/oak/docs/downloads.html (original)
+++ jackrabbit/site/live/oak/docs/downloads.html Thu Jan 15 14:45:27 2015
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
- | Generated by Apache Maven Doxia at 2014-12-08
+ | Generated by Apache Maven Doxia at 2015-01-15
| Rendered using Apache Maven Fluido Skin 1.3.0
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta name="Date-Revision-yyyymmdd" content="20141208" />
+ <meta name="Date-Revision-yyyymmdd" content="20150115" />
<meta http-equiv="Content-Language" content="en" />
<title>Jackrabbit Oak - Downloads</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -192,7 +192,7 @@
<ul class="breadcrumb">
- <li id="publishDate">Last Published: 2014-12-08</li>
+ <li id="publishDate">Last Published: 2015-01-15</li>
<li class="divider">|</li> <li id="projectVersion">Version: 1.1-SNAPSHOT</li>
@@ -445,7 +445,7 @@
<footer>
<div class="container-fluid">
- <div class="row span12">Copyright © 2012-2014
+ <div class="row span12">Copyright © 2012-2015
<a href="http://www.apache.org/">The Apache Software Foundation</a>.
All Rights Reserved.
Modified: jackrabbit/site/live/oak/docs/index.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/index.html?rev=1652115&r1=1652114&r2=1652115&view=diff
==============================================================================
--- jackrabbit/site/live/oak/docs/index.html (original)
+++ jackrabbit/site/live/oak/docs/index.html Thu Jan 15 14:45:27 2015
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
- | Generated by Apache Maven Doxia at 2014-12-08
+ | Generated by Apache Maven Doxia at 2015-01-15
| Rendered using Apache Maven Fluido Skin 1.3.0
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta name="Date-Revision-yyyymmdd" content="20141208" />
+ <meta name="Date-Revision-yyyymmdd" content="20150115" />
<meta http-equiv="Content-Language" content="en" />
<title>Jackrabbit Oak - Jackrabbit Oak - the next generation content repository</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -192,7 +192,7 @@
<ul class="breadcrumb">
- <li id="publishDate">Last Published: 2014-12-08</li>
+ <li id="publishDate">Last Published: 2015-01-15</li>
<li class="divider">|</li> <li id="projectVersion">Version: 1.1-SNAPSHOT</li>
@@ -466,7 +466,7 @@
<footer>
<div class="container-fluid">
- <div class="row span12">Copyright © 2012-2014
+ <div class="row span12">Copyright © 2012-2015
<a href="http://www.apache.org/">The Apache Software Foundation</a>.
All Rights Reserved.
Modified: jackrabbit/site/live/oak/docs/jsop-diff.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/jsop-diff.html?rev=1652115&r1=1652114&r2=1652115&view=diff
==============================================================================
--- jackrabbit/site/live/oak/docs/jsop-diff.html (original)
+++ jackrabbit/site/live/oak/docs/jsop-diff.html Thu Jan 15 14:45:27 2015
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
- | Generated by Apache Maven Doxia at 2014-12-08
+ | Generated by Apache Maven Doxia at 2015-01-15
| Rendered using Apache Maven Fluido Skin 1.3.0
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta name="Date-Revision-yyyymmdd" content="20141208" />
+ <meta name="Date-Revision-yyyymmdd" content="20150115" />
<meta http-equiv="Content-Language" content="en" />
<title>Jackrabbit Oak - </title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -192,7 +192,7 @@
<ul class="breadcrumb">
- <li id="publishDate">Last Published: 2014-12-08</li>
+ <li id="publishDate">Last Published: 2015-01-15</li>
<li class="divider">|</li> <li id="projectVersion">Version: 1.1-SNAPSHOT</li>
@@ -531,7 +531,7 @@ diffNode(X, S, T) {
<footer>
<div class="container-fluid">
- <div class="row span12">Copyright © 2012-2014
+ <div class="row span12">Copyright © 2012-2015
<a href="http://www.apache.org/">The Apache Software Foundation</a>.
All Rights Reserved.
Modified: jackrabbit/site/live/oak/docs/known_issues.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/known_issues.html?rev=1652115&r1=1652114&r2=1652115&view=diff
==============================================================================
--- jackrabbit/site/live/oak/docs/known_issues.html (original)
+++ jackrabbit/site/live/oak/docs/known_issues.html Thu Jan 15 14:45:27 2015
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
- | Generated by Apache Maven Doxia at 2014-12-08
+ | Generated by Apache Maven Doxia at 2015-01-15
| Rendered using Apache Maven Fluido Skin 1.3.0
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta name="Date-Revision-yyyymmdd" content="20141208" />
+ <meta name="Date-Revision-yyyymmdd" content="20150115" />
<meta http-equiv="Content-Language" content="en" />
<title>Jackrabbit Oak - Known issues</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -192,7 +192,7 @@
<ul class="breadcrumb">
- <li id="publishDate">Last Published: 2014-12-08</li>
+ <li id="publishDate">Last Published: 2015-01-15</li>
<li class="divider">|</li> <li id="projectVersion">Version: 1.1-SNAPSHOT</li>
@@ -456,7 +456,7 @@
<footer>
<div class="container-fluid">
- <div class="row span12">Copyright © 2012-2014
+ <div class="row span12">Copyright © 2012-2015
<a href="http://www.apache.org/">The Apache Software Foundation</a>.
All Rights Reserved.
Modified: jackrabbit/site/live/oak/docs/license.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/license.html?rev=1652115&r1=1652114&r2=1652115&view=diff
==============================================================================
--- jackrabbit/site/live/oak/docs/license.html (original)
+++ jackrabbit/site/live/oak/docs/license.html Thu Jan 15 14:45:27 2015
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
- | Generated by Apache Maven Doxia at 2014-12-08
+ | Generated by Apache Maven Doxia at 2015-01-15
| Rendered using Apache Maven Fluido Skin 1.3.0
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta name="Date-Revision-yyyymmdd" content="20141208" />
+ <meta name="Date-Revision-yyyymmdd" content="20150115" />
<meta http-equiv="Content-Language" content="en" />
<title>Jackrabbit Oak - License</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -192,7 +192,7 @@
<ul class="breadcrumb">
- <li id="publishDate">Last Published: 2014-12-08</li>
+ <li id="publishDate">Last Published: 2015-01-15</li>
<li class="divider">|</li> <li id="projectVersion">Version: 1.1-SNAPSHOT</li>
@@ -445,7 +445,7 @@
<footer>
<div class="container-fluid">
- <div class="row span12">Copyright © 2012-2014
+ <div class="row span12">Copyright © 2012-2015
<a href="http://www.apache.org/">The Apache Software Foundation</a>.
All Rights Reserved.
Modified: jackrabbit/site/live/oak/docs/nodestore/documentmk.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/nodestore/documentmk.html?rev=1652115&r1=1652114&r2=1652115&view=diff
==============================================================================
--- jackrabbit/site/live/oak/docs/nodestore/documentmk.html (original)
+++ jackrabbit/site/live/oak/docs/nodestore/documentmk.html Thu Jan 15 14:45:27 2015
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
- | Generated by Apache Maven Doxia at 2014-12-08
+ | Generated by Apache Maven Doxia at 2015-01-15
| Rendered using Apache Maven Fluido Skin 1.3.0
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta name="Date-Revision-yyyymmdd" content="20141208" />
+ <meta name="Date-Revision-yyyymmdd" content="20150115" />
<meta http-equiv="Content-Language" content="en" />
<title>Jackrabbit Oak - Oak DocumentMK</title>
<link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
@@ -192,7 +192,7 @@
<ul class="breadcrumb">
- <li id="publishDate">Last Published: 2014-12-08</li>
+ <li id="publishDate">Last Published: 2015-01-15</li>
<li class="divider">|</li> <li id="projectVersion">Version: 1.1-SNAPSHOT</li>
@@ -753,7 +753,7 @@ nodes
<footer>
<div class="container-fluid">
- <div class="row span12">Copyright © 2012-2014
+ <div class="row span12">Copyright © 2012-2015
<a href="http://www.apache.org/">The Apache Software Foundation</a>.
All Rights Reserved.
Modified: jackrabbit/site/live/oak/docs/nodestore/overview.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/nodestore/overview.html?rev=1652115&r1=1652114&r2=1652115&view=diff
==============================================================================
--- jackrabbit/site/live/oak/docs/nodestore/overview.html (original)
+++ jackrabbit/site/live/oak/docs/nodestore/overview.html Thu Jan 15 14:45:27 2015
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
- | Generated by Apache Maven Doxia at 2014-12-08
+ | Generated by Apache Maven Doxia at 2015-01-15
| Rendered using Apache Maven Fluido Skin 1.3.0
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta name="Date-Revision-yyyymmdd" content="20141208" />
+ <meta name="Date-Revision-yyyymmdd" content="20150115" />
<meta http-equiv="Content-Language" content="en" />
<title>Jackrabbit Oak - NodeStore API and MicroKernel API</title>
<link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
@@ -192,7 +192,7 @@
<ul class="breadcrumb">
- <li id="publishDate">Last Published: 2014-12-08</li>
+ <li id="publishDate">Last Published: 2015-01-15</li>
<li class="divider">|</li> <li id="projectVersion">Version: 1.1-SNAPSHOT</li>
@@ -452,7 +452,7 @@
<footer>
<div class="container-fluid">
- <div class="row span12">Copyright © 2012-2014
+ <div class="row span12">Copyright © 2012-2015
<a href="http://www.apache.org/">The Apache Software Foundation</a>.
All Rights Reserved.
Modified: jackrabbit/site/live/oak/docs/nodestore/segmentmk.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/nodestore/segmentmk.html?rev=1652115&r1=1652114&r2=1652115&view=diff
==============================================================================
--- jackrabbit/site/live/oak/docs/nodestore/segmentmk.html (original)
+++ jackrabbit/site/live/oak/docs/nodestore/segmentmk.html Thu Jan 15 14:45:27 2015
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
- | Generated by Apache Maven Doxia at 2014-12-08
+ | Generated by Apache Maven Doxia at 2015-01-15
| Rendered using Apache Maven Fluido Skin 1.3.0
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta name="Date-Revision-yyyymmdd" content="20141208" />
+ <meta name="Date-Revision-yyyymmdd" content="20150115" />
<meta http-equiv="Content-Language" content="en" />
<title>Jackrabbit Oak - SegmentMK design overview</title>
<link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
@@ -192,7 +192,7 @@
<ul class="breadcrumb">
- <li id="publishDate">Last Published: 2014-12-08</li>
+ <li id="publishDate">Last Published: 2015-01-15</li>
<li class="divider">|</li> <li id="projectVersion">Version: 1.1-SNAPSHOT</li>
@@ -618,7 +618,7 @@
<footer>
<div class="container-fluid">
- <div class="row span12">Copyright © 2012-2014
+ <div class="row span12">Copyright © 2012-2015
<a href="http://www.apache.org/">The Apache Software Foundation</a>.
All Rights Reserved.
Added: jackrabbit/site/live/oak/docs/oak-mongo-js/index.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/oak-mongo-js/index.html?rev=1652115&view=auto
==============================================================================
--- jackrabbit/site/live/oak/docs/oak-mongo-js/index.html (added)
+++ jackrabbit/site/live/oak/docs/oak-mongo-js/index.html Thu Jan 15 14:45:27 2015
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>JSDoc: Index</title>
+
+ <script src="scripts/prettify/prettify.js"> </script>
+ <script src="scripts/prettify/lang-css.js"> </script>
+ <!--[if lt IE 9]>
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+ <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
+</head>
+
+<body>
+
+<div id="main">
+
+ <h1 class="page-title">Index</h1>
+
+
+
+
+
+
+
+ <h3> </h3>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</div>
+
+<nav>
+ <h2><a href="index.html">Index</a></h2><h3>Namespaces</h3><ul><li><a href="oak.html">oak</a></li></ul>
+</nav>
+
+<br clear="both">
+
+<footer>
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.3-dev</a> on Thu Jan 15 2015 15:27:35 GMT+0100 (CET)
+</footer>
+
+<script> prettyPrint(); </script>
+<script src="scripts/linenumber.js"> </script>
+</body>
+</html>
\ No newline at end of file
Propchange: jackrabbit/site/live/oak/docs/oak-mongo-js/index.html
------------------------------------------------------------------------------
svn:eol-style = native
Added: jackrabbit/site/live/oak/docs/oak-mongo-js/oak-mongo.js.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/oak-mongo-js/oak-mongo.js.html?rev=1652115&view=auto
==============================================================================
--- jackrabbit/site/live/oak/docs/oak-mongo-js/oak-mongo.js.html (added)
+++ jackrabbit/site/live/oak/docs/oak-mongo-js/oak-mongo.js.html Thu Jan 15 14:45:27 2015
@@ -0,0 +1,683 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>JSDoc: Source: oak-mongo.js</title>
+
+ <script src="scripts/prettify/prettify.js"> </script>
+ <script src="scripts/prettify/lang-css.js"> </script>
+ <!--[if lt IE 9]>
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+ <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
+</head>
+
+<body>
+
+<div id="main">
+
+ <h1 class="page-title">Source: oak-mongo.js</h1>
+
+
+
+
+
+ <section>
+ <article>
+ <pre class="prettyprint source"><code>/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*global print, _, db, Object, ObjectId */
+
+/** @namespace */
+var oak = (function(global){
+ "use strict";
+
+ var api;
+
+ api = function(){
+ print("Oak Mongo Helpers");
+ };
+
+ /**
+ * Collects various stats related to Oak usage of Mongo.
+ *
+ * @memberof oak
+ * @method oak.systemStats
+ * @returns {object} system stats.
+ */
+ api.systemStats = function () {
+ var result = {};
+ result.nodeStats = db.nodes.stats(1024 * 1024);
+ result.blobStats = db.blobs.stats(1024 * 1024);
+ result.clusterStats = db.clusterNodes.find().toArray();
+ result.oakIndexes = db.nodes.find({'_id': /^2\:\/oak\:index\//}).toArray();
+ result.hostInfo = db.hostInfo();
+ result.rootDoc = db.nodes.findOne({'_id' : '0:/'});
+ return result;
+ };
+
+ /**
+ * Collects various stats related to Oak indexes stored under /oak:index.
+ *
+ * @memberof oak
+ * @method indexStats
+ * @returns {Array} index stats.
+ */
+ api.indexStats = function () {
+ var result = [];
+ var totalCount = 0;
+ var totalSize = 0;
+ db.nodes.find({'_id': /^2\:\/oak\:index\//}, {_id: 1}).forEach(function (doc) {
+ var stats = api.getChildStats(api.pathFromId(doc._id));
+ stats.id = doc._id;
+ result.push(stats);
+
+ totalCount += stats.count;
+ totalSize += stats.size;
+ });
+
+ result.push({id: "summary", count: totalCount, size: totalSize, "simple": humanFileSize(totalSize)});
+ return result;
+ };
+
+ /**
+ * Determines the number of child node (including all sub tree)
+ * for a given parent node path. This would be faster compared to
+ * {@link getChildStats} as it does not load the doc and works on
+ * index only.
+ *
+ * Note that there might be some difference between db.nodes.count()
+ * and countChildren('/') as split docs, intermediate docs are not
+ * accounted for
+ *
+ * @memberof oak
+ * @method countChildren
+ * @param {string} path the path of a node.
+ * @returns {number} the number of children, including all descendant nodes.
+ */
+ api.countChildren = function(path){
+ var depth = pathDepth(path);
+ var totalCount = 0;
+ while (true) {
+ var count = db.nodes.count({_id: pathFilter(depth++, path)});
+ if( count === 0){
+ break;
+ }
+ totalCount += count;
+ }
+ return totalCount;
+ };
+
+ /**
+ * Provides stats related to number of child nodes
+ * below given path or total size taken by such nodes.
+ *
+ * @memberof oak
+ * @method getChildStats
+ * @param {string} path the path of a node.
+ * @returns {{count: number, size: number}} statistics about the child nodes
+ * including all descendants.
+ */
+ api.getChildStats = function(path){
+ var count = 0;
+ var size = 0;
+ this.forEachChild(path, function(doc){
+ count++;
+ size += Object.bsonsize(doc);
+ });
+ return {"count" : count, "size" : size, "simple" : humanFileSize(size)};
+ };
+
+ /**
+ * Performs a breadth first traversal for nodes under given path
+ * and invokes the passed function for each child node.
+ *
+ * @memberof oak
+ * @method forEachChild
+ * @param {string} path the path of a node.
+ * @param callable a function to be called for each child node including all
+ * descendant nodes. The MongoDB document is passed as the single
+ * parameter of the function.
+ */
+ api.forEachChild = function(path, callable) {
+ var depth = pathDepth(path);
+ while (true) {
+ var cur = db.nodes.find({_id: pathFilter(depth++, path)});
+ if(!cur.hasNext()){
+ break;
+ }
+ cur.forEach(callable);
+ }
+ };
+
+ /**
+ * Returns the path part of the given id.
+ *
+ * @memberof oak
+ * @method pathFromId
+ * @param {string} id the id of a Document in the nodes collection.
+ * @returns {string} the path derived from the id.
+ */
+ api.pathFromId = function(id) {
+ var index = id.indexOf(':');
+ return id.substring(index + 1);
+ };
+
+ /**
+ * Checks the _lastRev for a given clusterId. The checks starts with the
+ * given path and walks up to the root node.
+ *
+ * @memberof oak
+ * @method checkLastRevs
+ * @param {string} path the path of a node to check
+ * @param {number} clusterId the id of an oak cluster node.
+ * @returns {object} the result of the check.
+ */
+ api.checkLastRevs = function(path, clusterId) {
+ return checkOrFixLastRevs(path, clusterId, true);
+ };
+
+ /**
+ * Fixes the _lastRev for a given clusterId. The fix starts with the
+ * given path and walks up to the root node.
+ *
+ * @memberof oak
+ * @method fixLastRevs
+ * @param {string} path the path of a node to fix
+ * @param {number} clusterId the id of an oak cluster node.
+ * @returns {object} the result of the fix.
+ */
+ api.fixLastRevs = function(path, clusterId) {
+ return checkOrFixLastRevs(path, clusterId, false);
+ };
+
+ /**
+ * Returns statistics about the blobs collection in the current database.
+ * The stats include the combined BSON size of all documents. The time to
+ * run this command therefore heavily depends on the size of the collection.
+ *
+ * @memberof oak
+ * @method blobStats
+ * @returns {object} statistics about the blobs collection.
+ */
+ api.blobStats = function() {
+ var result = {};
+ var stats = db.blobs.stats(1024 * 1024);
+ var bsonSize = 0;
+ db.blobs.find().forEach(function(doc){bsonSize += Object.bsonsize(doc)});
+ result.count = stats.count;
+ result.size = stats.size;
+ result.storageSize = stats.storageSize;
+ result.bsonSize = Math.round(bsonSize / (1024 * 1024));
+ result.indexSize = stats.totalIndexSize;
+ return result;
+ };
+
+ /**
+ * Converts the given Revision String into a more human readable version,
+ * which also prints the date.
+ *
+ * @memberof oak
+ * @method formatRevision
+ * @param {string} rev a revision string.
+ * @returns {string} a human readable string representation of the revision.
+ */
+ api.formatRevision = function(rev) {
+ return new Revision(rev).toReadableString();
+ };
+
+ /**
+ * Removes the complete subtree rooted at the given path.
+ *
+ * @memberof oak
+ * @method removeDescendantsAndSelf
+ * @param {string} path the path of the subtree to remove.
+ */
+ api.removeDescendantsAndSelf = function(path) {
+ var count = 0;
+ var depth = pathDepth(path);
+ var id = depth + ":" + path;
+ // current node at path
+ var result = db.nodes.remove({_id: id});
+ count += result.nRemoved;
+ // might be a long path
+ result = db.nodes.remove(longPathQuery(path));
+ count += result.nRemoved;
+ // descendants
+ var prefix = path + "/";
+ depth++;
+ while (true) {
+ result = db.nodes.remove(longPathFilter(depth, prefix));
+ count += result.nRemoved;
+ result = db.nodes.remove({_id: pathFilter(depth++, prefix)});
+ count += result.nRemoved;
+ if (result.nRemoved == 0) {
+ break;
+ }
+ }
+ // descendants further down the hierarchy with long path
+ while (true) {
+ result = db.nodes.remove(longPathFilter(depth++, prefix));
+ if (result.nRemoved == 0) {
+ break;
+ }
+ count += result.nRemoved;
+ }
+ return {nRemoved : count};
+ };
+
+ /**
+ * List all checkpoints.
+ *
+ * @memberof oak
+ * @method listCheckpoints
+ * @returns {object} all checkpoints
+ */
+ api.listCheckpoints = function() {
+ var result = {};
+ var doc = db.settings.findOne({_id:"checkpoint"});
+ if (doc == null) {
+ print("No checkpoint document found.");
+ return;
+ }
+ var data = doc.data;
+ var r;
+ for (r in data) {
+ var rev = new Revision(r);
+ var exp;
+ if (data[r].charAt(0) == '{') {
+ exp = JSON.parse(data[r])["expires"];
+ } else {
+ exp = data[r];
+ }
+ result[r] = {created:rev.asDate(), expires:new Date(parseInt(exp, 10))};
+ }
+ return result;
+ };
+
+ /**
+ * Removes all checkpoints older than a given Revision.
+ *
+ * @memberof oak
+ * @method removeCheckpointsOlderThan
+ * @param {string} rev checkpoints older than this revision are removed.
+ * @returns {object} the result of the MongoDB update.
+ */
+ api.removeCheckpointsOlderThan = function(rev) {
+ if (rev === undefined) {
+ print("No revision specified");
+ return;
+ }
+ var r = new Revision(rev);
+ var unset = {};
+ var cps = api.listCheckpoints();
+ var x;
+ var num = 0;
+ for (x in cps) {
+ if (r.isNewerThan(new Revision(x))) {
+ unset["data." + x] = "";
+ num++;
+ }
+ }
+ if (num > 0) {
+ var update = {};
+ update["$inc"] = {_modCount: 1};
+ update["$unset"] = unset;
+ return db.settings.update({_id:"checkpoint"}, update);
+ } else {
+ print("No checkpoint older than " + rev);
+ }
+ };
+
+ /**
+ * Removes all collision markers on the document with the given path and
+ * clusterId. This method will only remove collisions when the clusterId
+ * is inactive.
+ *
+ * @memberof oak
+ * @method removeCollisions
+ * @param {string} path the path of a document
+ * @param {number} clusterId collision markers for this clusterId will be removed.
+ * @returns {object} the result of the MongoDB update.
+ */
+ api.removeCollisions = function(path, clusterId) {
+ if (path === undefined) {
+ print("No path specified");
+ return;
+ }
+ if (clusterId === undefined) {
+ print("No clusterId specified");
+ return;
+ }
+ // refuse to remove when clusterId is marked active
+ var clusterNode = db.clusterNodes.findOne({_id: clusterId.toString()});
+ if (clusterNode && clusterNode.state == "ACTIVE") {
+ print("Cluster node with id " + clusterId + " is active!");
+ print("Can only remove collisions for inactive cluster node.");
+ return;
+ }
+
+ var doc = this.findOne(path);
+ if (!doc) {
+ print("No document for path: " + path);
+ return;
+ }
+ var unset = {};
+ var r;
+ var num = 0;
+ for (r in doc._collisions) {
+ if (new Revision(r).getClusterId() == clusterId) {
+ unset["_collisions." + r] = "";
+ num++;
+ }
+ }
+ if (num > 0) {
+ var update = {};
+ update["$inc"] = {_modCount: 1};
+ update["$unset"] = unset;
+ return db.nodes.update({_id: pathDepth(path) + ":" + path}, update);
+ } else {
+ print("No collisions found for clusterId " + clusterId);
+ }
+ };
+
+ /**
+ * Finds the document with the given path.
+ *
+ * @memberof oak
+ * @method findOne
+ * @param {string} path the path of the document.
+ * @returns {object} the document or null if it doesn't exist.
+ */
+ api.findOne = function(path) {
+ if (path === undefined) {
+ return null;
+ }
+ return db.nodes.findOne({_id: pathDepth(path) + ":" + path});
+ };
+
+ /**
+ * Checks the history of previous documents at the given path. Orphaned
+ * references to removed previous documents are counted and listed when
+ * run with verbose set to true.
+ *
+ * @memberof oak
+ * @method checkHistory
+ * @param {string} path the path of the document.
+ * @param {boolean} [verbose=false] if true, the result object will contain a list
+ * of dangling references to previous documents.
+ * @returns {object} the result of the check.
+ */
+ api.checkHistory = function(path, verbose) {
+ return checkOrFixHistory(path, false, verbose);
+ };
+
+ /**
+ * Repairs the history of previous documents at the given path. Orphaned
+ * references to removed previous documents are cleaned up and listed when
+ * run with verbose set to true.
+ *
+ * @memberof oak
+ * @method fixHistory
+ * @param {string} path the path of the document.
+ * @param {boolean} [verbose=false] if true, the result object will contain a list
+ * of removed references to previous documents.
+ * @returns {object} the result of the fix.
+ */
+ api.fixHistory = function(path, verbose) {
+ return checkOrFixHistory(path, true, verbose);
+ };
+
+ //~--------------------------------------------------< internal >
+
+ var checkOrFixHistory = function(path, fix, verbose) {
+ if (path === undefined) {
+ print("No path specified");
+ return;
+ }
+ if (path.length > 165) {
+ print("Path too long");
+ return;
+ }
+
+ var doc = api.findOne(path);
+ if (!doc) {
+ return null;
+ }
+
+ var result = {};
+ result._id = pathDepth(path) + ":" + path;
+ if (verbose) {
+ result.prevDocs = [];
+ if (fix) {
+ result.prevLinksRemoved = [];
+ } else {
+ result.prevLinksDangling = [];
+ }
+ }
+ result.numPrevDocs = 0;
+ if (fix) {
+ result.numPrevLinksRemoved = 0;
+ } else {
+ result.numPrevLinksDangling = 0;
+ }
+
+
+ forEachPrev(doc, function traverse(d, high, low, height) {
+ var p = "p" + path;
+ if (p.charAt(p.length - 1) != "/") {
+ p += "/";
+ }
+ p += high + "/" + height;
+ var id = (pathDepth(path) + 2) + ":" + p;
+ var prev = db.nodes.findOne({_id: id });
+ if (prev) {
+ if (result.prevDocs) {
+ result.prevDocs.push(high + "/" + height);
+ }
+ result.numPrevDocs++;
+ if (parseInt(height) > 0) {
+ forEachPrev(prev, traverse);
+ }
+ } else if (fix) {
+ if (result.prevLinksRemoved) {
+ result.prevLinksRemoved.push(high + "/" + height);
+ }
+ result.numPrevLinksRemoved++;
+ var update = {};
+ update.$inc = {_modCount : 1};
+ if (d._sdType == 40) { // intermediate split doc type
+ update.$unset = {};
+ update.$unset["_prev." + high] = 1;
+ } else {
+ update.$set = {};
+ update.$set["_stalePrev." + high] = height;
+ }
+ db.nodes.update({_id: d._id}, update);
+ } else {
+ if (result.prevLinksDangling) {
+ result.prevLinksDangling.push(high + "/" + height);
+ }
+ result.numPrevLinksDangling++;
+ }
+ });
+ return result;
+ };
+
+ var forEachPrev = function(doc, callable) {
+ var stalePrev = doc._stalePrev;
+ if (!stalePrev) {
+ stalePrev = {};
+ }
+ var r;
+ for (r in doc._prev) {
+ var value = doc._prev[r];
+ var idx = value.lastIndexOf("/");
+ var height = value.substring(idx + 1);
+ var low = value.substring(0, idx);
+ if (stalePrev[r] == height) {
+ continue;
+ }
+ callable.call(this, doc, r, low, height);
+ }
+ };
+
+ var checkOrFixLastRevs = function(path, clusterId, dryRun) {
+ if (path === undefined) {
+ print("Need at least a path from where to start check/fix.");
+ return;
+ }
+ var result = [];
+ var lastRev;
+ if (path.length == 0 || path.charAt(0) != '/') {
+ return "Not a valid absolute path";
+ }
+ if (clusterId === undefined) {
+ clusterId = 1;
+ }
+ while (true) {
+ var doc = db.nodes.findOne({_id: pathDepth(path) + ":" + path});
+ if (doc) {
+ var revStr = doc._lastRev["r0-0-" + clusterId];
+ if (revStr) {
+ var rev = new Revision(revStr);
+ if (lastRev && lastRev.isNewerThan(rev)) {
+ if (dryRun) {
+ result.push({_id: doc._id, _lastRev: rev.toString(), needsFix: lastRev.toString()});
+ } else {
+ var update = {$set:{}};
+ update.$set["_lastRev.r0-0-" + clusterId] = lastRev.toString();
+ db.nodes.update({_id: doc._id}, update);
+ result.push({_id: doc._id, _lastRev: rev.toString(), fixed: lastRev.toString()});
+ }
+ } else {
+ result.push({_id: doc._id, _lastRev: rev.toString()});
+ lastRev = rev;
+ }
+ }
+ }
+ if (path == "/") {
+ break;
+ }
+ var idx = path.lastIndexOf("/");
+ if (idx == 0) {
+ path = "/";
+ } else {
+ path = path.substring(0, idx);
+ }
+ }
+ return result;
+ };
+
+ var Revision = function(rev) {
+ var dashIdx = rev.indexOf("-");
+ this.rev = rev;
+ this.timestamp = parseInt(rev.substring(1, dashIdx), 16);
+ this.counter = parseInt(rev.substring(dashIdx + 1, rev.indexOf("-", dashIdx + 1)), 16);
+ this.clusterId = parseInt(rev.substring(rev.lastIndexOf("-") + 1), 16);
+ };
+
+ Revision.prototype.toString = function () {
+ return this.rev;
+ };
+
+ Revision.prototype.isNewerThan = function(other) {
+ if (this.timestamp > other.timestamp) {
+ return true;
+ } else if (this.timestamp < other.timestamp) {
+ return false;
+ } else {
+ return this.counter > other.counter;
+ }
+ };
+
+ Revision.prototype.toReadableString = function () {
+ return this.rev + " (" + this.asDate().toString() + ")"
+ };
+
+ Revision.prototype.asDate = function() {
+ return new Date(this.timestamp);
+ };
+
+ Revision.prototype.getClusterId = function() {
+ return this.clusterId;
+ };
+
+ var pathDepth = function(path){
+ if(path === '/'){
+ return 0;
+ }
+ var depth = 0;
+ for(var i = 0; i < path.length; i++){
+ if(path.charAt(i) === '/'){
+ depth++;
+ }
+ }
+ return depth;
+ };
+
+ var pathFilter = function (depth, prefix){
+ return new RegExp("^"+ depth + ":" + prefix);
+ };
+
+ var longPathFilter = function (depth, prefix) {
+ var filter = {};
+ filter._id = new RegExp("^" + depth + ":h");
+ filter._path = new RegExp("^" + prefix);
+ return filter;
+ };
+
+ var longPathQuery = function (path) {
+ var query = {};
+ query._id = new RegExp("^" + pathDepth(path) + ":h");
+ query._path = path;
+ return query;
+ };
+
+ //http://stackoverflow.com/a/20732091/1035417
+ var humanFileSize = function (size) {
+ var i = Math.floor( Math.log(size) / Math.log(1024) );
+ return ( size / Math.pow(1024, i) ).toFixed(2) * 1 + ' ' + ['B', 'kB', 'MB', 'GB', 'TB'][i];
+ };
+
+ return api;
+}(this));</code></pre>
+ </article>
+ </section>
+
+
+
+
+</div>
+
+<nav>
+ <h2><a href="index.html">Index</a></h2><h3>Namespaces</h3><ul><li><a href="oak.html">oak</a></li></ul>
+</nav>
+
+<br clear="both">
+
+<footer>
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.3-dev</a> on Thu Jan 15 2015 15:27:35 GMT+0100 (CET)
+</footer>
+
+<script> prettyPrint(); </script>
+<script src="scripts/linenumber.js"> </script>
+</body>
+</html>
\ No newline at end of file
Propchange: jackrabbit/site/live/oak/docs/oak-mongo-js/oak-mongo.js.html
------------------------------------------------------------------------------
svn:eol-style = native