Modified: websites/staging/sling/trunk/content/index.html ============================================================================== --- websites/staging/sling/trunk/content/index.html (original) +++ websites/staging/sling/trunk/content/index.html Tue Sep 22 10:23:16 2015 @@ -18,11 +18,11 @@ limitations under the License. --> <head> + <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Apache Sling - Apache Sling - Bringing Back the Fun!</title> <link rel="icon" href="/res/favicon.ico"> <link rel="stylesheet" href="/res/site.css" type="text/css" media="all"> <link rel="stylesheet" href="/res/codehilite.css" type="text/css" media="all"> - <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> </head> <body> <div class="title"> @@ -39,7 +39,18 @@ </div> <div class="menu"> - <p><strong><a href="/documentation.html">Documentation</a></strong> <br /> + <style type="text/css"> +/* The following code is added by mdx_elementid.py + It was originally lifted from http://subversion.apache.org/style/site.css */ +/* + * Hide class="elementid-permalink", except when an enclosing heading + * has the :hover property. + */ +.headerlink, .elementid-permalink { + visibility: hidden; +} +h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style> +<p><strong><a href="/documentation.html">Documentation</a></strong> <br /> <a href="/documentation/getting-started.html">Getting Started</a> <br /> <a href="/documentation/the-sling-engine.html">The Sling Engine</a> <br /> <a href="/documentation/development.html">Development</a> <br /> @@ -90,11 +101,22 @@ <h1>Apache Sling - Bringing Back the Fun!</h1> - <p><strong>Apache Sling™</strong> is an innovative web framework that is intended to + <style type="text/css"> +/* The following code is added by mdx_elementid.py + It was originally lifted from http://subversion.apache.org/style/site.css */ +/* + * Hide class="elementid-permalink", except when an enclosing heading + * has the :hover property. + */ +.headerlink, .elementid-permalink { + visibility: hidden; +} +h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style> +<p><strong>Apache Sling™</strong> is an innovative web framework that is intended to bring back the fun to web development.</p> <p>Discussions about Sling happen on our mailing lists, see the <a href="/project-information.html">Project Information</a> page for more info.</p> -<h1 id="apache-sling-in-five-bullets-points">Apache Sling in five bullets points</h1> +<h1 id="apache-sling-in-five-bullets-points">Apache Sling in five bullets points<a class="headerlink" href="#apache-sling-in-five-bullets-points" title="Permanent link">¶</a></h1> <ul> <li>REST based web framework</li> <li>Content-driven, using a JCR content repository</li> @@ -103,7 +125,7 @@ bring back the fun to web development.</ etc.)</li> <li>Apache Open Source project</li> </ul> -<h1 id="apache-sling-in-a-hundred-words">Apache Sling in a hundred words</h1> +<h1 id="apache-sling-in-a-hundred-words">Apache Sling in a hundred words<a class="headerlink" href="#apache-sling-in-a-hundred-words" title="Permanent link">¶</a></h1> <p>Apache Sling is a web framework that uses a <a href="http://en.wikipedia.org/wiki/JSR-170">Java Content Repository</a>, such as <a href="http://jackrabbit.apache.org/">Apache Jackrabbit</a>, to store and manage content.</p> <p>Sling applications use either scripts or Java servlets, selected based on simple name conventions, to process HTTP requests in a RESTful way.</p> @@ -115,12 +137,12 @@ runtime.</p> Java Content Repositories, Sling makes it very simple to implement simple applications, while providing an enterprise-level framework for more complex applications. </p> -<h2 id="news">News</h2> +<h2 id="news">News<a class="headerlink" href="#news" title="Permanent link">¶</a></h2> <ul id="newsExcerpt"> </ul> <p>Refer to the news <a href="/news.html">archive</a> for all news.</p> -<h2 id="history">History</h2> +<h2 id="history">History<a class="headerlink" href="#history" title="Permanent link">¶</a></h2> <p>Sling started as an internal project at <a href="http://www.day.com">Day Software</a> , and entered the Apache Incubator in September 2007. As of June, 17th, 2009 Apache Sling is a top level project of the Apache Software Foundation.</p> @@ -132,12 +154,12 @@ uses to slay the giant Goliath is a slin [David Nuescheler, CTO of Day Software] favorite weapon.</p> <p>It is also the simplest device for delivering content very fast.</p> </blockquote> -<h2 id="getting-started">Getting started</h2> +<h2 id="getting-started">Getting started<a class="headerlink" href="#getting-started" title="Permanent link">¶</a></h2> <p>If you prefer doing rather than reading, please proceed to <a href="/documentation/getting-started/discover-sling-in-15-minutes.html">Discover Sling in 15 minutes</a> or read through the recommended links in the <a href="/documentation/getting-started.html">Getting Started</a> section, where you can quickly get started on your own instance of Sling.</p> -<h2 id="use-cases-for-sling">Use Cases for Sling</h2> -<h4 id="wiki">Wiki</h4> +<h2 id="use-cases-for-sling">Use Cases for Sling<a class="headerlink" href="#use-cases-for-sling" title="Permanent link">¶</a></h2> +<h4 id="wiki">Wiki<a class="headerlink" href="#wiki" title="Permanent link">¶</a></h4> <p>Day built a Wiki system on Sling. Each Wiki page is a node (with optional child nodes) in the repository. As a page is requested, the respective node is accessed and through the applying Component is rendered.</p> @@ -150,14 +172,14 @@ happens to be in a node nested below the using the URL of the wiki page attaching the relative path of the attachement ode. The system resolves the URL to the attachement Content and just calls the attachement's Component to spool the attachement.</p> -<h4 id="digital-asset-management">Digital Asset Management</h4> +<h4 id="digital-asset-management">Digital Asset Management<a class="headerlink" href="#digital-asset-management" title="Permanent link">¶</a></h4> <p>Day has implemented a Digital Asset Management (DAM) Application based on Sling. Thanks to the flexibility of the Content/Component combo as well as the service registration/access functionality offered by OSGi, extending DAM for new content type is merely a matter of implementing one or two interfaces and registering the respective service(s).</p> <p>Again, the managed assets may be easily spooled by directly accessing them.</p> -<h4 id="web-content-management">Web Content Management</h4> +<h4 id="web-content-management">Web Content Management<a class="headerlink" href="#web-content-management" title="Permanent link">¶</a></h4> <p>Last but not least, Sling offers itself very well to implementing a Web Content Management system. Thanks to the flexibility of rendering the output - remember: the system does not care what to render, as long as the @@ -165,22 +187,22 @@ URL resolves to a Content object for whi called to render the Content - providing support for Web Content authors (not PHP programmers but users out in the field) to build pages to their likings can easily be done.</p> -<h2 id="references">References</h2> -<h4 id="apache-jackrabbit">Apache Jackrabbit</h4> +<h2 id="references">References<a class="headerlink" href="#references" title="Permanent link">¶</a></h2> +<h4 id="apache-jackrabbit">Apache Jackrabbit<a class="headerlink" href="#apache-jackrabbit" title="Permanent link">¶</a></h4> <p>The main purpose of Sling is to develop a content-centric Web Application framework for Java Content Repository (JCR) based data stores. Sling is implemented - with the notable exception of JCR Node Type management - purely in terms of the JCR API and as such may use any JCR compliant repository. The default implementation for <a href="http://jackrabbit.apache.org">Apache Jackrabbit</a> is provided out of the box.</p> -<h4 id="osgi">OSGi</h4> +<h4 id="osgi">OSGi<a class="headerlink" href="#osgi" title="Permanent link">¶</a></h4> <p>Sling is implemented as a series of <a href="http://www.osgi.org">OSGi</a> Bundles and makes extensive use of the OSGi functionality, such as lifecycle management and the service layer. In addition, Sling requires several OSGi compendium services to be available, such as the Log Service, Http Service, Configuration Admin Service, Metatype Service, and Declarative Services.</p> -<h4 id="apache-felix">Apache Felix</h4> +<h4 id="apache-felix">Apache Felix<a class="headerlink" href="#apache-felix" title="Permanent link">¶</a></h4> <p>While Sling does not require a specific OSGi framework implementation to run in, Sling is being developed using <a href="http://felix.apache.org">Apache Felix</a> as the OSGi framework implementation. It has not been tested yet, but it @@ -197,7 +219,7 @@ such as <a href="http://www.eclipse.org/ }); </script> <div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;"> - Rev. 1627541 by olli on Thu, 25 Sep 2014 13:32:31 +0000 + Rev. 1692085 by rombert on Tue, 21 Jul 2015 11:04:15 +0000 </div> <div class="trademarkFooter"> Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project
Modified: websites/staging/sling/trunk/content/links.html ============================================================================== --- websites/staging/sling/trunk/content/links.html (original) +++ websites/staging/sling/trunk/content/links.html Tue Sep 22 10:23:16 2015 @@ -18,11 +18,11 @@ limitations under the License. --> <head> + <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Apache Sling - Links</title> <link rel="icon" href="/res/favicon.ico"> <link rel="stylesheet" href="/res/site.css" type="text/css" media="all"> <link rel="stylesheet" href="/res/codehilite.css" type="text/css" media="all"> - <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> </head> <body> <div class="title"> @@ -39,7 +39,18 @@ </div> <div class="menu"> - <p><strong><a href="/documentation.html">Documentation</a></strong> <br /> + <style type="text/css"> +/* The following code is added by mdx_elementid.py + It was originally lifted from http://subversion.apache.org/style/site.css */ +/* + * Hide class="elementid-permalink", except when an enclosing heading + * has the :hover property. + */ +.headerlink, .elementid-permalink { + visibility: hidden; +} +h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style> +<p><strong><a href="/documentation.html">Documentation</a></strong> <br /> <a href="/documentation/getting-started.html">Getting Started</a> <br /> <a href="/documentation/the-sling-engine.html">The Sling Engine</a> <br /> <a href="/documentation/development.html">Development</a> <br /> @@ -90,14 +101,25 @@ <h1>Links</h1> - <p>Here are some links to other resources</p> -<h2 id="articles">Articles</h2> + <style type="text/css"> +/* The following code is added by mdx_elementid.py + It was originally lifted from http://subversion.apache.org/style/site.css */ +/* + * Hide class="elementid-permalink", except when an enclosing heading + * has the :hover property. + */ +.headerlink, .elementid-permalink { + visibility: hidden; +} +h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style> +<p>Here are some links to other resources</p> +<h2 id="articles">Articles<a class="headerlink" href="#articles" title="Permanent link">¶</a></h2> <ul> <li><a href="http://java.dzone.com/articles/java-content-repository-best">Java Content Repository: The Best Of Both Worlds</a> - by Bertrand Delacretaz on Javalobby - uses the Sling HTTP interface to demonstrate JCR features.</li> <li><a href="http://www.lucamasini.net/Home/sling-and-cq5/accessing-relational-data-as-sling-restful-urls">Accessing Relational Data as SLING RESTful URLs</a> - by Luca Masini</li> <li><a href="http://confluence.sakaiproject.org/display/KERNDOC/Your+First+Day+With+Sakai+Nakamura">Your First Day With Sakai Nakamura</a> - Sakai Nakamura is based on Sling, that introductory article has very good explanations of REST and Sling basics, and on why hierarchies are useful on the Web.</li> </ul> -<h2 id="about-sling">About Sling</h2> +<h2 id="about-sling">About Sling<a class="headerlink" href="#about-sling" title="Permanent link">¶</a></h2> <ul> <li><a href="http://dev.day.com/microsling/content/blogs/main.html?category=sling">Sling on dev.day.com</a> - Day's developers blog, regularly includes articles on Sling and JCR. Powered by Sling, of course.</li> <li><a href="http://weblogs.goshaky.com/weblogs/lars/tags/sling">Sling on Lars Trieloff's Blog</a> - Lars regularly writes on his experiences with Sling. Most notably the mini series of three entries introducing Sling and microsling.</li> @@ -106,11 +128,11 @@ <li><a href="https://www.ohloh.net/p/sling">Sling on ohloh</a> - activity and community statistics.</li> <li><a href="http://sling.markmail.org/">Sling on MarkMail</a> - searchable mailing list archives.</li> </ul> -<h2 id="projects-using-sling">Projects using Sling</h2> +<h2 id="projects-using-sling">Projects using Sling<a class="headerlink" href="#projects-using-sling" title="Permanent link">¶</a></h2> <ul> <li>Gert Vanthienen succeeded in installing Sling into the new Apache ServiceMix kernel and documented his experience <a href="http://servicemix.apache.org/SMX4KNL/running-apache-sling-on-servicemix-kernel.html">Sling On ServiceMix Kernel</a></li> </ul> -<h2 id="sling-presentations-and-screencasts">Sling Presentations and Screencasts</h2> +<h2 id="sling-presentations-and-screencasts">Sling Presentations and Screencasts<a class="headerlink" href="#sling-presentations-and-screencasts" title="Permanent link">¶</a></h2> <ul> <li><a href="http://www.slideshare.net/tag/sling">Presentations tagged with "sling" at slideshare</a> </li> </ul> @@ -119,17 +141,17 @@ <li><a href="http://dev.day.com/microsling/content/blogs/main/firststeps1.html">First Steps with CRX Quickstart</a></li> <li><a href="http://dev.day.com/microsling/content/blogs/main/firststeps2.html">TheServerSide.com in 15 minutes</a></li> </ul> -<h2 id="from-apachecon-eu-08">From ApacheCon EU 08</h2> +<h2 id="from-apachecon-eu-08">From ApacheCon EU 08<a class="headerlink" href="#from-apachecon-eu-08" title="Permanent link">¶</a></h2> <ul> <li><a href="/res/docs/ApacheConEU08_FFT_Sling.pdf">ApacheCon EU 08 Fast Feather Track Presentation on Sling</a></li> <li><a href="/res/docs/ApacheConEU08_JCR_Meetup_Sling_Architecture.pdf">JCR Meetup Presentation on Sling Architecture</a></li> </ul> -<h2 id="from-apachecon-us-07">From ApacheCon US 07</h2> +<h2 id="from-apachecon-us-07">From ApacheCon US 07<a class="headerlink" href="#from-apachecon-us-07" title="Permanent link">¶</a></h2> <ul> <li><a href="/res/docs/ApacheConUS07_FFT_Sling.pdf">ApacheCon US 07 Fast Feather Track Presentation on Sling</a></li> <li><a href="http://feathercast.org/?p=59">Feathercast On Day 4 with an interview on Sling with Felix</a></li> </ul> -<h2 id="technology-used-by-sling">Technology used by Sling</h2> +<h2 id="technology-used-by-sling">Technology used by Sling<a class="headerlink" href="#technology-used-by-sling" title="Permanent link">¶</a></h2> <ul> <li><a href="http://jackrabbit.apache.org">Apache Jackrabbit</a> - The reference implementation of the Content Repository for Java (JCR) Specification. This implementation is used in Sling as the primary repository.</li> <li><a href="http://www.jcp.org/en/jsr/detail?id=170">JSR 170: Content Repository for Java{tm} technology API</a> - The specification of the repository API.</li> Modified: websites/staging/sling/trunk/content/media.html ============================================================================== --- websites/staging/sling/trunk/content/media.html (original) +++ websites/staging/sling/trunk/content/media.html Tue Sep 22 10:23:16 2015 @@ -18,11 +18,11 @@ limitations under the License. --> <head> + <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Apache Sling - Media</title> <link rel="icon" href="/res/favicon.ico"> <link rel="stylesheet" href="/res/site.css" type="text/css" media="all"> <link rel="stylesheet" href="/res/codehilite.css" type="text/css" media="all"> - <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> </head> <body> <div class="title"> @@ -39,7 +39,18 @@ </div> <div class="menu"> - <p><strong><a href="/documentation.html">Documentation</a></strong> <br /> + <style type="text/css"> +/* The following code is added by mdx_elementid.py + It was originally lifted from http://subversion.apache.org/style/site.css */ +/* + * Hide class="elementid-permalink", except when an enclosing heading + * has the :hover property. + */ +.headerlink, .elementid-permalink { + visibility: hidden; +} +h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style> +<p><strong><a href="/documentation.html">Documentation</a></strong> <br /> <a href="/documentation/getting-started.html">Getting Started</a> <br /> <a href="/documentation/the-sling-engine.html">The Sling Engine</a> <br /> <a href="/documentation/development.html">Development</a> <br /> @@ -95,7 +106,18 @@ <h1>Media</h1> - <p>This 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).</p> + <style type="text/css"> +/* The following code is added by mdx_elementid.py + It was originally lifted from http://subversion.apache.org/style/site.css */ +/* + * Hide class="elementid-permalink", except when an enclosing heading + * has the :hover property. + */ +.headerlink, .elementid-permalink { + visibility: hidden; +} +h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style> +<p>This 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).</p> <p>Currently, some of these attachments are used by the overall site template (only visible/editable by Confluence administrators).</p> <p>{attachments}</p> <div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;"> Modified: websites/staging/sling/trunk/content/news.html ============================================================================== --- websites/staging/sling/trunk/content/news.html (original) +++ websites/staging/sling/trunk/content/news.html Tue Sep 22 10:23:16 2015 @@ -18,11 +18,11 @@ limitations under the License. --> <head> + <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Apache Sling - News</title> <link rel="icon" href="/res/favicon.ico"> <link rel="stylesheet" href="/res/site.css" type="text/css" media="all"> <link rel="stylesheet" href="/res/codehilite.css" type="text/css" media="all"> - <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> </head> <body> <div class="title"> Modified: websites/staging/sling/trunk/content/old-stuff.html ============================================================================== --- websites/staging/sling/trunk/content/old-stuff.html (original) +++ websites/staging/sling/trunk/content/old-stuff.html Tue Sep 22 10:23:16 2015 @@ -18,11 +18,11 @@ limitations under the License. --> <head> + <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Apache Sling - Old Stuff</title> <link rel="icon" href="/res/favicon.ico"> <link rel="stylesheet" href="/res/site.css" type="text/css" media="all"> <link rel="stylesheet" href="/res/codehilite.css" type="text/css" media="all"> - <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> </head> <body> <div class="title"> @@ -39,7 +39,18 @@ </div> <div class="menu"> - <p><strong><a href="/documentation.html">Documentation</a></strong> <br /> + <style type="text/css"> +/* The following code is added by mdx_elementid.py + It was originally lifted from http://subversion.apache.org/style/site.css */ +/* + * Hide class="elementid-permalink", except when an enclosing heading + * has the :hover property. + */ +.headerlink, .elementid-permalink { + visibility: hidden; +} +h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style> +<p><strong><a href="/documentation.html">Documentation</a></strong> <br /> <a href="/documentation/getting-started.html">Getting Started</a> <br /> <a href="/documentation/the-sling-engine.html">The Sling Engine</a> <br /> <a href="/documentation/development.html">Development</a> <br /> @@ -95,7 +106,18 @@ <h1>Old Stuff</h1> - <p>Should either be deleted or reviewed and updated to match the current code:</p> + <style type="text/css"> +/* The following code is added by mdx_elementid.py + It was originally lifted from http://subversion.apache.org/style/site.css */ +/* + * Hide class="elementid-permalink", except when an enclosing heading + * has the :hover property. + */ +.headerlink, .elementid-permalink { + visibility: hidden; +} +h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style> +<p>Should either be deleted or reviewed and updated to match the current code:</p> <ul> <li><a href="/old-stuff/assembly.html">Assembly</a></li> <li><a href="/old-stuff/launch-sling.html">Launch Sling</a></li> Modified: websites/staging/sling/trunk/content/old-stuff/assembly.html ============================================================================== --- websites/staging/sling/trunk/content/old-stuff/assembly.html (original) +++ websites/staging/sling/trunk/content/old-stuff/assembly.html Tue Sep 22 10:23:16 2015 @@ -18,11 +18,11 @@ limitations under the License. --> <head> + <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Apache Sling - Assembly</title> <link rel="icon" href="/res/favicon.ico"> <link rel="stylesheet" href="/res/site.css" type="text/css" media="all"> <link rel="stylesheet" href="/res/codehilite.css" type="text/css" media="all"> - <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> </head> <body> <div class="title"> @@ -39,7 +39,18 @@ </div> <div class="menu"> - <p><strong><a href="/documentation.html">Documentation</a></strong> <br /> + <style type="text/css"> +/* The following code is added by mdx_elementid.py + It was originally lifted from http://subversion.apache.org/style/site.css */ +/* + * Hide class="elementid-permalink", except when an enclosing heading + * has the :hover property. + */ +.headerlink, .elementid-permalink { + visibility: hidden; +} +h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style> +<p><strong><a href="/documentation.html">Documentation</a></strong> <br /> <a href="/documentation/getting-started.html">Getting Started</a> <br /> <a href="/documentation/the-sling-engine.html">The Sling Engine</a> <br /> <a href="/documentation/development.html">Development</a> <br /> @@ -90,24 +101,35 @@ <h1>Assembly</h1> - <p>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 Compendium Services Specification. It will have to be discussed whether the Assembly concept is dropped in favor of the Deplyoment Package Service.</p> -<h2 id="introduction">Introduction</h2> + <style type="text/css"> +/* The following code is added by mdx_elementid.py + It was originally lifted from http://subversion.apache.org/style/site.css */ +/* + * Hide class="elementid-permalink", except when an enclosing heading + * has the :hover property. + */ +.headerlink, .elementid-permalink { + visibility: hidden; +} +h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style> +<p>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 Compendium Services Specification. It will have to be discussed whether the Assembly concept is dropped in favor of the Deplyoment Package Service.</p> +<h2 id="introduction">Introduction<a class="headerlink" href="#introduction" title="Permanent link">¶</a></h2> <p>This chapter discusses the units of deployment as well as the units of functionality. The following contents is based on the Module and Service specifications of the OSGi Service Platform Core Specification, Release 4 but enhances functionality for ease of use and in terms of best practices.</p> <p>The term <em>Units of Deployment</em> describes the idea of packaging up functionality implemented by Java Classes into modules, so called <em>Bundles</em>. For bigger and more complicated applications the fine grained modularity of <em>Bundles</em> may be to complicated, so this chapter proposes an extension called <em>Assembly</em>. The goal of the <em>Assembly</em> specification presented below is to provide functionality to delivery a collection of bundles belonging together.</p> <p>The term <em>Units of Functionality</em> describes the idea of providing services implemented by Java Classes, so called <em>Services</em>. A <em>Service</em> is an abstraction and does not actually prescribe the implementation of specific interfaces. Instead the OSGi specification states how functionality may be provided to clients by registering objects implementing interfaces defining the functionality in terms of a Java API.</p> -<h2 id="bundles">Bundles</h2> +<h2 id="bundles">Bundles<a class="headerlink" href="#bundles" title="Permanent link">¶</a></h2> <p>The core unit of deployment is the <em>Bundle</em>. The OSGi core specification defines a <em>Bundle</em> to be a Java Archive (JAR) file whose manifest - the <code>META-INF/MANIFEST.MF</code> file - contains specific headers identifying the bundle. Most manifest headers are optional with defined default values - only the <code>Bundle-SymbolicName</code> header is actually required and the <code>Bundle-ManifestVersion</code> header should be set to <code>2</code> to identify the bundle to be a R4 bundle. Other information defined in the manifest is the bundle version, the list of packages exported - provided to other bundles - and imported - used and required to be provided by other bundles. See chapter <em>3.2.1 Bundle Manifest Header</em> of the OSGi Service Platform Core Specification for a complete list of the defined bundle manifest headers.</p> <p>Bundles may be installed, updated , started, stopped and removed in an OSGi framework individually.</p> -<h2 id="assemblies">Assemblies</h2> +<h2 id="assemblies">Assemblies<a class="headerlink" href="#assemblies" title="Permanent link">¶</a></h2> <p>For the deployment of bigger systems, the number of bundles may increase very quickly. To ease the management of products consisting of multiple bundles, this chapter introduces the <em>Assembly</em>. An Assembly is simply a collection of bundles deployed together. An Assembly - like a Bundle - is a JAR file whose manifest contains specific headers. In fact, an Assembly is just a standard bundle, with additional functionality.</p> <p>Assemblies are managed by the <em>Assembly Manager</em> which itself is a bundle installed into the framework.</p> -<h3 id="assembly-manifest-headers">Assembly manifest headers</h3> +<h3 id="assembly-manifest-headers">Assembly manifest headers<a class="headerlink" href="#assembly-manifest-headers" title="Permanent link">¶</a></h3> <p>As an Assembly is a standard Bundle, all the defined Bundle manifest headers may be specified. In addition, for the <em>Assembly Manager</em> to recognize an assembly and for the OSGi Bundle Repository to support dependency resolution, the following manifest headers are defined. All headers are optional with documented default values except where noted.</p> <ul> <li><strong>Assembly-Bundles</strong> - The list of bundles contained in this assembly. See below for the definition of the syntax of this header. This header is required. The presence of this headers identifies an Assembly to the <em>Assembly Manager</em>.</li> <li><strong>Assembly-BundleRepository</strong> - A comma-separated list of URLs pointing to OSGi Bundle Repository descriptors. These bundle repositories will be used to install bundles listed in the <code>Assembly-Bundles</code> header. This header is optional with not default value.</li> </ul> -<h3 id="assembly-lifecycle">Assembly Lifecycle</h3> +<h3 id="assembly-lifecycle">Assembly Lifecycle<a class="headerlink" href="#assembly-lifecycle" title="Permanent link">¶</a></h3> <p>An Assembly, like all bundles, may be in any of the defined bundle states:</p> <ul> <li><strong>Installed</strong> - The Assembly bundle has been installed into the system but not yet resolved. The <em>Assembly Manager</em> will try to install all bundles listed in the <code>Assembly-Bundles</code> header. The start levels of the bundles will be set according to the <code>startlevel</code> parameter. The bundles will not be started. If installation of one or more of the bundles fails, <em>Assembly Manager</em> logs an error message.</li> @@ -118,7 +140,7 @@ <li><strong>Uninstalled</strong> - The Assembly bundle is being uninstalled by calling the <code>Bundle.uninstall()</code> method. The <em>Assembly Manager</em> will (try to) uninstall all bundles listed in the <code>Assembly-Bundles</code> header.</li> <li><strong>Updated</strong> - The Assembly bundle will update all bundles installed previously according to the <code>Assembly-Bundles</code> header. If this header omits any bundle listed in the previous bundle version, the respective bundle is uninstalled from the system. If a bundle is already installed with the correct version, the installed bundle is not touched (It may though be uninstalled together with the Assembly Bundle if the Assembly Bundle is uninstalled).</li> </ul> -<h3 id="bundles-referenced-by-multiple-assembly-bundles">Bundles referenced by multiple Assembly Bundles</h3> +<h3 id="bundles-referenced-by-multiple-assembly-bundles">Bundles referenced by multiple Assembly Bundles<a class="headerlink" href="#bundles-referenced-by-multiple-assembly-bundles" title="Permanent link">¶</a></h3> <p>It is conceivable, that bundles are listed in the <code>Assembly-Bundles</code> header of more than one Assembly Bundle. If this is the case, the following collision resolution takes place:</p> <ul> <li>If the version of the bundle installed by the first Assembly bundle handled matches the version specification of any later Assembly Bundle, the installed bundle is not touched. Otherwise, if the later Assembly Bundle lists a version specification, which is acceptable for the first Assembly Bundle, the installed bundle is updated to the required version. If the version specifications may not be matched one way or the other, the later Assembly Bundle fails to install.</li> @@ -127,7 +149,7 @@ <li>Bundles not referred to by any Assembly Bundle are ignored by the <em>Assembly Manager</em>.</li> <li>Bundles installed through the <em>Assembly Manager</em> may be updated and/or uninstalled independently from their defining Assembly Bundle. If a bundle has been installed it will be reinstalled the next time the Assembly Bundle enters the <em>installed</em> state. If a bundle has been updated, it is not touched by the <em>Assembly Manager</em> as long as the updated version matches the version specification of the Assembly Bundle.</li> </ul> -<h3 id="bundle-installation">Bundle Installation</h3> +<h3 id="bundle-installation">Bundle Installation<a class="headerlink" href="#bundle-installation" title="Permanent link">¶</a></h3> <p>When an Assembly is installed into the framework, the <em>Assembly Manager</em> checks to see whether the Assembly needs to be deployed. This is done by checking the bundles listed in the <code>Assembly-Bundles</code> header whether they are installed or not. All bundles not installed will be installed and started if requested so.</p> <p>The following BNF defines the syntax =Assembly-Bundles= header value:</p> <div class="codehilite"><pre><span class="n">Assembly</span><span class="o">-</span><span class="n">Bundles</span> <span class="p">=</span> <span class="n">Bundle</span> <span class="p">{</span> "<span class="p">,</span>" <span class="n">Bundle</span> <span class="p">}</span> <span class="p">.</span> @@ -145,7 +167,7 @@ <li><strong>linked</strong> - Defines whether the bundle should be started and stopped together with the Assembly to which the bundle belongs. Default value is <code>true</code>.</li> </ul> <p>If resolving the bundles results in more bundles to be downloaded from the bundle repository to resolve the dependency, these bundles are always automatically started and assigned a startlevel which is smaller than the smallest startlevel of any of the bundles listed.</p> -<h3 id="bundle-location">Bundle Location</h3> +<h3 id="bundle-location">Bundle Location<a class="headerlink" href="#bundle-location" title="Permanent link">¶</a></h3> <p>Generally bundles to be installed with an Assembly Bundle are retrieved from an OSGi Bundle Repository. The <code>Assembly-BundleRepository</code> header may list additional URLs which will be temporarily used to resovle the bundles. Otherwise the system default bundle repositories will be used only.</p> <p>If a bundle is defined in the <code>Assembly-Bundles</code> header with an <code>entry</code> parameter, the respective entry is first looked for in the Assembly Bundle. If the entry exists, it is used as the bundle source to install. If no <code>entry</code> parameter is present for a declared bundle or the entry is missing, the OSGi Bundle Repository is used.</p> <p>Restrictions when packaging bundles with the Assembly:</p> @@ -158,8 +180,8 @@ <ul> <li><strong>Example</strong> - Assume the <code>Assembly-Bundles</code> header is set to <code>org.apache.sling.sample1;entry=path.jar,org.apache.sling.sample2</code>. The bundle <code>org.apache.sling.sample1</code> is then installed from the Assembly Bundle entry <code>path.jar</code>, while the bundle <code>org.apache.sling.sample2</code> is resolved in the OSGi Bundle Repository.</li> </ul> -<h2 id="best-practices">Best Practices</h2> -<h3 id="size-of-bundles">Size of Bundles</h3> +<h2 id="best-practices">Best Practices<a class="headerlink" href="#best-practices" title="Permanent link">¶</a></h2> +<h3 id="size-of-bundles">Size of Bundles<a class="headerlink" href="#size-of-bundles" title="Permanent link">¶</a></h3> <p>There is no fixed formula to calculate the best size for a bundle: It all depends on the contents and the intentions of the bundle and its programmer. The following list provides some hints:</p> <ul> <li>For ease of development follow the idea of <em>One Bundle - One Project</em></li> @@ -167,7 +189,7 @@ <li>Do not mix and match everything into a bundle. Rather bundle things together which belong together, for example create separate bundles for a HTTP Client implementation and DB support classes</li> <li>Use similar heuristics to decide on the contents of a bundle as you would for the contents of a plain old JAR file.</li> </ul> -<h3 id="nomen-est-omen">Nomen est Omen</h3> +<h3 id="nomen-est-omen">Nomen est Omen<a class="headerlink" href="#nomen-est-omen" title="Permanent link">¶</a></h3> <p>The symbolic name of a bundle should reflect its contents. A bundle should generally only contain a single subtree in the virtual package tree. The symbolic name of the bundle should be the root package contained within. For example, consider a bundle containing the packages <code>org.apache.sling.sample</code>, <code>org.apache.sling.sample.impl</code>, <code>org.apache.sling.more</code>. The bundle would the be named <code>org.apache.sling.sample</code>.</p> <div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;"> Rev. 1529998 by dklco on Mon, 7 Oct 2013 17:00:03 +0000 Modified: websites/staging/sling/trunk/content/old-stuff/launch-sling.html ============================================================================== --- websites/staging/sling/trunk/content/old-stuff/launch-sling.html (original) +++ websites/staging/sling/trunk/content/old-stuff/launch-sling.html Tue Sep 22 10:23:16 2015 @@ -18,11 +18,11 @@ limitations under the License. --> <head> + <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Apache Sling - Launch Sling</title> <link rel="icon" href="/res/favicon.ico"> <link rel="stylesheet" href="/res/site.css" type="text/css" media="all"> <link rel="stylesheet" href="/res/codehilite.css" type="text/css" media="all"> - <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> </head> <body> <div class="title"> @@ -39,7 +39,18 @@ </div> <div class="menu"> - <p><strong><a href="/documentation.html">Documentation</a></strong> <br /> + <style type="text/css"> +/* The following code is added by mdx_elementid.py + It was originally lifted from http://subversion.apache.org/style/site.css */ +/* + * Hide class="elementid-permalink", except when an enclosing heading + * has the :hover property. + */ +.headerlink, .elementid-permalink { + visibility: hidden; +} +h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style> +<p><strong><a href="/documentation.html">Documentation</a></strong> <br /> <a href="/documentation/getting-started.html">Getting Started</a> <br /> <a href="/documentation/the-sling-engine.html">The Sling Engine</a> <br /> <a href="/documentation/development.html">Development</a> <br /> @@ -95,7 +106,18 @@ <h1>Launch Sling</h1> - <p>Please refer to <a href="/documentation/the-sling-engine/the-sling-launchpad.html">The Sling Launchpad</a> for up-to-date information on launching Sling.</p> + <style type="text/css"> +/* The following code is added by mdx_elementid.py + It was originally lifted from http://subversion.apache.org/style/site.css */ +/* + * Hide class="elementid-permalink", except when an enclosing heading + * has the :hover property. + */ +.headerlink, .elementid-permalink { + visibility: hidden; +} +h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style> +<p>Please refer to <a href="/documentation/the-sling-engine/the-sling-launchpad.html">The Sling Launchpad</a> for up-to-date information on launching Sling.</p> <div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;"> Rev. 1499238 by fmeschbe on Wed, 3 Jul 2013 07:39:54 +0000 </div> Modified: websites/staging/sling/trunk/content/old-stuff/request-processing.html ============================================================================== --- websites/staging/sling/trunk/content/old-stuff/request-processing.html (original) +++ websites/staging/sling/trunk/content/old-stuff/request-processing.html Tue Sep 22 10:23:16 2015 @@ -18,11 +18,11 @@ limitations under the License. --> <head> + <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Apache Sling - Request Processing</title> <link rel="icon" href="/res/favicon.ico"> <link rel="stylesheet" href="/res/site.css" type="text/css" media="all"> <link rel="stylesheet" href="/res/codehilite.css" type="text/css" media="all"> - <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> </head> <body> <div class="title"> @@ -39,7 +39,18 @@ </div> <div class="menu"> - <p><strong><a href="/documentation.html">Documentation</a></strong> <br /> + <style type="text/css"> +/* The following code is added by mdx_elementid.py + It was originally lifted from http://subversion.apache.org/style/site.css */ +/* + * Hide class="elementid-permalink", except when an enclosing heading + * has the :hover property. + */ +.headerlink, .elementid-permalink { + visibility: hidden; +} +h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style> +<p><strong><a href="/documentation.html">Documentation</a></strong> <br /> <a href="/documentation/getting-started.html">Getting Started</a> <br /> <a href="/documentation/the-sling-engine.html">The Sling Engine</a> <br /> <a href="/documentation/development.html">Development</a> <br /> @@ -95,16 +106,27 @@ <h1>Request Processing</h1> - <div class="note"> + <style type="text/css"> +/* The following code is added by mdx_elementid.py + It was originally lifted from http://subversion.apache.org/style/site.css */ +/* + * Hide class="elementid-permalink", except when an enclosing heading + * has the :hover property. + */ +.headerlink, .elementid-permalink { + visibility: hidden; +} +h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style> +<div class="note"> 2008-02-13: this page is *out of sync* with the current codebase, needs to be reviewed and updated. </div> <p>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 requests inside Sling.</p> -<h2 id="core-request-processing">Core Request Processing</h2> +<h2 id="core-request-processing">Core Request Processing<a class="headerlink" href="#core-request-processing" title="Permanent link">¶</a></h2> <p>The HTTP request enters Sling in the <code>org.apache.sling.core.ComponentRequestHandlerImpl.service(ServletRequest req, ServletResponse res)</code> method as the <code>ComponentRequestHandlerImpl</code> is registered as the Servlet handling HTTP requests. This method sets up the initial <code>ComponentRequest</code> and <code>ComponentResponse</code> objects and hands the request over to the first <code>ComponentFilterChain</code>. This first filter chain calls all <code>ComponentFilter</code> instances registered as request level filters. After processing all filters in the request level filter chain, the request is handed over to the second <code>ComponentFilterChain</code> which calls all <code>ComponentFilter</code> instances registered as component level filters. At the end of the second filter chain the <code>service</code> method of the actual <code>Component</code> to which the request resolved is called.</p> <p>As the component is now processing the request, it may decide to dispatch the request to some other content such as for example a paragraph system or navigation component. To do this, the component will call the <code>RequestDispatcher.include</code> method. If the request dispatcher dispatches to a <code>Content</code> object Sling will hand the dispatch request over to the component level filter chain, which at the end will call the <code>service</code> method for the <code>Content</code> object to dispatched to. This process may be repeated at the component's discretion only limited by processing resources such as available memory.</p> <p>As can be seen Sling itself is absed on the Component API <code>ComponentFilter</code> mechanism. As such Sling provides and uses the following filters in the Sling Core bundle:</p> -<p>{table:class=confluenceTable} +<p table="table">{table:class=confluenceTable} {tr}{th:colspan=2|class=confluenceTh} Request Level Filters {th}{tr} {tr}{td:class=confluenceTd} <code>ErrorHandlerFilter</code> {td}{td:class=confluenceTd} Handles exceptions thrown while processing the request as well implements the <code>ComponentResponse.sendError()</code> method {td}{tr} {tr}{td:class=confluenceTd} <code>AuthenticationFilter</code> {td}{td:class=confluenceTd} Implements authentication for the request and provides the JCR Session of the request {td}{tr} @@ -112,8 +134,7 @@ {tr}{td:class=confluenceTd} <code>LocaleResolverFilter</code> {td}{td:class=confluenceTd} Provides information on the <code>Locale</code> to be used for request processing. This filter implements the <code>ComponentRequest.getLocale()</code> method {td}{tr} {tr}{td:class=confluenceTd} <code>ThemeResolverFilter</code> {td}{td:class=confluenceTd} Provides the <code>Theme</code> for the request. The theme is provided as a request attribute {td}{tr} {tr}{td:class=confluenceTd} <code>URLMapperFilter</code> {td}{td:class=confluenceTd} Resolves the request URL to a JCR Node which may be mapped into a <code>Content</code> object {td}{tr} -{tr}{td:class=confluenceTd} <code>ZipFilter</code> {td}{td:class=confluenceTd} Sample filter showing how the request response might be compressed according to the <em>Accept-Encoding</em> request header. This filter is not enabled by default. {td}{tr} -{table}</p> +{tr}{td:class=confluenceTd} <code>ZipFilter</code> {td}{td:class=confluenceTd} Sample filter showing how the request response might be compressed according to the <em>Accept-Encoding</em> request header. This filter is not enabled by default. {td}{tr}</p> <p>Deducing from these lists of filters, the actual request processing can be refined into the following steps:</p> <ol> <li>Extract user authentication information and acquire the JCR session to access content. If the request has no user authentication data the such data may be requested from the user (for example by sending a HTTP 401 status) or an anonymous repository session might be acquired.</li> @@ -123,18 +144,17 @@ <li>Resolve the request URL into a <code>Content</code> object.</li> </ol> <p>The default request level filter chain setup ends with finding the <code>Content</code> object requested by the request URL. After having found this object, the request is handed over to the component level filter chain, which is concerned with handling filtering on a single <code>Content</code> instance. As such, the component level filter chain is used for each <code>Content</code> object which is to be serviced either on behalf of the HTTP request or on behalf of request dispatcher. Thus the component level filter chain will generally called multiple times during a single request.</p> -<p>{table:class=confluenceTable} +<p table="table">{table:class=confluenceTable} {tr}{th:colspan=2|class=confluenceTh} Component Level Filters {th}{tr} {tr}{td:class=confluenceTd} <code>CacheFilter</code> {td}{td:class=confluenceTd} Checks whether the request to the current <code>Content</code> object may be handled by cached response data {td}{tr} -{tr}{td:class=confluenceTd} <code>ComponentResolverFilter</code> {td}{td:class=confluenceTd} Resolves the component ID returned by the <code>Content.getComponentId()</code> method into a <code>Component</code> instances, which will be called to service the request {td}{tr} -{table}</p> +{tr}{td:class=confluenceTd} <code>ComponentResolverFilter</code> {td}{td:class=confluenceTd} Resolves the component ID returned by the <code>Content.getComponentId()</code> method into a <code>Component</code> instances, which will be called to service the request {td}{tr}</p> <p>Again, deducing from the list of filters, the following steps are taking to service a given <code>Content</code> object:</p> <ol> <li>Check whether the <code>Content</code> object processing may be handled from the cache. Same as with request level cache handling, a cache entry may exist for a single <code>Content</code> instance depending on whether the request is cacheable at all and on whether a cache entry exists. If a cache entry exists and may be used, the response data is simply spooled into the response and component level processing terminates for the <code>Content</code> object. Otherwise processing continues and may optionally lead to a new cache entry for the <code>Content</code> object to be reused later.</li> <li>Resolve the component ID returned by the <code>Content.getComponentId()</code> method into a <code>Component</code> object. Of course it is an error, if the component ID cannot be mapped into a <code>Component</code> object.</li> </ol> <p>After resolving the <code>Component</code> object default component filter chain terminates and control is handed over to the <code>service</code> method of the <code>Component</code> object resolved in the last step. At the discretion of the component request dispatchers may now be acquired to render other <code>Content</code> objects. In this case the component level filter chain is simply kicked of again resulting in the <code>service</code> method of another <code>Component</code> being called. And so forth.</p> -<h2 id="resolving-content">Resolving Content</h2> +<h2 id="resolving-content">Resolving Content<a class="headerlink" href="#resolving-content" title="Permanent link">¶</a></h2> <p>As we have seen, the last step in the request level filter chain is the resolution of the request URL into a <code>Content</code> object. The URL Mapper Filter implementing this resolution uses an instance of the <code>org.apache.sling.content.ContentMapper</code> interface which is acquired by calling the <code>org.apache.sling.content.jcr.JcrContentManagerFactory</code> with the repository session acquired by the authentication filter.</p> <p>The URL Mapper filter then tries to apply fixed mappings from request URL to destination paths to support shortcut URLs. For example the root path <code>/</code> may be mapped into the default landing page at <code>/default/home</code>. The list of such mappings is configurable through the Configuration Admin Service.</p> <p>Next the URL Mapper tries to apply prefix matching patterns. A list of patterns is iterated checking whether the prefix applies and, if so, replacing the prefix with another prefix and trying to resolve the result. This functionality enables relocation of a subtree of the repository. For example, all requests whose prefix is <code>/here</code> might be remapped with the new prefix <code>/content/there</code>. The result of this remapping is then resolved.</p> @@ -144,14 +164,14 @@ <li><em>Vanity URLs</em> - Map the request URL according to the <code>Host</code> request header.</li> <li><em>Dynamic Mapping</em> - Add support for a set of variables in path and/or prefix mapping. For example, a prefix mapping may contain the string <code>/content/$\{lang}/$\{user</code>} resulting in resolving a prefix according to the language of the current locale and the name of the authenticated used.</li> </ul> -<h2 id="registering-components">Registering Components</h2> +<h2 id="registering-components">Registering Components<a class="headerlink" href="#registering-components" title="Permanent link">¶</a></h2> <p>The last step of the component level filter chain is resolving the <code>Component</code> from the component ID of the <code>Content</code> object. Sling implements this resolution by making use of the OSGi service registry. That is, each component is to be registered as a service with the name <code>org.apache.sling.component.Component</code>. The <code>ComponentResolverFilter</code> is listening for these components and registers them internally in a map indexed by the IDs of the component as returned by the <code>Component.getId()</code> method.</p> <p>When a component has to be resolved, the component ID returned by the <code>Content</code> object is simply looked up in the component map. If found, that component is used. Otherwise a fall back algorithm is applied which is described on the <a href="/documentation/the-sling-engine/default-mapping-and-rendering.html">Default Content Mapping and Request Rendering</a> page.</p> -<h2 id="reqistering-filters">Reqistering Filters</h2> +<h2 id="reqistering-filters">Reqistering Filters<a class="headerlink" href="#reqistering-filters" title="Permanent link">¶</a></h2> <p>Just as <code>Component</code> instances used by Sling are expected to be registered as OSGi services, the <code>ComponentFilter</code>s to be used have to be registered as services under the name <code>org.apache.sling.component.ComponentFilter</code>. Sling picks up all registered component filters and adds them to the respective filter chains.</p> <p>Service properties set upon registration of the filter define the chain to which the filter belongs and the order in which the filters should be processed:</p> -<table> +<table class="table"> <thead> <tr> <th>Property</th> @@ -169,7 +189,7 @@ used have to be registered as services u </tr> </tbody> </table> -<h2 id="content-is-a-java-object">Content is a Java Object</h2> +<h2 id="content-is-a-java-object">Content is a Java Object<a class="headerlink" href="#content-is-a-java-object" title="Permanent link">¶</a></h2> <p>It is crucial to understand that <code>Content</code> is an interface and the request processor of Sling does not actually care, how the <code>Content</code> instance comes to live as long as the is such an object and there is a <code>Component</code> instance capable of servicing the <code>Content</code> object.</p> <p>By default Sling uses the <em>URL Mapper</em> to resolve the request URL into a <code>Content</code> object. When a <code>Component</code> is tasked with servicing a <code>Content</code> object it usually uses the <code>ComponentRequestDispatcher</code> to ask Sling to service another content object generally identified by a (relative or absolute) path to a JCR Repository Node from which the <code>Content</code> object is loaded.</p> <p>But instead of having Sling resolve a path into a <code>Content</code> object the component may just as well create a <code>Content</code> object and hand it over to the <code>ComponentRequestDispatcher</code> for service. Consider a request which is handled by a <code>PageComponent</code>. This component has to draw a navigation tree somewhere in the response. So the component could of course insist on having a <code>navigation</code> child node to dispatch rendering to as follows:</p> Modified: websites/staging/sling/trunk/content/old-stuff/run-modes-org-apache-sling-runmode.html ============================================================================== --- websites/staging/sling/trunk/content/old-stuff/run-modes-org-apache-sling-runmode.html (original) +++ websites/staging/sling/trunk/content/old-stuff/run-modes-org-apache-sling-runmode.html Tue Sep 22 10:23:16 2015 @@ -18,11 +18,11 @@ limitations under the License. --> <head> + <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Apache Sling - Run Modes (org.apache.sling.runmode)</title> <link rel="icon" href="/res/favicon.ico"> <link rel="stylesheet" href="/res/site.css" type="text/css" media="all"> <link rel="stylesheet" href="/res/codehilite.css" type="text/css" media="all"> - <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> </head> <body> <div class="title"> @@ -39,7 +39,18 @@ </div> <div class="menu"> - <p><strong><a href="/documentation.html">Documentation</a></strong> <br /> + <style type="text/css"> +/* The following code is added by mdx_elementid.py + It was originally lifted from http://subversion.apache.org/style/site.css */ +/* + * Hide class="elementid-permalink", except when an enclosing heading + * has the :hover property. + */ +.headerlink, .elementid-permalink { + visibility: hidden; +} +h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style> +<p><strong><a href="/documentation.html">Documentation</a></strong> <br /> <a href="/documentation/getting-started.html">Getting Started</a> <br /> <a href="/documentation/the-sling-engine.html">The Sling Engine</a> <br /> <a href="/documentation/development.html">Development</a> <br /> @@ -90,24 +101,35 @@ <h1>Run Modes (org.apache.sling.runmode)</h1> - <div markdown="1" class="note"> + <style type="text/css"> +/* The following code is added by mdx_elementid.py + It was originally lifted from http://subversion.apache.org/style/site.css */ +/* + * Hide class="elementid-permalink", except when an enclosing heading + * has the :hover property. + */ +.headerlink, .elementid-permalink { + visibility: hidden; +} +h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style> +<div markdown="1" class="note"> As of Sling 6 the <code>org.apache.sling.runmode</code> bundle is replaced by the new <a href="/documentation/bundles/sling-settings-org-apache-sling-settings.html">Sling Settings (org.apache.sling.settings)</a> Bundle. For backwards compatibility this bundle may still exist in your environment. New code should use the API of the new Sling Settings Bundle, though. </div> -<h1 id="overview">Overview</h1> +<h1 id="overview">Overview<a class="headerlink" href="#overview" title="Permanent link">¶</a></h1> <p>Run modes are meant to define different sets of configuration parameters for various Sling instances.</p> <p>In a web publishing environment, for example, one could use run modes like <em>staging, production, dev, dmz</em> or combinations of such values.</p> <p>The <em><a href="">org.apache.sling.runmode</a></em> bundle provides a simple way of defining and querying a list of run modes.</p> -<h1 id="installation">Installation</h1> +<h1 id="installation">Installation<a class="headerlink" href="#installation" title="Permanent link">¶</a></h1> <p>The run mode service is not present in the default Sling launchpad builds, to activate it install and start the <em>org.apache.sling.runmode</em> bundle.</p> -<h1 id="configuration">Configuration</h1> +<h1 id="configuration">Configuration<a class="headerlink" href="#configuration" title="Permanent link">¶</a></h1> <p>Run modes can only be configured using a system property, or via the <em>sling.properties</em> file.</p> <p>Using <em>-Dsling.run.modes=foo,bar</em> on the JVM command-line, for example, activates the <em>foo</em> and <em>bar</em> run modes. </p> <p>This command-line parameter takes precedence over a similar definition (<em>sling.run.modes=dev,staging</em>) that might be present in the <em>sling.properties</em> file found in the Sling home directory.</p> -<h1 id="getting-the-current-list-of-run-modes">Getting the current list of run modes</h1> +<h1 id="getting-the-current-list-of-run-modes">Getting the current list of run modes<a class="headerlink" href="#getting-the-current-list-of-run-modes" title="Permanent link">¶</a></h1> <p>The <a href="">RunMode service</a> provides the current list of run modes, examples:</p> <div class="codehilite"><pre><span class="n">RunMode</span> <span class="n">r</span> <span class="o">=</span> <span class="o">...</span><span class="na">get</span> <span class="n">from</span> <span class="n">BundleContext</span><span class="o">...</span> <span class="n">String</span> <span class="o">[]</span> <span class="n">currentRunModes</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="na">getCurrentRunModes</span><span class="o">();</span> @@ -120,7 +142,7 @@ Sling Settings Bundle, though. </pre></div> -<h1 id="see-also">See also</h1> +<h1 id="see-also">See also<a class="headerlink" href="#see-also" title="Permanent link">¶</a></h1> <p>The RunMode service is used by the <a href="/documentation/bundles/jcr-installer-provider.html">jcrinstall</a> services.</p> <div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;"> Rev. 1462280 by fmeschbe on Thu, 28 Mar 2013 19:58:11 +0000 Modified: websites/staging/sling/trunk/content/old-stuff/scriptengineintegration.html ============================================================================== --- websites/staging/sling/trunk/content/old-stuff/scriptengineintegration.html (original) +++ websites/staging/sling/trunk/content/old-stuff/scriptengineintegration.html Tue Sep 22 10:23:16 2015 @@ -18,11 +18,11 @@ limitations under the License. --> <head> + <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Apache Sling - Integrating Scripting Languages</title> <link rel="icon" href="/res/favicon.ico"> <link rel="stylesheet" href="/res/site.css" type="text/css" media="all"> <link rel="stylesheet" href="/res/codehilite.css" type="text/css" media="all"> - <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> </head> <body> <div class="title"> @@ -39,7 +39,18 @@ </div> <div class="menu"> - <p><strong><a href="/documentation.html">Documentation</a></strong> <br /> + <style type="text/css"> +/* The following code is added by mdx_elementid.py + It was originally lifted from http://subversion.apache.org/style/site.css */ +/* + * Hide class="elementid-permalink", except when an enclosing heading + * has the :hover property. + */ +.headerlink, .elementid-permalink { + visibility: hidden; +} +h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style> +<p><strong><a href="/documentation.html">Documentation</a></strong> <br /> <a href="/documentation/getting-started.html">Getting Started</a> <br /> <a href="/documentation/the-sling-engine.html">The Sling Engine</a> <br /> <a href="/documentation/development.html">Development</a> <br /> @@ -95,7 +106,18 @@ <h1>Integrating Scripting Languages</h1> - <p>This page should be extended with more concrete and detailed information. For now, we have the following information:</p> + <style type="text/css"> +/* The following code is added by mdx_elementid.py + It was originally lifted from http://subversion.apache.org/style/site.css */ +/* + * Hide class="elementid-permalink", except when an enclosing heading + * has the :hover property. + */ +.headerlink, .elementid-permalink { + visibility: hidden; +} +h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style> +<p>This page should be extended with more concrete and detailed information. For now, we have the following information:</p> <ul> <li>There will be a talk at ApacheCon US 08 in New Orleans about creating JSR-223 ScriptEngineFactory and ScriptEngine implementaitons as well as how to integrate such implementations with Sling.</li> <li>From a mail on the mailing list, this is a very condensed how-to:<ul> @@ -105,7 +127,7 @@ </ul> </li> </ul> -<h1 id="notes-on-scriptengines">Notes on ScriptEngines</h1> +<h1 id="notes-on-scriptengines">Notes on ScriptEngines<a class="headerlink" href="#notes-on-scriptengines" title="Permanent link">¶</a></h1> <ul> <li><a href="/old-stuff/scriptengineintegration/groovy-support.html">Groovy Support</a></li> <li><a href="/old-stuff/scriptengineintegration/xslt-processing-pipeline.html">XSLT Processing Pipeline</a></li> Modified: websites/staging/sling/trunk/content/old-stuff/scriptengineintegration/groovy-support.html ============================================================================== --- websites/staging/sling/trunk/content/old-stuff/scriptengineintegration/groovy-support.html (original) +++ websites/staging/sling/trunk/content/old-stuff/scriptengineintegration/groovy-support.html Tue Sep 22 10:23:16 2015 @@ -18,11 +18,11 @@ limitations under the License. --> <head> + <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Apache Sling - Groovy Support</title> <link rel="icon" href="/res/favicon.ico"> <link rel="stylesheet" href="/res/site.css" type="text/css" media="all"> <link rel="stylesheet" href="/res/codehilite.css" type="text/css" media="all"> - <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> </head> <body> <div class="title"> @@ -39,7 +39,18 @@ </div> <div class="menu"> - <p><strong><a href="/documentation.html">Documentation</a></strong> <br /> + <style type="text/css"> +/* The following code is added by mdx_elementid.py + It was originally lifted from http://subversion.apache.org/style/site.css */ +/* + * Hide class="elementid-permalink", except when an enclosing heading + * has the :hover property. + */ +.headerlink, .elementid-permalink { + visibility: hidden; +} +h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style> +<p><strong><a href="/documentation.html">Documentation</a></strong> <br /> <a href="/documentation/getting-started.html">Getting Started</a> <br /> <a href="/documentation/the-sling-engine.html">The Sling Engine</a> <br /> <a href="/documentation/development.html">Development</a> <br /> @@ -95,7 +106,18 @@ <h1>Groovy Support</h1> - <p>After meeting Paul King of the Groovy Team at Apache Con US 08 in New Orleans, I set out to take a stab at SLING-315 again to add Groovy support to Sling. It turned out, that the current Groovy 1.6 branch already contains the required setup to build the <code>groovy-all.jar</code> as an OSGi Bundle, which is directly usable with Sling by just installing that bundle.</p> + <style type="text/css"> +/* The following code is added by mdx_elementid.py + It was originally lifted from http://subversion.apache.org/style/site.css */ +/* + * Hide class="elementid-permalink", except when an enclosing heading + * has the :hover property. + */ +.headerlink, .elementid-permalink { + visibility: hidden; +} +h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style> +<p>After meeting Paul King of the Groovy Team at Apache Con US 08 in New Orleans, I set out to take a stab at SLING-315 again to add Groovy support to Sling. It turned out, that the current Groovy 1.6 branch already contains the required setup to build the <code>groovy-all.jar</code> as an OSGi Bundle, which is directly usable with Sling by just installing that bundle.</p> <p>Currently the Groovy team is working hard towards the 1.6 release and many things are in flux, which is really great.</p> <p>So, on 11. Dec. 2008 Paul King of the Groovy Team has deployed a <a href="">first RC1 Snapshot of Groovy 1.6</a> which contains all the required OSGi bundle manifest headers as well das the JSR-233 <code>ScriptEngine</code> to use the <code>groovy-all.jar</code> unmodified with Sling. So just go ahead, grab the Groovy-All 1.6 RC 1 SNAPSHOT deploy it into your Sling instance and enjoy the fun of Groovy.</p> <p>If you want to be on verge of development, you might want to go for Groovy 1.7: The second SNAPSHOT of beta-1 also contains the required headers and classes and may as well be used unmodified in Sling. You may download it here: <code>[groovy-all-1.7-beta-1-20081210.120632-2.jar]()</code>.</p> @@ -109,7 +131,7 @@ </pre></div> -<h2 id="testing">Testing</h2> +<h2 id="testing">Testing<a class="headerlink" href="#testing" title="Permanent link">¶</a></h2> <p>To test create a simple Groovy script, for example</p> <div class="codehilite"><pre>response.setContentType("text/plain"); response.setCharacterEncoding("UTF-8"); @@ -138,7 +160,7 @@ println "You requested the Resource </pre></div> -<h2 id="references">References</h2> +<h2 id="references">References<a class="headerlink" href="#references" title="Permanent link">¶</a></h2> <ul> <li><a href="">SLING-315</a> -- The initial Sling issue proposing the addition of a Groovy ScriptEngine to Sling.</li> <li><a href="">Groovy Support in Apache Sling</a> -- A short thread on turning the Groovy <code>groovy-all.jar</code> into an OSGi Bundle.</li> Modified: websites/staging/sling/trunk/content/old-stuff/scriptengineintegration/xslt-processing-pipeline.html ============================================================================== --- websites/staging/sling/trunk/content/old-stuff/scriptengineintegration/xslt-processing-pipeline.html (original) +++ websites/staging/sling/trunk/content/old-stuff/scriptengineintegration/xslt-processing-pipeline.html Tue Sep 22 10:23:16 2015 @@ -18,11 +18,11 @@ limitations under the License. --> <head> + <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Apache Sling - XSLT Processing Pipeline</title> <link rel="icon" href="/res/favicon.ico"> <link rel="stylesheet" href="/res/site.css" type="text/css" media="all"> <link rel="stylesheet" href="/res/codehilite.css" type="text/css" media="all"> - <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> </head> <body> <div class="title"> @@ -39,7 +39,18 @@ </div> <div class="menu"> - <p><strong><a href="/documentation.html">Documentation</a></strong> <br /> + <style type="text/css"> +/* The following code is added by mdx_elementid.py + It was originally lifted from http://subversion.apache.org/style/site.css */ +/* + * Hide class="elementid-permalink", except when an enclosing heading + * has the :hover property. + */ +.headerlink, .elementid-permalink { + visibility: hidden; +} +h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style> +<p><strong><a href="/documentation.html">Documentation</a></strong> <br /> <a href="/documentation/getting-started.html">Getting Started</a> <br /> <a href="/documentation/the-sling-engine.html">The Sling Engine</a> <br /> <a href="/documentation/development.html">Development</a> <br /> @@ -90,13 +101,24 @@ <h1>XSLT Processing Pipeline</h1> - <p>In the <em>Apache Sling Scripting W3C XML Processing Support</em> bundle, Juanjo VÃ zquez has implemented XSLT processing support for Sling as another new scripting engine, based on the <a href="http://cocoon.apache.org/3.0/">Cocoon 3 pipeline engine</a>.</p> -<h2 id="intro">Intro</h2> + <style type="text/css"> +/* The following code is added by mdx_elementid.py + It was originally lifted from http://subversion.apache.org/style/site.css */ +/* + * Hide class="elementid-permalink", except when an enclosing heading + * has the :hover property. + */ +.headerlink, .elementid-permalink { + visibility: hidden; +} +h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style> +<p>In the <em>Apache Sling Scripting W3C XML Processing Support</em> bundle, Juanjo VÃ zquez has implemented XSLT processing support for Sling as another new scripting engine, based on the <a href="http://cocoon.apache.org/3.0/">Cocoon 3 pipeline engine</a>.</p> +<h2 id="intro">Intro<a class="headerlink" href="#intro" title="Permanent link">¶</a></h2> <p>An XML pipeline specifies a sequence of operations to be performed on zero or more XML documents. There are a number of advantages to using pipelines above all in terms of separation of concerns. On the other hand, we talk about XSLT processing if the operations in a pipeline are performed executing or applying XSLT stylesheets.</p> <p>XSLT processing support is implemented in Sling as an scripting engine bundle named <em>Apache Sling Scripting W3C XML Processing Support</em>. This bundle is based on the <a href="http://cocoon.apache.org/3.0/">Cocoon 3 pipeline engine</a> and uses the <a href="http://www.w3.org/TR/xproc/">W3C XProc language</a> in order to specify pipelines to be processed.</p> <p>For the time being, XProc is partially implemented and it is not clear that Sling must support all W3C recomendation yet. This could depend of concrete user requirements or use cases.</p> <p>The source code is found in the <a href="http://svn.apache.org/repos/asf/incubator/sling/trunk/contrib/scripting/xproc">contrib/scripting/xproc</a> module.</p> -<h2 id="how-to-install">How to Install</h2> +<h2 id="how-to-install">How to Install<a class="headerlink" href="#how-to-install" title="Permanent link">¶</a></h2> <p>Install the <code>org.apache.sling.scripting.xproc</code> bundle in order to work with XProc. You can achieve this either building it from <code>contrib/scripting/xproc</code> folder in the Sling trunk or by downloading it from the Apache Snapshot repository here: <a href="http://people.apache.org/repo/m2-snapshot-repository/org/apache/sling/org.apache.sling.scripting.xproc/2.0.0-incubator-SNAPSHOT/org.apache.sling.scripting.xproc-2.0.0-incubator-20090403.114403-1.jar">org.apache.sling.scripting.xproc-2.0.0-incubator-20090403.114403-1.jar</a>.</p> <p>To deploy the bundle go to the bundles page of Apache Felix Web Console (http://localhost:8888/system/console/bundles), select the bundle file to upload, check the Start check box and click Install or Update button.</p> <p>In order to check whether XProc scripting engine has been installed, go to the Script Engines page of the Apache Felix Web Console and see the entry for XProc there:</p> @@ -108,7 +130,7 @@ </pre></div> -<h2 id="how-it-works">How it works</h2> +<h2 id="how-it-works">How it works<a class="headerlink" href="#how-it-works" title="Permanent link">¶</a></h2> <p>As explained above, the bundle is able to perform a sequence of XSLT transforms on an XML document just as is expressed in a pipeline definition. A pipeline definition is a file with an xpl extension that follows the <a href="http://www.w3.org/TR/xproc/">W3C XProc grammar</a>. Only <code>p:xslt</code> steps are supported at the moment.</p> <p>For the XML input of pipeline, the processing uses a Cocoon generator named <code>SlingGenerator</code> that tries to resolve the requested resource as (in order of preference):</p> <ul> @@ -116,7 +138,7 @@ <li>a dynamically generated XML </li> <li>the underlying node's export document view </li> </ul> -<h2 id="samples">Samples</h2> +<h2 id="samples">Samples<a class="headerlink" href="#samples" title="Permanent link">¶</a></h2> <p>Let's see some samples in order to understand the processing behaviour.</p> <ol> <li> @@ -334,7 +356,7 @@ <p>This time the pipeline's source has been a dinamically generated XML.</p> </li> </ol> -<h2 id="references">References</h2> +<h2 id="references">References<a class="headerlink" href="#references" title="Permanent link">¶</a></h2> <ul> <li><a href="http://cocoon.apache.org//3.0/">Cocoon 3 pipeline engine</a></li> <li><a href="http://www.w3.org/TR/xproc/">W3C XProc language</a></li>