incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r813967 [7/16] - /websites/staging/sling/trunk/content/
Date Sun, 22 Apr 2012 16:52:31 GMT
Added: websites/staging/sling/trunk/content/getting-resources-and-properties-in-sling.html
==============================================================================
--- websites/staging/sling/trunk/content/getting-resources-and-properties-in-sling.html (added)
+++ websites/staging/sling/trunk/content/getting-resources-and-properties-in-sling.html Sun Apr 22 16:52:28 2012
@@ -0,0 +1,194 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+  <head>
+    <title>Apache Sling - Getting Resources and Properties in Sling</title>
+    <link rel="stylesheet" href="http://sling.apache.org/site/media.data/site.css" type="text/css" media="all">
+    <link rel="icon" href="http://sling.apache.org/site/media.data/favicon.ico">
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+  </head>
+  <body>
+    <div class="title">
+      <div class="logo">
+        <a href="http://sling.apache.org/site/index.html">
+          <img border="0" alt="Apache Sling" src="http://sling.apache.org/site/media.data/logo.png">
+        </a>
+      </div>
+      <div class="header">
+        <a href="http://www.apache.org/">
+          <img border="0" alt="Apache" src="http://sling.apache.org/site/media.data/apache.png">
+        </a>
+      </div>
+    </div>
+    
+    <div class="menu"> 
+      <h1 id="documentation">Documentation</h1>
+<ul>
+<li><a href="getting-started.html">Getting Started</a></li>
+<li><a href="the-sling-engine.html">The Sling Engine</a></li>
+<li><a href="development.html">Development</a></li>
+<li><a href="bundles.html">Bundles</a></li>
+<li><a href="tutorials-&amp;-how-tos.html">Tutorials &amp; How-Tos</a></li>
+<li><a href="configuration.html">Configuration</a></li>
+<li><a href="http://sling.apache.org/apidocs/sling5/index.html">API docs</a></li>
+<li><a href="http://s.apache.org/sling.wiki">Wiki</a></li>
+<li><a href="http://s.apache.org/sling.faq">FAQ</a></li>
+</ul>
+<h1 id="project-info">Project info</h1>
+<ul>
+<li><a href="http://sling.apache.org/site/downloads.cgi">Downloads</a></li>
+<li><a href="http://www.apache.org/licenses/">License</a></li>
+<li><a href="contributing.html">Contributing</a></li>
+<li><a href="news.html">News</a></li>
+<li><a href="links.html">Links</a></li>
+<li><a href="project-information.html">Project Information</a></li>
+<li><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a></li>
+<li><a href="http://svn.apache.org/viewvc/sling/trunk">Browse Source Repository</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+<h1 id="sponsorship">Sponsorship</h1>
+<ul>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/foundation/buy_stuff.html">Buy Stuff</a></li>
+</ul>
+<iframe 
+    src="http://www.apache.org/ads/button.html"
+    style="border-width:0; float: left" frameborder="0" 
+    scrolling="no"
+    width="135" 
+    height="135">
+</iframe>
+    </div>
+    
+    <div class="main">
+      <div class="breadcrump" style="font-size: 80%;">
+		(TODO: breadcrumb here)
+      </div>
+      <h1 class="title">Getting Resources and Properties in Sling</h1>
+      <div>
+	    <p><a name="GettingResourcesandPropertiesinSling-GettingResourcesandPropertiesinSling"></a></p>
+<h1 id="getting-resources-and-properties-in-sling">Getting Resources and Properties in Sling</h1>
+<p>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 provided by so called resource
+providers. By doing this Sling fits very well in the paradigm of the REST
+architecture.</p>
+<p>In this article we will explore a few ways to programmatically map a
+resource path (String) to a resource object (Resource) and its properties
+in Sling, from within an OSGI service, a servlet and a JSP.</p>
+<p>The whole game consists in first getting a <em>ResourceResolver</em> and then
+getting the <em>Resource</em> itself.</p>
+<p><a name="GettingResourcesandPropertiesinSling-WithinanOSGIService/Compoment"></a></p>
+<h2 id="within-an-osgi-servicecompoment">Within an OSGI Service/Compoment</h2>
+<p>You can access a resource through the <em>ResourceResolverFactory</em> service:</p>
+<div class="codehilite"><pre><span class="sr">/** @scr.reference */</span>
+<span class="n">private</span> <span class="n">ResourceResolverFactory</span> <span class="n">resolverFactory</span><span class="p">;</span>
+
+<span class="n">public</span> <span class="n">void</span> <span class="n">myMethod</span><span class="p">()</span> <span class="p">{</span>
+    <span class="n">try</span> <span class="p">{</span>
+    <span class="n">String</span> <span class="n">resourcePath</span> <span class="o">=</span> <span class="s">&quot;path/to/resource&quot;</span><span class="p">;</span>
+    <span class="n">ResourceResolver</span> <span class="n">resourceResolver</span> <span class="o">=</span>
+</pre></div>
+
+
+<p>resolverFactory.getAdministrativeResourceResolver(null);
+        Resource res = resourceResolver.getResource(resourcePath);
+        // do something with the resource
+        // when done, close the ResourceResolver
+        resourceResolver.close();
+        } catch (LoginException e) {
+        // log the error
+        }
+    }</p>
+<p><a name="GettingResourcesandPropertiesinSling-WithinaServlet"></a></p>
+<h2 id="within-a-servlet">Within a Servlet</h2>
+<p>You can access the resource defined by the request URL through the
+<em>SlingHttpServletRequest</em>:</p>
+<div class="codehilite"><pre><span class="n">Resource</span> <span class="n">res</span> <span class="o">=</span> <span class="n">req</span><span class="o">.</span><span class="n">getResource</span><span class="p">();</span>
+<span class="sr">//</span> <span class="n">req</span> <span class="n">is</span> <span class="n">the</span> <span class="n">SlingHttpServletRequest</span>
+</pre></div>
+
+
+<p>You can access any resource by first accessing the <em>ResourceResolver</em>:</p>
+<div class="codehilite"><pre><span class="n">String</span> <span class="n">resourcePath</span> <span class="o">=</span> <span class="s">&quot;path/to/resource&quot;</span><span class="p">;</span>
+<span class="n">ResourceResolver</span> <span class="n">resourceResolver</span> <span class="o">=</span> <span class="n">req</span><span class="o">.</span><span class="n">getResourceResolver</span><span class="p">();</span>
+<span class="sr">//</span> <span class="n">req</span> <span class="n">is</span> <span class="n">the</span> <span class="n">SlingHttpServletRequest</span>
+<span class="n">Resource</span> <span class="n">res</span> <span class="o">=</span> <span class="n">resourceResolver</span><span class="o">.</span><span class="n">getResource</span><span class="p">(</span><span class="n">resourcePath</span><span class="p">);</span>
+</pre></div>
+
+
+<p><a name="GettingResourcesandPropertiesinSling-WithinaJSPfile"></a></p>
+<h2 id="within-a-jsp-file">Within a JSP file</h2>
+<p>When you use the <em><sling:defineObjects></em> tag in a JSP file, you have
+access to a few handy objects, one of them is <em>resource</em>, the resource
+that is resolved from the URL. Another one is <em>resourceResolver</em>, the
+<em>ResourceResolver</em> defined through the <em>SlingHttpServletRequest</em>. </p>
+<p>To access a resource:</p>
+<div class="codehilite"><pre><span class="x">&lt;sling:defineObjects&gt;</span>
+<span class="cp">&lt;%</span>
+<span class="nb">String</span> <span class="n">resourcePath</span> <span class="o">=</span> <span class="s2">&quot;path/to/resource&quot;</span><span class="p">;</span>
+<span class="no">Resource</span> <span class="n">res</span> <span class="o">=</span> <span class="n">resourceResolver</span><span class="o">.</span><span class="n">getResource</span><span class="p">(</span><span class="n">resourcePath</span><span class="p">);</span>
+<span class="cp">%&gt;</span><span class="x"></span>
+</pre></div>
+
+
+<p>If needed you can adapt a Sling Resource to a JCR Node:</p>
+<div class="codehilite"><pre><span class="n">Node</span> <span class="n">node</span> <span class="o">=</span> <span class="n">resource</span><span class="o">.</span><span class="n">adaptTo</span><span class="p">(</span><span class="n">Node</span><span class="o">.</span><span class="n">class</span><span class="p">);</span>
+</pre></div>
+
+
+<p>Note: <em>resource.adaptTo(Node.class)</em> may return null if the resource is
+not backed by a JCR node. This is particularly the case for
+<em>NonExistingResource</em> resources or resource provided by a non-JCR
+resource provider.</p>
+<p><a name="GettingResourcesandPropertiesinSling-AccessingaProperty"></a></p>
+<h2 id="accessing-a-property">Accessing a Property</h2>
+<p>The <em>ValueMap</em> is an easy way to access properties of a resource. With
+most resources you can use <em>Adaptable.adaptTo(Class)</em> to adapt the
+resource to a value map:</p>
+<div class="codehilite"><pre><span class="n">ValueMap</span> <span class="n">properties</span> <span class="o">=</span> <span class="n">res</span><span class="o">.</span><span class="n">adaptTo</span><span class="p">(</span><span class="n">ValueMap</span><span class="o">.</span><span class="n">class</span><span class="p">);</span>
+<span class="sr">//</span> <span class="n">res</span> <span class="n">is</span> <span class="n">the</span> <span class="n">Resource</span>
+</pre></div>
+
+
+<p>You can also access the properties through the <em>ResourceUtil</em> utility
+class:</p>
+<div class="codehilite"><pre><span class="n">ValueMap</span> <span class="n">properties</span> <span class="o">=</span> <span class="n">ResourceUtil</span><span class="o">.</span><span class="n">getValueMap</span><span class="p">(</span><span class="n">res</span><span class="p">);</span>
+<span class="sr">//</span> <span class="n">res</span> <span class="n">is</span> <span class="n">the</span> <span class="n">Resource</span>
+</pre></div>
+
+
+<p>Then, to access a specific String property called <em>propName</em>:</p>
+<div class="codehilite"><pre><span class="n">String</span> <span class="n">rule</span> <span class="o">=</span> <span class="n">properties</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">propName</span><span class="p">,</span> <span class="p">(</span><span class="n">String</span><span class="p">)</span> <span class="n">null</span><span class="p">);</span>
+</pre></div>
+
+
+<p>For more details about resources and how to access them in Sling, you can
+refer to the <a href="http://sling.apache.org/site/resources.html">Sling documentation about Resources</a>
+.</p>
+      </div>
+    </div>
+    
+    <div class="trademarkFooter"> 
+		Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+	</div>
+  </body>
+</html>

Added: websites/staging/sling/trunk/content/getting-started.html
==============================================================================
--- websites/staging/sling/trunk/content/getting-started.html (added)
+++ websites/staging/sling/trunk/content/getting-started.html Sun Apr 22 16:52:28 2012
@@ -0,0 +1,115 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+  <head>
+    <title>Apache Sling - Getting Started</title>
+    <link rel="stylesheet" href="http://sling.apache.org/site/media.data/site.css" type="text/css" media="all">
+    <link rel="icon" href="http://sling.apache.org/site/media.data/favicon.ico">
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+  </head>
+  <body>
+    <div class="title">
+      <div class="logo">
+        <a href="http://sling.apache.org/site/index.html">
+          <img border="0" alt="Apache Sling" src="http://sling.apache.org/site/media.data/logo.png">
+        </a>
+      </div>
+      <div class="header">
+        <a href="http://www.apache.org/">
+          <img border="0" alt="Apache" src="http://sling.apache.org/site/media.data/apache.png">
+        </a>
+      </div>
+    </div>
+    
+    <div class="menu"> 
+      <h1 id="documentation">Documentation</h1>
+<ul>
+<li><a href="getting-started.html">Getting Started</a></li>
+<li><a href="the-sling-engine.html">The Sling Engine</a></li>
+<li><a href="development.html">Development</a></li>
+<li><a href="bundles.html">Bundles</a></li>
+<li><a href="tutorials-&amp;-how-tos.html">Tutorials &amp; How-Tos</a></li>
+<li><a href="configuration.html">Configuration</a></li>
+<li><a href="http://sling.apache.org/apidocs/sling5/index.html">API docs</a></li>
+<li><a href="http://s.apache.org/sling.wiki">Wiki</a></li>
+<li><a href="http://s.apache.org/sling.faq">FAQ</a></li>
+</ul>
+<h1 id="project-info">Project info</h1>
+<ul>
+<li><a href="http://sling.apache.org/site/downloads.cgi">Downloads</a></li>
+<li><a href="http://www.apache.org/licenses/">License</a></li>
+<li><a href="contributing.html">Contributing</a></li>
+<li><a href="news.html">News</a></li>
+<li><a href="links.html">Links</a></li>
+<li><a href="project-information.html">Project Information</a></li>
+<li><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a></li>
+<li><a href="http://svn.apache.org/viewvc/sling/trunk">Browse Source Repository</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+<h1 id="sponsorship">Sponsorship</h1>
+<ul>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/foundation/buy_stuff.html">Buy Stuff</a></li>
+</ul>
+<iframe 
+    src="http://www.apache.org/ads/button.html"
+    style="border-width:0; float: left" frameborder="0" 
+    scrolling="no"
+    width="135" 
+    height="135">
+</iframe>
+    </div>
+    
+    <div class="main">
+      <div class="breadcrump" style="font-size: 80%;">
+		(TODO: breadcrumb here)
+      </div>
+      <h1 class="title">Getting Started</h1>
+      <div>
+	    <p><a name="GettingStarted-GettingStarted"></a></p>
+<h1 id="getting-started">Getting Started</h1>
+<p>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:</p>
+<p>{children:all=true}</p>
+<p><a name="GettingStarted-Wheretoheadfromhere"></a></p>
+<h2 id="where-to-head-from-here">Where to head from here</h2>
+<p>We recommend you read through following topics to get as fast as possible
+into Sling: </p>
+<p>{show-to}
+<em> What is Sling
+{show-to}
+</em> <a href="getting-and-building-sling.html">Getting and building Sling</a>
+<em> <a href="architecture.html">Architecture</a>
+</em> <a href="dispatching-requests.html">Dispatching Requests</a>
+<em> <a href="resources.html">Resources</a>
+</em> <a href="http://cwiki.apache.org/SLING/setting-up-eclipse-34-for-sling.html">Setting up an Sling-Project with Eclipse</a>
+<em> <a href="manipulating-content---the-slingpostservlet-(servlets.post).html">Manipulating Content - The SlingPostServlet (servlets.post)</a>
+</em> <a href="request-parameters.html">Request Parameters</a>
+<em> <a href="authentication.html">Authentication</a>
+</em> <a href="eventing-and-jobs.html">Eventing and Jobs</a></p>
+      </div>
+    </div>
+    
+    <div class="trademarkFooter"> 
+		Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+	</div>
+  </body>
+</html>

Added: websites/staging/sling/trunk/content/groovy-support.html
==============================================================================
--- websites/staging/sling/trunk/content/groovy-support.html (added)
+++ websites/staging/sling/trunk/content/groovy-support.html Sun Apr 22 16:52:28 2012
@@ -0,0 +1,174 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+  <head>
+    <title>Apache Sling - Groovy Support</title>
+    <link rel="stylesheet" href="http://sling.apache.org/site/media.data/site.css" type="text/css" media="all">
+    <link rel="icon" href="http://sling.apache.org/site/media.data/favicon.ico">
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+  </head>
+  <body>
+    <div class="title">
+      <div class="logo">
+        <a href="http://sling.apache.org/site/index.html">
+          <img border="0" alt="Apache Sling" src="http://sling.apache.org/site/media.data/logo.png">
+        </a>
+      </div>
+      <div class="header">
+        <a href="http://www.apache.org/">
+          <img border="0" alt="Apache" src="http://sling.apache.org/site/media.data/apache.png">
+        </a>
+      </div>
+    </div>
+    
+    <div class="menu"> 
+      <h1 id="documentation">Documentation</h1>
+<ul>
+<li><a href="getting-started.html">Getting Started</a></li>
+<li><a href="the-sling-engine.html">The Sling Engine</a></li>
+<li><a href="development.html">Development</a></li>
+<li><a href="bundles.html">Bundles</a></li>
+<li><a href="tutorials-&amp;-how-tos.html">Tutorials &amp; How-Tos</a></li>
+<li><a href="configuration.html">Configuration</a></li>
+<li><a href="http://sling.apache.org/apidocs/sling5/index.html">API docs</a></li>
+<li><a href="http://s.apache.org/sling.wiki">Wiki</a></li>
+<li><a href="http://s.apache.org/sling.faq">FAQ</a></li>
+</ul>
+<h1 id="project-info">Project info</h1>
+<ul>
+<li><a href="http://sling.apache.org/site/downloads.cgi">Downloads</a></li>
+<li><a href="http://www.apache.org/licenses/">License</a></li>
+<li><a href="contributing.html">Contributing</a></li>
+<li><a href="news.html">News</a></li>
+<li><a href="links.html">Links</a></li>
+<li><a href="project-information.html">Project Information</a></li>
+<li><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a></li>
+<li><a href="http://svn.apache.org/viewvc/sling/trunk">Browse Source Repository</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+<h1 id="sponsorship">Sponsorship</h1>
+<ul>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/foundation/buy_stuff.html">Buy Stuff</a></li>
+</ul>
+<iframe 
+    src="http://www.apache.org/ads/button.html"
+    style="border-width:0; float: left" frameborder="0" 
+    scrolling="no"
+    width="135" 
+    height="135">
+</iframe>
+    </div>
+    
+    <div class="main">
+      <div class="breadcrump" style="font-size: 80%;">
+		(TODO: breadcrumb here)
+      </div>
+      <h1 class="title">Groovy Support</h1>
+      <div>
+	    <p>{excerpt:hidden=true}
+Explains how to add support for Groovy to Apache Sling.
+{excerpt}</p>
+<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 <em>groovy-all.jar</em> 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="http://snapshots.repository.codehaus.org/org/codehaus/groovy/groovy-all/1.6-RC-1-SNAPSHOT/groovy-all-1.6-RC-1-20081211.113737-1.jar">first RC1 Snapshot of Groovy 1.6</a>
+ which contains all the required OSGi bundle manifest headers as well das
+the JSR-233 <em>ScriptEngine</em> to use the <em>groovy-all.jar</em> 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: {{<a href="http://snapshots.repository.codehaus.org/org/codehaus/groovy/groovy-all/1.7-beta-1-SNAPSHOT/groovy-all-1.7-beta-1-20081210.120632-2.jar">groovy-all-1.7-beta-1-20081210.120632-2.jar</a>
+}}.</p>
+<p>To deploy the bundle go to the Bundles page, for example at
+http://localhost:8888/system/console/bundles of the Apache Felix Web
+Console select the bundle file to upload, check the <em>Start</em> check box and
+click <em>Install or Update</em> button.</p>
+<p>You may check, whether the Groovy ScriptEngine has been "accepted" by
+Sling, by going to the Script Engines page of the Apache Felix Web Console.
+You should see the entry for Groovy there, somthing like this:</p>
+<div class="codehilite"><pre><span class="n">Groovy</span> <span class="n">Scripting</span> <span class="n">Engine</span><span class="p">,</span> <span class="mf">2.0</span>
+  <span class="n">Language</span>  <span class="n">Groovy</span><span class="p">,</span>
+  <span class="n">Extensions</span>    <span class="n">groovy</span>
+  <span class="n">MIME</span> <span class="n">Types</span>    <span class="n">application</span><span class="o">/</span><span class="n">x</span><span class="o">-</span><span class="n">groovy</span>
+  <span class="n">Names</span>     <span class="n">groovy</span><span class="p">,</span> <span class="n">Groovy</span>
+</pre></div>
+
+
+<p><a name="GroovySupport-Testing"></a></p>
+<h2 id="testing">Testing</h2>
+<p>To test create a simple Groovy script, for example</p>
+<div class="codehilite"><pre>response.setContentType(&quot;text/plain&quot;);
+response.setCharacterEncoding(&quot;UTF-8&quot;);
+
+println &quot;Hello World !&quot;
+println &quot;This is Groovy Speaking&quot;
+println &quot;You requested the Resource <span class="cp">${</span><span class="n">resource</span><span class="cp">}</span> (yes, this is a GString)&quot;
+</pre></div>
+
+
+<p>and upload it to the repository as <em>/apps/nt/folder/GET.groovy</em> using
+your favourite WebDAV client or use curl to upload the file (assuming Sling
+is running on localhost:8888) :</p>
+<div class="codehilite"><pre><span class="nv">$</span> <span class="nv">curl</span> <span class="o">-</span><span class="n">u</span> <span class="n">admin:admin</span> <span class="o">-</span><span class="n">FGET</span><span class="o">.</span><span class="n">groovy</span><span class="o">=</span><span class="nv">@GET</span><span class="o">.</span><span class="n">groovy</span>
+</pre></div>
+
+
+<p>-F../../nt/jcr:primaryType=sling:Folder http:host:8888/apps/nt/folder</p>
+<p>To test it create a <em>/sample</em> <em>nt:Folder</em> node using your favourite
+WebDAV client or use curl again:</p>
+<div class="codehilite"><pre><span class="nv">$</span> <span class="nv">curl</span> <span class="o">-</span><span class="n">u</span> <span class="n">admin:admin</span> <span class="o">-</span><span class="n">Fjcr:primaryType</span><span class="o">=</span><span class="n">nt:folder</span> <span class="n">http:</span><span class="sr">//</span><span class="n">localhost:8888</span><span class="o">/</span>
+</pre></div>
+
+
+<p>Finally, request the <em>/sample</em> node using your favourite Browser or use
+curl again:</p>
+<div class="codehilite"><pre><span class="nv">$</span> <span class="nv">curl</span> <span class="n">http:</span><span class="sr">//</span><span class="n">localhost:8888</span><span class="o">/</span><span class="n">sample</span>
+<span class="n">Hello</span> <span class="n">World</span> <span class="o">!</span>
+<span class="n">This</span> <span class="n">is</span> <span class="n">Groovy</span> <span class="n">Speaking</span>
+<span class="n">You</span> <span class="n">requested</span> <span class="n">Resource</span> <span class="n">JcrNodeResource</span><span class="p">,</span> <span class="n">type</span><span class="o">=</span><span class="n">nt:folder</span><span class="p">,</span> <span class="n">path</span><span class="o">=/</span><span class="n">sample</span> <span class="p">(</span><span class="n">yes</span><span class="p">,</span>
+</pre></div>
+
+
+<p>this is a GString)</p>
+<p><a name="GroovySupport-References"></a></p>
+<h2 id="references">References</h2>
+<ul>
+<li><a href="https://issues.apache.org/jira/browse/SLING-315">SLING-315</a>
+ -- The initial Sling issue proposing the addition of a Groovy ScriptEngine
+to Sling.</li>
+<li><a href="http://markmail.org/message/7sqscr5y2mbk6jko">Groovy Support in Apache Sling</a>
+ -- A short thread on turning the Groovy <em>groovy-all.jar</em> into an OSGi
+Bundle.</li>
+<li><a href="http://markmail.org/message/47n2ow2jlo553jvk">Groovy in Apache Sling</a>
+ -- Thread on adding the <em>DynamicImport-Package</em> header to the Groovy
+bundle manifest.</li>
+</ul>
+      </div>
+    </div>
+    
+    <div class="trademarkFooter"> 
+		Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+	</div>
+  </body>
+</html>

Added: websites/staging/sling/trunk/content/guides.html
==============================================================================
--- websites/staging/sling/trunk/content/guides.html (added)
+++ websites/staging/sling/trunk/content/guides.html Sun Apr 22 16:52:28 2012
@@ -0,0 +1,136 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+  <head>
+    <title>Apache Sling - Guides</title>
+    <link rel="stylesheet" href="http://sling.apache.org/site/media.data/site.css" type="text/css" media="all">
+    <link rel="icon" href="http://sling.apache.org/site/media.data/favicon.ico">
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+  </head>
+  <body>
+    <div class="title">
+      <div class="logo">
+        <a href="http://sling.apache.org/site/index.html">
+          <img border="0" alt="Apache Sling" src="http://sling.apache.org/site/media.data/logo.png">
+        </a>
+      </div>
+      <div class="header">
+        <a href="http://www.apache.org/">
+          <img border="0" alt="Apache" src="http://sling.apache.org/site/media.data/apache.png">
+        </a>
+      </div>
+    </div>
+    
+    <div class="menu"> 
+      <h1 id="documentation">Documentation</h1>
+<ul>
+<li><a href="getting-started.html">Getting Started</a></li>
+<li><a href="the-sling-engine.html">The Sling Engine</a></li>
+<li><a href="development.html">Development</a></li>
+<li><a href="bundles.html">Bundles</a></li>
+<li><a href="tutorials-&amp;-how-tos.html">Tutorials &amp; How-Tos</a></li>
+<li><a href="configuration.html">Configuration</a></li>
+<li><a href="http://sling.apache.org/apidocs/sling5/index.html">API docs</a></li>
+<li><a href="http://s.apache.org/sling.wiki">Wiki</a></li>
+<li><a href="http://s.apache.org/sling.faq">FAQ</a></li>
+</ul>
+<h1 id="project-info">Project info</h1>
+<ul>
+<li><a href="http://sling.apache.org/site/downloads.cgi">Downloads</a></li>
+<li><a href="http://www.apache.org/licenses/">License</a></li>
+<li><a href="contributing.html">Contributing</a></li>
+<li><a href="news.html">News</a></li>
+<li><a href="links.html">Links</a></li>
+<li><a href="project-information.html">Project Information</a></li>
+<li><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a></li>
+<li><a href="http://svn.apache.org/viewvc/sling/trunk">Browse Source Repository</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+<h1 id="sponsorship">Sponsorship</h1>
+<ul>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/foundation/buy_stuff.html">Buy Stuff</a></li>
+</ul>
+<iframe 
+    src="http://www.apache.org/ads/button.html"
+    style="border-width:0; float: left" frameborder="0" 
+    scrolling="no"
+    width="135" 
+    height="135">
+</iframe>
+    </div>
+    
+    <div class="main">
+      <div class="breadcrump" style="font-size: 80%;">
+		(TODO: breadcrumb here)
+      </div>
+      <h1 class="title">Guides</h1>
+      <div>
+	    <p>These pages contain further information in a more informal way.</p>
+<div class="codehilite"><pre><span class="o">*</span> <span class="p">[</span><span class="n">Discover</span> <span class="n">Sling</span> <span class="n">in</span> <span class="mi">15</span> <span class="n">minutes</span> <span class="p">](</span><span class="n">discover</span><span class="o">-</span><span class="n">sling</span><span class="o">-</span><span class="n">in</span><span class="o">-</span><span class="mi">15</span><span class="o">-</span><span class="n">minutes</span><span class="o">-.</span><span class="n">html</span><span class="p">)</span>
+</pre></div>
+
+
+<ul>
+<li>
+<p>title says it all</p>
+<ul>
+<li><a href="resources.html">Resources</a>
+ -- Presents the Resource as the object around which Sling is built</li>
+<li><a href="servlet-resolution.html">Servlet Resolution</a>
+ -- How Sling resolves the servlet or script responsible for rendering a
+Resource.</li>
+<li><a href="request-parameters.html">Request Parameters</a>
+ -- Explains how Sling provides request parameters to servlets, scripts and
+filters.</li>
+<li>
+<p><a href="repository-based-development.html">Repository Based Development</a>
+ -- Shows how WebDAV is supported by Sling.</p>
+</li>
+<li>
+<p><a href="installing-and-upgrading-bundles.html">Bundle Management</a>
+ -- Explains how to install, upgrade and uninstall Bundles using the Sling
+Management console.</p>
+</li>
+</ul>
+</li>
+</ul>
+<p>These pages refer to the old Component API and launcher, and remain
+referred to here until more up to date documentation has been prepared:</p>
+<div class="codehilite"><pre><span class="o">*</span> <span class="p">[</span><span class="n">Getting</span> <span class="ow">and</span> <span class="n">Building</span> <span class="n">Sling</span><span class="p">](</span><span class="n">getting</span><span class="o">-</span><span class="ow">and</span><span class="o">-</span><span class="n">building</span><span class="o">-</span><span class="n">sling</span><span class="o">.</span><span class="n">html</span><span class="p">)</span>
+</pre></div>
+
+
+<p>-- A short recount on the first step for getting a running Sling instance
+after checking out the source from the SVN repository
+    * <a href="default-mapping-and-rendering.html">Default Mapping and Rendering</a>
+ -- Explains default mapping of repository nodes to Content instances and
+selection of a default Component.
+    * <a href="dispatching-requests.html">Dispatching Requests</a>
+ -- Explains how a Component may dispatch requests to include further
+content renderings in the response to the client's request</p>
+      </div>
+    </div>
+    
+    <div class="trademarkFooter"> 
+		Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+	</div>
+  </body>
+</html>

Added: websites/staging/sling/trunk/content/how-to-manage-events-in-sling.html
==============================================================================
--- websites/staging/sling/trunk/content/how-to-manage-events-in-sling.html (added)
+++ websites/staging/sling/trunk/content/how-to-manage-events-in-sling.html Sun Apr 22 16:52:28 2012
@@ -0,0 +1,336 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+  <head>
+    <title>Apache Sling - How to Manage Events in Sling</title>
+    <link rel="stylesheet" href="http://sling.apache.org/site/media.data/site.css" type="text/css" media="all">
+    <link rel="icon" href="http://sling.apache.org/site/media.data/favicon.ico">
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+  </head>
+  <body>
+    <div class="title">
+      <div class="logo">
+        <a href="http://sling.apache.org/site/index.html">
+          <img border="0" alt="Apache Sling" src="http://sling.apache.org/site/media.data/logo.png">
+        </a>
+      </div>
+      <div class="header">
+        <a href="http://www.apache.org/">
+          <img border="0" alt="Apache" src="http://sling.apache.org/site/media.data/apache.png">
+        </a>
+      </div>
+    </div>
+    
+    <div class="menu"> 
+      <h1 id="documentation">Documentation</h1>
+<ul>
+<li><a href="getting-started.html">Getting Started</a></li>
+<li><a href="the-sling-engine.html">The Sling Engine</a></li>
+<li><a href="development.html">Development</a></li>
+<li><a href="bundles.html">Bundles</a></li>
+<li><a href="tutorials-&amp;-how-tos.html">Tutorials &amp; How-Tos</a></li>
+<li><a href="configuration.html">Configuration</a></li>
+<li><a href="http://sling.apache.org/apidocs/sling5/index.html">API docs</a></li>
+<li><a href="http://s.apache.org/sling.wiki">Wiki</a></li>
+<li><a href="http://s.apache.org/sling.faq">FAQ</a></li>
+</ul>
+<h1 id="project-info">Project info</h1>
+<ul>
+<li><a href="http://sling.apache.org/site/downloads.cgi">Downloads</a></li>
+<li><a href="http://www.apache.org/licenses/">License</a></li>
+<li><a href="contributing.html">Contributing</a></li>
+<li><a href="news.html">News</a></li>
+<li><a href="links.html">Links</a></li>
+<li><a href="project-information.html">Project Information</a></li>
+<li><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a></li>
+<li><a href="http://svn.apache.org/viewvc/sling/trunk">Browse Source Repository</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+<h1 id="sponsorship">Sponsorship</h1>
+<ul>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/foundation/buy_stuff.html">Buy Stuff</a></li>
+</ul>
+<iframe 
+    src="http://www.apache.org/ads/button.html"
+    style="border-width:0; float: left" frameborder="0" 
+    scrolling="no"
+    width="135" 
+    height="135">
+</iframe>
+    </div>
+    
+    <div class="main">
+      <div class="breadcrump" style="font-size: 80%;">
+		(TODO: breadcrumb here)
+      </div>
+      <h1 class="title">How to Manage Events in Sling</h1>
+      <div>
+	    <p><a name="HowtoManageEventsinSling-HowtoManageEventsinSling"></a></p>
+<h1 id="how-to-manage-events-in-sling">How to Manage Events in Sling</h1>
+<p>Apache Sling provides some mechanisms and support for managing events.</p>
+<p>The event mechanism is leveraging the OSGi Event Admin Specification (OSGi
+Compendium 113). The OSGi API is very simple and lightweight. Sending an
+event is just generating the event object and calling the event admin.
+Receiving the event is implementing a single interface and declaring
+through properties which topics one is interested in. 
+Sling makes a distinction between events and job events. Unlike events, job
+events are garanteed to be processed. In other words: someone has to do
+something with the job event (do the job). </p>
+<p>For more details please refer to the following resources:
+<em> <a href="http://sling.apache.org/site/eventing-and-jobs.html">Eventing, Jobs and Scheduling section</a>
+ to get detailed information on the eventing mechanisms in Sling.
+</em> package <a href="http://www.osgi.org/javadoc/r4v42/org/osgi/service/event/package-summary.html">org.osgi.service.event</a>
+ of the OSGI API.
+* package <a href="http://sling.apache.org/apidocs/sling6/org/apache/sling/event/package-summary.html">org.apache.sling.event</a>
+ of the Sling API.</p>
+<p>This page drives you through the implementation of two services that rely
+on the Sling eventing mechanisms. The services implement the following use
+case: whenever a file is uploaded to a temporary location in your web
+application, the file is moved to a specific location according to its MIME
+type.</p>
+<p><a name="HowtoManageEventsinSling-Introduction"></a></p>
+<h2 id="introduction">Introduction</h2>
+<p>You will now implement the logic to listen to files posted to
+<em>/tmp/dropbox</em> and to move them to the appropriate locations depending on
+the MIME type:
+<em> images (.png) are moved to </em>/dropbox/images/<em>
+</em> music (.mp3) are moved to <em>/dropbox/music/</em>
+<em> movies (.avi) are moved to </em>/dropbox/movies/<em>
+</em> otherwise the files are moved to <em>/dropbox/other/</em></p>
+<p>To do that, you will implement two services. The first one, called
+<em>DropBoxService</em>:
+<em> Listens to OSGI events.
+</em> Sends a job event if a resource has been added to <em>/tmp/dropbox</em>.</p>
+<p>The second one, called <em>DropBoxEventHandler</em>:
+<em> Listens to the former job event.
+</em> Moves the file according to its extension.</p>
+<p><a name="HowtoManageEventsinSling-ListeningtoOSGIEvents"></a></p>
+<h2 id="listening-to-osgi-events">Listening to OSGI Events</h2>
+<p>To listen to the specific OSGI event <em>"resource added"</em>:
+<em> The property </em>event.topics<em> needs to be set to
+</em>org.apache.sling.api.SlingConstants.TOPIC_RESOURCE_ADDED* in the class
+annotations.</p>
+<div class="codehilite"><pre> <span class="o">*</span> <span class="nv">@scr</span><span class="o">.</span><span class="n">property</span> <span class="n">name</span><span class="o">=</span><span class="s">&quot;event.topics&quot;</span>
+</pre></div>
+
+
+<p>valueRef="org.apache.sling.api.SlingConstants.TOPIC_RESOURCE_ADDED"</p>
+<p>You can refer to the <a href="http://sling.apache.org/apidocs/sling6/org/apache/sling/api/SlingConstants.html">org.apache.sling.api.SlingConstants</a>
+ class in the Javadocs to know about other events available in Sling.</p>
+<p><a name="HowtoManageEventsinSling-SendingJobEvents"></a></p>
+<h2 id="sending-job-events">Sending Job Events</h2>
+<p>To send a job event the service needs to implement:
+<em> the </em>org.osgi.service.event.EventHandler<em> interface.
+</em> the <em>org.apache.sling.event.JobProcessor</em> interface.</p>
+<div class="codehilite"><pre><span class="n">public</span> <span class="n">class</span> <span class="n">DropBoxService</span> <span class="n">implements</span> <span class="n">JobProcessor</span><span class="p">,</span> <span class="n">EventHandler</span> <span class="p">{</span>
+</pre></div>
+
+
+<p>To send the job event the Event Admin service needs to be referenced:</p>
+<div class="codehilite"><pre>    <span class="o">/**</span> 
+     <span class="o">*</span> <span class="n">The</span> <span class="n">OSGI</span> <span class="n">event</span> <span class="n">admin</span> <span class="n">used</span> <span class="k">for</span> <span class="n">sending</span> <span class="n">events</span> 
+     <span class="o">*</span> <span class="nv">@scr</span><span class="o">.</span><span class="n">reference</span>
+     <span class="o">*/</span>
+    <span class="n">private</span> <span class="n">EventAdmin</span> <span class="n">eventAdmin</span><span class="p">;</span>
+</pre></div>
+
+
+<p>The job topic for dropbox job events needs to be defined:</p>
+<div class="codehilite"><pre>    <span class="sr">/** The job topic for dropbox job events. */</span>
+    <span class="n">public</span> <span class="n">static</span> <span class="n">final</span> <span class="n">String</span> <span class="n">JOB_TOPIC</span> <span class="o">=</span>
+</pre></div>
+
+
+<p>"com/sling/eventing/dropbox/job";</p>
+<p>The <em>org.osgi.service.event.EventHandler#handleEvent(Event event)</em> method
+needs to be implemented:</p>
+<div class="codehilite"><pre>    <span class="n">public</span> <span class="n">void</span> <span class="n">handleEvent</span><span class="p">(</span><span class="n">Event</span> <span class="n">event</span><span class="p">)</span> <span class="p">{</span>
+        <span class="k">if</span> <span class="p">(</span><span class="n">EventUtil</span><span class="o">.</span><span class="n">isLocal</span><span class="p">(</span><span class="n">event</span><span class="p">))</span> <span class="p">{</span>
+        <span class="n">EventUtil</span><span class="o">.</span><span class="n">processJob</span><span class="p">(</span><span class="n">event</span><span class="p">,</span> <span class="n">this</span><span class="p">);</span>
+        <span class="p">}</span>
+    <span class="p">}</span>
+</pre></div>
+
+
+<p>The <em>org.apache.sling.event.JobProcessor#process(Event event)</em> method needs
+to be implemented.</p>
+<p>Its logic is as follows:
+<em> The OSGI event is analyzed.
+</em> If the event is a file that has been added to <em>/tmp/dropbox</em>:
+<strong> An event is created with 2 properties:
+<strong><em> A property to set the event as a job event.
+</em></strong> A property for the file path.
+</strong> The job event is sent to all the listeners that subscribe to the topic
+of the event.</p>
+<div class="codehilite"><pre>    <span class="n">public</span> <span class="n">boolean</span> <span class="n">process</span><span class="p">(</span><span class="n">Event</span> <span class="n">event</span><span class="p">)</span> <span class="p">{</span>
+        <span class="n">String</span> <span class="n">propPath</span> <span class="o">=</span> <span class="p">(</span><span class="n">String</span><span class="p">)</span>
+</pre></div>
+
+
+<p>event.getProperty(SlingConstants.PROPERTY_PATH);
+            String propResType = (String)
+event.getProperty(SlingConstants.PROPERTY_RESOURCE_TYPE);
+            // an event is sent if a file is added to /tmp/dropbox
+            if (propPath.startsWith("/tmp/dropbox") &amp;&amp;
+propResType.equals("nt:file")) {
+                final Dictionary<String, Object> props = new
+Hashtable<String, Object>();
+                props.put(EventUtil.PROPERTY_JOB_TOPIC, JOB_TOPIC);
+                props.put("resourcePath", propPath);
+                Event dropboxJobEvent = new
+Event(EventUtil.TOPIC_JOB, props);
+                eventAdmin.sendEvent(dropboxJobEvent);
+                log.info("the dropbox job has been sent: {}",
+propPath);
+            }
+            return true;
+        }</p>
+<p>The complete code for the <em>DropBoxService</em> service is available <a href="^dropboxservice.java.html">here</a>
+.</p>
+<p><a name="HowtoManageEventsinSling-ListeningtoJobEvents"></a></p>
+<h2 id="listening-to-job-events">Listening to Job Events</h2>
+<p>Now that you have implemented a service that sends a job event when a file
+is uploaded to <em>/tmp/dropbox</em>, you will implement the service
+<em>DropBoxEventHandler</em> that listens to those job events and moves the files
+to a location according to their MIME types.</p>
+<p>To listen to the job events that have been defined before:
+<em> The property </em>event.topics<em> needs to be set to
+</em>mypackage.DropBoxService.JOB_TOPIC* in the class annotations.</p>
+<div class="codehilite"><pre> <span class="o">*</span> <span class="nv">@scr</span><span class="o">.</span><span class="n">property</span> <span class="n">name</span><span class="o">=</span><span class="s">&quot;event.topics&quot;</span>
+</pre></div>
+
+
+<p>valueRef="mypackage.DropBoxService.JOB_TOPIC"</p>
+<p><a name="HowtoManageEventsinSling-HandlingJobEvents"></a></p>
+<h2 id="handling-job-events">Handling Job Events</h2>
+<p>To move the files the service needs to implement:
+<em> the </em>org.osgi.service.event.EventHandler<em> interface.
+</em> the <em>org.apache.sling.event.JobProcessor</em> interface.</p>
+<div class="codehilite"><pre><span class="n">public</span> <span class="n">class</span> <span class="n">DropBoxEventHandler</span> <span class="n">implements</span> <span class="n">JobProcessor</span><span class="p">,</span> <span class="n">EventHandler</span> <span class="p">{</span>
+</pre></div>
+
+
+<p>Some class fields need to be defined for:
+<em> The default log.
+</em> The references to the SlingRepository and the JcrResourceResolverFactory
+services, which are used in the implementation.
+* The destination paths of the files.</p>
+<p>{code}
+   /*<em> Default log. </em>/
+    protected final Logger log = LoggerFactory.getLogger(this.getClass());</p>
+<div class="codehilite"><pre><span class="sr">/** @scr.reference */</span>
+<span class="n">private</span> <span class="n">SlingRepository</span> <span class="n">repository</span><span class="p">;</span>
+
+<span class="o">/**</span>
+ <span class="o">*</span> <span class="nv">@scr</span><span class="o">.</span><span class="n">reference</span>
+ <span class="o">*/</span>
+<span class="n">private</span> <span class="n">JcrResourceResolverFactory</span> <span class="n">resolverFactory</span><span class="p">;</span>
+
+<span class="n">private</span> <span class="n">final</span> <span class="n">static</span> <span class="n">String</span> <span class="n">IMAGES_PATH</span> <span class="o">=</span> <span class="s">&quot;/dropbox/images/&quot;</span><span class="p">;</span>
+<span class="n">private</span> <span class="n">final</span> <span class="n">static</span> <span class="n">String</span> <span class="n">MUSIC_PATH</span> <span class="o">=</span> <span class="s">&quot;/dropbox/music/&quot;</span><span class="p">;</span>
+<span class="n">private</span> <span class="n">final</span> <span class="n">static</span> <span class="n">String</span> <span class="n">MOVIES_PATH</span> <span class="o">=</span> <span class="s">&quot;/dropbox/movies/&quot;</span><span class="p">;</span>
+<span class="n">private</span> <span class="n">final</span> <span class="n">static</span> <span class="n">String</span> <span class="n">OTHER_PATH</span> <span class="o">=</span> <span class="s">&quot;/dropbox/other/&quot;</span><span class="p">;</span>
+
+<span class="n">The</span> <span class="o">*</span><span class="n">org</span><span class="o">.</span><span class="n">osgi</span><span class="o">.</span><span class="n">service</span><span class="o">.</span><span class="n">event</span><span class="o">.</span><span class="n">EventHandler</span><span class="c1">#handleEvent(Event event)* method</span>
+</pre></div>
+
+
+<p>needs to be implemented:</p>
+<div class="codehilite"><pre><span class="n">public</span> <span class="n">void</span> <span class="n">handleEvent</span><span class="p">(</span><span class="n">Event</span> <span class="n">event</span><span class="p">)</span> <span class="p">{</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">EventUtil</span><span class="o">.</span><span class="n">isLocal</span><span class="p">(</span><span class="n">event</span><span class="p">))</span> <span class="p">{</span>
+    <span class="n">EventUtil</span><span class="o">.</span><span class="n">processJob</span><span class="p">(</span><span class="n">event</span><span class="p">,</span> <span class="n">this</span><span class="p">);</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="n">The</span> <span class="o">*</span><span class="n">org</span><span class="o">.</span><span class="n">apache</span><span class="o">.</span><span class="n">sling</span><span class="o">.</span><span class="n">event</span><span class="o">.</span><span class="n">JobProcessor</span><span class="c1">#process(Event event)* method needs</span>
+</pre></div>
+
+
+<p>to be implemented.</p>
+<div class="codehilite"><pre><span class="n">Its</span> <span class="n">logic</span> <span class="n">is</span> <span class="n">as</span> <span class="n">follows:</span>
+<span class="o">*</span> <span class="n">The</span> <span class="n">resource</span> <span class="n">path</span> <span class="n">is</span> <span class="n">extracted</span> <span class="n">from</span> <span class="n">the</span> <span class="n">job</span> <span class="n">event</span> <span class="n">property</span><span class="o">.</span>
+<span class="o">*</span> <span class="n">The</span> <span class="n">resource</span> <span class="n">is</span> <span class="n">obtained</span> <span class="n">from</span> <span class="n">the</span> <span class="n">resource</span> <span class="n">path</span><span class="o">.</span>
+<span class="o">*</span> <span class="n">If</span> <span class="n">the</span> <span class="n">resource</span> <span class="n">is</span> <span class="n">a</span> <span class="n">file</span><span class="p">,</span> <span class="n">the</span> <span class="n">destination</span> <span class="n">path</span> <span class="n">is</span> <span class="nb">defined</span> <span class="n">based</span> <span class="n">on</span> <span class="n">the</span>
+</pre></div>
+
+
+<p>file MIME type.
+    * The file is moved to the new location.</p>
+<div class="codehilite"><pre><span class="n">public</span> <span class="n">boolean</span> <span class="n">process</span><span class="p">(</span><span class="n">Event</span> <span class="n">event</span><span class="p">)</span> <span class="p">{</span>
+    <span class="n">Session</span> <span class="n">adminSession</span> <span class="o">=</span> <span class="n">null</span><span class="p">;</span>
+    <span class="n">try</span> <span class="p">{</span>
+        <span class="n">String</span> <span class="n">resourcePath</span> <span class="o">=</span> <span class="p">(</span><span class="n">String</span><span class="p">)</span>
+</pre></div>
+
+
+<p>event.getProperty("resourcePath");
+            String resourceName =
+resourcePath.substring(resourcePath.lastIndexOf("/") + 1);
+        adminSession = repository.loginAdministrative(null);
+        ResourceResolver resourceResolver =
+resolverFactory.getResourceResolver(adminSession);
+        Resource res = resourceResolver.getResource(resourcePath);
+        if (ResourceUtil.isA(res, "nt:file")) {
+            String mimeType =
+res.getResourceMetadata().getContentType();
+            String destDir;
+            if (mimeType.equals("image/png")) {
+                destDir = IMAGES_PATH;
+            }
+            else if (mimeType.equals("audio/mpeg")) {
+                destDir = MUSIC_PATH;
+            }
+            else if (mimeType.equals("video/x-msvideo")) {
+                destDir = MOVIES_PATH;
+            }
+            else {
+                destDir = OTHER_PATH;
+            }
+            adminSession.move(resourcePath, destDir +
+resourceName);
+            adminSession.save();
+            log.info("The file {} has been moved to {}",
+resourceName, destDir);
+        }
+        return true;
+        } catch (RepositoryException e) {
+            log.error("RepositoryException: " + e);
+            return false;
+    } finally {
+        if (adminSession != null &amp;&amp; adminSession.isLive()) {
+        adminSession.logout();
+        adminSession = null;
+        }
+    }
+    }</p>
+<div class="codehilite"><pre><span class="n">The</span> <span class="n">complete</span> <span class="n">code</span> <span class="k">for</span> <span class="n">the</span> <span class="o">*</span><span class="n">DropBoxEventHandler</span><span class="o">*</span> <span class="n">service</span> <span class="n">is</span> <span class="n">available</span> <span class="p">[</span><span class="n">here</span><span class="o">|^</span><span class="n">DropBoxEventHandler</span><span class="o">.</span><span class="n">java</span><span class="p">]</span>
+</pre></div>
+
+
+<p>.</p>
+      </div>
+    </div>
+    
+    <div class="trademarkFooter"> 
+		Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+	</div>
+  </body>
+</html>

Added: websites/staging/sling/trunk/content/installing-and-upgrading-bundles.html
==============================================================================
--- websites/staging/sling/trunk/content/installing-and-upgrading-bundles.html (added)
+++ websites/staging/sling/trunk/content/installing-and-upgrading-bundles.html Sun Apr 22 16:52:28 2012
@@ -0,0 +1,207 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+  <head>
+    <title>Apache Sling - Installing and Upgrading Bundles</title>
+    <link rel="stylesheet" href="http://sling.apache.org/site/media.data/site.css" type="text/css" media="all">
+    <link rel="icon" href="http://sling.apache.org/site/media.data/favicon.ico">
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+  </head>
+  <body>
+    <div class="title">
+      <div class="logo">
+        <a href="http://sling.apache.org/site/index.html">
+          <img border="0" alt="Apache Sling" src="http://sling.apache.org/site/media.data/logo.png">
+        </a>
+      </div>
+      <div class="header">
+        <a href="http://www.apache.org/">
+          <img border="0" alt="Apache" src="http://sling.apache.org/site/media.data/apache.png">
+        </a>
+      </div>
+    </div>
+    
+    <div class="menu"> 
+      <h1 id="documentation">Documentation</h1>
+<ul>
+<li><a href="getting-started.html">Getting Started</a></li>
+<li><a href="the-sling-engine.html">The Sling Engine</a></li>
+<li><a href="development.html">Development</a></li>
+<li><a href="bundles.html">Bundles</a></li>
+<li><a href="tutorials-&amp;-how-tos.html">Tutorials &amp; How-Tos</a></li>
+<li><a href="configuration.html">Configuration</a></li>
+<li><a href="http://sling.apache.org/apidocs/sling5/index.html">API docs</a></li>
+<li><a href="http://s.apache.org/sling.wiki">Wiki</a></li>
+<li><a href="http://s.apache.org/sling.faq">FAQ</a></li>
+</ul>
+<h1 id="project-info">Project info</h1>
+<ul>
+<li><a href="http://sling.apache.org/site/downloads.cgi">Downloads</a></li>
+<li><a href="http://www.apache.org/licenses/">License</a></li>
+<li><a href="contributing.html">Contributing</a></li>
+<li><a href="news.html">News</a></li>
+<li><a href="links.html">Links</a></li>
+<li><a href="project-information.html">Project Information</a></li>
+<li><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a></li>
+<li><a href="http://svn.apache.org/viewvc/sling/trunk">Browse Source Repository</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+<h1 id="sponsorship">Sponsorship</h1>
+<ul>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/foundation/buy_stuff.html">Buy Stuff</a></li>
+</ul>
+<iframe 
+    src="http://www.apache.org/ads/button.html"
+    style="border-width:0; float: left" frameborder="0" 
+    scrolling="no"
+    width="135" 
+    height="135">
+</iframe>
+    </div>
+    
+    <div class="main">
+      <div class="breadcrump" style="font-size: 80%;">
+		(TODO: breadcrumb here)
+      </div>
+      <h1 class="title">Installing and Upgrading Bundles</h1>
+      <div>
+	    <p><a name="InstallingandUpgradingBundles-InstallingandUpgradingBundles"></a></p>
+<h1 id="installing-and-upgrading-bundles">Installing and Upgrading Bundles</h1>
+<p>{note}
+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 <a href="http://felix.apache.org/site/apache-felix-web-console.html">Apache Felix Web Console</a>
+.
+{note}</p>
+<p>{excerpt:hidden=true}Explains how to install, upgrade and uninstall Bundles
+using the Sling Management console.{excerpt}</p>
+<p>OSGi bundles installed in the OSGi framework, which is provided by Sling,
+may be upgraded or removed and new bundles may be installed by using the
+Sling Management Console. This page is about using the Sling Management
+Console for those tasks.</p>
+<p>Basically, you have two choices to install and upgrade bundles: Upload the
+bundle files or install them from a Bundle Repository.</p>
+<p><a name="InstallingandUpgradingBundles-SlingManagementConsole"></a></p>
+<h2 id="sling-management-console">Sling Management Console</h2>
+<p>The Sling Management Console is installed by default when Sling is running
+and may be reached at on the page <em>/system/console</em> in the Sling Context
+by default. For example if you installed the Sling Web Application in the
+<em>/sample</em> context of the Servlet Container running at
+<em>http<strong>://somehost:4402<em>, you would access the Sling Management Console
+at </em>http</strong>://somehost:4402/sample/system/console</em>.</p>
+<p>You will be prompted for a user name and password to access the Sling
+Management Console. This password is preset to be <em>admin</em> for the user name
+and <em>admin</em> for the password.</p>
+<p>NB: Both the username and password and the location of the Sling Management
+Console inside the Web Application Context is configurable in the <em>Sling
+Management Console</em> configuration on the <em>Configuration</em> page.</p>
+<p><a name="InstallingandUpgradingBundles-InstallingandupgradingbundlesbyUpload"></a></p>
+<h2 id="installing-and-upgrading-bundles-by-upload">Installing and upgrading bundles by Upload</h2>
+<p>To install a new bundle or upgrade an already installed bundle, go to the
+<em>Bundles</em> page in the Sling Management Console. At the top and the bottom
+of the page you have a form to specify and upload a bundle as a file :</p>
+<ul>
+<li>Select the bundle file to upload</li>
+<li>Click the <em>Start</em> checkbox, if you want to start the bundle after
+installation. If the bundle is upgraded, this checkbox is ignored.</li>
+<li>Specify the start level of the bundle in the <em>Start Level</em> field. This
+must be a number higher than 0 and is ignored for bundles, which are
+already installed. Most of the time, you will use the default value.</li>
+<li>Click the <em>Install or Update</em> button</li>
+</ul>
+<p>After clicking the button, the bundle file will be uploaded. If a bundle
+with the same bundle symbolic name is already installed, the respective
+bundle will be updated with the new bundle file. Otherwise the bundle file
+will be installed as a new bundle and its start level is set as defined.
+Additionally the bundle will optionally be started.</p>
+<p>After having updated a bundle, you should also refresh the packages by
+clicking on the <em>Refresh Packages</em> button. The reson for this is, that the
+old version of the bundle is still used by other bundles even after
+upgrading to a new version. Only when the packages are refreshed any users
+of the bundle will be relinked to use the new bundle version. As this might
+be a somewhat lengthy operation, which also stops and restarts using
+bundles, this operation has to be executed explicitly.</p>
+<p>Also, if you plan to upgrade multiple bundles, you may wish to upgrade all
+bundles before repackaging the using bundles.</p>
+<p><a name="InstallingandUpgradingBundles-InstallingandupgradingbundlesfromtheBundleRepository"></a></p>
+<h2 id="installing-and-upgrading-bundles-from-the-bundle-repository">Installing and upgrading bundles from the Bundle Repository</h2>
+<p>The OSGi Bundle Repository is a repository of bundles, from which Sling may
+download and install or upgrade bundles very easily. Unlike the
+installation of bundles by file upload, the OSGi Bundle Repository has the
+functionality to resolve and dependencies of bundles to be installed.</p>
+<p>Say you wish to install bundle <em>X</em> which depends on packages provided by
+bundle <em>Y</em>. When uploading bundle <em>X</em> as a file it will not resolve, that
+is Sling (the OSGi framework actually) is not able to ensure proper
+operation of bundle <em>X</em> and thus prevents the bundle from being started and
+used. You will have to manually upload bundle <em>Y</em> yourself. When using the
+OSGi Bundle Repository, you just select bundle <em>X</em> for installation and the
+bundle repository will find out, that bundle <em>Y</em> is also required and will
+automatically download and install it along with bundle <em>X</em>.</p>
+<p><a name="InstallingandUpgradingBundles-TheBundleRepositorypage"></a></p>
+<h3 id="the-bundle-repository-page">The Bundle Repository page</h3>
+<p>Installation or update of bundles may be done on the <em>Bundle Repository</em>
+page of the Sling Management Console. In the upper part of the page, you
+will see a list (usually just a single entry) of OSGi Bundle Repositories
+known to Sling. In the lower part of the list you see the bundles available
+from these repositories. To install or update bundles, just check the
+respective button and click on the <em>Deploy Selected</em> or <em>Deploy and Start
+Selected</em> button at the bottom of the page depending on whether you want to
+start the bundle(s) after installation or not.</p>
+<p>See below for more information on OSGi Bundle Repository management.</p>
+<p><a name="InstallingandUpgradingBundles-TheBundlespage"></a></p>
+<h3 id="the-bundles-page">The Bundles page</h3>
+<p>You may also want to upgrade already installed bundles from the <em>Bundles</em>
+page of the Sling Management Console. For each bundle listed in this page,
+there is an <em>Upgrade</em> button. If there is an upgrade to the installed
+bundle available in the OSGi Bundle Repository, the button is enabled and
+clicking on the button will upgrade the respective bundle. If no upgrade is
+available from the OSGi Bundle Repository, this button is disabled.</p>
+<p><a name="InstallingandUpgradingBundles-ManagingOSGiBundleRepositories"></a></p>
+<h3 id="managing-osgi-bundle-repositories">Managing OSGi Bundle Repositories</h3>
+<p>Currently management of known OSGi Bundle Repositories is very simple. If a
+configured bundle repository is not available on startup, it will be marked
+as being inactive. If you know the repository is now available, you may
+click on the <em>Refresh</em> button, to activate it. Similarly, the contents of
+the repository may be modified by for example adding new bundles or
+updating bundles in the repository, these changes will be made known to
+Sling by clicking the <em>Refresh</em> button.</p>
+<p>There exists no GUI functionality yet to add a new repository to the list
+of known repositories. Instead you may submit a request with parameters
+<em>action</em> whose value must be <em>refreshOBR</em> and <em>repository</em> whose
+value must be the URL to the repository descriptor file generally called
+<em>repository.xml</em>.</p>
+<p>For example, if you run Sling on <em>http</em><em>://localhost:7402/sample</em> with
+default location of the Sling Management Console, the following request
+would add a repository at <em>/tmp/repo/repository.xml</em> in the filesystem:</p>
+<div class="codehilite"><pre><span class="n">http:</span><span class="sr">//</span><span class="n">localhost:7402</span><span class="sr">/sample/s</span><span class="n">ystem</span><span class="sr">/console/</span><span class="n">bundlerepo</span><span class="p">?</span><span class="n">action</span><span class="o">=</span><span class="n">refreshOBR</span><span class="o">&amp;</span><span class="n">repository</span><span class="o">=</span><span class="n">file:</span><span class="sr">///tmp/</span><span class="n">repo</span><span class="o">/</span><span class="n">repository</span><span class="o">.</span><span class="n">xml</span>
+</pre></div>
+
+
+<p>Note: Only use <em>file:</em> URLs if you know Sling has access to the named
+file !</p>
+      </div>
+    </div>
+    
+    <div class="trademarkFooter"> 
+		Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+	</div>
+  </body>
+</html>

Added: websites/staging/sling/trunk/content/issue-tracker.html
==============================================================================
--- websites/staging/sling/trunk/content/issue-tracker.html (added)
+++ websites/staging/sling/trunk/content/issue-tracker.html Sun Apr 22 16:52:28 2012
@@ -0,0 +1,193 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+  <head>
+    <title>Apache Sling - Issue Tracker</title>
+    <link rel="stylesheet" href="http://sling.apache.org/site/media.data/site.css" type="text/css" media="all">
+    <link rel="icon" href="http://sling.apache.org/site/media.data/favicon.ico">
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+  </head>
+  <body>
+    <div class="title">
+      <div class="logo">
+        <a href="http://sling.apache.org/site/index.html">
+          <img border="0" alt="Apache Sling" src="http://sling.apache.org/site/media.data/logo.png">
+        </a>
+      </div>
+      <div class="header">
+        <a href="http://www.apache.org/">
+          <img border="0" alt="Apache" src="http://sling.apache.org/site/media.data/apache.png">
+        </a>
+      </div>
+    </div>
+    
+    <div class="menu"> 
+      <h1 id="documentation">Documentation</h1>
+<ul>
+<li><a href="getting-started.html">Getting Started</a></li>
+<li><a href="the-sling-engine.html">The Sling Engine</a></li>
+<li><a href="development.html">Development</a></li>
+<li><a href="bundles.html">Bundles</a></li>
+<li><a href="tutorials-&amp;-how-tos.html">Tutorials &amp; How-Tos</a></li>
+<li><a href="configuration.html">Configuration</a></li>
+<li><a href="http://sling.apache.org/apidocs/sling5/index.html">API docs</a></li>
+<li><a href="http://s.apache.org/sling.wiki">Wiki</a></li>
+<li><a href="http://s.apache.org/sling.faq">FAQ</a></li>
+</ul>
+<h1 id="project-info">Project info</h1>
+<ul>
+<li><a href="http://sling.apache.org/site/downloads.cgi">Downloads</a></li>
+<li><a href="http://www.apache.org/licenses/">License</a></li>
+<li><a href="contributing.html">Contributing</a></li>
+<li><a href="news.html">News</a></li>
+<li><a href="links.html">Links</a></li>
+<li><a href="project-information.html">Project Information</a></li>
+<li><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a></li>
+<li><a href="http://svn.apache.org/viewvc/sling/trunk">Browse Source Repository</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+<h1 id="sponsorship">Sponsorship</h1>
+<ul>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/foundation/buy_stuff.html">Buy Stuff</a></li>
+</ul>
+<iframe 
+    src="http://www.apache.org/ads/button.html"
+    style="border-width:0; float: left" frameborder="0" 
+    scrolling="no"
+    width="135" 
+    height="135">
+</iframe>
+    </div>
+    
+    <div class="main">
+      <div class="breadcrump" style="font-size: 80%;">
+		(TODO: breadcrumb here)
+      </div>
+      <h1 class="title">Issue Tracker</h1>
+      <div>
+	    <p>Apache Sling uses Jira for tracking bug reports and requests for
+improvements, new features, and other changes.</p>
+<p>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 on existing
+issues. Use the <a href="https://issues.apache.org/jira/secure/Signup!default.jspa">registration form</a>
+ to request an account if you do not already have one.</p>
+<p>See below for guidelines on creating and managing issues.</p>
+<p><a name="IssueTracker-Issuetype"></a></p>
+<h2 id="issue-type">Issue type</h2>
+<p>When creating a new issue, select the issue type based as follows:</p>
+<table>
+<tr><th> Issue type   </th><th> Description </th></tr>
+<tr><td>  *Bug*   </td><td>  Bug reports are used for cases where Sling fails not
+function as it should (as defined by some documentation). If you are not
+certain whether the issue you've found is actually a bug, please ask the [Sling mailing lists](project-information#projectinformation-mailinglists.html)
+ first for help. </td></tr>
+<tr><td>  *New Feature*  </td><td>  Use a feature request when Sling does not have some
+functionality you need. </td></tr>
+<tr><td>  *Improvement*  </td><td>  Use an improvement request to suggest improvements to
+existing features. Typical improvement requests are about updating
+documentation, increasing stability and performance, simplifying the
+implementation, or other such changes that make Sling better without
+introducing new features or fixing existing bugs. </td></tr>
+<tr><td>  *Test*      </td><td>  Use this type when contributing test cases for
+existing features. Normally test cases should be contributed as a part of
+the original feature request or as regression tests associated with bug
+reports, but sometimes you just want to extend test coverage by introducing
+new test cases. This issue type is for such cases. </td></tr>
+<tr><td>  *Task*      </td><td>  Used only for issues related to project
+infrastructure. </td></tr>
+</table>
+
+<p><a name="IssueTracker-Summary"></a></p>
+<h2 id="summary">Summary</h2>
+<p>The issue summary should be a short and clear statement that indicates the
+scope of the issue. You are probably being too verbose if you exceed the
+length of the text field. Use the Environment and Description fields to
+provide more detailed information.</p>
+<p><a name="IssueTracker-Issuepriority"></a></p>
+<h2 id="issue-priority">Issue priority</h2>
+<p>Issue priority should be set according to the following:</p>
+<table>
+<tr><th> Issue priority </th><th> Description </td></tr>
+<tr><td>  *Blocker*   </td><td>  Legal or other fundamental issue that makes it
+impossible to release Jackrabbit code </td></tr>
+<tr><td>  *Critical*      </td><td>  Major loss of functionality that affects many
+Slingusers </td></tr>
+<tr><td>  *Major*     </td><td>  Important issue that should be resolved soon </td></tr>
+<tr><td>  *Minor*     </td><td>  Nice to have issues </td></tr>
+<tr><td>  *Trivial*   </td><td>  Trivial changes that can be applied whenever someone
+has extra time </td></tr>
+</table>
+
+<p><a name="IssueTracker-IssueStates"></a></p>
+<h2 id="issue-states">Issue States</h2>
+<p>Sling issues can transition through a number of states while being
+processed:</p>
+<table>
+<tr><th> State </th><th> Description </th><th> Next States in Workflow </th></tr>
+<tr><td> *Open* </td><td> The issue has just been created </td><td> _In Pogress_ </td></tr>
+<tr><td> *In Progress* </td><td> Work has started on the issue </td><td> _Documentation Required_,
+_Testcase Required_, _Documentation/Testcase required_, _Resolved_, _Open_
+</td></tr>
+<tr><td> *Documentation Required* </td><td> Implementation work has finished for this
+issue. To complete it documentation must be created and/or updated. </td><td>
+_Resolved_ </td></tr>
+<tr><td> *Testcase Required* </td><td> Implementation work has finished for this issue. To
+complete it test cases must be created and/or updated. </td><td> _Resolved_ </td></tr>
+<tr><td> *Documentation/Testcase Required* </td><td> Implementation work has finished for
+this issue. To complete it documentation and test cases must be created
+and/or updated. </td><td> _Resolved_, _Documentation Required_, _Testcase Required_
+</td></tr>
+<tr><td> *Resolved* </td><td> The issue has been resolved from the developers point of
+view. Documentation and Testcases have been created and updated as
+required. Issue is ready for release. </td><td> _Reopened_, _Closed_ </td></tr>
+<tr><td> *Reopened* </td><td> A resolved issue has been recognized to contain bugs or to
+be incomplete and thus has been reopened. </td><td> _In Progress_, _Resolved_ </td></tr>
+<tr><td> *Closed* </td><td> Work on this issue has finished and it is included in the
+release. </td><td> -- </td></tr>
+</table>
+
+<p>Users generally create issues and provide feedback while work on the issue
+is in progress. When the developer thinks the issue has been resolved, he
+resolves the issue. At this point, the user may test the resolution and
+reopen the issue if it has not really be solved. Otherwise the user may
+just acknowledge the fix.</p>
+<p>Developers transition the issue through the workflow while working on it.
+When done with the issue, they mark the issue resolved with the appropriate
+resolution and ask the reporting user to confirm.</p>
+<p>Issues are closed once the project against which it has been reported has
+been released. Issues once closed cannot be opened again. Rather new issues
+should be created against the new release to have broken implementations
+fixed or extended.</p>
+<p><a name="IssueTracker-Patches"></a></p>
+<h2 id="patches">Patches</h2>
+<p>When reporting a bug, requesting a feature or propose an improvement, it is
+a good thing to attach a patch to the issue. This may speed up issue
+processing and helps you being recognized as a good community member
+leading to closer involvement with Sling.</p>
+      </div>
+    </div>
+    
+    <div class="trademarkFooter"> 
+		Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+	</div>
+  </body>
+</html>



Mime
View raw message