incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Sling Website > Output Rewriting Pipelines (org.apache.sling.rewriter)
Date Wed, 16 Sep 2009 06:04:01 GMT
<html>
<head>
    <base href="http://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=SLINGxSITE&amp;forWysiwyg=true" type="text/css">
    </head>
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
     <h2><a href="http://cwiki.apache.org/confluence/display/SLINGxSITE/Output+Rewriting+Pipelines+%28org.apache.sling.rewriter%29">Output Rewriting Pipelines (org.apache.sling.rewriter)</a></h2>
     <h4>Page <b>edited</b> by             <a href="http://cwiki.apache.org/confluence/display/~cziegeler@apache.org">Carsten Ziegeler</a>
    </h4>
     
          <br/>
     <div class="notificationGreySide">
         <h1><a name="OutputRewritingPipelines%28org.apache.sling.rewriter%29-ApacheSlingRewriter"></a>Apache Sling Rewriter</h1>

<p>The Apache Sling Rewriter is a module for rewriting the output generated by a usual Sling rendering process. Some possible use cases include rewriting or checking all links in an html page, manipulating the html page, or using the generated output as the base for further transformation. An example of futher transformation is to use XSLT to transform rendered XML to some output format like HTML or XSL:FO for generating PDF.</p>

<p>For supporting these use cases, the rewriter uses the concept for a processor. The processor is a component that is injected through a servlet filter into the response. By implementing the <em>Processor</em> interface one is able to rewrite the whole response in one go. A more convenient way of processing the output is by using a so called pipeline; the Apache Sling rewriter basically uses the same concept as the famous Apache Cocoon: an XML based pipeline for further post processing of the output. The pipeline is based on SAX events.</p>

<h2><a name="OutputRewritingPipelines%28org.apache.sling.rewriter%29-SAXPipelines"></a>SAX Pipelines</h2>
<p>The rewriter allows to configure a pipeline for post processing of the generated response. Depending on how the pipeline is assembled the rewriting process might buffer the whole output in order to do proper post processing - for example this is required if an HTML response is "transformed" to XHTML or if XSLT is used to process the response.</p>

<p>As the pipeline is based on SAX events, there needs to be a component that generates these events and sends them through the pipeline. By default the Sling rendering scripts write to an output stream, so there is a need to parse this output and generate the SAX events.</p>

<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. A 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>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><div class="error"><span class="error">Unknown macro: {componentType}</span> <p>-<div class="error"><span class="error">Unknown macro: {name}</span> </div>_, 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 _</p></div>-<h2>Space Index</h2>

<p>
<table width="99%" cellspacing="0" class="grid">
    <tr>
        <td colspan="2">
         <table width="100%">
           <tr>                <td><a href="#index-0-9">0-9</a> ... 0</td>
                                                                      <td><a href="#index-A">A</a> ... 6</td>
                                                                      <td><a href="#index-B">B</a> ... 1</td>
                                                                      <td><a href="#index-C">C</a> ... 3</td>
                                                                      <td><a href="#index-D">D</a> ... 7</td>
                                                                      <td><a href="#index-E">E</a> ... 1</td>
                                                              </tr><tr>
                                                   <td><a href="#index-F">F</a> ... 1</td>
                                                                      <td><a href="#index-G">G</a> ... 4</td>
                                                                      <td><a href="#index-H">H</a> ... 0</td>
                                                                      <td><a href="#index-I">I</a> ... 3</td>
                                                                      <td><a href="#index-J">J</a> ... 2</td>
                                                                      <td><a href="#index-K">K</a> ... 0</td>
                                                              </tr><tr>
                                                   <td><a href="#index-L">L</a> ... 3</td>
                                                                      <td><a href="#index-M">M</a> ... 8</td>
                                                                      <td><a href="#index-N">N</a> ... 2</td>
                                                                      <td><a href="#index-O">O</a> ... 2</td>
                                                                      <td><a href="#index-P">P</a> ... 4</td>
                                                                      <td><a href="#index-Q">Q</a> ... 0</td>
                                                              </tr><tr>
                                                   <td><a href="#index-R">R</a> ... 5</td>
                                                                      <td><a href="#index-S">S</a> ... 5</td>
                                                                      <td><a href="#index-T">T</a> ... 2</td>
                                                                      <td><a href="#index-U">U</a> ... 1</td>
                                                                      <td><a href="#index-V">V</a> ... 0</td>
                                                                      <td><a href="#index-W">W</a> ... 1</td>
                                                              </tr><tr>
                                                   <td><a href="#index-X">X</a> ... 1</td>
                                                                      <td><a href="#index-Y">Y</a> ... 0</td>
                                                                      <td><a href="#index-Z">Z</a> ... 0</td>
                                                                      <td><a href="#index-%21@%23%24">!@#$</a> ... 0</td>
                                                                                                                  <td>&nbsp;</td>
                                            <td>&nbsp;</td>
                                                </tr>
         </table>
        </td>
    </tr>
   <tr valign="top">        <td><h4 style="margin-top: 0px"><a name="index-0-9"></a>0-9</h4>
        </td>
                                      <td><h4 style="margin-top: 0px"><a name="index-A"></a>A</h4>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Adapters"/>
                         <a href="/confluence/display/SLINGxSITE/Adapters">Adapters</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Adapters The {{Resource}} and {{ResourceResolver}} interfaces are defined with a method {{adaptTo}}, which adapts the object to other classes. Using this mechanism the JCR session of the resource resolver calling the {{adaptTo}} method with the {{javax.jcr.Session}} class object. Likewise the JCR node on which a resource is based ... </div>
                                 <img src="/confluence/images/icons/home_16.gif" height="16" width="16" border="0" align="absmiddle" title="Apache Sling (Space Home Page)"/>
                         <a href="/confluence/display/SLINGxSITE/Apache+Sling">Apache Sling</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Apache Sling Bringing Back the Fun  Apache Sling is an innovative web framework that is intended to bring back the fun to web development.  Discussions about Sling happen on our mailing lists, see the Project Information page for more info ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Apache Sling Community Roles and Processes"/>
                         <a href="/confluence/display/SLINGxSITE/Apache+Sling+Community+Roles+and+Processes">Apache Sling Community Roles and Processes</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Community Roles and Processes  The Community Roles and Processes are put in effect as of 13/May/2009.   Roles  There are different roles with which Sling community members may be associated: User, Contributor, Committer, and PMC (Project Management Committee) Member. These roles are assigned and assumed based ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Architecture"/>
                         <a href="/confluence/display/SLINGxSITE/Architecture">Architecture</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Architecture of Sling  The following is a short list of highlights of Sling:   OSGi The Sling application is built as a series of OSGi bundles and makes heavy use of a number of OSGi core and compendium services  Sling API To implement Content based Web Applications with Sling ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Assembly"/>
                         <a href="/confluence/display/SLINGxSITE/Assembly">Assembly</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Assembly: Bundling Bundles    The Assembly concept grew out of a need to bundle together a set of OSGi Bundles to deploy applications. The concept has been developped before the OSGi Deployment Package Service Specification has been published in the Release 4.1 ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Authentication"/>
                         <a href="/confluence/display/SLINGxSITE/Authentication">Authentication</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Authentication    How requests are authenticated.      This page is about how requests are authenticated in Sling. The process of authenticating client requests takes two steps: The first step extracts the credentials from the request and the second step tries to login to the JCR repository Currently ... </div>
        </td>
                                      </tr><tr valign="top">
                           <td><h4 style="margin-top: 0px"><a name="index-B"></a>B</h4>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Bundles"/>
                         <a href="/confluence/display/SLINGxSITE/Bundles">Bundles</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Bundles</div>
        </td>
                                      <td><h4 style="margin-top: 0px"><a name="index-C"></a>C</h4>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Configuration"/>
                         <a href="/confluence/display/SLINGxSITE/Configuration">Configuration</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Configuration Support    Introduction  Configuration in Sling is aligned with respective support by the OSGi specification:    Framework and Java system properties are available through the {{BundleContext.getProperty(String)}} method. These properties are provided in Sling through the Sling launcher.   Bundle Header values are available through ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Content Loading (jcr.contentloader)"/>
                         <a href="/confluence/display/SLINGxSITE/Content+Loading+%28jcr.contentloader%29">Content Loading (jcr.contentloader)</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Content Loading and Nodetype Support  Apache Sling provides support for initial content loading into a repository and for registering node types. The {{slingjcrcontentloader}} bundle provides loading of content from a bundle into the repository and the {{slingjcrbase}} bundle provides node type registration.   Initial ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Contributing"/>
                         <a href="/confluence/display/SLINGxSITE/Contributing">Contributing</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Contributing  Apache Sling is a volunteer effort, so there is always plenty of work that needs to be accomplished. If you want to help support Sling, this page is intended as a starting point for specific contribution ideas. To further understand how the Sling community operates, refer ... </div>
        </td>
                                      </tr><tr valign="top">
                           <td><h4 style="margin-top: 0px"><a name="index-D"></a>D</h4>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Default Mapping and Rendering"/>
                         <a href="/confluence/display/SLINGxSITE/Default+Mapping+and+Rendering">Default Mapping and Rendering</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Default Content Mapping and Request Rendering   Explains default mapping of repository nodes to {{Content}} instances and selection of a default {{Component}}.    20080213: this page is out of sync with the current codebase, needs to be reviewed and updated.     One of the big obstacles in quick adoption of Sling ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Dependency Management"/>
                         <a href="/confluence/display/SLINGxSITE/Dependency+Management">Dependency Management</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Dependency Management   This page is about how we do and don't do dependency management in the Sling project.      Introduction  Maven provides projects with a nice feature called dependency management. In Sling we currently use this feature to declare the nonSling dependencies ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Development"/>
                         <a href="/confluence/display/SLINGxSITE/Development">Development</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Development  Welcome to the wonderful world of extending Sling. Refer to these pages to find out how we envision the extension of Sling and how to do it.    Using Sling as your Development Framework  Look here for more information on developper support when your ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Discover Sling in 15 minutes"/>
                         <a href="/confluence/display/SLINGxSITE/Discover+Sling+in+15+minutes">Discover Sling in 15 minutes</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Discover Sling in 15 minutes the Sling Launchpad  The Sling Launchpad is a readytorun Sling configuration, providing an embedded JCR content repository and web server, a selection of Sling components, and documentation and examples. The Launchpad makes it easy to get started with Sling ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Dispatching Requests"/>
                         <a href="/confluence/display/SLINGxSITE/Dispatching+Requests">Dispatching Requests</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Request Processing   Main process  The following steps should give you an overview how a request is processed in Sling. Details can be found under provided links.   Step 1  The client sends the request   Step 2  This step applies ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Documentation"/>
                         <a href="/confluence/display/SLINGxSITE/Documentation">Documentation</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Documentation  The documentation is splitted into different parts:    Getting Started, the right place to start!   The Sling Engine, all about the heart of Sling   Development, how do I get and develop with Sling   Bundles, which bundle brings which features to Sling ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Downloads"/>
                         <a href="/confluence/display/SLINGxSITE/Downloads">Downloads</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Downloads  To get the latest development release of Apache Sling, you can check out the Source Code Project Information#ProjectInformationsource and Getting and Building Sling yourself. Otherwise, the releases below are available for download. To install, just download and extract. These KEYS ... </div>
        </td>
                                      <td><h4 style="margin-top: 0px"><a name="index-E"></a>E</h4>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Eventing and Jobs"/>
                         <a href="/confluence/display/SLINGxSITE/Eventing+and+Jobs">Eventing and Jobs</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Eventing, Jobs and Scheduling  Apache Sling provides some mechanisms and support for eventing, handling jobs and scheduling.   Possible Use Cases for Eventing  Workflow  Post Processing (business processes)  Caching  Auditing   Sources of Events  There is a variety of sources from which ... </div>
        </td>
                                      </tr><tr valign="top">
                           <td><h4 style="margin-top: 0px"><a name="index-F"></a>F</h4>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Filters"/>
                         <a href="/confluence/display/SLINGxSITE/Filters">Filters</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Servlet Filter Support  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 for the type {{javax.servlet.Filter}} which of course means that the services ... </div>
        </td>
                                      <td><h4 style="margin-top: 0px"><a name="index-G"></a>G</h4>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Getting and Building Sling"/>
                         <a href="/confluence/display/SLINGxSITE/Getting+and+Building+Sling">Getting and Building Sling</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Getting and Building Sling  A quick guide for getting the Sling source, setting up Eclipse, and running the resulting Sling instance.  Note that you don't have to build Sling yourself, if you don't need the bleedingedge stuff you can get ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Getting Started"/>
                         <a href="/confluence/display/SLINGxSITE/Getting+Started">Getting Started</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Getting Started  We're on the way to update the documentation to make it more easy to get in touch with Sling. At the moment we can give you the following starting points:      Where to head from here  We recommend you read through following ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Groovy Support"/>
                         <a href="/confluence/display/SLINGxSITE/Groovy+Support">Groovy Support</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Explains how to add support for Groovy to Apache Sling.    After meeting Paul King of the Groovy Team at Apache Con US 08 in New Orleans, I set out to take a stab at SLING315 again to add Groovy support to Sling ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Guides"/>
                         <a href="/confluence/display/SLINGxSITE/Guides">Guides</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">pages contain further information in a more informal way.     Discover Sling in 15 minutes  title says it all     Resources Presents the Resource as the object around which Sling is built    Servlet Resolution How Sling resolves the servlet or script responsible ... </div>
        </td>
                                      </tr><tr valign="top">
                           <td><h4 style="margin-top: 0px"><a name="index-H"></a>H</h4>
        </td>
                                      <td><h4 style="margin-top: 0px"><a name="index-I"></a>I</h4>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Installing and Upgrading Bundles"/>
                         <a href="/confluence/display/SLINGxSITE/Installing+and+Upgrading+Bundles">Installing and Upgrading Bundles</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Installing and Upgrading Bundles    We recommend to use the Apache Felix Web Console. The documentation below describes the old Sling Management Console, which isn't in use any more. Please refer to the documentation of the Apache Felix Web Console http ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Internationalization Support (i18n)"/>
                         <a href="/confluence/display/SLINGxSITE/Internationalization+Support+%28i18n%29">Internationalization Support (i18n)</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Internationalization Support  Internationalization support in Sling consists of four methods in the {{SlingHttpServletRequest}} interface:    {{getLocale()}} Returns the primary {{Locale}} for the current request. This method is inherited from the {{javax.servlet.ServletRequest}} interface.   {{getLocales()}} Returns the {{Locale}} instances for the current request. This method is inherited from ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Issue Tracker"/>
                         <a href="/confluence/display/SLINGxSITE/Issue+Tracker">Issue Tracker</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Apache Sling uses Jira for tracking bug reports and requests for improvements, new features, and other changes.  The issue tracker is available at https://issues.apache.org/jira/browse/SLING and is readable by everyone. A Jira account is needed to create new issues and to comment ... </div>
        </td>
                                      </tr><tr valign="top">
                           <td><h4 style="margin-top: 0px"><a name="index-J"></a>J</h4>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="JCR Installer (jcr.jcrinstall and osgi.installer)"/>
                         <a href="/confluence/display/SLINGxSITE/JCR+Installer+%28jcr.jcrinstall+and+osgi.installer%29">JCR Installer (jcr.jcrinstall and osgi.installer)</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">JCR installer modules (collectively known as JCRInstall) install OSGi bundles and configurations found in the JCR repository.  The goal is to allow Sling applications to be distributed as "content packages", which install additional services and configurations when copied to the JCR repository.   Example ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="JspC"/>
                         <a href="/confluence/display/SLINGxSITE/JspC">JspC</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Maven JspC Plugin   Compiles JSP scripts into class files and generates Declarative Service Descriptors to register the compiled JSPs as services   The Maven JspC Plugin provides a single goal {{jspc}} which is by default executed in the {{compile}} phase of the Maven build ... </div>
        </td>
                                      <td><h4 style="margin-top: 0px"><a name="index-K"></a>K</h4>
        </td>
                                      </tr><tr valign="top">
                           <td><h4 style="margin-top: 0px"><a name="index-L"></a>L</h4>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Launch Sling"/>
                         <a href="/confluence/display/SLINGxSITE/Launch+Sling">Launch Sling</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Initial Provisioning and Startup    The information presented on this page is currently (13Apr2009) not up to date. We are in the process of updating the site and will also fix this page.     We got a Launch  The most complicated tasks getting Sling or any Sling application up and running ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Links"/>
                         <a href="/confluence/display/SLINGxSITE/Links">Links</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Links  Here are some links to other resources   About Sling    Sling on dev.day.com http://dev.day.com/microsling/content/blogs/main.html?category=sling This blog every now and then contains an interesting article on Sling and microsling. Especially interesting is, that this blog ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Logging"/>
                         <a href="/confluence/display/SLINGxSITE/Logging">Logging</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Logging   Introduction  Logging in Sling is supported by the {{org.apache.sling.commons.log}} bundle, which is one of the first bundles installed and started by the Sling Launcher. The {{org.apache.sling.commons.log}} bundle has the following tasks:    Implements the OSGi Log Service Specification and registers the {{LogService}} and {{LogReader}} services   Exports ... </div>
        </td>
                                      <td><h4 style="margin-top: 0px"><a name="index-M"></a>M</h4>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Managing permissions (jackrabbit.accessmanager)"/>
                         <a href="/confluence/display/SLINGxSITE/Managing+permissions+%28jackrabbit.accessmanager%29">Managing permissions (jackrabbit.accessmanager)</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Managing permissions   The {{jackrabbitaccessmanager}} bundle delivers a REST interface to manipulate users permissions in the JCR. After installing the {{jackrabbitaccessmanager}} bundle the REST services are exposed under the path of the node where you will manipulate the permissions for a user with a specific selector like {{modifyAce ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Managing users and groups (jackrabbit.usermanager)"/>
                         <a href="/confluence/display/SLINGxSITE/Managing+users+and+groups+%28jackrabbit.usermanager%29">Managing users and groups (jackrabbit.usermanager)</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Managing users and groups  The {{jackrabbitusermanager}} bundle delivers a REST interface to create, update and delete users and groups in the JCR. After installing the {{jackrabbitusermanager}} bundle all REST services are exposed under the path /system/userManager.      Create user  To create a new ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Manipulating Content - The SlingPostServlet (servlets.post)"/>
                         <a href="/confluence/display/SLINGxSITE/Manipulating+Content+-+The+SlingPostServlet+%28servlets.post%29">Manipulating Content - The SlingPostServlet (servlets.post)</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Manipulating Content: The SlingPostServlet         Multiple Ways to Modify Content  As always in life there is more than one way to do it. So to modify content in a JCR repository underlying Sling, you have multiple options, two of which are WebDAV and the Sling default ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Mappings for Resource Resolution"/>
                         <a href="/confluence/display/SLINGxSITE/Mappings+for+Resource+Resolution">Mappings for Resource Resolution</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Mappings for Resource Resolution    Configuration    Properties  When dealing with the new resource resolution we have a number of properties influencing the process:  {{sling:match}} This property when set on a node in the {{/etc/map}} tree (see below) defines a partial regular ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="MavenTipsAndTricks"/>
                         <a href="/confluence/display/SLINGxSITE/MavenTipsAndTricks">MavenTipsAndTricks</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Here's our collection of tips and tricks for building Sling with Maven http://maven.apache.org.   Maven local repository  The first time you run a Maven build, or when Maven needs additional build components, it downloads plugins and dependencies under its ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Media"/>
                         <a href="/confluence/display/SLINGxSITE/Media">Media</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">page holds all media required for the Apache Sling website. The media are attachments and can be addressed using the following URL: http://cwiki.apache.org/SLINGxSITE/media.data/ (followed by the actual name of the attachment).  Currently, some of these attachments are used by the overall site template ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="MIME Type Support (commons.mime)"/>
                         <a href="/confluence/display/SLINGxSITE/MIME+Type+Support+%28commons.mime%29">MIME Type Support (commons.mime)</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">MIME Type Support  Support for MIME type mappings is generally a problematic issue. On the one hand applications have to take care to stay up to date with their mappings on the other hands in web applications it is tedious to maintain the mappings. Apache Sling takes ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Monitoring Requests"/>
                         <a href="/confluence/display/SLINGxSITE/Monitoring+Requests">Monitoring Requests</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Monitoring Requests  Sling provides a simple OSGi console plugin to monitor recent requests. This is quite useful when debugging and to understand how things work, though it's obviously not a replacement for fullblown HTTP trafic monitoring tools.  The console plugin is available ... </div>
        </td>
                                      </tr><tr valign="top">
                           <td><h4 style="margin-top: 0px"><a name="index-N"></a>N</h4>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Navigation"/>
                         <a href="/confluence/display/SLINGxSITE/Navigation">Navigation</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Documentation\\ Getting Started\\ The Sling Engine\\ Development\\ Bundles\\ Tutorials & HowTos\\ Configuration\\ API docs http://sling.apache.org/apidocs/sling5/index.html\\ Wiki http://cwiki.apache.org/SLING/\\ FAQ http://cwiki.apache.org/SLING/faq.html\\  Project info\\ Downloads http://sling.apache.org ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="News"/>
                         <a href="/confluence/display/SLINGxSITE/News">News</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">News    New releases: Apache Sling API 2.0.6 and Apache Sling JCR API 2.0.4 (August 17, 2009)  Apache Sling OSGi LogService Implementation, Version 2.0.6, is released (August 5, 2009)  Ian Boston added as a member ... </div>
        </td>
                                      <td><h4 style="margin-top: 0px"><a name="index-O"></a>O</h4>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Old Stuff"/>
                         <a href="/confluence/display/SLINGxSITE/Old+Stuff">Old Stuff</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Should either be deleted or reviewed and updated to match the current code</div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Output Rewriting Pipelines (org.apache.sling.rewriter)"/>
                         <a href="/confluence/display/SLINGxSITE/Output+Rewriting+Pipelines+%28org.apache.sling.rewriter%29">Output Rewriting Pipelines (org.apache.sling.rewriter)</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Apache Sling Rewriter  The Apache Sling Rewriter is a module for rewriting the output generated by a usual Sling rendering process. Some possible use cases include rewriting or checking all links in an html page, manipulating the html page, or using ... </div>
        </td>
                                      </tr><tr valign="top">
                           <td><h4 style="margin-top: 0px"><a name="index-P"></a>P</h4>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Plugins"/>
                         <a href="/confluence/display/SLINGxSITE/Plugins">Plugins</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">pages present the various Maven Plugins of Sling</div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Project Information"/>
                         <a href="/confluence/display/SLINGxSITE/Project+Information">Project Information</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Sling project information  This document provides an overview of the various documents and links that are part of this project's general information:   Community Roles and Processes Apache Sling Community Roles and Processes  Project Team  Mailing Lists #lists  Issue Tracking #issues ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Project License"/>
                         <a href="/confluence/display/SLINGxSITE/Project+License">Project License</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Apache License               Version 2.0, January 2004             http://www.apache.org/licenses/    TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION    1. Definitions.     "License" shall mean the terms and conditions for use, reproduction,    and distribution as defined by Sections 1 through 9 of this document ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Project Team"/>
                         <a href="/confluence/display/SLINGxSITE/Project+Team">Project Team</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Project Team  A successful project requires many people to play many roles. Some members write code or documentation, while others are valuable as testers, submitting patches and suggestions.  The team is comprised of Committers and Contributors. Committers have direct access ... </div>
        </td>
                                      <td><h4 style="margin-top: 0px"><a name="index-Q"></a>Q</h4>
        </td>
                                      </tr><tr valign="top">
                           <td><h4 style="margin-top: 0px"><a name="index-R"></a>R</h4>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Release Management"/>
                         <a href="/confluence/display/SLINGxSITE/Release+Management">Release Management</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Release Management   Sling releases (and SNAPSHOTS) are deployed to the Nexus repository http://repository.apache.org instead of the traditional deployment via the Maven 2 mirros source on {{people.apache.org}}. This makes the release process much leaner and simpler. In addtion we can benefit from ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Repository Based Development"/>
                         <a href="/confluence/display/SLINGxSITE/Repository+Based+Development">Repository Based Development</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Repository Based Development      WebDAV Support  WebDAV support in Sling is based on the Simple WebDAV http://jackrabbit.apache.org/doc/components/jcrserver.html implementation of Apache Jackrabbit which is integrated in the {{jcr/webdav}} project. This bundle provides WebDAV access to Sling's repository ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Request Parameters"/>
                         <a href="/confluence/display/SLINGxSITE/Request+Parameters">Request Parameters</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Request Parameter Handling in Sling   Explains how Sling provides request parameters to the {{Component}}.    Servlet API  The Servlet API specification provides the following methods to access the parameters of a request   {{HttpServletRequest.getQueryString()}}  Returns the query part of the request URL   {{ServletRequest.getParameter(String ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Request Processing"/>
                         <a href="/confluence/display/SLINGxSITE/Request+Processing">Request Processing</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">HTTP Request Processing    20080213: this page is out of sync with the current codebase, needs to be reviewed and updated.    One of the core problems towards understanding how Sling works is knowing how a Client Request is processed by Sling. This page describes the flow of processing ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Resources"/>
                         <a href="/confluence/display/SLINGxSITE/Resources">Resources</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Resources    What is a Resource The Resource is one of the central parts of Sling. Extending from JCR's Everything is Content, Sling assumes Everthing is a Resource. Thus Sling is maintaining a virtual tree of resources, which is a merger of the actual contents in the JCR Repository and resources ... </div>
        </td>
                                      <td><h4 style="margin-top: 0px"><a name="index-S"></a>S</h4>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="ScriptEngineIntegration"/>
                         <a href="/confluence/display/SLINGxSITE/ScriptEngineIntegration">ScriptEngineIntegration</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Integrating Scripting Languages  This page should be extended with more concrete and detailed information. For now, we have the following information:    There will be a talk at ApacheCon US 08 in New Orleans about creating JSR223 ScriptEngineFactory and ScriptEngine implementaitons as well as how to integrate ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Servlet Resolution"/>
                         <a href="/confluence/display/SLINGxSITE/Servlet+Resolution">Servlet Resolution</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Servlet Resolution    Please note that the description on this page is out of sync with the most recent developments going on as part of implementing issue SLING387 https://issues.apache.org/jira/browse/SLING387. See the links to integration tests at the end of this page for the Current Truth.  Please see ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Servlets"/>
                         <a href="/confluence/display/SLINGxSITE/Servlets">Servlets</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Servlets and Scripts  Servlets can be registered as OSGi services. The following service reference properties are defined for Servlets defined as OSGi services of type {{javax.servlet.Servlet}}:    Name  Description    {{sling.servlet.paths}}  A list of absolute paths under which the servlet is accessible as a Resource. The property ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Sling"/>
                         <a href="/confluence/display/SLINGxSITE/Sling">Sling</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Maven Sling Plugin  The Maven Sling Plugin provides a number of goals which may be of help while developping bundles for Sling. To run the plugin you need at least Maven 2.x and JDK 1.5 or higher. Maven Sling Plugin provides ... </div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Sling API"/>
                         <a href="/confluence/display/SLINGxSITE/Sling+API">Sling API</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Sling API     The contents of this page is being created at the moment. It contains incomplete and partially wrong information as the text is adapted from the contents of the Component API documentation page.      Introduction  The Sling API defines a presentation framework to build Web Applications. As such the Sling ... </div>
        </td>
                                      </tr><tr valign="top">
                           <td><h4 style="margin-top: 0px"><a name="index-T"></a>T</h4>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="The Sling Engine"/>
                         <a href="/confluence/display/SLINGxSITE/The+Sling+Engine">The Sling Engine</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Sling Engine   Architecture  Dispatching Requests  Filters  Servlets and Scripts Servlets  URL decomposition  Request Parameters  Default Mapping and Rendering  Resources  Mappings for Resource Resolution  Adapters  Authentication  Eventing and Jobs</div>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="Tutorials &amp; How-Tos"/>
                         <a href="/confluence/pages/viewpage.action?pageId=119113">Tutorials &amp; How-Tos</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Tutorials & HowTos</div>
        </td>
                                      <td><h4 style="margin-top: 0px"><a name="index-U"></a>U</h4>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="URL decomposition"/>
                         <a href="/confluence/display/SLINGxSITE/URL+decomposition">URL decomposition</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">URL decomposition  During the Resource Resolution step, the client request URL is decomposed into the following parts:  # Resource Path  The longest substring of the request URL such that the resource path is either the complete request URL or the next character in the request URL after the resource ... </div>
        </td>
                                      </tr><tr valign="top">
                           <td><h4 style="margin-top: 0px"><a name="index-V"></a>V</h4>
        </td>
                                      <td><h4 style="margin-top: 0px"><a name="index-W"></a>W</h4>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="wiki"/>
                         <a href="/confluence/display/SLINGxSITE/wiki">wiki</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Apache Sling Website    The Apache Sling project uses a Confluence space for documentation purposes and to generate the static Sling web site. You are currently looking at the source wiki. End users should generally use the static, generated pages, at http ... </div>
        </td>
                                      </tr><tr valign="top">
                           <td><h4 style="margin-top: 0px"><a name="index-X"></a>X</h4>
                                 <img src="/confluence/images/icons/docs_16.gif" height="16" width="16" border="0" align="absmiddle" title="XSLT Processing Pipeline"/>
                         <a href="/confluence/display/SLINGxSITE/XSLT+Processing+Pipeline">XSLT Processing Pipeline</a>
        <br />
             <div class="smalltext" style="margin: 0 0 0 36px">Explains how to use the XSLT processing support (script extension {{.xpl}})  In the Apache Sling Scripting W3C XML Processing Support bundle, Juanjo Vázquez has implemented XSLT processing support for Sling as another new scripting engine, based ... </div>
        </td>
                                      <td><h4 style="margin-top: 0px"><a name="index-Y"></a>Y</h4>
        </td>
                                      </tr><tr valign="top">
                           <td><h4 style="margin-top: 0px"><a name="index-Z"></a>Z</h4>
        </td>
                                      <td><h4 style="margin-top: 0px"><a name="index-%21@%23%24"></a>!@#$</h4>
        </td>
                                          </tr>
</table>
</p>
</em> where index is the index of the transformer starting with 1. For example if you have a pipeline with the following transformers, xslt, html-cleaner, xslt, link-checker, then the configuration nodes should be named <em>transformer-1</em> (for the first xslt), <em>transformer-html-cleaner</em>, <em>transformer-3</em> (for the second xslt), and <em>transformer-link-checker</em>.</p>


<h3><a name="OutputRewritingPipelines%28org.apache.sling.rewriter%29-DefaultPipeline"></a>Default Pipeline</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.<br/>
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 name="OutputRewritingPipelines%28org.apache.sling.rewriter%29-ImplementingPipelineComponents"></a>Implementing Pipeline Components</h2>

<p>Each pipeline component type has a corresponding Java interface (Generator, Transformer, and Serializer) together with a factory interface (GeneratorFactory, TransformerFactory, and SerializerFactory). When implementing such a component, both interfaces need to be implemented. The factory has only one method which creates a new instance of that type for the current request. The factory has to be registered as a service. For example if you're using the Maven SCR plugin, it looks like this:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
@scr.component metatype=<span class="code-quote">"no"</span> 
@scr.service <span class="code-keyword">interface</span>=<span class="code-quote">"TransformerFactory"</span>
@scr.property value=<span class="code-quote">"pipeline.type"</span> value=<span class="code-quote">"validator"</span>
</pre>
</div></div>

<p>The factory needs to implement the according interface and should be registered as a service for this factory interface (this is a plain service and not a factory service in the OSGi sense). Each factory gets a unique name through the <em>pipeline.type</em> property. The pipeline configuration in the repository just references this unique name (like validator).</p>

<h2><a name="OutputRewritingPipelines%28org.apache.sling.rewriter%29-ExtendingthePipeline"></a>Extending the Pipeline</h2>
<p>With the possibilities from above, it is possible to define new pipelines and add custom components to the pipeline. However, in some cases it is required to just add a custom transformer to the existing pipeline. Therefore the rewriting can be configured with pre and post transformers that are simply added to each configured pipeline. This allows a more flexible way of customizing the pipeline without changing/adding a configuration in the repository.</p>

<p>The approach here is nearly the same. A transformer factory needs to be implemented, but instead of giving this factory a unique name, this factory is marked as a global factory:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
@scr.component metatype=<span class="code-quote">"no"</span>
@scr.service <span class="code-keyword">interface</span>=<span class="code-quote">"TransformerFactory"</span>
@scr.property name=<span class="code-quote">"pipeline.mode"</span> value=<span class="code-quote">"global"</span>
@scr.property name=<span class="code-quote">"service.ranking"</span> value=<span class="code-quote">"RANKING"</span> type=<span class="code-quote">"<span class="code-object">Integer</span>"</span>
</pre>
</div></div>
<p><em>RANKING</em> is an integer value (don't forget the type attribute otherwise the ranking is interpreted as zero!) specifying where to add the transformer in the pipeline. If the value is less than zero the transformer is added at the beginning of the pipeline right after the generator. If the ranking is equal or higher as zero, the transformer is added at the end of the pipeline before the serializer.</p>

<p>The <em>TransformerFactory</em> interface has just one method which returns a new transformer instance. If you plan to use other services in your transformer you might declare the references on the factory and pass in the instances into the newly created transformer.</p>


<h2><a name="OutputRewritingPipelines%28org.apache.sling.rewriter%29-ImplementingaProcessor"></a>Implementing a Processor</h2>
<p>A processor must conform to the Java interface <em>org.apache.sling.rewriter.Processor</em>. It gets initializd (method <em>init</em>) with the <em>ProcessingContext</em>. This context contains all necessary information for the current request (especially the output writer to write the rewritten content to).<br/>
The <em>getWriter</em> method should return a writer where the output is written to. When the output is written or an error occured <em>finished</em> is called.</p>

<p>Like the pipeline components a processor is generated by a factory which has to be registered as a service factory, like this:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
@scr.component metatype=<span class="code-quote">"no"</span> 
@scr.service <span class="code-keyword">interface</span>=<span class="code-quote">"ProcessorFactory"</span>
@scr.property value=<span class="code-quote">"pipeline.type"</span> value=<span class="code-quote">"uniqueName"</span>
</pre>
</div></div>

<h2><a name="OutputRewritingPipelines%28org.apache.sling.rewriter%29-ConfiguringaProcessor"></a>Configuring a Processor</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 pipeline should be used for (optional)</li>
	<li>resourceTypes (multi value string) - the resource types this pipeline should be used for (optional)</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>


     </div>
     <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href="http://cwiki.apache.org/confluence/users/viewnotifications.action" class="grey">Change Notification Preferences</a>
       </div>

       <a href="http://cwiki.apache.org/confluence/display/SLINGxSITE/Output+Rewriting+Pipelines+%28org.apache.sling.rewriter%29">View Online</a>
       |
       <a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=115997&revisedVersion=9&originalVersion=8">View Change</a>
              |
       <a href="http://cwiki.apache.org/confluence/display/SLINGxSITE/Output+Rewriting+Pipelines+%28org.apache.sling.rewriter%29?showComments=true&amp;showCommentArea=true#addcomment">Add Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message