This is an automated email from the ASF dual-hosted git repository.
kwin pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/sling-site.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 220d8e2 Clarification of rewriter pipeline configurationsns
220d8e2 is described below
commit 220d8e2c0d39782cb08da6492204814ac7a1cd57
Author: Konrad Windszus <[email protected]>
AuthorDate: Tue Jul 10 11:46:00 2018 +0200
Clarification of rewriter pipeline configurationsns
---
...riting-pipelines-org-apache-sling-rewriter.html | 131 ++++++++++++++++-----
downloads.html | 4 +-
releases.html | 3 +-
repolist.html | 2 +
4 files changed, 108 insertions(+), 32 deletions(-)
diff --git
a/documentation/bundles/output-rewriting-pipelines-org-apache-sling-rewriter.html
b/documentation/bundles/output-rewriting-pipelines-org-apache-sling-rewriter.html
index cbb1174..b1697c2 100644
---
a/documentation/bundles/output-rewriting-pipelines-org-apache-sling-rewriter.html
+++
b/documentation/bundles/output-rewriting-pipelines-org-apache-sling-rewriter.html
@@ -99,22 +99,7 @@
<p>The first component in the pipeline generating the initial SAX events is
called a generator. The generator gets the output from Sling, generates SAX
events (XML), and streams these events into the pipeline. The counterpart of
the generator is the serializer which builds the end of the pipeline. The
serializer collects all incomming SAX events, transforms them into the required
response by writing into output stream of the response.</p>
<p>Between the generator and the serializer so called transformers can be
placed in a chain. A transformer receives SAX events from the previous
component in the pipeline and sends SAX events to the next component in the
pipeline. A transformer can remove events, change events, add events or just
pass on the events.</p>
<p>Sling contains a default pipeline which is executed for all HTML responses:
it starts with an HTML generator, parsing the HTML output and sending events
into the pipeline. An HTML serializer collects all events and serializes the
output. </p>
-<p>The pipelines can be configured in the repository as a child node of
<em>/apps/APPNAME/config/rewriter</em> (or
<em>/libs/APPNAME/config/rewriter</em>). (In fact the configured search paths
of the resource resolver are observed.) Each node can have the following
properties:</p>
-<ul>
- <li>generatorType - the type of the generator (required)</li>
- <li>transformerTypes (multi value string) - the types of the transformers
(optional)</li>
- <li>serializerType - the type of the serializer (required)</li>
- <li>paths (multi value string) - the paths this pipeline should run on
(content paths)</li>
- <li>contentTypes (multi value string) - the content types this pipeline
should be used for (optional)</li>
- <li>extensions (multi value string) - the extensions this pipeline should be
used for (optional)</li>
- <li>resourceTypes (multi value string) - the resource types this pipeline
should be used for (optional)</li>
- <li>unwrapResources (boolean) - check resource types of unwrapped resources
as well (optional, since 1.1.0)</li>
- <li>selectors (multi value string) - a set of selectors the pipeline should
be used for (optional, since 1.1.0)</li>
- <li>order (long) - the configurations are sorted by this order, order must
be higher or equal to 0. The configuration with the highest order is tried
first.</li>
- <li>enabled (boolean) - Is this configuration active? (default yes)</li>
-</ul>
-<p>As you can see from the configuration there are several possibilities to
define when a pipeline should be used for a response, like paths, extensions,
content types, or resource types. It is possible to specify several of them at
once. In this case all conditions must be met.</p>
-<p>If a component needs a configuration, the configuration is stored in a
child node which name is <em>{componentType}-{name}</em>, e.g. to configure the
HTML generator (named <em>html-generator</em>), the node should have the name
<em>generator-html-generator</em>. In the case that the pipeline contains the
same transformer several times, the configuration child node should have the
formant <em>{componentType}-{index}</em> where index is the index of the
transformer starting with 1. For [...]
+<p>You can overwrite the configuration or contribute more specific
configurations as outlined below in <a
href="#configuring-a-processor">Configuring a Processor</a>. Only one pipeline
is being picked based on the matching configuration with the highest order.</p>
<h3><a href="#default-pipeline" name="default-pipeline">Default
Pipeline</a></h3>
<p>The default pipeline is configured for the <em>text/html</em> mime type and
the <em>html</em> extensions and consists of the <em>html-generator</em> as the
generator, and the <em>html-serializer</em> for generating the final response.
As the HTML generated by Sling is not required to be valid XHTML, the HTML
parser is using an HTML parser to create valid SAX events. In order to perform
this, the generator needs to buffer the whole response first.</p>
<h2><a href="#implementing-pipeline-components"
name="implementing-pipeline-components">Implementing Pipeline
Components</a></h2>
@@ -143,21 +128,109 @@
@scr.property value="pipeline.type" value="uniqueName"
</code></pre>
<h2><a href="#configuring-a-processor"
name="configuring-a-processor">Configuring a Processor</a></h2>
-<p>The processors can be configured in the repository as a child node of
<em>/apps/APPNAME/config/rewriter</em> (or libs or any configured search path).
Each node can have the following properties:</p>
-<ul>
- <li>processorType - the type of the processor (required) - this is the part
from the scr factory information after the slash (in the example above this is
<em>uniqueName</em>)</li>
- <li>paths (multi value string) - the paths this processor should run on
(content paths)</li>
- <li>contentTypes (multi value string) - the content types this processor
should be used for (optional)</li>
- <li>extensions (multi value string) - the extensions this processor should
be used for (optional)</li>
- <li>resourceTypes (multi value string) - the resource types this processor
should be used for (optional)</li>
- <li>unwrapResources (boolean) - check resource types of unwrapped resources
as well (optional, since 1.1.0)</li>
- <li>selectors (multi value string) - a set of selectors the pipeline should
be used for (optional, since 1.1.0)</li>
- <li>order (long) - the configurations are sorted by this order, order must
be higher or equal to 0. The configuration with the highest order is tried
first.</li>
- <li>enabled (boolean) - Is this configuration active? (default yes)</li>
-</ul></section></div></div>
+<p>The pipelines can be configured in the repository as a child resource of
<code>/apps/<APPNAME>/config/rewriter/*</code> (or
<code>/libs/<APPNAME>/config/rewriter/*</code>). (In fact the configured
search paths of the resource resolver are observed.) Each resource can have the
following properties:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Property </th>
+ <th>Type </th>
+ <th>Description </th>
+ <th>Example Value </th>
+ <th>Mandatory</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>generatorType</code> </td>
+ <td>String </td>
+ <td>The type of the generator. Identifies the generator being registered
via service property <code>pipeline.type</code> of a service implementing a
<code>GeneratorFactory</code> </td>
+ <td><code>html-generator</code> </td>
+ <td>yes</td>
+ </tr>
+ <tr>
+ <td><code>transformerTypes</code> </td>
+ <td>String[] </td>
+ <td>The types of the transformers. Identifies the transformers being
registered via service property <code>pipeline.type</code> of a service
implementing a <code>TransformerFactory</code> </td>
+ <td><code>link-rewriter</code> (Sling itself does not contain any
TransformerFactories) </td>
+ <td>no</td>
+ </tr>
+ <tr>
+ <td><code>serializerType</code> </td>
+ <td>String </td>
+ <td>The type of the serializer. Identifies the serializer being
registered via service property <code>pipeline.type</code> of a service
implementing a <code>SerializerFactory</code> </td>
+ <td><code>html-serializer</code> </td>
+ <td>yes</td>
+ </tr>
+ <tr>
+ <td><code>paths</code> </td>
+ <td>String[] </td>
+ <td>The paths this pipeline should run on (content paths). Only if the
request's resource path starts with one of the given <code>paths</code> or one
of the given paths is <code>*</code> the pipeline configuration is considered.
</td>
+ <td><code>/content/</code> </td>
+ <td>no</td>
+ </tr>
+ <tr>
+ <td><code>contentTypes</code> </td>
+ <td>String[] </td>
+ <td>The content types this pipeline should be used for . If no explicit
content type is set on the response yet, <code>text/html</code> is assumed. May
contain <code>*</code> values which match for all content types. Only if the
response has one of the given content types the pipeline configuration is
considered. </td>
+ <td><code>text/html</code> </td>
+ <td>no</td>
+ </tr>
+ <tr>
+ <td><code>extensions</code> </td>
+ <td>String </td>
+ <td>The extensions this pipeline should be used for. Only if the
request's extension is equal to one of the given extensions the pipeline
configuration is considered. </td>
+ <td><code>html</code> </td>
+ <td>no</td>
+ </tr>
+ <tr>
+ <td><code>resourceTypes</code> </td>
+ <td>String[] </td>
+ <td>The resource types this pipeline should be used for. Only if the
request's resource type is equal (via
<code>ResourceResolver.isResourceType(<request's resource>, <given
resource type></code>) to one of the given resourceTypes the pipeline
configuration is considered. </td>
+ <td><code>myapp/customresourcetype</code> </td>
+ <td>no</td>
+ </tr>
+ <tr>
+ <td><code>unwrapResources</code> </td>
+ <td>Boolean </td>
+ <td>Check resource types of unwrapped resources as well if this is set
to <code>true</code>. Available since 1.1.0 (<a
href="https://issues.apache.org/jira/browse/SLING-5012">SLING-5012</a>). </td>
+ <td><code>false</code> </td>
+ <td>no</td>
+ </tr>
+ <tr>
+ <td><code>selectors</code> </td>
+ <td>String[] </td>
+ <td>A set of selectors the pipeline should be used for. Each value is a
single selector (i.e. must not contain <code>.</code>). Only if the request
contains at least one selector which is equal to one of the given selectors,
this pipeline configuration is considered. Available since 1.1.0 (<a
href="https://issues.apache.org/jira/browse/SLING-3511">SLING-3511</a>) </td>
+ <td><code>myselector</code> </td>
+ <td>no</td>
+ </tr>
+ <tr>
+ <td><code>order</code> </td>
+ <td>Long </td>
+ <td>The configurations are sorted by this order, order must be higher or
equal to 0. The configuration with the highest order is tried first. Default
value (if not set): 0 </td>
+ <td>100 </td>
+ <td>no</td>
+ </tr>
+ <tr>
+ <td><code>enabled</code> </td>
+ <td>Boolean </td>
+ <td>Is this configuration active? (default yes) </td>
+ <td><code>false</code> </td>
+ <td>no</td>
+ </tr>
+ <tr>
+ <td><code>processError</code> </td>
+ <td>Boolean </td>
+ <td>Only if this is set to <code>true</code> also error responses are
processed by this pipeline configuration. Default <code>true</code> </td>
+ <td><code>true</code> </td>
+ <td>no</td>
+ </tr>
+ </tbody>
+</table>
+<p>As you can see from the configuration there are several possibilities to
define when a pipeline should be used for a response, like paths, extensions,
content types, or resource types. It is possible to specify several of them at
once. In this case all conditions must be met.</p>
+<p>If a component needs a configuration, the configuration is stored in a
child node which name is <em>{componentType}-{name}</em>, e.g. to configure the
HTML generator (named <em>html-generator</em>), the node should have the name
<em>generator-html-generator</em>. In the case that the pipeline contains the
same transformer several times, the configuration child node should have the
formant <em>{componentType}-{index}</em> where index is the index of the
transformer starting with 1. For [...]
<div class="footer">
<div class="revisionInfo">
- Last modified by <span class="author">Bertrand
Delacretaz</span> on <span class="comment">Fri Sep 29 15:57:01 2017 +0200</span>
+ Last modified by <span class="author">Konrad
Windszus</span> on <span class="comment">Tue Jul 10 11:43:51 2018 +0200</span>
</div> <p>
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.
</p><p>
diff --git a/downloads.html b/downloads.html
index e66f745..9c58950 100644
--- a/downloads.html
+++ b/downloads.html
@@ -304,8 +304,8 @@
</td><td><a
href="[preferred]sling/org.apache.sling.jcr.classloader-3.2.2-source-release.zip">Source
ZIP</a> (<a
href="https://www.apache.org/dist/sling/org.apache.sling.jcr.classloader-3.2.2-source-release.zip.asc">asc</a>,
<a
href="https://www.apache.org/dist/sling/org.apache.sling.jcr.classloader-3.2.2-source-release.zip.sha1">sha1</a>)
</td></tr><tr><td>JCR
Compiler</td><td>2.1.0</td><td><a
href="[preferred]sling/org.apache.sling.jcr.compiler-2.1.0.jar">Bundle</a> (<a
href="https://www.apache.org/dist/sling/org.apache.sling.jcr.compiler-2.1.0.jar.asc">asc</a>,
<a
href="https://www.apache.org/dist/sling/org.apache.sling.jcr.compiler-2.1.0.jar.sha1">sha1</a>)
</td><td><a
href="[preferred]sling/org.apache.sling.jcr.compiler-2.1.0-source-release.zip">Source
ZIP</a> (<a
href="https://www.apache.org/dist/sling/org.apache.sling.jcr.compiler-2.1.0-source-release.zip.asc">asc</a>,
<a
href="https://www.apache.org/dist/sling/org.apache.sling.jcr.compiler-2.1.0-source-release.zip.sha1">sha1</a>)
- </td></tr><tr><td>JCR Content
Loader</td><td>2.2.4</td><td><a
href="[preferred]sling/org.apache.sling.jcr.contentloader-2.2.4.jar">Bundle</a>
(<a
href="https://www.apache.org/dist/sling/org.apache.sling.jcr.contentloader-2.2.4.jar.asc">asc</a>,
<a
href="https://www.apache.org/dist/sling/org.apache.sling.jcr.contentloader-2.2.4.jar.sha1">sha1</a>)
- </td><td><a
href="[preferred]sling/org.apache.sling.jcr.contentloader-2.2.4-source-release.zip">Source
ZIP</a> (<a
href="https://www.apache.org/dist/sling/org.apache.sling.jcr.contentloader-2.2.4-source-release.zip.asc">asc</a>,
<a
href="https://www.apache.org/dist/sling/org.apache.sling.jcr.contentloader-2.2.4-source-release.zip.sha1">sha1</a>)
+ </td></tr><tr><td>JCR Content
Loader</td><td>2.2.6</td><td><a
href="[preferred]sling/org.apache.sling.jcr.contentloader-2.2.6.jar">Bundle</a>
(<a
href="https://www.apache.org/dist/sling/org.apache.sling.jcr.contentloader-2.2.6.jar.asc">asc</a>,
<a
href="https://www.apache.org/dist/sling/org.apache.sling.jcr.contentloader-2.2.6.jar.sha1">sha1</a>)
+ </td><td><a
href="[preferred]sling/org.apache.sling.jcr.contentloader-2.2.6-source-release.zip">Source
ZIP</a> (<a
href="https://www.apache.org/dist/sling/org.apache.sling.jcr.contentloader-2.2.6-source-release.zip.asc">asc</a>,
<a
href="https://www.apache.org/dist/sling/org.apache.sling.jcr.contentloader-2.2.6-source-release.zip.sha1">sha1</a>)
</td></tr><tr><td>JCR Content
Parser</td><td>1.2.6</td><td><a
href="[preferred]sling/org.apache.sling.jcr.contentparser-1.2.6.jar">Bundle</a>
(<a
href="https://www.apache.org/dist/sling/org.apache.sling.jcr.contentparser-1.2.6.jar.asc">asc</a>,
<a
href="https://www.apache.org/dist/sling/org.apache.sling.jcr.contentparser-1.2.6.jar.sha1">sha1</a>)
</td><td><a
href="[preferred]sling/org.apache.sling.jcr.contentparser-1.2.6-source-release.zip">Source
ZIP</a> (<a
href="https://www.apache.org/dist/sling/org.apache.sling.jcr.contentparser-1.2.6-source-release.zip.asc">asc</a>,
<a
href="https://www.apache.org/dist/sling/org.apache.sling.jcr.contentparser-1.2.6-source-release.zip.sha1">sha1</a>)
</td></tr><tr><td>JCR
DavEx</td><td>1.3.10</td><td><a
href="[preferred]sling/org.apache.sling.jcr.davex-1.3.10.jar">Bundle</a> (<a
href="https://www.apache.org/dist/sling/org.apache.sling.jcr.davex-1.3.10.jar.asc">asc</a>,
<a
href="https://www.apache.org/dist/sling/org.apache.sling.jcr.davex-1.3.10.jar.sha1">sha1</a>)
diff --git a/releases.html b/releases.html
index 9712e1e..01181c6 100644
--- a/releases.html
+++ b/releases.html
@@ -89,6 +89,7 @@
</h1><div class="row"><div class="small-12 columns"><section
class="wrap"><p>This is a list of all our releases, available from our <a
href="/downloads.cgi">downloads</a> page.</p>
<h2><a href="#july-2018" name="july-2018">July 2018</a></h2>
<ul>
+ <li>Sling Content Loader 2.2.6 (6th)</li>
<li>XSS Protection API 2.0.8 (3rd)</li>
</ul>
<h2><a href="#june-2018" name="june-2018">June 2018</a></h2>
@@ -1720,7 +1721,7 @@
</ul></section></div></div>
<div class="footer">
<div class="revisionInfo">
- Last modified by <span class="author">Radu Cotescu</span>
on <span class="comment">Tue Jul 3 13:08:51 2018 +0200</span>
+ Last modified by <span class="author">Jason E
Bailey</span> on <span class="comment">Fri Jul 6 15:29:36 2018 -0400</span>
</div> <p>
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.
</p><p>
diff --git a/repolist.html b/repolist.html
index f355623..443cba9 100644
--- a/repolist.html
+++ b/repolist.html
@@ -403,6 +403,7 @@
<li><a
href="https://github.com/apache/sling-org-apache-sling-feature-modelconverter.git">org-apache-sling-feature-modelconverter</a></li>
<li><a
href="https://github.com/apache/sling-org-apache-sling-feature-resolver.git">org-apache-sling-feature-resolver</a></li>
<li><a
href="https://github.com/apache/sling-org-apache-sling-featureflags.git">org-apache-sling-featureflags</a></li>
+ <li><a
href="https://github.com/apache/sling-org-apache-sling-file-optimization.git">org-apache-sling-file-optimization</a></li>
<li><a
href="https://github.com/apache/sling-org-apache-sling-fragment-activation.git">org-apache-sling-fragment-activation</a></li>
<li><a
href="https://github.com/apache/sling-org-apache-sling-fragment-nashorn.git">org-apache-sling-fragment-nashorn</a></li>
<li><a
href="https://github.com/apache/sling-org-apache-sling-fragment-transaction.git">org-apache-sling-fragment-transaction</a></li>
@@ -502,6 +503,7 @@
<li><a
href="https://github.com/apache/sling-org-apache-sling-repoinit-parser.git">org-apache-sling-repoinit-parser</a></li>
<li><a
href="https://github.com/apache/sling-org-apache-sling-reqanalyzer.git">org-apache-sling-reqanalyzer</a></li>
<li><a
href="https://github.com/apache/sling-org-apache-sling-resource-editor.git">org-apache-sling-resource-editor</a></li>
+ <li><a
href="https://github.com/apache/sling-org-apache-sling-resource-filter.git">org-apache-sling-resource-filter</a></li>
<li><a
href="https://github.com/apache/sling-org-apache-sling-resource-inventory.git">org-apache-sling-resource-inventory</a></li>
<li><a
href="https://github.com/apache/sling-org-apache-sling-resource-presence.git">org-apache-sling-resource-presence</a></li>
<li><a
href="https://github.com/apache/sling-org-apache-sling-resourceaccesssecurity.git">org-apache-sling-resourceaccesssecurity</a></li>