sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r1008898 - in /websites/staging/sling/trunk/content: ./ documentation/bundles/content-loading-jcr-contentloader.html
Date Fri, 24 Mar 2017 10:01:02 GMT
Author: buildbot
Date: Fri Mar 24 10:01:02 2017
New Revision: 1008898

Log:
Staging update by buildbot for sling

Modified:
    websites/staging/sling/trunk/content/   (props changed)
    websites/staging/sling/trunk/content/documentation/bundles/content-loading-jcr-contentloader.html

Propchange: websites/staging/sling/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Fri Mar 24 10:01:02 2017
@@ -1 +1 @@
-1788371
+1788399

Modified: websites/staging/sling/trunk/content/documentation/bundles/content-loading-jcr-contentloader.html
==============================================================================
--- websites/staging/sling/trunk/content/documentation/bundles/content-loading-jcr-contentloader.html
(original)
+++ websites/staging/sling/trunk/content/documentation/bundles/content-loading-jcr-contentloader.html
Fri Mar 24 10:01:02 2017
@@ -117,12 +117,12 @@ h2:hover > .headerlink, h3:hover > .head
 <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 id="initial-content-loading">Initial Content Loading<a class="headerlink" href="#initial-content-loading"
title="Permanent link">&para;</a></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 show in this table, which
assumes a <code>Sling-Initial-Content</code> header entry of <code>SLING-INF/content</code>:</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 class="table">
 <thead>
 <tr>
-<th>Entry</th>
-<th>Repository Path</th>
+<th>Source Entry Paths in Bundle</th>
+<th>Target Repository Path</th>
 </tr>
 </thead>
 <tbody>
@@ -134,6 +134,10 @@ h2:hover > .headerlink, h3:hover > .head
 <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>
@@ -170,18 +174,18 @@ h2:hover > .headerlink, h3:hover > .head
 <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 or just
initially added.  If this is true, existing nodes are deleted and a new node is created in
the same place.</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.</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><code>overwrite</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>
@@ -204,26 +208,26 @@ h2:hover > .headerlink, h3:hover > .head
 </tr>
 </tbody>
 </table>
-<p>Examples of these directives uses could be (assumes a Sling-Initial-Content header
entry of SLING-INF/content):</p>
+<p>Examples of these directives within <code>Sling-Initial-Content</code>
header entries:</p>
 <table class="table">
 <thead>
 <tr>
-<th>Entry</th>
+<th><code>Sling-Initial-Content</code> header entry</th>
 <th>Behaviour</th>
 </tr>
 </thead>
 <tbody>
 <tr>
-<td><code>SLING-INF/content/home;overwrite:=true;uninstall:=true</code></td>
+<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</code></td>
+<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>if <em>/sites/sling_website</em> exists it loads the content into it.
Otherwise, it loads the content into root node <em>/</em>.</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>
@@ -406,7 +410,7 @@ Support for re-registration of node type
 <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>
       <div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
-        Rev. 1642126 by fmeschbe on Thu, 27 Nov 2014 12:37:40 +0000
+        Rev. 1788399 by kwin on Fri, 24 Mar 2017 10:00:44 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project



Mime
View raw message