incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r841833 [12/28] - in /websites/staging/sling/trunk/content: ./ site/ site/46-line-blog.data/ site/authentication.data/ site/documentation.data/ site/first-steps.data/ site/getting-and-building-sling.data/ site/how-to-manage-events-in-sling....
Date Wed, 12 Dec 2012 09:17:17 GMT
Added: websites/staging/sling/trunk/content/site/how-to-manage-events-in-sling.html
==============================================================================
--- websites/staging/sling/trunk/content/site/how-to-manage-events-in-sling.html (added)
+++ websites/staging/sling/trunk/content/site/how-to-manage-events-in-sling.html Wed Dec 12 09:16:44 2012
@@ -0,0 +1,349 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<HTML>
+  <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">
+<P><B>Documentation</B><BR class="atl-forced-newline">
+<A href="getting-started.html" title="Getting Started">Getting Started</A><BR class="atl-forced-newline">
+<A href="the-sling-engine.html" title="The Sling Engine">The Sling Engine</A><BR class="atl-forced-newline">
+<A href="development.html" title="Development">Development</A><BR class="atl-forced-newline">
+<A href="bundles.html" title="Bundles">Bundles</A><BR class="atl-forced-newline">
+<A href="tutorials-how-tos.html" title="Tutorials & How-Tos">Tutorials &amp; How&#45;Tos</A><BR class="atl-forced-newline">
+<A href="configuration.html" title="Configuration">Configuration</A><BR class="atl-forced-newline">
+<A href="http://sling.apache.org/apidocs/sling6/index.html" class="external-link" rel="nofollow">API docs</A><BR class="atl-forced-newline">
+<A href="http://s.apache.org/sling.wiki" class="external-link" rel="nofollow">Wiki</A><BR class="atl-forced-newline">
+<A href="http://s.apache.org/sling.faq" class="external-link" rel="nofollow">FAQ</A><BR class="atl-forced-newline"></P>
+
+<P><B>Project info</B><BR class="atl-forced-newline">
+<A href="http://sling.apache.org/site/downloads.cgi" class="external-link" rel="nofollow">Downloads</A><BR class="atl-forced-newline">
+<A href="http://www.apache.org/licenses/" class="external-link" rel="nofollow">License</A><BR class="atl-forced-newline">
+<A href="contributing.html" title="Contributing">Contributing</A><BR class="atl-forced-newline">
+<A href="news.html" title="News">News</A><BR class="atl-forced-newline">
+<A href="links.html" title="Links">Links</A><BR class="atl-forced-newline">
+<A href="project-information.html" title="Project Information">Project Information</A><BR class="atl-forced-newline">
+<A href="https://issues.apache.org/jira/browse/SLING" class="external-link" rel="nofollow">Issue Tracker</A><BR class="atl-forced-newline">
+<A href="http://svn.apache.org/viewvc/sling/trunk" class="external-link" rel="nofollow">Browse Source Repository</A><BR class="atl-forced-newline">
+<A href="security.html" title="Security">Security</A><BR class="atl-forced-newline"></P>
+
+<P><B>Sponsorship</B><BR class="atl-forced-newline">
+<A href="http://www.apache.org/foundation/thanks.html" class="external-link" rel="nofollow">Thanks</A><BR class="atl-forced-newline">
+<A href="http://www.apache.org/foundation/sponsorship.html" class="external-link" rel="nofollow">Become a Sponsor</A><BR>
+<A href="http://www.apache.org/foundation/buy_stuff.html" class="external-link" rel="nofollow">Buy Stuff</A></P>
+
+
+  <IFRAME src="http://www.apache.org/ads/button.html" style="border-width:0; float: left" frameborder="0" scrolling="no" width="135" height="135"></IFRAME>
+  <P style="height: 135px"></P>
+    </DIV>
+    <DIV class="main">
+        <DIV class="breadcrump" style="font-size: 80%;">
+<A href="apache-sling.html" title="Apache Sling Website">Apache Sling Website</A>&nbsp;&gt;&nbsp;<A href="apache-sling.html" title="Apache Sling">Apache Sling</A>&nbsp;&gt;&nbsp;<A href="documentation.html" title="Documentation">Documentation</A>&nbsp;&gt;&nbsp;<A href="tutorials-how-tos.html" title="Tutorials & How-Tos">Tutorials &amp; How-Tos</A>&nbsp;&gt;&nbsp;<A href="" title="How to Manage Events in Sling">How to Manage Events in Sling</A>
+        </DIV>
+<H1><A name="HowtoManageEventsinSling-HowtoManageEventsinSling"></A>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. <BR>
+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:</P>
+<UL>
+	<LI><A href="http://sling.apache.org/site/eventing-and-jobs.html" class="external-link" rel="nofollow">Eventing, Jobs and Scheduling section</A> to get detailed information on the eventing mechanisms in Sling.</LI>
+	<LI>package <A href="http://www.osgi.org/javadoc/r4v42/org/osgi/service/event/package-summary.html" class="external-link" rel="nofollow">org.osgi.service.event</A> of the OSGI API.</LI>
+	<LI>package <A href="http://sling.apache.org/apidocs/sling6/org/apache/sling/event/package-summary.html" class="external-link" rel="nofollow">org.apache.sling.event</A> of the Sling API.</LI>
+</UL>
+
+
+<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>
+
+<H2><A name="HowtoManageEventsinSling-Introduction"></A>Introduction</H2>
+
+<P>You will now implement the logic to listen to files posted to <B>/tmp/dropbox</B> and to move them to the appropriate locations depending on the MIME type:</P>
+<UL>
+	<LI>images (.png) are moved to <B>/dropbox/images/</B></LI>
+	<LI>music (.mp3) are moved to <B>/dropbox/music/</B></LI>
+	<LI>movies (.avi) are moved to <B>/dropbox/movies/</B></LI>
+	<LI>otherwise the files are moved to <B>/dropbox/other/</B></LI>
+</UL>
+
+
+<P>To do that, you will implement two services. The first one, called <B>DropBoxService</B>:</P>
+<UL>
+	<LI>Listens to OSGI events.</LI>
+	<LI>Sends a job event if a resource has been added to <B>/tmp/dropbox</B>.</LI>
+</UL>
+
+
+<P>The second one, called <B>DropBoxEventHandler</B>:</P>
+<UL>
+	<LI>Listens to the former job event.</LI>
+	<LI>Moves the file according to its extension.</LI>
+</UL>
+
+
+<H2><A name="HowtoManageEventsinSling-ListeningtoOSGIEvents"></A>Listening to OSGI Events</H2>
+
+<P>To listen to the specific OSGI event <B>&quot;resource added&quot;</B>:</P>
+<UL>
+	<LI>The property <B>event.topics</B> needs to be set to <B>org.apache.sling.api.SlingConstants.TOPIC_RESOURCE_ADDED</B> in the class annotations.</LI>
+</UL>
+
+
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+ * @scr.property name=<SPAN class="code-quote">&quot;event.topics&quot;</SPAN> valueRef=<SPAN class="code-quote">&quot;org.apache.sling.api.SlingConstants.TOPIC_RESOURCE_ADDED&quot;</SPAN>
+</PRE>
+</DIV></DIV>
+
+<P>You can refer to the <A href="http://sling.apache.org/apidocs/sling6/org/apache/sling/api/SlingConstants.html" class="external-link" rel="nofollow">org.apache.sling.api.SlingConstants</A> class in the Javadocs to know about other events available in Sling.</P>
+
+<H2><A name="HowtoManageEventsinSling-SendingJobEvents"></A>Sending Job Events</H2>
+
+<P>To send an event the following code can be used: </P>
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+<SPAN class="code-keyword">public</SPAN> void sendEvent() {
+    <SPAN class="code-keyword">final</SPAN> Dictionary&lt;<SPAN class="code-object">String</SPAN>, <SPAN class="code-object">Object</SPAN>&gt; props = <SPAN class="code-keyword">new</SPAN> Hashtable&lt;<SPAN class="code-object">String</SPAN>, <SPAN class="code-object">Object</SPAN>&gt;();
+    props.put(JobUtil.PROPERTY_JOB_TOPIC, JOB_TOPIC);
+    props.put(<SPAN class="code-quote">&quot;resourcePath&quot;</SPAN>, RESOURCE_PATH);
+    <SPAN class="code-keyword">final</SPAN> Event myEvent = <SPAN class="code-keyword">new</SPAN> Event(JOB_TOPIC, props);
+    eventAdmin.sendEvent(myEvent);
+} 
+</PRE>
+</DIV></DIV>
+
+<P>However, for our example, to send a job event the service needs to implement:</P>
+<UL>
+	<LI>the <B>org.osgi.service.event.EventHandler</B> interface.</LI>
+	<LI>the <B>org.apache.sling.event.JobProcessor</B> interface.</LI>
+</UL>
+
+
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+<SPAN class="code-keyword">public</SPAN> class DropBoxService <SPAN class="code-keyword">implements</SPAN> JobProcessor, EventHandler {
+</PRE>
+</DIV></DIV>
+
+<P>To send the job event the Event Admin service needs to be referenced:</P>
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+	/** 
+	 * The OSGI event admin used <SPAN class="code-keyword">for</SPAN> sending events 
+	 * @scr.reference
+	 */
+	<SPAN class="code-keyword">private</SPAN> EventAdmin eventAdmin;
+</PRE>
+</DIV></DIV>
+
+<P>The job topic for dropbox job events needs to be defined:</P>
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+    /** The job topic <SPAN class="code-keyword">for</SPAN> dropbox job events. */
+    <SPAN class="code-keyword">public</SPAN> <SPAN class="code-keyword">static</SPAN> <SPAN class="code-keyword">final</SPAN> <SPAN class="code-object">String</SPAN> JOB_TOPIC = <SPAN class="code-quote">&quot;com/sling/eventing/dropbox/job&quot;</SPAN>;
+</PRE>
+</DIV></DIV>
+
+<P>The <B>org.osgi.service.event.EventHandler#handleEvent(Event event)</B> method needs to be implemented:</P>
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+	<SPAN class="code-keyword">public</SPAN> void handleEvent(Event event) {
+	    <SPAN class="code-keyword">if</SPAN> (EventUtil.isLocal(event)) {
+	        EventUtil.processJob(event, <SPAN class="code-keyword">this</SPAN>);
+	    }
+	}
+</PRE>
+</DIV></DIV>
+
+<P>The <B>org.apache.sling.event.JobProcessor#process(Event event)</B> method needs to be implemented.</P>
+
+<P>Its logic is as follows:</P>
+<UL>
+	<LI>The OSGI event is analyzed.</LI>
+	<LI>If the event is a file that has been added to <B>/tmp/dropbox</B>:
+	<UL>
+		<LI>An event is created with 2 properties:
+		<UL>
+			<LI>A property to set the event as a job event.</LI>
+			<LI>A property for the file path.</LI>
+		</UL>
+		</LI>
+		<LI>The job event is sent to all the listeners that subscribe to the topic of the event.</LI>
+	</UL>
+	</LI>
+</UL>
+
+
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+	<SPAN class="code-keyword">public</SPAN> <SPAN class="code-object">boolean</SPAN> process(Event event) {
+		<SPAN class="code-object">String</SPAN> propPath = (<SPAN class="code-object">String</SPAN>) event.getProperty(SlingConstants.PROPERTY_PATH);
+		<SPAN class="code-object">String</SPAN> propResType = (<SPAN class="code-object">String</SPAN>) event.getProperty(SlingConstants.PROPERTY_RESOURCE_TYPE);
+		<SPAN class="code-comment">// an event is sent <SPAN class="code-keyword">if</SPAN> a file is added to /tmp/dropbox
+</SPAN>		<SPAN class="code-keyword">if</SPAN> (propPath.startsWith(<SPAN class="code-quote">&quot;/tmp/dropbox&quot;</SPAN>) &amp;&amp; propResType.equals(<SPAN class="code-quote">&quot;nt:file&quot;</SPAN>)) {
+			<SPAN class="code-keyword">final</SPAN> Dictionary&lt;<SPAN class="code-object">String</SPAN>, <SPAN class="code-object">Object</SPAN>&gt; props = <SPAN class="code-keyword">new</SPAN> Hashtable&lt;<SPAN class="code-object">String</SPAN>, <SPAN class="code-object">Object</SPAN>&gt;();
+			props.put(EventUtil.PROPERTY_JOB_TOPIC, JOB_TOPIC);
+			props.put(<SPAN class="code-quote">&quot;resourcePath&quot;</SPAN>, propPath);
+			Event dropboxJobEvent = <SPAN class="code-keyword">new</SPAN> Event(EventUtil.TOPIC_JOB, props);
+			eventAdmin.sendEvent(dropboxJobEvent);
+			log.info(<SPAN class="code-quote">&quot;the dropbox job has been sent: {}&quot;</SPAN>, propPath);
+		}
+		<SPAN class="code-keyword">return</SPAN> <SPAN class="code-keyword">true</SPAN>;
+	}
+</PRE>
+</DIV></DIV>
+
+<P>The complete code for the <B>DropBoxService</B> service is available <A href="how-to-manage-events-in-sling.data/DropBoxService.java">here</A>.</P>
+
+<H2><A name="HowtoManageEventsinSling-ListeningtoJobEvents"></A>Listening to Job Events</H2>
+
+<P>Now that you have implemented a service that sends a job event when a file is uploaded to <B>/tmp/dropbox</B>, you will implement the service <B>DropBoxEventHandler</B> 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:</P>
+<UL>
+	<LI>The property <B>event.topics</B> needs to be set to <B>mypackage.DropBoxService.JOB_TOPIC</B> in the class annotations.</LI>
+</UL>
+
+
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+ * @scr.property name=<SPAN class="code-quote">&quot;event.topics&quot;</SPAN> valueRef=<SPAN class="code-quote">&quot;mypackage.DropBoxService.JOB_TOPIC&quot;</SPAN>
+</PRE>
+</DIV></DIV>
+
+<H2><A name="HowtoManageEventsinSling-HandlingJobEvents"></A>Handling Job Events</H2>
+
+<P>To move the files the service needs to implement:</P>
+<UL>
+	<LI>the <B>org.osgi.service.event.EventHandler</B> interface.</LI>
+	<LI>the <B>org.apache.sling.event.JobProcessor</B> interface.</LI>
+</UL>
+
+
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+<SPAN class="code-keyword">public</SPAN> class DropBoxEventHandler <SPAN class="code-keyword">implements</SPAN> JobProcessor, EventHandler {
+</PRE>
+</DIV></DIV>
+
+<P>Some class fields need to be defined for:</P>
+<UL>
+	<LI>The default log.</LI>
+	<LI>The references to the SlingRepository and the JcrResourceResolverFactory services, which are used in the implementation.</LI>
+	<LI>The destination paths of the files.</LI>
+</UL>
+
+
+ <DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+   /** Default log. */
+    <SPAN class="code-keyword">protected</SPAN> <SPAN class="code-keyword">final</SPAN> Logger log = LoggerFactory.getLogger(<SPAN class="code-keyword">this</SPAN>.getClass());
+
+    /** @scr.reference */
+    <SPAN class="code-keyword">private</SPAN> SlingRepository repository;
+    
+    /**
+     * @scr.reference
+     */
+    <SPAN class="code-keyword">private</SPAN> JcrResourceResolverFactory resolverFactory;
+    
+    <SPAN class="code-keyword">private</SPAN> <SPAN class="code-keyword">final</SPAN> <SPAN class="code-keyword">static</SPAN> <SPAN class="code-object">String</SPAN> IMAGES_PATH = <SPAN class="code-quote">&quot;/dropbox/images/&quot;</SPAN>;
+    <SPAN class="code-keyword">private</SPAN> <SPAN class="code-keyword">final</SPAN> <SPAN class="code-keyword">static</SPAN> <SPAN class="code-object">String</SPAN> MUSIC_PATH = <SPAN class="code-quote">&quot;/dropbox/music/&quot;</SPAN>;
+    <SPAN class="code-keyword">private</SPAN> <SPAN class="code-keyword">final</SPAN> <SPAN class="code-keyword">static</SPAN> <SPAN class="code-object">String</SPAN> MOVIES_PATH = <SPAN class="code-quote">&quot;/dropbox/movies/&quot;</SPAN>;
+    <SPAN class="code-keyword">private</SPAN> <SPAN class="code-keyword">final</SPAN> <SPAN class="code-keyword">static</SPAN> <SPAN class="code-object">String</SPAN> OTHER_PATH = <SPAN class="code-quote">&quot;/dropbox/other/&quot;</SPAN>;
+</PRE>
+</DIV></DIV>
+
+<P>The <B>org.osgi.service.event.EventHandler#handleEvent(Event event)</B> method needs to be implemented:</P>
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+	<SPAN class="code-keyword">public</SPAN> void handleEvent(Event event) {
+	    <SPAN class="code-keyword">if</SPAN> (EventUtil.isLocal(event)) {
+	        EventUtil.processJob(event, <SPAN class="code-keyword">this</SPAN>);
+	    }
+	}
+</PRE>
+</DIV></DIV>
+
+<P>The <B>org.apache.sling.event.JobProcessor#process(Event event)</B> method needs to be implemented.</P>
+
+<P>Its logic is as follows:</P>
+<UL>
+	<LI>The resource path is extracted from the job event property.</LI>
+	<LI>The resource is obtained from the resource path.</LI>
+	<LI>If the resource is a file, the destination path is defined based on the file MIME type.</LI>
+	<LI>The file is moved to the new location.</LI>
+</UL>
+
+
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+	<SPAN class="code-keyword">public</SPAN> <SPAN class="code-object">boolean</SPAN> process(Event event) {
+		Session adminSession = <SPAN class="code-keyword">null</SPAN>;
+		<SPAN class="code-keyword">try</SPAN> {
+			<SPAN class="code-object">String</SPAN> resourcePath = (<SPAN class="code-object">String</SPAN>) event.getProperty(<SPAN class="code-quote">&quot;resourcePath&quot;</SPAN>);
+			<SPAN class="code-object">String</SPAN> resourceName = resourcePath.substring(resourcePath.lastIndexOf(<SPAN class="code-quote">&quot;/&quot;</SPAN>) + 1);
+        	adminSession = repository.loginAdministrative(<SPAN class="code-keyword">null</SPAN>);
+	        ResourceResolver resourceResolver = resolverFactory.getResourceResolver(adminSession);
+	        Resource res = resourceResolver.getResource(resourcePath);
+	        <SPAN class="code-keyword">if</SPAN> (ResourceUtil.isA(res, <SPAN class="code-quote">&quot;nt:file&quot;</SPAN>)) {
+	        	<SPAN class="code-object">String</SPAN> mimeType = res.getResourceMetadata().getContentType();
+	        	<SPAN class="code-object">String</SPAN> destDir;
+	        	<SPAN class="code-keyword">if</SPAN> (mimeType.equals(<SPAN class="code-quote">&quot;image/png&quot;</SPAN>)) {
+	        		destDir = IMAGES_PATH;
+	        	}
+	        	<SPAN class="code-keyword">else</SPAN> <SPAN class="code-keyword">if</SPAN> (mimeType.equals(<SPAN class="code-quote">&quot;audio/mpeg&quot;</SPAN>)) {
+	        		destDir = MUSIC_PATH;
+	        	}
+	        	<SPAN class="code-keyword">else</SPAN> <SPAN class="code-keyword">if</SPAN> (mimeType.equals(<SPAN class="code-quote">&quot;video/x-msvideo&quot;</SPAN>)) {
+	        		destDir = MOVIES_PATH;
+	        	}
+	        	<SPAN class="code-keyword">else</SPAN> {
+	        		destDir = OTHER_PATH;
+	        	}
+        		adminSession.move(resourcePath, destDir + resourceName);
+	        	adminSession.save();
+	        	log.info(<SPAN class="code-quote">&quot;The file {} has been moved to {}&quot;</SPAN>, resourceName, destDir);
+	        }
+	        <SPAN class="code-keyword">return</SPAN> <SPAN class="code-keyword">true</SPAN>;
+		} <SPAN class="code-keyword">catch</SPAN> (RepositoryException e) {
+			log.error(<SPAN class="code-quote">&quot;RepositoryException: &quot;</SPAN> + e);
+			<SPAN class="code-keyword">return</SPAN> <SPAN class="code-keyword">false</SPAN>;
+        } <SPAN class="code-keyword">finally</SPAN> {
+            <SPAN class="code-keyword">if</SPAN> (adminSession != <SPAN class="code-keyword">null</SPAN> &amp;&amp; adminSession.isLive()) {
+            	adminSession.logout();
+            	adminSession = <SPAN class="code-keyword">null</SPAN>;
+            }
+        }
+	}
+</PRE>
+</DIV></DIV>
+
+<P>The complete code for the <B>DropBoxEventHandler</B> service is available <A href="how-to-manage-events-in-sling.data/DropBoxEventHandler.java">here</A>.</P>
+        <DIV class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
+Last modified by jck on Mon Jun 25 08:26:46 EDT 2012
+        </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>
+    </DIV>
+  </BODY>
+</HTML>
+

Added: websites/staging/sling/trunk/content/site/incubator-status-report-february-2008.html
==============================================================================
--- websites/staging/sling/trunk/content/site/incubator-status-report-february-2008.html (added)
+++ websites/staging/sling/trunk/content/site/incubator-status-report-february-2008.html Wed Dec 12 09:16:44 2012
@@ -0,0 +1,84 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<HTML>
+  <HEAD>
+    <TITLE>Apache Sling - Incubator Status Report (February 2008)</TITLE>
+    <LINK rel="stylesheet" href="http://incubator.apache.org/sling/site/media.data/site.css" type="text/css" media="all">
+    <LINK rel="icon" href="http://incubator.apache.org/sling/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://incubator.apache.org/sling/site/index.html">
+          <IMG border="0" alt="Apache Sling" src="http://incubator.apache.org/sling/site/media.data/logo.png">
+        </A>
+      </DIV>
+      <DIV class="header">
+        <A href="http://incubator.apache.org/">
+          <IMG border="0" alt="Apache Incubator" src="http://incubator.apache.org/images/apache-incubator-logo.png">
+        </A>
+      </DIV>
+    </DIV>
+    <DIV class="menu">
+                                    <P>
+
+<UL>
+	<LI><A href="index.html" title="Index">Home</A></LI>
+	<LI><A href="project-information.html" title="Project Information">Project Information</A></LI>
+	<LI><A href="usecases.html" title="UseCases">Use Cases</A></LI>
+	<LI><A href="guides.html" title="Guides">Guides</A></LI>
+	<LI><A href="documentation.html" title="Documentation">Documentation</A></LI>
+	<LI><A href="plugins.html" title="Plugins">Plugins</A></LI>
+	<LI><A href="faq.html" title="FAQ">FAQ</A></LI>
+	<LI><A href="links.html" title="Links">Links</A></LI>
+	<LI><A href="old-documentation.html" title="Old Documentation">Old Documentation</A></LI>
+	<LI><SPAN class="nobr"><A href="http://cwiki.apache.org/confluence/x/GAUB" title="Visit page outside Confluence" rel="nofollow">Wiki<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+	<LI><SPAN class="nobr"><A href="http://www.apache.org/foundation/thanks.html" title="Visit page outside Confluence" rel="nofollow">Sponsors<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+	<LI><SPAN class="nobr"><A href="http://www.apache.org/foundation/sponsorship.html" title="Visit page outside Confluence" rel="nofollow">Sponsorship<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+</UL>
+
+
+<P>
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </DIV>
+    <DIV class="main">
+<P>Sling is a framework to develop content centric web applications based on the idea of modularizing the rendering of HTTP resources. </P>
+
+<P>Sling entered incubation on September 5th, 2007.</P>
+
+<P>Community</P>
+
+<UL>
+	<LI>The Sling PPMC voted and passed the <SPAN class="nobr"><A href="http://cwiki.apache.org/confluence/x/rhsB" title="Visit page outside Confluence" rel="nofollow">Community Roles and Processes<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN> document.</LI>
+	<LI>Paddy Hannon added as Committer and member of the PPMC</LI>
+</UL>
+
+
+<P>Software</P>
+
+<UL>
+	<LI>The Sling API has been finalized and the project migrated to the new API.</LI>
+	<LI>Creation of the Sling Launchpad, based on the former microsling module, provides a ready to run configuration of Sling.</LI>
+	<LI>General stabilization of the API and implementation, should lead to a first release soon.</LI>
+	<LI>No export control notifications are needed for Apache Sling.</LI>
+</UL>
+
+
+<P>Issues before graduation</P>
+
+<UL>
+	<LI>Make an incubating Sling release.</LI>
+	<LI>Grow a more diverse community (so far commits mostly from Day employees).</LI>
+</UL>
+
+
+<P>Licensing and other issues</P>
+
+<UL>
+	<LI>none</LI>
+</UL>
+
+    </DIV>
+  </BODY>
+</HTML>
+

Added: websites/staging/sling/trunk/content/site/incubator-status-report-may-2008.html
==============================================================================
--- websites/staging/sling/trunk/content/site/incubator-status-report-may-2008.html (added)
+++ websites/staging/sling/trunk/content/site/incubator-status-report-may-2008.html Wed Dec 12 09:16:44 2012
@@ -0,0 +1,80 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<HTML>
+  <HEAD>
+    <TITLE>Apache Sling - Incubator Status Report (May 2008)</TITLE>
+    <LINK rel="stylesheet" href="http://incubator.apache.org/sling/site/media.data/site.css" type="text/css" media="all">
+    <LINK rel="icon" href="http://incubator.apache.org/sling/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://incubator.apache.org/sling/site/index.html">
+          <IMG border="0" alt="Apache Sling" src="http://incubator.apache.org/sling/site/media.data/logo.png">
+        </A>
+      </DIV>
+      <DIV class="header">
+        <A href="http://incubator.apache.org/">
+          <IMG border="0" alt="Apache Incubator" src="http://incubator.apache.org/images/apache-incubator-logo.png">
+        </A>
+      </DIV>
+    </DIV>
+    <DIV class="menu">
+                                    <P>
+
+<UL>
+	<LI><A href="index.html" title="Index">Home</A></LI>
+	<LI><A href="project-information.html" title="Project Information">Project Information</A></LI>
+	<LI><A href="usecases.html" title="UseCases">Use Cases</A></LI>
+	<LI><A href="guides.html" title="Guides">Guides</A></LI>
+	<LI><A href="documentation.html" title="Documentation">Documentation</A></LI>
+	<LI><A href="plugins.html" title="Plugins">Plugins</A></LI>
+	<LI><A href="faq.html" title="FAQ">FAQ</A></LI>
+	<LI><A href="links.html" title="Links">Links</A></LI>
+	<LI><A href="old-documentation.html" title="Old Documentation">Old Documentation</A></LI>
+	<LI><SPAN class="nobr"><A href="http://cwiki.apache.org/confluence/x/GAUB" title="Visit page outside Confluence" rel="nofollow">Wiki<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+	<LI><SPAN class="nobr"><A href="http://www.apache.org/foundation/thanks.html" title="Visit page outside Confluence" rel="nofollow">Sponsors<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+	<LI><SPAN class="nobr"><A href="http://www.apache.org/foundation/sponsorship.html" title="Visit page outside Confluence" rel="nofollow">Sponsorship<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+</UL>
+
+
+<P>
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </DIV>
+    <DIV class="main">
+<P>Sling is a framework to develop content centric web applications based on the idea of modularizing the rendering of HTTP resources. </P>
+
+<P>Sling entered incubation on September 5th, 2007.</P>
+
+<P>Community</P>
+
+<UL>
+	<LI>...</LI>
+</UL>
+
+
+<P>Software</P>
+
+<UL>
+	<LI>...</LI>
+</UL>
+
+
+<P>Issues before graduation</P>
+
+<UL>
+	<LI>Make an incubating Sling release.</LI>
+	<LI>Grow a more diverse community (so far commits mostly from Day employees).</LI>
+</UL>
+
+
+<P>Licensing and other issues</P>
+
+<UL>
+	<LI>none</LI>
+</UL>
+
+    </DIV>
+  </BODY>
+</HTML>
+

Added: websites/staging/sling/trunk/content/site/incubator-status-report-november-2007.html
==============================================================================
--- websites/staging/sling/trunk/content/site/incubator-status-report-november-2007.html (added)
+++ websites/staging/sling/trunk/content/site/incubator-status-report-november-2007.html Wed Dec 12 09:16:44 2012
@@ -0,0 +1,82 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<HTML>
+  <HEAD>
+    <TITLE>Apache Sling - Incubator Status Report (November 2007)</TITLE>
+    <LINK rel="stylesheet" href="http://incubator.apache.org/sling/site/media.data/site.css" type="text/css" media="all">
+    <LINK rel="icon" href="http://incubator.apache.org/sling/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://incubator.apache.org/sling/site/index.html">
+          <IMG border="0" alt="Apache Sling" src="http://incubator.apache.org/sling/site/media.data/logo.png">
+        </A>
+      </DIV>
+      <DIV class="header">
+        <A href="http://incubator.apache.org/">
+          <IMG border="0" alt="Apache Incubator" src="http://incubator.apache.org/images/apache-incubator-logo.png">
+        </A>
+      </DIV>
+    </DIV>
+    <DIV class="menu">
+                                    <P>
+
+<UL>
+	<LI><A href="index.html" title="Index">Home</A></LI>
+	<LI><A href="project-information.html" title="Project Information">Project Information</A></LI>
+	<LI><A href="usecases.html" title="UseCases">Use Cases</A></LI>
+	<LI><A href="guides.html" title="Guides">Guides</A></LI>
+	<LI><A href="documentation.html" title="Documentation">Documentation</A></LI>
+	<LI><A href="plugins.html" title="Plugins">Plugins</A></LI>
+	<LI><A href="faq.html" title="FAQ">FAQ</A></LI>
+	<LI><A href="links.html" title="Links">Links</A></LI>
+	<LI><A href="old-documentation.html" title="Old Documentation">Old Documentation</A></LI>
+	<LI><SPAN class="nobr"><A href="http://cwiki.apache.org/confluence/x/GAUB" title="Visit page outside Confluence" rel="nofollow">Wiki<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+	<LI><SPAN class="nobr"><A href="http://www.apache.org/foundation/thanks.html" title="Visit page outside Confluence" rel="nofollow">Sponsors<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+	<LI><SPAN class="nobr"><A href="http://www.apache.org/foundation/sponsorship.html" title="Visit page outside Confluence" rel="nofollow">Sponsorship<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+</UL>
+
+
+<P>
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </DIV>
+    <DIV class="main">
+<P>Sling is a framework to develop content centric web applications based on the idea of modularizing the rendering of HTTP resources. </P>
+
+<P>Sling entered incubation on September 5th, 2007.</P>
+
+<P>Community</P>
+
+<UL>
+	<LI>We had a very active month with adding microsling and based on this project developping and voting the new Sling API replacing the form Component API. Currently we are migrating the project sources to the new API.</LI>
+	<LI>Sling present at ApacheCon US 07 with a FeatherTalk and a BOF</LI>
+</UL>
+
+
+<P>Software</P>
+
+<UL>
+	<LI>microsling added to Sling as simple entry level framework exhibiting the mechanisms of Sling. microsling was also used as a proof of concept for the new Sling API and greatly influenced its evolution.</LI>
+	<LI>Two contributions of the community added to microsling and Sling: Freemarker support by Padraic Hannon and Ruby integration by  Shawn Anderson.</LI>
+</UL>
+
+
+<P>Issues before graduation</P>
+
+<UL>
+	<LI>Make an incubating Sling release</LI>
+	<LI>Grow a more diverse community (so far only commits from Day employees)</LI>
+</UL>
+
+
+<P>Licensing and other issues</P>
+
+<UL>
+	<LI>none</LI>
+</UL>
+
+    </DIV>
+  </BODY>
+</HTML>
+

Added: websites/staging/sling/trunk/content/site/incubator-status-report-october-2007.html
==============================================================================
--- websites/staging/sling/trunk/content/site/incubator-status-report-october-2007.html (added)
+++ websites/staging/sling/trunk/content/site/incubator-status-report-october-2007.html Wed Dec 12 09:16:44 2012
@@ -0,0 +1,80 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<HTML>
+  <HEAD>
+    <TITLE>Apache Sling - Incubator Status Report (October 2007)</TITLE>
+    <LINK rel="stylesheet" href="http://incubator.apache.org/sling/site/media.data/site.css" type="text/css" media="all">
+    <LINK rel="icon" href="http://incubator.apache.org/sling/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://incubator.apache.org/sling/site/index.html">
+          <IMG border="0" alt="Apache Sling" src="http://incubator.apache.org/sling/site/media.data/logo.png">
+        </A>
+      </DIV>
+      <DIV class="header">
+        <A href="http://incubator.apache.org/">
+          <IMG border="0" alt="Apache Incubator" src="http://incubator.apache.org/images/apache-incubator-logo.png">
+        </A>
+      </DIV>
+    </DIV>
+    <DIV class="menu">
+                                    <P>
+
+<UL>
+	<LI><A href="index.html" title="Index">Home</A></LI>
+	<LI><A href="project-information.html" title="Project Information">Project Information</A></LI>
+	<LI><A href="usecases.html" title="UseCases">Use Cases</A></LI>
+	<LI><A href="guides.html" title="Guides">Guides</A></LI>
+	<LI><A href="documentation.html" title="Documentation">Documentation</A></LI>
+	<LI><A href="plugins.html" title="Plugins">Plugins</A></LI>
+	<LI><A href="faq.html" title="FAQ">FAQ</A></LI>
+	<LI><A href="links.html" title="Links">Links</A></LI>
+	<LI><A href="old-documentation.html" title="Old Documentation">Old Documentation</A></LI>
+	<LI><SPAN class="nobr"><A href="http://cwiki.apache.org/confluence/x/GAUB" title="Visit page outside Confluence" rel="nofollow">Wiki<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+	<LI><SPAN class="nobr"><A href="http://www.apache.org/foundation/thanks.html" title="Visit page outside Confluence" rel="nofollow">Sponsors<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+	<LI><SPAN class="nobr"><A href="http://www.apache.org/foundation/sponsorship.html" title="Visit page outside Confluence" rel="nofollow">Sponsorship<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+</UL>
+
+
+<P>
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </DIV>
+    <DIV class="main">
+<P>Sling is a framework to develop content centric web applications based on the idea of modularizing the rendering of HTTP resources. </P>
+
+<P>Sling entered incubation on September 5th, 2007.</P>
+
+<P>Community</P>
+<UL>
+	<LI>Proper wiki/web page created by Felix Meschberger based on the Apache Felix setup by Marcel Offermans and Ronald Spierenburg.</LI>
+	<LI>Juan's committer account has been setup</LI>
+	<LI>Apache Sling will be present at the ApacheCon US 07 with a Feather Talk.</LI>
+	<LI>Upcoming will be a discussion on when we should cut a first release.</LI>
+</UL>
+
+
+<P>Software</P>
+<UL>
+	<LI>Discusssion is taking place to simplify the current &quot;Component API&quot; and to remove interfaces which are more or less duplicate to the Servlet API used and extended by Sling.</LI>
+	<LI>A &quot;sample&quot; project has been added to show some features of Sling.</LI>
+</UL>
+
+
+<P>Issues before graduation</P>
+<UL>
+	<LI>Make an incubating Sling release</LI>
+	<LI>Grow a more diverse community (so far only commits from Day employees)</LI>
+</UL>
+
+
+<P>Licensing and other issues</P>
+<UL>
+	<LI>none</LI>
+</UL>
+
+    </DIV>
+  </BODY>
+</HTML>
+

Added: websites/staging/sling/trunk/content/site/index.data/ApacheConUS07_FFT_Sling.pdf
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/sling/trunk/content/site/index.data/ApacheConUS07_FFT_Sling.pdf
------------------------------------------------------------------------------
    svn:mime-type = application/pdf

Added: websites/staging/sling/trunk/content/site/index.html
==============================================================================
--- websites/staging/sling/trunk/content/site/index.html (added)
+++ websites/staging/sling/trunk/content/site/index.html Wed Dec 12 09:16:44 2012
@@ -0,0 +1,185 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<HTML>
+  <HEAD>
+    <TITLE>Apache Sling - Apache 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">
+<P><B>Documentation</B><BR class="atl-forced-newline">
+<A href="getting-started.html" title="Getting Started">Getting Started</A><BR class="atl-forced-newline">
+<A href="the-sling-engine.html" title="The Sling Engine">The Sling Engine</A><BR class="atl-forced-newline">
+<A href="development.html" title="Development">Development</A><BR class="atl-forced-newline">
+<A href="bundles.html" title="Bundles">Bundles</A><BR class="atl-forced-newline">
+<A href="tutorials-how-tos.html" title="Tutorials & How-Tos">Tutorials &amp; How&#45;Tos</A><BR class="atl-forced-newline">
+<A href="configuration.html" title="Configuration">Configuration</A><BR class="atl-forced-newline">
+<A href="http://sling.apache.org/apidocs/sling6/index.html" class="external-link" rel="nofollow">API docs</A><BR class="atl-forced-newline">
+<A href="http://s.apache.org/sling.wiki" class="external-link" rel="nofollow">Wiki</A><BR class="atl-forced-newline">
+<A href="http://s.apache.org/sling.faq" class="external-link" rel="nofollow">FAQ</A><BR class="atl-forced-newline"></P>
+
+<P><B>Project info</B><BR class="atl-forced-newline">
+<A href="http://sling.apache.org/site/downloads.cgi" class="external-link" rel="nofollow">Downloads</A><BR class="atl-forced-newline">
+<A href="http://www.apache.org/licenses/" class="external-link" rel="nofollow">License</A><BR class="atl-forced-newline">
+<A href="contributing.html" title="Contributing">Contributing</A><BR class="atl-forced-newline">
+<A href="news.html" title="News">News</A><BR class="atl-forced-newline">
+<A href="links.html" title="Links">Links</A><BR class="atl-forced-newline">
+<A href="project-information.html" title="Project Information">Project Information</A><BR class="atl-forced-newline">
+<A href="https://issues.apache.org/jira/browse/SLING" class="external-link" rel="nofollow">Issue Tracker</A><BR class="atl-forced-newline">
+<A href="http://svn.apache.org/viewvc/sling/trunk" class="external-link" rel="nofollow">Browse Source Repository</A><BR class="atl-forced-newline">
+<A href="security.html" title="Security">Security</A><BR class="atl-forced-newline"></P>
+
+<P><B>Sponsorship</B><BR class="atl-forced-newline">
+<A href="http://www.apache.org/foundation/thanks.html" class="external-link" rel="nofollow">Thanks</A><BR class="atl-forced-newline">
+<A href="http://www.apache.org/foundation/sponsorship.html" class="external-link" rel="nofollow">Become a Sponsor</A><BR>
+<A href="http://www.apache.org/foundation/buy_stuff.html" class="external-link" rel="nofollow">Buy Stuff</A></P>
+
+
+  <IFRAME src="http://www.apache.org/ads/button.html" style="border-width:0; float: left" frameborder="0" scrolling="no" width="135" height="135"></IFRAME>
+  <P style="height: 135px"></P>
+    </DIV>
+    <DIV class="main">
+        <DIV class="breadcrump" style="font-size: 80%;">
+<A href="" title="Apache Sling Website">Apache Sling Website</A>&nbsp;&gt;&nbsp;<A href="" title="Apache Sling">Apache Sling</A>
+        </DIV>
+<H1><A name="ApacheSling-ApacheSlingBringingBacktheFun"></A>Apache Sling - Bringing Back the Fun</H1>
+
+<P><SPAN class="tm mark "><B>Apache Sling</B><SMALL><SUP>TM</SUP></SMALL></SPAN>
+ 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" title="Project Information">Project Information</A> page for more info.</P>
+
+<H1><A name="ApacheSling-ApacheSlinginfivebulletspoints"></A>Apache Sling in five bullets points</H1>
+
+<UL>
+	<LI>REST based web framework</LI>
+	<LI>Content-driven, using a JCR content repository</LI>
+	<LI>Powered by OSGi</LI>
+	<LI>Scripting inside, multiple languages (JSP, server-side javascript, Scala, etc.)</LI>
+	<LI>Apache Open Source project</LI>
+</UL>
+
+
+<H1><A name="ApacheSling-ApacheSlinginahundredwords"></A>Apache Sling in a hundred words</H1>
+
+<P>Apache Sling is a web framework that uses a <A href="http://en.wikipedia.org/wiki/JSR-170" class="external-link" rel="nofollow">Java Content Repository</A>, such as <A href="http://jackrabbit.apache.org/" class="external-link" rel="nofollow">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>
+
+<P>The embedded <A href="http://felix.apache.org/" class="external-link" rel="nofollow">Apache Felix</A> OSGi framework and console provide a dynamic runtime environment, where code and content bundles can be loaded, unloaded and reconfigured at runtime.</P>
+
+<P>As the first web framework dedicated to <A href="http://jcp.org/en/jsr/detail?id=170" class="external-link" rel="nofollow">JSR-170</A> Java Content Repositories, Sling makes it very simple to implement simple applications, while providing an enterprise-level framework for more complex applications. </P>
+
+<H2><A name="ApacheSling-News"></A>News</H2>
+
+<P><UL>
+	<LI>New Release: Apache Sling Servlet Resolver 2.2.2 (December 10th, 2012)</LI>
+	<LI>New Releases: Apache Sling Settings 1.2.2, Apache Sling Auth Core 1.1.0, Apache Sling Commons Logservice 1.0.2, Apache Sling Installer Core 3.4.2, Apache Sling Scripting JSP 2.0.26, Apache Sling Commons Compiler 2.1.0, Apache Sling JCR Compiler 2.1.0, Apache Sling I18n 2.2.4, Apache Sling JCR Classloader 3.1.10, Apache Sling JCR Webdav 2.1.2, Apache Sling JCR Davex 1.1.0 (November 30th, 2012)</LI>
+	<LI>New Releases: Apache Sling Maven Launchpad Plugin 2.2.0, Apache Sling Commons OSGi 2.2.0, Apache Sling Launchpad Installer 1.2.0, Apache Sling Rewriter 1.0.4, Apache Sling Settings 1.2.0 (November 19th, 2012)</LI>
+	<LI>New Releases: Apache Sling API 2.3.0, Apache Sling Bundle Resource Provider 2.1.0, Apache Sling File System Resource Provider 1.1.0, Apache Sling JCR Resource 2.2.0, Apache Sling Resource Resolver 1.0.0, Apache Sling Servlets Get 2.1.4, Apache Sling Servlets Post 2.2.0, Apache Sling Servlets Resolver 2.2.0, Apache Sling Adapter 2.1.0, Apache Sling Commons Testing 2.0.12 (November 15th, 2012)</LI>
+	<LI>New Release: Apache Sling JSP Taglib 2.1.8, Apache Sling Installer Core 3.4.0, Apache Sling Installer API 1.0.0, Apache Sling Installer Console 1.0.0, Apache Sling JCR Wrapper 2.0.0 (October 29th, 2012)</LI>
+	<LI>New Releases: Apache Sling Installer Core 3.3.8, Apache Sling Launchpad Installer 1.1.4, and Apache Sling Maven Launchpad Plugin 2.1.2 (August 19th, 2012)</LI>
+</UL>
+</P>
+<UL>
+	<LI><A href="news.html" title="News">all news...</A></LI>
+</UL>
+
+
+<H2><A name="ApacheSling-History"></A>History</H2>
+
+<P>Sling started as an internal project at <A href="http://www.day.com/" class="external-link" rel="nofollow">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>
+
+<P>The name &quot;Sling&quot; has been proposed by Roy Fielding who explained it like this:</P>
+
+<BLOCKQUOTE>
+<P>[The name is] Biblical in nature.  The story of David: the weapon he uses to slay the giant Goliath is a sling.  Hence, our David's [David Nuescheler, CTO of Day Software] favorite weapon.</P>
+
+<P>It is also the simplest device for delivering content very fast.</P></BLOCKQUOTE>
+
+
+<H2><A name="ApacheSling-WhousesSling%3F"></A>Who uses Sling?</H2>
+
+<P>See <A href="http://cwiki.apache.org/SLING/who-is-using-sling-.html" class="external-link" rel="nofollow">Who is using Sling</A> on our public wiki.</P>
+
+<H2><A name="ApacheSling-Gettingstarted"></A>Getting started</H2>
+
+<P>If you prefer doing rather than reading, please proceed to <A href="discover-sling-in-15-minutes.html" title="Discover Sling in 15 minutes">Discover Sling in 15 minutes</A> or read through the recommended links in the <A href="getting-started.html" title="Getting Started">Getting Started</A> section, where you can quickly get started on your own instance of Sling.</P>
+
+<H2><A name="ApacheSling-Contents"></A>Contents</H2>
+
+<UL>
+	<LI><A href="documentation.html" title="Documentation">Documentation</A> &#45; Here you will find the documentation on Sling</LI>
+	<LI><A href="development.html" title="Development">Development</A> &ndash; Documentation on how to develop web applications with Sling and what tools you have at your disposal</LI>
+	<LI><A href="links.html" title="Links">Links</A></LI>
+	<LI><A href="http://cwiki.apache.org/SLING/" class="external-link" rel="nofollow">Wiki</A></LI>
+	<LI><A href="http://cwiki.apache.org/SLING/faq.html" class="external-link" rel="nofollow">FAQ</A></LI>
+	<LI><A href="project-information.html" title="Project Information">Project Information</A></LI>
+</UL>
+
+
+
+<H2><A name="ApacheSling-UseCasesforSling"></A>Use Cases for Sling</H2>
+
+
+<H4><A name="ApacheSling-Wiki"></A>Wiki</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>
+
+<P>Thanks to the JCR Mapping and the resolution of the Component from the mapped Content, the system does not care for what actual node is addressed as long as there is a Content mapping and a Component capable of handling the Content.</P>
+
+<P>Thus in the tradition of REST, the attachement of a Wiki page, which happens to be in a node nested below the wiki page node is easily accessed 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><A name="ApacheSling-DigitalAssetManagement"></A>Digital Asset Management</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><A name="ApacheSling-WebContentManagement"></A>Web Content Management</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 URL resolves to a Content object for which a Component exists, which is 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><A name="ApacheSling-References"></A>References</H2>
+
+
+<H4><A name="ApacheSling-ApacheJackrabbit"></A>Apache Jackrabbit</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/" class="external-link" rel="nofollow">Apache Jackrabbit</A> is provided out of the box.</P>
+
+<H4><A name="ApacheSling-OSGi"></A>OSGi</H4>
+
+<P>Sling is implemented as a series of <A href="http://www.osgi.org/" class="external-link" rel="nofollow">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><A name="ApacheSling-ApacheFelix"></A>Apache Felix</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/" class="external-link" rel="nofollow">Apache Felix</A> as the OSGi framework implementation. It has not been tested yet, but it is expected that Sling also operates perfectly inside other OSGi frameworks such as <A href="http://www.eclipse.org/equinox" class="external-link" rel="nofollow">Equinox</A> and <A href="http://www.knopflerfish.org/" class="external-link" rel="nofollow">Knopflerfish</A>.</P>
+        <DIV class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
+Last modified by bdelacretaz on 2012-04-03 11:06:05.0
+        </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>
+    </DIV>
+  </BODY>
+</HTML>
+

Added: websites/staging/sling/trunk/content/site/installing-and-upgrading-bundles.html
==============================================================================
--- websites/staging/sling/trunk/content/site/installing-and-upgrading-bundles.html (added)
+++ websites/staging/sling/trunk/content/site/installing-and-upgrading-bundles.html Wed Dec 12 09:16:44 2012
@@ -0,0 +1,145 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<HTML>
+  <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">
+<P><B>Documentation</B><BR class="atl-forced-newline">
+<A href="getting-started.html" title="Getting Started">Getting Started</A><BR class="atl-forced-newline">
+<A href="the-sling-engine.html" title="The Sling Engine">The Sling Engine</A><BR class="atl-forced-newline">
+<A href="development.html" title="Development">Development</A><BR class="atl-forced-newline">
+<A href="bundles.html" title="Bundles">Bundles</A><BR class="atl-forced-newline">
+<A href="tutorials-how-tos.html" title="Tutorials & How-Tos">Tutorials &amp; How&#45;Tos</A><BR class="atl-forced-newline">
+<A href="configuration.html" title="Configuration">Configuration</A><BR class="atl-forced-newline">
+<A href="http://sling.apache.org/apidocs/sling6/index.html" class="external-link" rel="nofollow">API docs</A><BR class="atl-forced-newline">
+<A href="http://s.apache.org/sling.wiki" class="external-link" rel="nofollow">Wiki</A><BR class="atl-forced-newline">
+<A href="http://s.apache.org/sling.faq" class="external-link" rel="nofollow">FAQ</A><BR class="atl-forced-newline"></P>
+
+<P><B>Project info</B><BR class="atl-forced-newline">
+<A href="http://sling.apache.org/site/downloads.cgi" class="external-link" rel="nofollow">Downloads</A><BR class="atl-forced-newline">
+<A href="http://www.apache.org/licenses/" class="external-link" rel="nofollow">License</A><BR class="atl-forced-newline">
+<A href="contributing.html" title="Contributing">Contributing</A><BR class="atl-forced-newline">
+<A href="news.html" title="News">News</A><BR class="atl-forced-newline">
+<A href="links.html" title="Links">Links</A><BR class="atl-forced-newline">
+<A href="project-information.html" title="Project Information">Project Information</A><BR class="atl-forced-newline">
+<A href="https://issues.apache.org/jira/browse/SLING" class="external-link" rel="nofollow">Issue Tracker</A><BR class="atl-forced-newline">
+<A href="http://svn.apache.org/viewvc/sling/trunk" class="external-link" rel="nofollow">Browse Source Repository</A><BR class="atl-forced-newline">
+<A href="security.html" title="Security">Security</A><BR class="atl-forced-newline"></P>
+
+<P><B>Sponsorship</B><BR class="atl-forced-newline">
+<A href="http://www.apache.org/foundation/thanks.html" class="external-link" rel="nofollow">Thanks</A><BR class="atl-forced-newline">
+<A href="http://www.apache.org/foundation/sponsorship.html" class="external-link" rel="nofollow">Become a Sponsor</A><BR>
+<A href="http://www.apache.org/foundation/buy_stuff.html" class="external-link" rel="nofollow">Buy Stuff</A></P>
+
+
+  <IFRAME src="http://www.apache.org/ads/button.html" style="border-width:0; float: left" frameborder="0" scrolling="no" width="135" height="135"></IFRAME>
+  <P style="height: 135px"></P>
+    </DIV>
+    <DIV class="main">
+        <DIV class="breadcrump" style="font-size: 80%;">
+<A href="apache-sling.html" title="Apache Sling Website">Apache Sling Website</A>&nbsp;&gt;&nbsp;<A href="apache-sling.html" title="Apache Sling">Apache Sling</A>&nbsp;&gt;&nbsp;<A href="documentation.html" title="Documentation">Documentation</A>&nbsp;&gt;&nbsp;<A href="tutorials-how-tos.html" title="Tutorials & How-Tos">Tutorials &amp; How-Tos</A>&nbsp;&gt;&nbsp;<A href="" title="Installing and Upgrading Bundles">Installing and Upgrading Bundles</A>
+        </DIV>
+<H1><A name="InstallingandUpgradingBundles-InstallingandUpgradingBundles"></A>Installing and Upgrading Bundles</H1>
+
+<DIV class="panelMacro"><TABLE class="noteMacro"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="https://cwiki.apache.org/confluence/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD>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" class="external-link" rel="nofollow">Apache Felix Web Console</A>.</TD></TR></TABLE></DIV>
+
+
+
+<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>
+
+
+
+<H2><A name="InstallingandUpgradingBundles-SlingManagementConsole"></A>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 <TT>/system/console</TT> in the Sling Context by default. For example if you installed the Sling Web Application in the <TT>/sample</TT> context of the Servlet Container running at <TT>http</TT><TT>://somehost:4402</TT>, you would access the Sling Management Console at <TT>http</TT><TT>://somehost:4402/sample/system/console</TT>.</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>
+
+
+
+<H2><A name="InstallingandUpgradingBundles-InstallingandupgradingbundlesbyUpload"></A>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>
+
+
+
+<H2><A name="InstallingandUpgradingBundles-InstallingandupgradingbundlesfromtheBundleRepository"></A>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>
+
+
+<H3><A name="InstallingandUpgradingBundles-TheBundleRepositorypage"></A>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>
+
+
+
+<H3><A name="InstallingandUpgradingBundles-TheBundlespage"></A>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>
+
+
+
+<H3><A name="InstallingandUpgradingBundles-ManagingOSGiBundleRepositories"></A>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 <TT>action</TT> whose value must be <TT>refreshOBR</TT> and <TT>repository</TT> whose value must be the URL to the repository descriptor file generally called <TT>repository.xml</TT>.</P>
+
+<P>For example, if you run Sling on <TT>http</TT><TT>://localhost:7402/sample</TT> with default location of the Sling Management Console, the following request would add a repository at <TT>/tmp/repo/repository.xml</TT> in the filesystem:</P>
+
+<DIV class="preformatted panel" style="border-width: 1px;"><DIV class="preformattedContent panelContent">
+<PRE>http://localhost:7402/sample/system/console/bundlerepo?action=refreshOBR&amp;repository=file:///tmp/repo/repository.xml
+</PRE>
+</DIV></DIV>
+
+<P>Note: Only use <TT>file:</TT> URLs if you know Sling has access to the named file !</P>
+        <DIV class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
+Last modified by mykee on 2009-06-01 07:34:34.0
+        </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>
+    </DIV>
+  </BODY>
+</HTML>
+

Added: websites/staging/sling/trunk/content/site/internationalization-support-i18n.html
==============================================================================
--- websites/staging/sling/trunk/content/site/internationalization-support-i18n.html (added)
+++ websites/staging/sling/trunk/content/site/internationalization-support-i18n.html Wed Dec 12 09:16:44 2012
@@ -0,0 +1,232 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<HTML>
+  <HEAD>
+    <TITLE>Apache Sling - Internationalization Support (i18n)</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">
+<P><B>Documentation</B><BR class="atl-forced-newline">
+<A href="getting-started.html" title="Getting Started">Getting Started</A><BR class="atl-forced-newline">
+<A href="the-sling-engine.html" title="The Sling Engine">The Sling Engine</A><BR class="atl-forced-newline">
+<A href="development.html" title="Development">Development</A><BR class="atl-forced-newline">
+<A href="bundles.html" title="Bundles">Bundles</A><BR class="atl-forced-newline">
+<A href="tutorials-how-tos.html" title="Tutorials & How-Tos">Tutorials &amp; How&#45;Tos</A><BR class="atl-forced-newline">
+<A href="configuration.html" title="Configuration">Configuration</A><BR class="atl-forced-newline">
+<A href="http://sling.apache.org/apidocs/sling6/index.html" class="external-link" rel="nofollow">API docs</A><BR class="atl-forced-newline">
+<A href="http://s.apache.org/sling.wiki" class="external-link" rel="nofollow">Wiki</A><BR class="atl-forced-newline">
+<A href="http://s.apache.org/sling.faq" class="external-link" rel="nofollow">FAQ</A><BR class="atl-forced-newline"></P>
+
+<P><B>Project info</B><BR class="atl-forced-newline">
+<A href="http://sling.apache.org/site/downloads.cgi" class="external-link" rel="nofollow">Downloads</A><BR class="atl-forced-newline">
+<A href="http://www.apache.org/licenses/" class="external-link" rel="nofollow">License</A><BR class="atl-forced-newline">
+<A href="contributing.html" title="Contributing">Contributing</A><BR class="atl-forced-newline">
+<A href="news.html" title="News">News</A><BR class="atl-forced-newline">
+<A href="links.html" title="Links">Links</A><BR class="atl-forced-newline">
+<A href="project-information.html" title="Project Information">Project Information</A><BR class="atl-forced-newline">
+<A href="https://issues.apache.org/jira/browse/SLING" class="external-link" rel="nofollow">Issue Tracker</A><BR class="atl-forced-newline">
+<A href="http://svn.apache.org/viewvc/sling/trunk" class="external-link" rel="nofollow">Browse Source Repository</A><BR class="atl-forced-newline">
+<A href="security.html" title="Security">Security</A><BR class="atl-forced-newline"></P>
+
+<P><B>Sponsorship</B><BR class="atl-forced-newline">
+<A href="http://www.apache.org/foundation/thanks.html" class="external-link" rel="nofollow">Thanks</A><BR class="atl-forced-newline">
+<A href="http://www.apache.org/foundation/sponsorship.html" class="external-link" rel="nofollow">Become a Sponsor</A><BR>
+<A href="http://www.apache.org/foundation/buy_stuff.html" class="external-link" rel="nofollow">Buy Stuff</A></P>
+
+
+  <IFRAME src="http://www.apache.org/ads/button.html" style="border-width:0; float: left" frameborder="0" scrolling="no" width="135" height="135"></IFRAME>
+  <P style="height: 135px"></P>
+    </DIV>
+    <DIV class="main">
+        <DIV class="breadcrump" style="font-size: 80%;">
+<A href="apache-sling.html" title="Apache Sling Website">Apache Sling Website</A>&nbsp;&gt;&nbsp;<A href="apache-sling.html" title="Apache Sling">Apache Sling</A>&nbsp;&gt;&nbsp;<A href="documentation.html" title="Documentation">Documentation</A>&nbsp;&gt;&nbsp;<A href="bundles.html" title="Bundles">Bundles</A>&nbsp;&gt;&nbsp;<A href="" title="Internationalization Support (i18n)">Internationalization Support (i18n)</A>
+        </DIV>
+<H1><A name="InternationalizationSupport%28i18n%29-InternationalizationSupport"></A>Internationalization Support</H1>
+
+<P>Internationalization support in Sling consists of four methods in the <TT>SlingHttpServletRequest</TT> interface:</P>
+
+<UL>
+	<LI><TT>getLocale()</TT> &ndash; Returns the primary <TT>Locale</TT> for the current request. This method is inherited from the <TT>javax.servlet.ServletRequest</TT> interface.</LI>
+	<LI><TT>getLocales()</TT> &ndash; Returns the <TT>Locale</TT> instances for the current request. This method is inherited from the <TT>javax.servlet.ServletRequest</TT> interface.</LI>
+	<LI><TT>getResourceBundle(Locale)</TT> &ndash; Returns a <TT>ResourceBundle</TT> for the given <TT>Locale</TT>. This method is specific to Sling.</LI>
+	<LI><TT>getResourceBundle(String, Locale)</TT> &ndash; Returns a <TT>ResourceBundle</TT> of a given base name for the given <TT>Locale</TT>. This method is specific to Sling.</LI>
+</UL>
+
+
+
+<P>These methods have a default implementation in the <TT>org.apache.sling.core</TT> bundle and an extended and extensible implementation in the <TT>org.apache.sling.i18n</TT> bundle.</P>
+
+
+<H2><A name="InternationalizationSupport%28i18n%29-DefaultImplementationinthe%7B%7Borg.apache.sling.engine%7D%7DBundle"></A>Default Implementation in the <TT>org.apache.sling.engine</TT> Bundle</H2>
+
+<P>The default implementation of the above mentioned four methods in the Sling Engine bundle is contained in the bundle-private class <TT>org.apache.sling.engine.impl.SlingHttpServletRequestImpl</TT> which is the primary implementation of the <TT>SlingHttpServletRequest</TT> interface:</P>
+
+<UL>
+	<LI><TT>getLocale()</TT> &ndash; Returns the <TT>Locale</TT> from the request object of the servlet container in which Sling is running. As per the Servlet API specification, this is either the primary Locale of the <TT>Accept-Language</TT> request header or the server default locale.</LI>
+	<LI><TT>getLocales()</TT> &ndash; Returns the <TT>Enumeration</TT> from the request object of the servlet container in which Sling is running. As per the Servlet API specification, this is either based on the <TT>Accept-Language</TT> request header or just the server default locale.</LI>
+	<LI><TT>getResourceBundle(Locale)</TT> &ndash; Returns a <TT>ResourceBundle</TT> whose <TT>getString(String key)</TT> method returns the <TT>key</TT> as the message and whose <TT>getKeys()</TT> method returns an empty <TT>Enumeration</TT>.</LI>
+	<LI><TT>getResourceBundle(String, Locale)</TT> &ndash; Returns a <TT>ResourceBundle</TT> whose <TT>getString(String key)</TT> method returns the <TT>key</TT> as the message and whose <TT>getKeys()</TT> method returns an empty <TT>Enumeration</TT>.</LI>
+</UL>
+
+
+
+<P>NOTE: Unlike the default implementations of the <TT>ResourceBundle</TT> abstract class in the Java Runtime &ndash; <TT>PropertyResourceBundle</TT> and <TT>ListResourceBundle</TT> &ndash; the <TT>ResourceBundle</TT> returned by the default implementation of the <TT>getResourceBundle(Locale)</TT> and <TT>getResourceBundle(String, Locale)</TT> always returns a string message for any key, which is the key itself. This prevents throwing <TT>MissingResourceException</TT>.</P>
+
+
+
+<H2><A name="InternationalizationSupport%28i18n%29-ExtensibleImplementationinthe%7B%7Borg.apache.sling.i18n%7D%7DBundle"></A>Extensible Implementation in the <TT>org.apache.sling.i18n</TT> Bundle</H2>
+
+<P>The <TT>org.apache.sling.i18n</TT> Bundle implements a request level <TT>Filter</TT> providing extensible implementations of the above mentioned three methods. Extensibility is attained by defining two service interfaces:</P>
+
+<UL>
+	<LI><TT>LocaleResolver</TT> &ndash; The <TT>LocaleResolver</TT> interface defines a method which may be implemented by a service outside of the sling.i18n bundle. If no such service is registered the default behaviour is as described above for the sling.core bundle. The service described by this interface is used to implement the <TT>getLocale()</TT> and <TT>getLocales()</TT> method.</LI>
+</UL>
+
+
+<UL>
+	<LI><TT>ResourceBundleProvider</TT> &ndash; The <TT>ResourceBundleProvider</TT> interface defines two methods to acquire a <TT>ResourceBundle</TT> for any <TT>Locale</TT> and an optional base name. This service interface is not intended to be implemented outside of the sling.i18n bundle: A JCR Repository based implementation is contained in the sling.i18n bundle. The <TT>ResourceBundleProvider</TT> service is not only used within the sling.i18n bundle to implement the <TT>SlingHttpServletRequest.getResourceBundle(Locale)</TT> and  <TT>SlingHttpServletRequest.getResourceBundle(String, Locale)</TT> methods. The service may also be used by Sling applications to acquire <TT>ResourceBundle</TT> instances without having a request object by getting the service and calling its <TT>getResourceBundle(Locale)</TT> or <TT>getResourceBundle(String, Locale)</TT> method directly.</LI>
+</UL>
+
+
+
+
+<H3><A name="InternationalizationSupport%28i18n%29-JCRRepositorybased%7B%7BResourceBundleProvider%7D%7D"></A>JCR Repository based <TT>ResourceBundleProvider</TT></H3>
+
+<P>The sling.i18n Bundle provides the implementation of the <TT>ResourceBundleProvider</TT> interface, which may also be used outside of Sling requests for service tasks. This implementation gets the messages from a JCR Repository stored below nodes of the mixin node type <TT>mix:language</TT>. These language nodes have a <TT>jcr:language</TT> property naming the language of the resources. In the context of the JCR based <TT>ResourceBundleProvider</TT> this is of course expected to be the string value of respective <TT>Locale</TT>.</P>
+
+<P>The (direct) child nodes of the <TT>mix:language</TT> node must contain two special properties naming the key string and the message:</P>
+
+<UL>
+	<LI><TT>sling:key</TT> &ndash; The <TT>sling:key</TT> property is a string property being the key for which the node contains the message(s).</LI>
+	<LI><TT>sling:message</TT> &ndash; The <TT>sling:message</TT> property represents the resource for the key.</LI>
+</UL>
+
+
+<P>The exact location of these nodes is not relevant as the <TT>ResourceBundleProvider</TT> finds them by applying a JCR search. It is only required that the message nodes are located below <TT>mix:language</TT> nodes. Such structures may also be scattered in the repository to allow storing message resources next to where they are most likely used, such as request scripts.</P>
+
+
+<H3><A name="InternationalizationSupport%28i18n%29-%7B%7BResourceBundle%7D%7Dwithbasenames"></A><TT>ResourceBundle</TT> with base names</H3>
+
+<P>Similar to standard Java <TT>ResourceBundle</TT> instances, Sling <TT>ResourceBundle</TT> instances may be created for base names through any of the <TT>getResourceBundle(String, Locale)</TT> methods. These methods use the base name parameter as a selector for the values of the <TT>sling:basename</TT> property of the <TT>mix:language</TT> nodes.</P>
+
+<P>The base name argument can take one three values:</P>
+
+<DIV class="table-wrap">
+<TABLE class="confluenceTable"><TBODY>
+<TR>
+<TH class="confluenceTh"> Value </TH>
+<TH class="confluenceTh"> <TT>ResourceBundle</TT> selection </TH>
+</TR>
+<TR>
+<TD class="confluenceTd"> <TT>null</TT> </TD>
+<TD class="confluenceTd"> Selects messages of <TT>mix:language</TT> nodes ignoring the existence or absence of <TT>sling:basename</TT> properties </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> Empty String </TD>
+<TD class="confluenceTd"> Selects messages of <TT>mix:language</TT> nodes which have <TT>sling:basename</TT> properties, ignoring the actual values </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> Any other Value </TD>
+<TD class="confluenceTd"> Selects messages of <TT>mix:language</TT> nodes whose <TT>sling:basename</TT> properties has any value which matches the base name string </TD>
+</TR>
+</TBODY></TABLE>
+</DIV>
+
+
+<P>The <TT>sling:basename</TT> property may be multi-valued, that is the messages of a <TT>mix:language</TT> nodes may belong to multiple base names and thus <TT>ResourceBundle</TT> instances.</P>
+
+
+<H3><A name="InternationalizationSupport%28i18n%29-SampleResources"></A>Sample Resources</H3>
+
+<P>Consider the following repository content:</P>
+
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+   /libs/languages
+           +-- English (nt:folder, mix:language)
+           |    +-- jcr:language = en
+           |    +-- m1 (sling:messageEntry)
+           |    |    +-- sling:key = <SPAN class="code-quote">&quot;msg001&quot;</SPAN>
+           |    |    +-- slign:message = <SPAN class="code-quote">&quot;This is a message&quot;</SPAN>
+           |    +-- m2 (sling:messageEntry)
+           |         +-- sling:key = <SPAN class="code-quote">&quot;msg002&quot;</SPAN>
+           |         +-- slign:message = <SPAN class="code-quote">&quot;Another message&quot;</SPAN>
+           +-- Deutsch (nt:folder, mix:language)
+                +-- jcr:language = de
+                +-- m1 (sling:messageEntry)
+                |    +-- sling:key = <SPAN class="code-quote">&quot;msg001&quot;</SPAN>
+                |    +-- slign:message = <SPAN class="code-quote">&quot;Das ist ein Text&quot;</SPAN>
+                +-- m2 (sling:messageEntry)
+                     +-- sling:key = <SPAN class="code-quote">&quot;msg002&quot;</SPAN>
+                     +-- slign:message = <SPAN class="code-quote">&quot;Ein anderer Text&quot;</SPAN>
+
+   /apps/myApp
+           +-- English (nt:folder, mix:language)
+           |    +-- jcr:language = en
+           |    +-- mx (sling:messageEntry)
+           |         +-- sling:key = <SPAN class="code-quote">&quot;msgXXX&quot;</SPAN>
+           |         +-- slign:message = <SPAN class="code-quote">&quot;An Application Text&quot;</SPAN>
+           +-- Deutsch (nt:folder, mix:language)
+                +-- jcr:language = de
+                +-- mx (sling:messageEntry)
+                     +-- sling:key = <SPAN class="code-quote">&quot;msgXXX&quot;</SPAN>
+                     +-- slign:message = <SPAN class="code-quote">&quot;Ein Anwendungstext&quot;</SPAN>
+</PRE>
+</DIV></DIV>
+
+<P>This content defines two languages <EM>en</EM> and <EM>de</EM> with three messages <EM>msg001</EM>, <EM>msg002</EM> and <EM>msgXXX</EM> each. The names of the respective nodes have no significance at all because all information required is extracted from the <TT>jcr:language</TT>, <TT>sling:key</TT> and <TT>sling:message</TT> properties.</P>
+
+
+<H3><A name="InternationalizationSupport%28i18n%29-JCRNodeTypessupportingtheJCRRepositorybased%7B%7BResourceBundleProvider%7D%7D"></A>JCR Node Types supporting the JCR Repository based <TT>ResourceBundleProvider</TT></H3>
+
+<P>The sling.i18n bundle asserts the following node types:</P>
+
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeHeader panelHeader" style="border-bottom-width: 1px;"><B>mix:language</B></DIV><DIV class="codeContent panelContent">
+<PRE class="code-java">
+[mix:language]
+    mixin
+  - jcr:language (string)
+</PRE>
+</DIV></DIV>
+
+<P>The <TT>mix:language</TT> mixin node type allows setting the <TT>jcr:language</TT> property required by the <TT>ResourceBundleProvider</TT> implementation to identify the message <TT>Locale</TT>.</P>
+
+
+
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeHeader panelHeader" style="border-bottom-width: 1px;"><B>sling:message and sling:messageEntry</B></DIV><DIV class="codeContent panelContent">
+<PRE class="code-java">
+[sling:message]
+    mixin
+  - sling:key (string)
+  - sling:message (undefined)
+
+[sling:messageEntry] &gt; nt:hierarchyNode, sling:message  
+</PRE>
+</DIV></DIV>
+
+<P>The <TT>sling:message</TT> and <TT>slign:messageEntry</TT> are helper node types which may be used to create the nodes with the <TT>sling:key</TT> and <TT>sling:message</TT> properties required by the <TT>ResourceBundleProvider</TT>. The node types themselves are not required but by defining the required properties, they may be of use.</P>
+        <DIV class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
+Last modified by fmeschbe on 2009-12-17 13:46:20.0
+        </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>
+    </DIV>
+  </BODY>
+</HTML>
+



Mime
View raw message