You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bu...@apache.org on 2015/07/01 08:18:58 UTC

svn commit: r956485 - in /websites/staging/sling/trunk/content: ./ documentation/bundles/scheduler-service-commons-scheduler.html documentation/bundles/validation.html documentation/getting-started/discover-sling-in-15-minutes.html

Author: buildbot
Date: Wed Jul  1 06:18:57 2015
New Revision: 956485

Log:
Staging update by buildbot for sling

Modified:
    websites/staging/sling/trunk/content/   (props changed)
    websites/staging/sling/trunk/content/documentation/bundles/scheduler-service-commons-scheduler.html
    websites/staging/sling/trunk/content/documentation/bundles/validation.html
    websites/staging/sling/trunk/content/documentation/getting-started/discover-sling-in-15-minutes.html

Propchange: websites/staging/sling/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Wed Jul  1 06:18:57 2015
@@ -1 +1 @@
-1687900
+1688556

Modified: websites/staging/sling/trunk/content/documentation/bundles/scheduler-service-commons-scheduler.html
==============================================================================
--- websites/staging/sling/trunk/content/documentation/bundles/scheduler-service-commons-scheduler.html (original)
+++ websites/staging/sling/trunk/content/documentation/bundles/scheduler-service-commons-scheduler.html Wed Jul  1 06:18:57 2015
@@ -91,6 +91,10 @@
       
       <h1>Scheduler Service (commons scheduler)</h1>
       <p>The scheduler is a service for scheduling other services/jobs (it uses the open source Quartz library). The scheduler can be used in two ways, by registering the job through the scheduler API and by leveraging the whiteboard pattern that is supported by the scheduler. In most cases the whiteboard pattern is preferred</p>
+<div class="note">
+This notion of Job used here is a different one that the one used for [Sling Jobs](/documentation/bundles/apache-sling-eventing-and-job-handling.html). The main difference is that a scheduler job is not persisted. 
+</div>
+
 <h2 id="examples-of-jobs-that-are-scheduled-by-leveraging-the-whiteboard-pattern">Examples of jobs that are scheduled by leveraging the whiteboard pattern</h2>
 <p>The following examples show you how to define and schedule a job by leveraging the whiteboard pattern.</p>
 <h3 id="scheduling-with-a-cron-expression">Scheduling with a cron expression</h3>
@@ -289,7 +293,7 @@
 <span class="p">}</span>
 </pre></div>
       <div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
-        Rev. 1621958 by cziegeler on Tue, 2 Sep 2014 11:07:18 +0000
+        Rev. 1688225 by kwin on Mon, 29 Jun 2015 14:10:58 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project

Modified: websites/staging/sling/trunk/content/documentation/bundles/validation.html
==============================================================================
--- websites/staging/sling/trunk/content/documentation/bundles/validation.html (original)
+++ websites/staging/sling/trunk/content/documentation/bundles/validation.html Wed Jul  1 06:18:57 2015
@@ -124,9 +124,18 @@ This documentation is still work in prog
 </pre></div>
 
 
-<p>Apart from that it is also possible to validate resources including all child resources having their own validation model (i.e. a merged view of the validation models is applied). The appropriate validation model is being looked up by getting the resource type for each node. Since by default the JCR will return the primary type in case there is no <code>sling:resourceType</code> property found on the node, either the 2nd parameter <code>enforceValidation</code> should be set to <code>false</code> or some resource types must be explicitly ignored to also properly support validation models which have children on its own.</p>
+<p>Apart from that it is also possible to validate resources including all child resources having their own validation model (i.e. a merged view of the validation models is applied). The appropriate validation model is being looked up by getting the resource type for each node. Since by default the JCR will return the primary type in case there is no <code>sling:resourceType</code> property found on the node, either the 2nd parameter <code>enforceValidation</code> should be set to <code>false</code> or some resource types must be explicitly ignored by the given filter in the 3rd parameter <code>filter</code> to also properly support validation models which have children resources on their own.</p>
 <div class="codehilite"><pre><span class="k">try</span> <span class="o">{</span>
-    <span class="n">ValidationResult</span> <span class="n">result</span> <span class="o">=</span> <span class="n">validationService</span><span class="o">.</span><span class="na">validateAllResourceTypesInResource</span><span class="o">(</span><span class="n">resource</span><span class="o">,</span> <span class="kc">false</span><span class="o">,</span> <span class="kc">null</span><span class="o">);</span>
+    <span class="n">Predicate</span> <span class="n">ignoreResourceType1Predicate</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Predicate</span><span class="o">()</span> <span class="o">{</span>
+        <span class="kd">public</span> <span class="kt">boolean</span> <span class="nf">evaluate</span><span class="o">(</span><span class="n">Object</span> <span class="n">object</span><span class="o">)</span> <span class="o">{</span>
+            <span class="n">Resource</span> <span class="n">resource</span> <span class="o">=</span> <span class="o">(</span><span class="n">Resource</span><span class="o">)</span> <span class="n">object</span><span class="o">;</span>
+            <span class="k">if</span> <span class="o">(</span><span class="s">&quot;resourcetype1&quot;</span><span class="o">.</span><span class="na">equals</span><span class="o">(</span><span class="n">resource</span><span class="o">.</span><span class="na">getResourceType</span><span class="o">()))</span> <span class="o">{</span>
+                <span class="k">return</span> <span class="kc">false</span><span class="o">;</span>
+            <span class="o">}</span>
+            <span class="k">return</span> <span class="kc">true</span><span class="o">;</span>
+        <span class="o">}</span>
+    <span class="o">}</span>
+    <span class="n">ValidationResult</span> <span class="n">result</span> <span class="o">=</span> <span class="n">validationService</span><span class="o">.</span><span class="na">validateResourceRecursively</span><span class="o">(</span><span class="n">resource</span><span class="o">,</span> <span class="kc">false</span><span class="o">,</span> <span class="n">ignoreResourceType1Predicate</span><span class="o">);</span>
     <span class="k">if</span> <span class="o">(!</span><span class="n">result</span><span class="o">.</span><span class="na">isValid</span><span class="o">())</span> <span class="o">{</span>
         <span class="c1">// give out validation messages from result.get</span>
     <span class="o">}</span>
@@ -291,7 +300,7 @@ That interface defines the method <code>
 <li><a href="http://www.slideshare.net/raducotescu/apache-sling-generic-validation-framework">Apache Sling Generic Validation Framework, adaptTo 2014</a></li>
 </ol>
       <div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
-        Rev. 1664603 by kwin on Fri, 6 Mar 2015 12:41:15 +0000
+        Rev. 1688218 by kwin on Mon, 29 Jun 2015 13:46:08 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project

Modified: websites/staging/sling/trunk/content/documentation/getting-started/discover-sling-in-15-minutes.html
==============================================================================
--- websites/staging/sling/trunk/content/documentation/getting-started/discover-sling-in-15-minutes.html (original)
+++ websites/staging/sling/trunk/content/documentation/getting-started/discover-sling-in-15-minutes.html Wed Jul  1 06:18:57 2015
@@ -135,11 +135,16 @@
 
 
 <p>The resulting node can be seen at <a href="http://localhost:8080/content/mynode.html.path">http://localhost:8080/content/mynode.html</a>, or as json format under <a href="http://localhost:8080/content/mynode.json">http://localhost:8080/content/mynode.json</a>. Lets try with cURL:</p>
-<div class="codehilite"><pre>$ <span class="n">curl</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">localhost</span><span class="p">:</span>8080<span class="o">/</span><span class="n">content</span><span class="o">/</span><span class="n">mynode</span><span class="p">.</span><span class="n">json</span> <span class="p">{</span>&quot;<span class="n">title</span>&quot;<span class="p">:</span>&quot;<span class="n">some</span> <span class="n">title</span>&quot;<span class="p">,</span>&quot;<span class="n">sling</span><span class="p">:</span><span class="n">resourceType</span>&quot;<span class="p">:</span>&quot;<span class="n">foo</span><span class="o">/</span><span class="n">bar</span>&quot;<span class="p">,</span>&quot;<span class="n">jcr</span><span class="p">:</span><span class="n">primaryType</span>&quot;<span class="p">:</span>&quot;<span class="n">nt</span><span class="p">:</span><span class="n">unstructured</span>&quot;<span class=
 "p">}</span>
+<div class="codehilite"><pre>$ <span class="n">curl</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">localhost</span><span class="p">:</span>8080<span class="o">/</span><span class="n">content</span><span class="o">/</span><span class="n">mynode</span><span class="p">.</span><span class="n">json</span>
 </pre></div>
 
 
-<p>This returns the properties of the <code>/content/mynode</code> in JSON format as we have created it above. The additional property <code>jcr:primaryType</code> is a special JCR property indicating the JCR primary node type.</p>
+<p>This returns the properties of the <code>/content/mynode</code> in JSON format as we have created it above. </p>
+<div class="codehilite"><pre><span class="p">{</span>&quot;<span class="n">title</span>&quot;<span class="p">:</span>&quot;<span class="n">some</span> <span class="n">title</span>&quot;<span class="p">,</span>&quot;<span class="n">sling</span><span class="p">:</span><span class="n">resourceType</span>&quot;<span class="p">:</span>&quot;<span class="n">foo</span><span class="o">/</span><span class="n">bar</span>&quot;<span class="p">,</span>&quot;<span class="n">jcr</span><span class="p">:</span><span class="n">primaryType</span>&quot;<span class="p">:</span>&quot;<span class="n">nt</span><span class="p">:</span><span class="n">unstructured</span>&quot;<span class="p">}</span>
+</pre></div>
+
+
+<p>The additional property <code>jcr:primaryType</code> is a special JCR property added by the content repository, indicating the JCR primary node type.</p>
 <p><em>Monitoring requests: Sling provides a simple tool (an OSGi console plugin) to monitor HTTP requests, which helps understand how things work internally. See the <a href="/documentation/development/monitoring-requests.html">Monitoring Requests</a> page for details.</em></p>
 <h2 id="render-your-content-using-server-side-javascript-esp">Render your content using server-side javascript (ESP)</h2>
 <p>Sling uses scripts or servlets to render and process content.</p>
@@ -252,7 +257,7 @@ well as above in the <em>see also</em> s
 
 <p>The <a href="http://localhost:8080/content/mynode.html">http://localhost:8080/content/mynode.html</a>, once refreshed, now shows the blue headline and logo, and this layout also applies to any node created with <em>sling:resourceType=foo/bar</em>.</p>
       <div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
-        Rev. 1661661 by olli on Mon, 23 Feb 2015 13:19:53 +0000
+        Rev. 1688556 by bdelacretaz on Wed, 1 Jul 2015 06:18:43 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project