This is an automated email from the ASF dual-hosted git repository.
git-site-role 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 a43c9e6 Automatic website deployment
a43c9e6 is described below
commit a43c9e60d6530a49c73017e51f57126c89f3f54f
Author: jenkins <[email protected]>
AuthorDate: Sun Apr 26 15:22:10 2020 +0000
Automatic website deployment
---
documentation/the-sling-engine/filters.html | 73 ++++++++++++++++++++---------
1 file changed, 52 insertions(+), 21 deletions(-)
diff --git a/documentation/the-sling-engine/filters.html
b/documentation/the-sling-engine/filters.html
index 87241d5..4b29b75 100644
--- a/documentation/the-sling-engine/filters.html
+++ b/documentation/the-sling-engine/filters.html
@@ -118,16 +118,7 @@
</li>
</ul>
</nav><script src='/res/jquery-3.2.1.min.js'
type='text/javascript'></script><script src='/res/tocjs-1-1-2.js'
type='text/javascript'></script><script
type='text/javascript'>$(document).ready(function() {
$('#generatedToC').toc({'selector':'h1[class!=title],h2,h3','ulClass':'menu-list'});
} );</script><div class="content is-marginless">
-<div class="row"><div><section><p>Sling supports filter processing by applying
filter chains to the requests before actually dispatching to the servlet or
script for processing. Filters to be used in such filter processing are plain
OSGi services of type <code>javax.servlet.Filter</code> which of course means
that the services implement this interface.</p>
-<div class="note">
-See <a href="https://issues.apache.org/jira/browse/SLING-1213">SLING-1213</a>,
-<a href="https://issues.apache.org/jira/browse/SLING-1734">SLING-1734</a>, and
-<a href="http://markmail.org/message/quxhm7d5s6u66crr">Registering filters
with Sling</a>
- for more details. The
-<a
href="https://github.com/apache/sling-org-apache-sling-launchpad-test-services/blob/master/src/main/java/org/apache/sling/launchpad/testservices/filters/NoPropertyFilter.java">NoPropertyFilter</a>
-from our integration tests shows an example Sling Filter.
-</div>
-<p>For Sling to pick up a <code>javax.servlet.Filter</code> service for filter
processing two service registration properties are inspected:</p>
+<div class="row"><div><section><p>Sling supports filtering the request
processing by applying filter chains to the requests before actually
dispatching to the servlet or script for processing. Filters to be used in such
filter processing are plain OSGi services of type
<code>javax.servlet.Filter</code> which of course means that the services
implement this interface. For Sling to pick up a
<code>javax.servlet.Filter</code> service for filter processing some service
properties must be set [...]
<table>
<thead>
<tr>
@@ -136,64 +127,104 @@ from our integration tests shows an example Sling Filter.
<th>Default Value </th>
<th>Valid Values </th>
<th>Description </th>
+ <th>Engine Version </th>
</tr>
</thead>
<tbody>
<tr>
<td><code>sling.filter.scope</code> </td>
- <td><code>String</code>, <code>String[]</code> or
<code>Vector<String></code> </td>
- <td><code>request</code> </td>
+ <td><code>String</code>, <code>String[]</code> </td>
+ <td><code>(-)</code> </td>
<td><code>REQUEST</code>, <code>INCLUDE</code>, <code>FORWARD</code>,
<code>ERROR</code>, <code>COMPONENT</code> </td>
<td>Indication of which chain the filter should be added to. This
property is required. If it is missing from the service, the service is ignored
because it is assumed another consumer will be interested in using the service.
Any unknown values of this property are also ignored causing the service to be
completely ignored if none of the values provided by the property are valid.
See below for the description of the filter chains. </td>
+ <td> </td>
</tr>
<tr>
<td><code>service.ranking</code> </td>
<td><code>Integer</code> </td>
<td><code>0</code> </td>
<td>Any <code>Integer</code> value </td>
- <td>Indication of where to place the filter in the filter chain. The
higher the number the earlier in the filter chain. This value may span the
whole range of integer values. Two filters with equal
<code>service.ranking</code> property value (explicitly set or default value of
zero) will be ordered according to their <code>service.id</code> service
property as described in section 5.2.5, Service Properties, of the OSGi Core
Specification R 4.2. </td>
+ <td colspan="2">Indication of where to place the filter in the filter
chain. The higher the number the earlier in the filter chain. This value may
span the whole range of integer values. Two filters with equal
<code>service.ranking</code> property value (explicitly set or default value of
zero) will be ordered according to their <code>service.id</code> service
property as described in section 5.2.5, Service Properties, of the OSGi Core
Specification R 4.2. </td>
+ </tr>
+ <tr>
+ <td><code>sling.filter.pattern</code> </td>
+ <td><code>String</code></td>
+ <td><code>(-)</code> </td>
+ <td>Any <code>String</code> value </td>
+ <td>Restrict the filter to request or content paths excluding selectors,
extension and suffix that match the supplied regular expression. </td>
+ <td>2.7.0 </td>
</tr>
<tr>
<td><code>sling.filter.pattern</code> </td>
<td><code>String</code></td>
<td><code>(-)</code> </td>
<td>Any <code>String</code> value </td>
- <td>Restrict the filter to resource paths that match the supplied
regular expression. <em>This does not refer to the request path, but rather to
the resolved resource path excluding selectors, extension and suffix</em>
Requires Sling Engine 2.4.0. </td>
+ <td>Restrict the filter to content paths excluding selectors, extension
and suffix that match the supplied regular expression. </td>
+ <td>2.6.14 - 2.6.22 </td>
+ </tr>
+ <tr>
+ <td><code>sling.filter.pattern</code> </td>
+ <td><code>String</code></td>
+ <td><code>(-)</code> </td>
+ <td>Any <code>String</code> value </td>
+ <td>Restrict the filter to request paths excluding selectors, extension
and suffix that match the supplied regular expression. </td>
+ <td>2.4.0 - 2.6.12 </td>
+ </tr>
+ <tr>
+ <td><code>sling.filter.request.pattern</code> </td>
+ <td><code>String</code></td>
+ <td><code>(-)</code> </td>
+ <td>Any <code>String</code> value </td>
+ <td>Restrict the filter to request paths excluding selectors, extension
and suffix that match the supplied regular expression. </td>
+ <td>2.7.0 </td>
+ </tr>
+ <tr>
+ <td><code>sling.filter.resource.pattern</code> </td>
+ <td><code>String</code></td>
+ <td><code>(-)</code> </td>
+ <td>Any <code>String</code> value </td>
+ <td>Restrict the filter to resource paths excluding selectors, extension
and suffix that match the supplied regular expression. </td>
+ <td>2.7.0 </td>
</tr>
<tr>
<td><code>sling.filter.suffix.pattern</code> </td>
<td><code>String</code></td>
<td><code>(-)</code> </td>
<td>Any <code>String</code> value </td>
- <td>Restrict the filter to requests with suffix that match the supplied
regular expression. Requires Sling Engine 2.6.14. </td>
+ <td>Restrict the filter to requests with suffix that match the supplied
regular expression. </td>
+ <td>2.6.14 </td>
</tr>
<tr>
<td><code>sling.filter.selectors</code> </td>
<td><code>String[]</code></td>
<td><code>(-)</code> </td>
<td>Any <code>String</code> value </td>
- <td>Restrict the filter to requests whose selectors match one or more of
the provided ones. Requires Sling Engine 2.6.14. </td>
+ <td>Restrict the filter to requests whose selectors match one or more of
the provided ones. </td>
+ <td>2.6.14 </td>
</tr>
<tr>
<td><code>sling.filter.methods</code> </td>
<td><code>String[]</code></td>
<td><code>(-)</code> </td>
<td>Any <code>String</code> value </td>
- <td>Restrict the filter to requests whose methods match one or more of
the provided ones. Requires Sling Engine 2.6.14. </td>
+ <td>Restrict the filter to requests whose methods match one or more of
the provided ones. </td>
+ <td>2.6.14 </td>
</tr>
<tr>
<td><code>sling.filter.resourceTypes</code> </td>
<td><code>String[]</code></td>
<td><code>(-)</code> </td>
<td>Any <code>String</code> value </td>
- <td>Restrict the filter to requests whose resource type match one of the
provided ones. Requires Sling Engine 2.6.14. </td>
+ <td>Restrict the filter to requests whose resource type match one of the
provided ones. </td>
+ <td>2.6.14 </td>
</tr>
<tr>
<td><code>sling.filter.extensions</code> </td>
<td><code>String[]</code></td>
<td><code>(-)</code> </td>
<td>Any <code>String</code> value </td>
- <td>Restrict the filter to requests whose extension matches one of the
provided ones. Requires Sling Engine 2.6.14. </td>
+ <td>Restrict the filter to requests whose extension matches one of the
provided ones. </td>
+ <td>2.6.14 </td>
</tr>
</tbody>
</table>
@@ -224,7 +255,7 @@ from our integration tests shows an example Sling Filter.
SlingHttpServletResponse slingResponse =
(SlingHttpServletResponse)response;
//will only be run on (GET|HEAD)
/content/.*.foo|bar.txt|json/suffix/foo requests
//code here can be reduced to what should actually be done in that
case
- //for other requests, this filter will not be in the call stack
+ //for other requests, this filter will not be in the call stack
slingResponse.addHeader("foobared", "true");
chain.doFilter(request, slingResponse);
}
@@ -364,7 +395,7 @@ Component Filters:
</div><footer class="footer">
<div class="content has-text-centered is-small">
<div class="revisionInfo">
- Last modified by <span class="author">Konrad
Windszus</span> on <span class="comment">Fri Feb 28 09:32:41 2020 +0100</span>
+ Last modified by <span class="author">Carsten
Ziegeler</span> on <span class="comment">Sun Apr 26 17:19:54 2020 +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>