You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2017/06/19 12:41:58 UTC

[52/53] sling-site git commit: asf-site branch created for published content

http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/bundles/bundle-resources-extensions-bundleresource.html
----------------------------------------------------------------------
diff --git a/documentation/bundles/bundle-resources-extensions-bundleresource.html b/documentation/bundles/bundle-resources-extensions-bundleresource.html
new file mode 100644
index 0000000..94a57d3
--- /dev/null
+++ b/documentation/bundles/bundle-resources-extensions-bundleresource.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html><html lang="en">
+    <head>
+<meta charset="utf-8"/>
+        <title>Apache Sling on JBake</title>
+        <link rel="stylesheet" href="/res/css/site.css"/>
+        <link rel="stylesheet" href="/res/css/codehilite.css"/>
+        <div class="title">
+            <div class="logo">
+                <a href="http://sling.apache.org">
+                    <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+                </a>
+            </div><div class="header">
+                <a href="http://www.apache.org">
+                    <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+                </a>
+            </div>
+        </div>        
+    </head><body>
+<div class="menu">
+            <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials &amp; How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
 ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
 dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+        </div>        <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Bundle Resources (extensions.bundleresource)</h1></header><p>[TOC]</p>
+<h2>Introduction</h2>
+<p>The Bundle Resource Provider provides access to files/directories included in an OSGi bundle through the Sling <code>ResourceResolver</code>.</p>
+<h2>Resource Types</h2>
+<p>Files and directories are mapped into the resource tree as regular <code>Resource</code> instances whose resource type depends on the actual nature of the mapped resource:</p>
+<ul>
+  <li>Regular files are assigned the <code>nt:file</code> resource type</li>
+  <li>Directories are assigned the <code>nt:folder</code> resource type</li>
+</ul>
+<h2>Adapters</h2>
+<p>Filesystem resources extend from Sling's <code>AbstractResource</code> class and thus are adaptable to any type for which an <code>AdapterFactory</code> is registered supporting bundle resources. In addition <code>BundleResource</code> support the following adapters natively:</p>
+<ul>
+  <li><code>java.net.URL</code> -- A valid <code>bundle://</code> URL to the resource in the bundle.</li>
+  <li><code>java.io.InputStream</code> -- An <code>InputStream</code> to read file contents. Doesn't apply to folders.</li>
+</ul>
+<h2>Configuration</h2>
+<p>Providing bundles have a Bundle manifest header <code>Sling-Bundle-Resources</code> containing a list of absolute paths provided by the bundle. The paths are separated by comma or whitespace (SP, TAB, VTAB, CR, LF).</p>
+<p>Example (manifest.mf):</p>
+<p>... Sling-Bundle-Resources: /libs/sling/explorer, /libs/sling/servlet/default/explorer ...</p>
+<p>It's also possible to map resources from the bundle to a different location in the resource tree. In this case the path has to be extended with a path attrribute to declare where the resources are in the bundle:</p>
+<p>... Sling-Bundle-Resources: /somepath/inthe/resourcetree;path:=/path/inthe/bundle ...</p>
+<p>The Bundle Resource Provider also has a web console plugin through which the currently installed bundles can be seen.</p></section></div></div>            
+<div class="footer">
+                <div class="timestamp">
+                    TODO display revision number here
+                </div><div class="trademarkFooter">
+                    Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+                </div>
+            </div>            
+            
+        </div>
+    </body>
+</html>

http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/bundles/caching-services.html
----------------------------------------------------------------------
diff --git a/documentation/bundles/caching-services.html b/documentation/bundles/caching-services.html
new file mode 100644
index 0000000..8e7a487
--- /dev/null
+++ b/documentation/bundles/caching-services.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html><html lang="en">
+    <head>
+<meta charset="utf-8"/>
+        <title>Apache Sling on JBake</title>
+        <link rel="stylesheet" href="/res/css/site.css"/>
+        <link rel="stylesheet" href="/res/css/codehilite.css"/>
+        <div class="title">
+            <div class="logo">
+                <a href="http://sling.apache.org">
+                    <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+                </a>
+            </div><div class="header">
+                <a href="http://www.apache.org">
+                    <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+                </a>
+            </div>
+        </div>        
+    </head><body>
+<div class="menu">
+            <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials &amp; How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
 ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
 dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+        </div>        <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Sling Caching Services</h1></header><p>Caching services are available as a contribution at <a href="https://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/cache">https://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/cache</a></p>
+<p>Both EhCache and Infinispan implementations are provided, with good unit and integration tests coverage.</p>
+<p>A portal cache provider API implementation is provided, that depends on the whiteboard portal modules found under <a href="https://svn.apache.org/repos/asf/sling/whiteboard/portal">https://svn.apache.org/repos/asf/sling/whiteboard/portal</a></p></section></div></div>            
+<div class="footer">
+                <div class="timestamp">
+                    TODO display revision number here
+                </div><div class="trademarkFooter">
+                    Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+                </div>
+            </div>            
+            
+        </div>
+    </body>
+</html>

http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/bundles/commons-html-utilities.html
----------------------------------------------------------------------
diff --git a/documentation/bundles/commons-html-utilities.html b/documentation/bundles/commons-html-utilities.html
new file mode 100644
index 0000000..72c2d97
--- /dev/null
+++ b/documentation/bundles/commons-html-utilities.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html><html lang="en">
+    <head>
+<meta charset="utf-8"/>
+        <title>Apache Sling on JBake</title>
+        <link rel="stylesheet" href="/res/css/site.css"/>
+        <link rel="stylesheet" href="/res/css/codehilite.css"/>
+        <div class="title">
+            <div class="logo">
+                <a href="http://sling.apache.org">
+                    <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+                </a>
+            </div><div class="header">
+                <a href="http://www.apache.org">
+                    <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+                </a>
+            </div>
+        </div>        
+    </head><body>
+<div class="menu">
+            <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials &amp; How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
 ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
 dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+        </div>        <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Commons HTML Utilities (org.apache.sling.commons.html)</h1></header><p>The Apache Sling Commons HTML Utilities bundle provides an HTML parser which can be used to parse HTML and either generate a DOM or SAX events out of the HTML. Therefore the parser transforms the HTML into proper XHTML.</p></section></div></div>            
+<div class="footer">
+                <div class="timestamp">
+                    TODO display revision number here
+                </div><div class="trademarkFooter">
+                    Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+                </div>
+            </div>            
+            
+        </div>
+    </body>
+</html>

http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/bundles/configuration-installer-factory.html
----------------------------------------------------------------------
diff --git a/documentation/bundles/configuration-installer-factory.html b/documentation/bundles/configuration-installer-factory.html
new file mode 100644
index 0000000..67aa156
--- /dev/null
+++ b/documentation/bundles/configuration-installer-factory.html
@@ -0,0 +1,69 @@
+<!DOCTYPE html><html lang="en">
+    <head>
+<meta charset="utf-8"/>
+        <title>Apache Sling on JBake</title>
+        <link rel="stylesheet" href="/res/css/site.css"/>
+        <link rel="stylesheet" href="/res/css/codehilite.css"/>
+        <div class="title">
+            <div class="logo">
+                <a href="http://sling.apache.org">
+                    <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+                </a>
+            </div><div class="header">
+                <a href="http://www.apache.org">
+                    <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+                </a>
+            </div>
+        </div>        
+    </head><body>
+<div class="menu">
+            <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials &amp; How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
 ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
 dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+        </div>        <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Configuration Installer Factory</h1></header><p>The configuration installer factory provides support for configurations to the <a href="/documentation/bundles/osgi-installer.html">OSGI installer</a>. The provisioning of artifacts is handled by installer providers like the file installer or the JCR installer.</p>
+<h2>Configurations</h2>
+<p>Configuration file names are related to the PID and factory PID. The structure of the file name is as follows:</p>
+<p>filename ::= <pid> ( '-' <subname> )? ('.cfg'|'.config')</p>
+<p>If the form is <code>&lt;pid&gt;(&#39;.cfg&#39;|&#39;.config&#39;)</code>, the file contains the properties for a Managed Service. The <code>&lt;pid&gt;</code> is then the PID of the Managed Service. See the Configuration Admin service for details.</p>
+<p>When a Managed Service Factory is used, the situation is different. The <code>&lt;pid&gt;</code> part then describes the PID of the Managed Service Factory. You can pick any <code>&lt;subname&gt;</code>, the installer will then create an instance for the factory for each unique name. For example:</p>
+<p>com.acme.xyz.cfg // configuration for Managed Service // com.acme.xyz com.acme.abc-default.cfg // Managed Service Factory, // creates an instance for com.acme.abc</p>
+<p>If a configuration is modified, the file installer will write the configuration back to a file to ensure peristence across restarts (if <code>sling.fileinstall.writeback</code> is enabled).</p>
+<h3>Property Files (.cfg)</h3>
+<p>Configuration files ending in '.cfg' are plain property files (<code>java.util.Property</code>). The format is simple:</p>
+<p>file ::= ( header | comment ) * header ::= <header> ( ':' | '=' ) <value> ( '<nl> <value> ) * comment ::= '#' <any></p>
+<p>Notice that this model only supports string properties. For example:</p>
+<h1>default port</h1>
+<p>ftp.port = 21</p>
+<h3>Configuration Files (.config)</h3>
+<p>Configuration files ending in '.config' use the format of the Apache Felix ConfigAdmin implementation. It allows to specify the type and cardinality of a configuration property and is not limited to string values.</p>
+<p>The first line of such a file might start with a comment line (a line starting with a #). Comments within the file are not allowed.</p>
+<p>The format is:</p>
+<p>file ::= (comment) (header) * comment ::= '#' <any> header ::= prop '=' value prop ::= symbolic-name // 1.4.2 of OSGi Core Specification symbolic-name ::= token { '.' token } token ::= { [ 0..9 ] | [ a..z ] | [ A..Z ] | '_' | '-' } value ::= [ type ] ( '[' values ']' | '(' values ')' | simple ) values ::= simple { ',' simple } simple ::= '"' stringsimple '"' type ::= <1-char type code> stringsimple ::= &lt;quoted string representation of the value where both '"' and '=' need to be escaped&gt;</p>
+<p>The quoted string format is equal to the definition from HTTP 1.1 (<a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html">RFC2616</a>), except that both '"' and '=' need to be escaped.</p>
+<p>The 1 character type code is one of:</p>
+<ul>
+  <li>'T' : simple string</li>
+  <li>'I' : Integer</li>
+  <li>'L' : Long</li>
+  <li>'F' : Float</li>
+  <li>'D' : Double</li>
+  <li>'X' : Byte</li>
+  <li>'S' : Short</li>
+  <li>'C' : Character</li>
+  <li>'B' : Boolean</li>
+</ul>
+<p>A number of such .config files exist in the Sling codebase and can be used as examples.</p>
+<h1>Project Info</h1>
+<ul>
+  <li>Configuration installer factory (<a href="http://svn.apache.org/repos/asf/sling/trunk/installer/factories/configuration">org.apache.sling.installer.factory.configuration</a>)</li>
+</ul></section></div></div>            
+<div class="footer">
+                <div class="timestamp">
+                    TODO display revision number here
+                </div><div class="trademarkFooter">
+                    Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+                </div>
+            </div>            
+            
+        </div>
+    </body>
+</html>

http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/bundles/content-distribution.html
----------------------------------------------------------------------
diff --git a/documentation/bundles/content-distribution.html b/documentation/bundles/content-distribution.html
new file mode 100644
index 0000000..2b490b0
--- /dev/null
+++ b/documentation/bundles/content-distribution.html
@@ -0,0 +1,129 @@
+<!DOCTYPE html><html lang="en">
+    <head>
+<meta charset="utf-8"/>
+        <title>Apache Sling on JBake</title>
+        <link rel="stylesheet" href="/res/css/site.css"/>
+        <link rel="stylesheet" href="/res/css/codehilite.css"/>
+        <div class="title">
+            <div class="logo">
+                <a href="http://sling.apache.org">
+                    <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+                </a>
+            </div><div class="header">
+                <a href="http://www.apache.org">
+                    <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+                </a>
+            </div>
+        </div>        
+    </head><body>
+<div class="menu">
+            <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials &amp; How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
 ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
 dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+        </div>        <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Content Distribution (org.apache.sling.distribution)</h1></header><p>[TOC]</p>
+<h2>Introduction</h2>
+<p>The Sling Content Distribution (SCD) module allows one to distribute Sling resources between different Sling instances. The API works at path level and the distribution agents basically enable distribution of specific paths between instances. There are several main usecases in which SCD can help. Typically the distribution is done from one or more source instances to one or more target instances.</p>
+<h2>Distribution usecases</h2>
+<p>Some of the usecases have sample configuration in <a href="https://github.com/apache/sling/tree/trunk/contrib/extensions/distribution/sample/src/main/resources/SLING-CONTENT/libs/sling/distribution">Distribution Sample Module</a> and are tested in <a href="https://github.com/apache/sling/tree/trunk/contrib/extensions/distribution/it">Distribution ITs Module</a>.</p>
+<h3>Forward distribution</h3>
+<p>A forward distribution setup allows one to transfer content from a source instance to a farm of target instances. That is done by pushing the content from source to target.</p>
+<h4>Setup overview</h4>
+<ul>
+  <li>one source instance</li>
+  <li>one distribution agent connected to importer endpoints for all target instances.</li>
+  <li>N target instances</li>
+  <li>one distribution importer on each target instance used to import packages into the local instance.</li>
+</ul>
+<h4>Sample configuration</h4>
+<ul>
+  <li>on source instance: one forward agent</li>
+</ul>
+<p>org.apache.sling.distribution.agent.impl.ForwardDistributionAgentFactory-publish.json name="publish" packageImporter.endpoints=["http://localhost:4503/libs/sling/distribution/services/importers/default"]</p>
+<ul>
+  <li>on target instance: one local importer</li>
+</ul>
+<p>org.apache.sling.distribution.packaging.impl.importer.LocalDistributionPackageImporterFactory-default name="default"</p>
+<h3>Reverse distribution</h3>
+<p>A reverse distribution setup allows one to transfer content from a farm of source instances to a target instance. That is done by pulling the content from source instances into the target instance.</p>
+<h4>Setup overview</h4>
+<ul>
+  <li>one target instance</li>
+  <li>one distribution agent connected to exporter endpoints for all target instances.</li>
+  <li>N source instances</li>
+  <li>one distribution (queue) agent on each source instance; changes from the source instances are placed in the queues of these agents.</li>
+  <li>one distribution exporter on each source instance that exports packages from the queue agent.</li>
+</ul>
+<h4>Sample configuration</h4>
+<ul>
+  <li>on target instance: one reverse agent</li>
+</ul>
+<p>org.apache.sling.distribution.agent.impl.ReverseDistributionAgentFactory-reverse.json name="reverse" packageExporter.endpoints=["http://localhost:4503/libs/sling/distribution/services/exporters/reverse"]</p>
+<ul>
+  <li>on source instance: one queue agent and one exporter for that agent</li>
+</ul>
+<p>org.apache.sling.distribution.agent.impl.QueueDistributionAgentFactory-reverse.json name="reverse"</p>
+<p>org.apache.sling.distribution.packaging.impl.exporter.AgentDistributionPackageExporterFactory-reverse name="reverse" agent.target="(name=reverse)"</p>
+<h3>Sync distribution</h3>
+<p>A sync distribution setup allows one to synchronize content in a farm of instances. That is done by using a coordinator instance (typically an author instance) that pulls content from all instances in a farm and pushes it back to all.</p>
+<h4>Setup overview:</h4>
+<ul>
+  <li>one coordinator instance</li>
+  <li>one distribution agent connected to exporter/importer endpoints for all farm instances.</li>
+  <li>N farm instances</li>
+  <li>one distribution (queue) agent on each farm instance; changes from these instances are placed in the queues of the queue agents.</li>
+  <li>one distribution exporter on each farm instance that exports packages from the queue agent.</li>
+  <li>one distribution importer on each farm instance used to import packages into the local instance.</li>
+</ul>
+<h4>Sample configuration</h4>
+<ul>
+  <li>on coordinator instance: one sync agent</li>
+</ul>
+<p>org.apache.sling.distribution.agent.impl.SyncDistributionAgentFactory-sync.json name="sync" packageExporter.endpoints=["http://localhost:4503/libs/sling/distribution/services/exporters/reverse", "http://localhost:4504/libs/sling/distribution/services/exporters/reverse"] packageImporter.endpoints=["http://localhost:4503/libs/sling/distribution/services/importers/default", "http://localhost:4504/libs/sling/distribution/services/importers/default"]</p>
+<ul>
+  <li>on each farm instance: one local exporter and one local importer</li>
+</ul>
+<p>org.apache.sling.distribution.agent.impl.QueueDistributionAgentFactory-reverse.json name="reverse"</p>
+<p>org.apache.sling.distribution.packaging.impl.exporter.AgentDistributionPackageExporterFactory-reverse name="reverse" agent.target="(name=reverse)"</p>
+<p>org.apache.sling.distribution.packaging.impl.importer.LocalDistributionPackageImporterFactory-default name="reverse" agent.target="(name=reverse)"</p>
+<h3>Multidatacenter sync distribution</h3>
+<p>A multidatacenter sync distribution setup allows one to synchronize content in a farm of publish instances across datacenters. This a variation of sync distribution but using a coordinator in each datacenter.</p>
+<h4>Setup overview</h4>
+<ul>
+  <li>one coordinator instance in each datacenter</li>
+  <li>one distribution agent for intra-datacenter synchronization. Like a regular sync agent it connects to all farm instances in its datacenter and syncronizes them. In addition to a regular sync agent it keeps the packages also in dedicated queues for the other DCs, so that the coordinators from the other DCs can pull the updates.</li>
+  <li>one distribution exporter for each queue dedicated for the remote DCs. The inter-dc coordinators from the other DCs will connect to these exporter endpoints.</li>
+  <li>one distribution agent for inter-datacenter synchronization; it conntects to the dedicated queues exposed by intra-dc coordinators from the other datacenters.</li>
+  <li>N farm instances in each datacenter</li>
+  <li>one distribution (queue) agent on each farm instance; changes from these instances are placed in the queues of the queue agents.</li>
+  <li>one distribution exporter on each farm instance that exports packages from the queue agent.</li>
+  <li>one distribution importer on each farm instance used to import packages into the local instance.</li>
+</ul>
+<h4>Sample configuration</h4>
+<ul>
+  <li>on coordinator instance: one intradcsync agent with two exporters for the other dcs, and one interdcsync agent that connects to remote exporters.</li>
+</ul>
+<p>org.apache.sling.distribution.agent.impl.SyncDistributionAgentFactory-intradcsync name="intradcsync" packageExporter.endpoints=["http://localhost:4503/libs/sling/distribution/services/exporters/reverse", "http://localhost:4504/libs/sling/distribution/services/exporters/reverse"] packageImporter.endpoints=["http://localhost:4503/libs/sling/distribution/services/importers/default", "http://localhost:4504/libs/sling/distribution/services/importers/default"] passiveQueues=["dc2queue", "dc3queue"]</p>
+<p>org.apache.sling.distribution.packaging.impl.exporter.AgentDistributionPackageExporterFactory-dc2queue name="dc2queue" agent.target="(name=intradcsync)" queue="dc2queue"</p>
+<p>org.apache.sling.distribution.packaging.impl.exporter.AgentDistributionPackageExporterFactory-dc3queue name="dc3queue" agent.target="(name=intradcsync)" queue="dc3queue"</p>
+<p>org.apache.sling.distribution.agent.impl.SyncDistributionAgentFactory-interdcsync name="interdcsync" packageExporter.endpoints=["http://localhost:5502/libs/sling/distribution/services/exporters/dc1queue", "http://localhost:6502/libs/sling/distribution/services/exporters/dc1queue"] packageImporter.endpoints=["http://localhost:4503/libs/sling/distribution/services/importers/default", "http://localhost:4504/libs/sling/distribution/services/importers/default"]</p>
+<ul>
+  <li>on each farm instance: one local exporter and one local importer</li>
+</ul>
+<p>org.apache.sling.distribution.agent.impl.QueueDistributionAgentFactory-reverse.json name="reverse"</p>
+<p>org.apache.sling.distribution.packaging.impl.exporter.AgentDistributionPackageExporterFactory-reverse name="reverse" agent.target="(name=reverse)"</p>
+<p>org.apache.sling.distribution.packaging.impl.importer.LocalDistributionPackageImporterFactory-default name="default"</p>
+<h2>Additional options</h2>
+<h3>How to trigger distribution over HTTP?</h3>
+<h3>How to configure binary-less distribution?</h3>
+<h3>How to configure priority paths?</h3>
+<h3>How to configure error queues?</h3></section></div></div>            
+<div class="footer">
+                <div class="timestamp">
+                    TODO display revision number here
+                </div><div class="trademarkFooter">
+                    Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+                </div>
+            </div>            
+            
+        </div>
+    </body>
+</html>

http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/bundles/content-loading-jcr-contentloader.html
----------------------------------------------------------------------
diff --git a/documentation/bundles/content-loading-jcr-contentloader.html b/documentation/bundles/content-loading-jcr-contentloader.html
new file mode 100644
index 0000000..f9f5b5a
--- /dev/null
+++ b/documentation/bundles/content-loading-jcr-contentloader.html
@@ -0,0 +1,256 @@
+<!DOCTYPE html><html lang="en">
+    <head>
+<meta charset="utf-8"/>
+        <title>Apache Sling on JBake</title>
+        <link rel="stylesheet" href="/res/css/site.css"/>
+        <link rel="stylesheet" href="/res/css/codehilite.css"/>
+        <div class="title">
+            <div class="logo">
+                <a href="http://sling.apache.org">
+                    <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+                </a>
+            </div><div class="header">
+                <a href="http://www.apache.org">
+                    <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+                </a>
+            </div>
+        </div>        
+    </head><body>
+<div class="menu">
+            <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials &amp; How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
 ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
 dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+        </div>        <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Content Loading and Nodetype Support (jcr.contentloader)</h1></header><p>Apache Sling provides support for initial content loading into a repository and for registering node types. The <code>sling-jcr-contentloader</code> bundle provides loading of content from a bundle into the repository and the <code>sling-jcr-base</code> bundle provides node type registration.</p>
+<h2>Initial Content Loading</h2>
+<p>Bundles can provide initial content, which is loaded into the repository when the bundle has entered the <em>started</em> state. Such content is expected to be contained in the bundles accessible through the Bundle entry API methods. Content to be loaded is declared in the <code>Sling-Initial-Content</code> bundle manifest header. This header takes a comma-separated list of bundle entry paths. Each entry and all its child entries are accessed and entered into starting with the child entries of the listed entries.</p>
+<p>Adding this content preserves the paths of the entries as shown in this table, which assumes a <code>Sling-Initial-Content</code> header entry of <code>SLING-INF/content</code> (with no further directives):</p>
+<table>
+  <thead>
+    <tr>
+      <th>Source Entry Paths in Bundle </th>
+      <th>Target Repository Path </th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td><code>SLING-INF/content/home</code> </td>
+      <td><code>/home</code> </td>
+    </tr>
+    <tr>
+      <td><code>SLING-INF/content/content/playground/en/home</code> </td>
+      <td><code>/content/playground/en/home</code> </td>
+    </tr>
+    <tr>
+      <td><code>SLING-INF/someothercontent/playground/en/home</code> </td>
+      <td>not installed at all, because not below the <code>Sling-Initial-Content</code> header entry </td>
+    </tr>
+  </tbody>
+</table>
+<p>Bundle entries are installed as follows:</p>
+<table>
+  <thead>
+    <tr>
+      <th>Entry Type </th>
+      <th>Installation method </th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td>Directory </td>
+      <td>Created as a node of type <code>sling:Folder</code> unless a content definition file of the same name exists in the same directory as the directory to be installed. Example: A directory <code>SLING-INF/content/dir</code> is installed as node <code>/dir</code> of type <code>nt:folder</code> unless a <code>SLING-INF/content/dir.xml</code> or <code>SLING-INF/content/dir.json</code> file exists which defines the content for the <code>/dir</code> node. </td>
+    </tr>
+    <tr>
+      <td>File </td>
+      <td>Unless the file is a content definition file (see below) an <code>nt:file</code> node is created for the file and an <code>nt:resource</code> node is created as its <code>jcr:content</code> child node to take the contents of the bundle file. The properties of the <code>nt:resource</code> node are set from file information as available. If a content definition file exists with the same name as the file plus <code>.json</code> or <code>.xml</code> these properties are set additionally on the imported file. See below for the content definition file specification. </td>
+    </tr>
+  </tbody>
+</table>
+<p>It is possible to modify the intial content loading default behaviour by using certain optional directives. Directives should be specified separated by semicolon. They are defined as follows:</p>
+<table>
+  <thead>
+    <tr>
+      <th>Directive </th>
+      <th>Definition </th>
+      <th>Default value </th>
+      <th>Description </th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td><code>overwrite</code> </td>
+      <td><code>overwrite:=(true&#124;false)<code> </td>
+      <td><code>false</code> </td>
+      <td>The overwrite directive specifies if content nodes should be overwritten (at the target repository path, which is "/" by default) or just initially added. If this is true, existing nodes are deleted and a new node is created in the same place. This directive should be used together with the <code>path</code> directive to limit overwriting. </td>
+    </tr>
+    <tr>
+      <td><code>overwriteProperties</code> </td>
+      <td><code>overwriteProperties:=(true&#124;false)</code> </td>
+      <td><code>false</code> </td>
+      <td>The overwriteProperties directive specifying if content properties should be overwritten or just initially added (at the target repository path, which is "/" by default). This directive should be used together with the <code>path</code> directive to limit overwriting. </td>
+    </tr>
+    <tr>
+      <td><code>uninstall</code> </td>
+      <td><code>uninstall:=(true&#124;false)</code> </td>
+      <td>value from <code>overwrite</code> </td>
+      <td>The uninstall directive specifies if content should be uninstalled when bundle is unregistered. This value defaults to the value of the <code>overwrite</code> directive. </td>
+    </tr>
+    <tr>
+      <td><code>path</code> </td>
+      <td><code>path:=*/target/location*</code> </td>
+      <td><code>/</code> </td>
+      <td>The path directive specifies the target node where initial content will be loaded. If the path does not exist yet in the repository, it is created by the content loader. The intermediate nodes are of type <code>sling:Folder</code>. </td>
+    </tr>
+    <tr>
+      <td><code>checkin</code> </td>
+      <td><code>checkin:=(true&#124;false)</code> </td>
+      <td><code>false</code> </td>
+      <td>The checkin directive specifies whether versionable nodes should be checked in. </td>
+    </tr>
+    <tr>
+      <td><code>ignoreImportProviders</code> </td>
+      <td><code>ignoreImportProviders:=list of extensions</code> </td>
+      <td><code>empty</code> </td>
+      <td>This directive can be used to not run one of the configured extractors (see below). </td>
+    </tr>
+  </tbody>
+</table>
+<p>Examples of these directives within <code>Sling-Initial-Content</code> header entries:</p>
+<table>
+  <thead>
+    <tr>
+      <th><code>Sling-Initial-Content</code> header entry </th>
+      <th>Behaviour </th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td><code>SLING-INF/content/home;overwrite:=true;path:=/home</code> </td>
+      <td>Overwrites already existing content in <em>/home</em> and uninstalls the content when the bundle is unregistered. </td>
+    </tr>
+    <tr>
+      <td><code>SLING-INF/content/home;overwriteProperties:=true;path:=/home</code> </td>
+      <td>Overwrites properties of existing content in <em>/home</em>. </td>
+    </tr>
+    <tr>
+      <td><code>SLING-INF/content/home;path:=/sites/sling_website</code> </td>
+      <td>This loads the content given in <em>SLING-INF/content/home</em> into <em>/sites/sling_website</em>. </td>
+    </tr>
+    <tr>
+      <td><code>SLING-INF/content/home;checkin:=true</code> </td>
+      <td>After content loading, versionable nodes are checked in. </td>
+    </tr>
+  </tbody>
+</table>
+<h2>Loading initial content from bundles</h2>
+<p>Repository items to be loaded into the repository, when the bundle is first installed, may be defined in four ways:</p>
+<ol>
+  <li>Directories</li>
+  <li>Files</li>
+  <li>XML descriptor files</li>
+  <li>JSON descriptor files</li>
+</ol>
+<p>Depending on the bundle entry found in the location indicated by the Sling-Initial-Content bundle manifest header, nodes are created (and/or updated) as follows:</p>
+<h3>Directories</h3>
+<p>Unless a node with the name of the directory already exists or has been defined in an XML or JSON descriptor file (see below) a directory is created as a node with the primary node type "nt:folder" in the repository.</p>
+<h3>Files</h3>
+<p>Unless a node with the name of the file already exists or has been defined in an XML or JSON descriptor file (see below) a file is created as two nodes in the repository. The node bearing the name of the file itself is created with the primary node type "nt:file". Underneath this file node, a resource node with the primary node type "nt:resource" is created, which is set to the contents of the file.</p>
+<p>The MIME type is derived from the file name extension by first trying to resolve it from the Bundle entry URL. If this does not resolve to a MIME type, the Sling MIME type resolution service is used to try to find a mime type. If all fals, the MIME type is defaulted to "application/octet-stream".&nbsp;&nbsp;</p>
+<h3>XML Descriptor Files</h3>
+<p>Nodes, Properties and in fact complete subtrees may be described in XML files using either the JCR SystemView format, or the format described below. In either case, the file must have the .xml extension.</p>
+<p><node> <!--
+optional on top level, defaults to XML file name without .xml extension
+required for child nodes
+--> <name>xyz</name></p>
+<!--
+optional, defaults to nt:unstructured
+-->
+<p><primaryNodeType>nt:file</primaryNodeType></p>
+<!--
+optional mixin node type
+may be repeated for multiple mixin node types
+-->
+<p><mixinNodeType>mix:versionable</mixinNodeType> <mixinNodeType>mix:lockable</mixinNodeType></p>
+<!--
+Optional properties for the node. Each <property> element defines
+a single property of the node. The element may be repeated.
+-->
+<p><property> <!--
+required property name
+--> <name>prop</name></p>
+<!--
+value of the property.
+For multi-value properties, the values are defined by multiple
+<value> elements nested inside a <values> element instead of a
+single <value> element
+-->
+<p><value>property value as string</value></p>
+<!--
+Optional type of the property value, defaults to String.
+This must be one of the property type strings defined in the
+JCR PropertyType interface.
+-->
+<p><type>String</type> </property></p>
+<!--
+Additional child nodes. May be further nested.
+-->
+<p><node> .... </node> </node></p>
+<h4>Using a custom XML format</h4>
+<p>By writing an XSLT stylesheet file, you can use whatever XML format you prefer. The XML file references an XSLT stylesheet by using the xml-stylesheet processing instruction:</p>
+<p>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;?xml-stylesheet href="my-transform.xsl" type="text/xsl"?&gt; <!-- The path to my-transform.xsl is relative to this file --></p>
+<p><your_custom_root_node> <your_custom_element> ... </your_custom_element> ... </your_custom_root_node></p>
+<p>The my-transform.xsl file is then responsible for translating your format into one of the supported XML formats:</p>
+<p>&lt;xsl:stylesheet version="1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:rep="internal" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;</p>
+<p>&lt;xsl:template match="your_custom_element"&gt; <node> ... </node> &lt;/xsl:template&gt; ... &lt;/xsl:stylesheet&gt;</p>
+<h3>JSON Descriptor Files</h3>
+<p>Nodes, Properties and in fact complete subtrees may be described in JSON files using the following skeleton structure (see <a href="http://www.json.org">http://www.json.org</a> or information on the syntax of JSON) :</p>
+<p>{ // child node name "nodename" : {</p>
+<p>// optional primary node type, default "nt:unstructured" "jcr:primaryType": "sling:ScriptedComponent",</p>
+<p>// optional mixin node types as array "jcr:mixinTypes": [ ],</p>
+<p>// additional properties as name value pairs. // Multi-value properties are defined as JSON array. // Property type is derived from the value</p>
+<p>// String value (default) "sling:contentClass": "com.day.sling.jcr.test.Test",</p>
+<p>// Multi-value String "sampleMulti": [ "v1", "v2" ],</p>
+<p>// Long value, single and multi "sampleStruct": 1, "sampleStructMulti": [ 1, 2, 3 ],</p>
+<p>// Date follows pattern yyyy-mm-ddTHH:MM:SS.sss±HH:MM "sampleDate": "2014-11-27T13:26:00.000+01:00",</p>
+<p>// JCR Node Reference with name prefix (removed to derive node name) "jcr:reference:sampleRef": "386b0f48-49c3-4c58-8735-ceee6bfc1933",</p>
+<p>// JCR Path with name prefix (removed to derive node name) "jcr:path:samplePath": "/content/data",</p>
+<p>// JCR Name with name prefix (removed to derive node name) "jcr:name:sampleName": "data",</p>
+<p>// URI with name prefix (removed to derive node name) "jcr:uri:sampleUri": "http://sling.apache.org/",</p>
+<p>// Child nodes are simple JSON objects "sling:scripts": { "jcr:primaryType": "sling:ScriptList", "sling:Script": { "jcr:primaryType": "sling:Script", "sling:name": "/test/content/jsp/start.jsp", "sling:type": "jsp", "sling:glob": "*" } } }</p>
+<h3>Extractors</h3>
+<p>By default, the <code>sling-jcr-contentloader</code> bundle tries to extract certain file types during content loading. These include <code>json</code>, <code>xml</code>, <code>zip</code>, and <code>jar</code> files. Therefore all available extractors are used for content processing. However if some files should be put into the repository unextracted, the <code>ignoreImportProviders</code> directive can be used with a comma separated list of extensions that should not be extracted, like <code>ignoreImportProviders:=&quot;jar,zip&quot;</code>. Please note that the value needs to be put into quotation marks if more than one value is used like in the example.</p>
+<h3>Workspace Targetting</h3>
+<p>By default, initial content will be loaded into the default workspace. To override this, add a <code>Sling-Initial-Content-Workspace</code> bundle manifest header to specify the workspace. Note that <em>all</em> content from a bundle will be loaded into the same workspace.</p>
+<h3>Example: Load i18n JSON files</h3>
+<p>The Sling Internationalization Support (i18n) supports providing JSON-filed based i18n files (see <a href="https://sling.apache.org/documentation/bundles/internationalization-support-i18n.html#json-file-based">i18n documentation</a>). In this case the JSON file is not interpreted as content definition file, but is stored as binary file in the repository. Additionally a mixin <code>mix:language</code> and a property <code>jcr:language</code> with the language code has to be set on the file node.</p>
+<p>This is an example how such an i18n file can be loaded from an OSGi bundle with the Sling Content Loader.</p>
+<p>Within your bundle header you have to define a separate path for the i18n files where you have to explicitly disable the JSON provider:</p>
+<p><Sling-Initial-Content> SLING-INF/i18n;overwrite:=true;ignoreImportProviders:=json;path:=/apps/myapp/i18n </Sling-Initial-Content></p>
+<p>The folder <code>SLING-INF/i18n</code> from your bundles contains a pair of files for each language, e.g.:</p>
+<ul>
+  <li><code>en.json</code> - The JSON file containing the i18n keys</li>
+  <li><code>en.json.xml</code> - Additional content descriptor file setting the mixing and language property</li>
+</ul>
+<p>Example for the content descriptor:</p>
+<p>&lt;?xml version="1.0" encoding="UTF-8"?&gt; <node> <name>en.json</name> <mixinNodeType>mix:language</mixinNodeType> <property> <name>jcr:language</name> <value>en</value> <type>String</type> </property> </node></p>
+<h2>Declared Node Type Registration</h2>
+<p>The <code>sling-jcr-base</code> bundle provides low-level repository operations which are at the heart of the functionality of Sling: * <em>Node Type Definitions</em> - The class <code>org.apache.sling.content.jcr.base.NodeTypeLoader</code> provides methods to register custom node types with a repository given a repository session and a node type definition file in CND format. This class is also used by this bundle to register node types on behalf of other bundles.</p>
+<p>Bundles may list node type definition files in CND format in the <code>Sling-Nodetypes</code> bundle header. This header is a comma-separated list of resources in the respective bundle. Each resource is taken and fed to the <code>NodeTypeLoader</code> to define the node types.</p>
+<p>After a bundle has entered the <em>resolved</em> state, the node types listed in the <code>Sling-Nodetypes</code> bundle header are registered with the repository.</p>
+<p>Node types installed by this mechanism will never be removed again by the <code>sling-jcr-base</code> bundle.</p>
+<p>Starting with revision 911430, re-registration of existing node types is enabled by default. To disable this, add <code>;rereigster:=false</code> to the resource names for which re-registration should be disabled.</p>
+<div class="warning">
+Support for re-registration of node types is relatively limited. In Jackrabbit, for example, only "trivial" changes are allowed.
+</div>
+<h3>Automated tests</h3>
+<p>The initial content found in the <a href="http://svn.apache.org/repos/asf/sling/trunk/launchpad/content/src/main/resources/content/sling-test">sling-test folder of the launchpad initial content</a> is verified by the <a href="http://svn.apache.org/repos/asf/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/InitialContentTest.java">InitialContentTest</a> when running the <em>launchpad/testing</em> integration tests.</p>
+<p>Those tests can be used as verified examples of initial content loading. Contributions are welcome to improve the coverage of those tests.</p></section></div></div>            
+<div class="footer">
+                <div class="timestamp">
+                    TODO display revision number here
+                </div><div class="trademarkFooter">
+                    Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+                </div>
+            </div>            
+            
+        </div>
+    </body>
+</html>

http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/bundles/context-aware-configuration/context-aware-configuration-default-implementation.html
----------------------------------------------------------------------
diff --git a/documentation/bundles/context-aware-configuration/context-aware-configuration-default-implementation.html b/documentation/bundles/context-aware-configuration/context-aware-configuration-default-implementation.html
new file mode 100644
index 0000000..417d7de
--- /dev/null
+++ b/documentation/bundles/context-aware-configuration/context-aware-configuration-default-implementation.html
@@ -0,0 +1,89 @@
+<!DOCTYPE html><html lang="en">
+    <head>
+<meta charset="utf-8"/>
+        <title>Apache Sling on JBake</title>
+        <link rel="stylesheet" href="/res/css/site.css"/>
+        <link rel="stylesheet" href="/res/css/codehilite.css"/>
+        <div class="title">
+            <div class="logo">
+                <a href="http://sling.apache.org">
+                    <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+                </a>
+            </div><div class="header">
+                <a href="http://www.apache.org">
+                    <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+                </a>
+            </div>
+        </div>        
+    </head><body>
+<div class="menu">
+            <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials &amp; How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
 ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
 dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+        </div>        <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Apache Sling Context-Aware Configuration - Default Implementation</h1></header><p>[TOC]</p>
+<h1>About</h1>
+<p>By default the 'default implementation' us used by the Context-Aware Configuration concerning lookup and persistence of configuration data, resource and property inheritance and context path detection. Using the <a href="http://sling.apache.org/documentation/bundles/context-aware-configuration/context-aware-configuration-spi.html">SPI</a> it is possible to overlay, extend or replace this functionality.</p>
+<p>This page documents the details of the default implementation.</p>
+<h1>Repository paths</h1>
+<p>By default all configuration data is stored in <code>/conf</code>. Fallback paths are <code>/conf/global</code>, <code>/apps/conf</code>and <code>/libs/conf</code>.</p>
+<p>The paths are configurable in the service configuration.</p>
+<h1>Context paths</h1>
+<p>The content resource hierarchy is defined by setting <code>sling:configRef</code> properties. Each resource that has a <code>sling:configRef</code> property set defines the root resource of a context, the whole subtree is the context. Within the subtree further nested contexts can be defined.</p>
+<h1>Configuration resource resolving</h1>
+<p>This illustration shows an example for configuration resource lookup:</p>
+<p><img src="config-resource-lookup.png" alt="Configuration resource lookup" /></p>
+<p>If you get the context-aware configuration via the API for any resource below <code>/content/tenant1/region1/site1</code> it is looked up in this path in this order:</p>
+<ol>
+  <li><code>/conf/brand1/tenant1/region1/site1</code> - because referenced by <code>/content/tenant1/region1/site1</code></li>
+  <li><code>/conf/brand1/tenant1/region1</code> - because referenced by <code>/content/tenant1/region1</code> (parent context)</li>
+  <li><code>/conf/brand1/tenant1</code> - because referenced by <code>/content/tenant1</code> (parent context)</li>
+  <li><code>/conf/brand1</code> - because it is a parent of by <code>/conf/brand1/tenant1</code></li>
+  <li><code>/conf/global</code> - because it is configured as fallback path</li>
+  <li><code>/apps/conf</code> - because it is configured as fallback path</li>
+  <li><code>/libs/conf</code> - because it is configured as fallback path</li>
+</ol>
+<p>So the basic rules are:</p>
+<ul>
+  <li>Go up in the content resource tree until a resource with <code>sling:configRef</code> is found. This is the 'inner-most' context. Check if a configuration resource exists at the path the property points to.</li>
+  <li>Check for parent resources of the references configuration resource (below <code>/conf</code>)</li>
+  <li>Go further up in the content resource tree for parent contexts, and check their configuration resources as well (they may reference completely different location below <code>/conf</code>)</li>
+  <li>Check the fallback paths</li>
+</ul>
+<h1>Configuration persistence</h1>
+<p>Example for the resource structure for a configuration resource at <code>/conf/mysite</code>:</p>
+<p>/conf /mysite /sling:configs /x.y.z.MyConfig @prop1 = 'value1' @prop2 = 123 @prop3= true</p>
+<p>Explanation:</p>
+<ul>
+  <li><code>sling:configs</code> is the bucket named which is used by the ConfigurationResolver by default for context-aware configurations. May be another name if you use the ConfigurationResourceResolver directly.</li>
+  <li><code>x.y.z.MyConfig</code> is the configuration name, in this case derived from an annotation class. May be any other custom name as well.</li>
+  <li><code>prop1..3</code>are example for configuration properties</li>
+  <li>It is possible to use deeper hierarchies below <code>sling:configs</code> as well.</li>
+  <li>Nested configurations are supported as well. This can be mapped to annotation classes referencing other annotation classes.</li>
+</ul>
+<h1>Resource inheritance</h1>
+<p>We distinguish between:</p>
+<ul>
+  <li>Singleton resources: Configuration resources looked up by the <code>get</code>/<code>as</code> method variants</li>
+  <li>Collection resources: Configuration resources lists looked up by the <code>getCollection</code>/<code>asCollection</code> method variants</li>
+</ul>
+<p>For singleton resources, there is not resource inheritance. The first resource that is found in the configuration resource resolving lookup order is returned.</p>
+<p>For collection resources there is no resource inheritance enabled by default. The children of the first resource that is found in the configuration resource resolving lookup order are returned.</p>
+<p>By defining a property <code>sling:configCollectionInherit</code> on the configuration resource, the children of the next resource that is found in the configuration resource resolving lookup order are combined with the children of the current configuration resource, returned a merged list. If both configuration resources contain child resources with the same name, duplicates are eliminated and only the children of the first resource are included.</p>
+<p>By setting the property <code>sling:configCollectionInherit</code> on multiple configuration resources that are part of the lookup order it is possible to form deeper inheritance chains following the same rules.</p>
+<p>Example for resource inheritance:</p>
+<p><img src="resource-inheritance.png" alt="Resource inheritance" /></p>
+<p>The result of this example is: <strong>C, A, B</strong>. It would by just <strong>C</strong> if the <code>sling:configCollectionInherit</code> is not set.</p>
+<h1>Property inheritance</h1>
+<p>By default, no property inheritance takes place. That means only the properties that are stored in the configuration resource are mapped to the annotation class or returned as value map, regardless whether singleton or collection resources are returned, or if resource collection inheritance is enabled or not.</p>
+<p>By defining a property <code>sling:configPropertyInherit</code> on the configuration resource, property merging is enabled between the current configuration resource and the next resource with the same name (singleton or resource collection item) in the configuration resource lookup order. That means that all properties that are not defined on the current configuration resource are inherited from the next resources and a merged value map is used for the configuration mapping.</p>
+<p>By setting the property <code>sling:configPropertyInherit</code> on multiple configuration resources that are part of the lookup order it is possible to form deeper inheritance chains following the same rules.</p></section></div></div>            
+<div class="footer">
+                <div class="timestamp">
+                    TODO display revision number here
+                </div><div class="trademarkFooter">
+                    Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+                </div>
+            </div>            
+            
+        </div>
+    </body>
+</html>

http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/bundles/context-aware-configuration/context-aware-configuration-override.html
----------------------------------------------------------------------
diff --git a/documentation/bundles/context-aware-configuration/context-aware-configuration-override.html b/documentation/bundles/context-aware-configuration/context-aware-configuration-override.html
new file mode 100644
index 0000000..4e6f765
--- /dev/null
+++ b/documentation/bundles/context-aware-configuration/context-aware-configuration-override.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html><html lang="en">
+    <head>
+<meta charset="utf-8"/>
+        <title>Apache Sling on JBake</title>
+        <link rel="stylesheet" href="/res/css/site.css"/>
+        <link rel="stylesheet" href="/res/css/codehilite.css"/>
+        <div class="title">
+            <div class="logo">
+                <a href="http://sling.apache.org">
+                    <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+                </a>
+            </div><div class="header">
+                <a href="http://www.apache.org">
+                    <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+                </a>
+            </div>
+        </div>        
+    </head><body>
+<div class="menu">
+            <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials &amp; How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
 ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
 dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+        </div>        <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Apache Sling Context-Aware Configuration - Override</h1></header><p>[TOC]</p>
+<h1>About</h1>
+<p>Using overrides it is possible to override context-aware configuration values globally or for specific content paths (and their subtrees) within an instance. If an override is active the Configuration API returns the overridden values instead of the values from the configuration resources.</p>
+<p>An example use case is to overwrite the Site URLs on your staging system which has a copy of the configuration content of the production system installed.</p>
+<p>Via the <a href="http://sling.apache.org/documentation/bundles/context-aware-configuration/context-aware-configuration-spi.html">SPI</a> you can add your own override providers - but in most cases the built-in ones described in this page are sufficient. All override providers use the same override syntax.</p>
+<h1>Override syntax</h1>
+<p>Generally an override consists of one single line. Syntax examples:</p>
+<p>{configName}/{propertyName}={propertyJsonValue} {configName}={propertyJsonObject} [{contextPath}]{configName}/{propertyName}={propertyJsonValue} [{contextPath}]{configName}={propertyJsonObject}</p>
+<p>The different parts:</p>
+<ul>
+  <li><code>{configName}</code> - Configuration name - can be a relative path with sub-resources</li>
+  <li><code>{propertyName}</code> - Property name</li>
+  <li><code>{propertyJsonValue}</code> - Property value in JSON value syntax.</li>
+  <li><code>{propertyJsonObject}</code> - If the property name is missing a JSON object can be defined containing all properties as key-value pairs.</li>
+  <li><code>{contextPath}</code> - If the context path is missing, the override is applied to all context path. If it is defined (enclosed in brackets), the override is applied only to this content path and it's subtree.</li>
+</ul>
+<p>When the syntax <code>{configName}/{propertyName}={propertyJsonValue}</code> is used, only this specific property is overwritten leaving all other properties in the configuration resource untouched. When the syntax <code>{configName}={propertyJsonObject}</code> is used, all configuration properties in the configuration resources are replaced with the set from the JSON object.</p>
+<p>Override string examples with real values:</p>
+<p>my-config/property1="value 1" my-config/sub1/property1="value 1" my-config/property1=["value 1","value 2"] my-config/property1=123 x.y.z.MyConfig={"prop1"="value1","prop2"=[1,2,3],"prop3"=true,"prop4"=1.23} [/content/region1]my-config/property1="value 1" [/content/region1]my-config/sub1={"prop1":"value 1"}</p>
+<p>If multiple statements are defined affecting the same content path, configuration name and property name, they overwrite each other. That means the override string defined last wins.</p>
+<h1>Built-in override providers</h1>
+<h2>Override via system properties</h2>
+<p>Allows to define configuration property overrides from system environment properties.</p>
+<p>The parameters are defined when starting the JVM using the -D command line parameter. Each parameter contains an override string. All parameter names have to be prefixed with the string <code>sling.caconfig.override.</code>.</p>
+<p>Example:</p>
+<p>-Dsling.caconfig.override.my-config/sub1/property1=123 -D"sling.caconfig.override.my-config/property1=["value 1","value 2"]" -D"sling.caconfig.override.[/content/region1]x.y.z.MyConfig={"prop1"="value1","prop2"=[1,2,3],"prop3"=true,"prop4"=1.23}"</p>
+<p>This provider is not active by default, it has to be activated via OSGi configuration ("Apache Sling Context-Aware System Property Configuration Override Provider").</p>
+<h2>Override via OSGi configuration</h2>
+<p>Allows to define configuration property overrides from OSGi configuration.</p>
+<p>You can provide multiple providers using a factory configuration ("Apache Sling Context-Aware OSGi Configuration Override Provider"), each of them provides list of override strings.</p></section></div></div>            
+<div class="footer">
+                <div class="timestamp">
+                    TODO display revision number here
+                </div><div class="trademarkFooter">
+                    Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+                </div>
+            </div>            
+            
+        </div>
+    </body>
+</html>

http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/bundles/context-aware-configuration/context-aware-configuration-spi.html
----------------------------------------------------------------------
diff --git a/documentation/bundles/context-aware-configuration/context-aware-configuration-spi.html b/documentation/bundles/context-aware-configuration/context-aware-configuration-spi.html
new file mode 100644
index 0000000..b179274
--- /dev/null
+++ b/documentation/bundles/context-aware-configuration/context-aware-configuration-spi.html
@@ -0,0 +1,59 @@
+<!DOCTYPE html><html lang="en">
+    <head>
+<meta charset="utf-8"/>
+        <title>Apache Sling on JBake</title>
+        <link rel="stylesheet" href="/res/css/site.css"/>
+        <link rel="stylesheet" href="/res/css/codehilite.css"/>
+        <div class="title">
+            <div class="logo">
+                <a href="http://sling.apache.org">
+                    <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+                </a>
+            </div><div class="header">
+                <a href="http://www.apache.org">
+                    <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+                </a>
+            </div>
+        </div>        
+    </head><body>
+<div class="menu">
+            <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials &amp; How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
 ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
 dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+        </div>        <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Apache Sling Context-Aware Configuration - SPI</h1></header><p>[TOC]</p>
+<h1>About</h1>
+<p>The Context-Aware Configuration implementation provides a set of Service Provider Interfaces (SPI) that allows you to overlay, enhance or replace the default implementation and adapt it to your needs.</p>
+<p>Please use the SPI with care, and first check if the <a href="http://sling.apache.org/documentation/bundles/context-aware-configuration/context-aware-configuration-default-implementation.html">Default Implementation</a> does not already fulfill your needs.</p>
+<h1>General principles</h1>
+<p>All SPIs share a common principle:</p>
+<ul>
+  <li>Support multiple strategies at the same time</li>
+  <li>No need to switch off or „copy“ the initial strategy</li>
+  <li>Apply additional strategies only for those places where needed (“minimally invasive”)</li>
+</ul>
+<p>All existing implementations are iterated in order of their service ranking.</p>
+<h1>Context Path Strategy</h1>
+<p>By providing an implementation of <code>org.apache.sling.caconfig.resource.spi.ContextPathStrategy</code> you can provide additional ways how context paths and their configuration references are detected in your content resource hierarchy.</p>
+<p>E.g. you could implement detecting context paths by project-specific conventions.</p>
+<h1>Configuration Resource Resolver Strategy</h1>
+<p>By providing an implementation of <code>org.apache.sling.caconfig.resource.spi.ConfigurationResourceResolvingStrategy</code> you can define where configuration data is looked up, and how resource and property inheritance is handled.</p>
+<h1>Configuration Inheritance Strategy</h1>
+<p>By providing an implementation of <code>org.apache.sling.caconfig.spi.ConfigurationInheritanceStrategy</code> you can define if and how resources are inherited across the inheritance chain.</p>
+<h1>Configuration Persistence Strategy</h1>
+<p>By providing an implementation of <code>org.apache.sling.caconfig.spi.ConfigurationPersistenceStrategy2</code> you can define the persistence structure of the configuration within the configuration resources.</p>
+<p>E.g. you could use a specific JCR node type or slightly different content structure to store the configuration data.</p>
+<h1>Configuration Metadata Provider</h1>
+<p>By providing an implementation of <code>org.apache.sling.caconfig.spi.ConfigurationMetadataProvider</code> you can provide information about configuration metadata from other sources than annotation classes.</p>
+<h1>Configuration Override Provider</h1>
+<p>By providing an implementation of <code>org.apache.sling.caconfig.spi.ConfigurationOverrideProvider</code> you can provide your own overrides - if the built-in override providers do not fit your needs.</p>
+<p>See <a href="http://sling.apache.org/documentation/bundles/context-aware-configuration/context-aware-configuration-override.html">Override</a> for the list of built-in providers and the override syntax.</p></section></div></div>            
+<div class="footer">
+                <div class="timestamp">
+                    TODO display revision number here
+                </div><div class="trademarkFooter">
+                    Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+                </div>
+            </div>            
+            
+        </div>
+    </body>
+</html>