sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r1007370 - in /websites/staging/sling/trunk/content: ./ documentation/bundles/validation.html
Date Mon, 27 Feb 2017 14:35:30 GMT
Author: buildbot
Date: Mon Feb 27 14:35:30 2017
New Revision: 1007370

Log:
Staging update by buildbot for sling

Modified:
    websites/staging/sling/trunk/content/   (props changed)
    websites/staging/sling/trunk/content/documentation/bundles/validation.html

Propchange: websites/staging/sling/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Mon Feb 27 14:35:30 2017
@@ -1 +1 @@
-1784234
+1784572

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 Mon Feb 27
14:35:30 2017
@@ -120,6 +120,7 @@ This documentation is still work in prog
 
 <div class="toc">
 <ul>
+<li><a href="#prerequisites">Prerequisites</a></li>
 <li><a href="#basic-usage">Basic Usage</a></li>
 <li><a href="#validation-model-resources">Validation Model Resources</a><ul>
 <li><a href="#validation-model-inheritance">Validation Model Inheritance</a></li>
@@ -135,6 +136,13 @@ This documentation is still work in prog
 </ul>
 </div>
 <p>Many Sling projects want to be able to validate both Resources and request parameters.
Through the Sling Validation Bundle this is possible with the help of validation model resources
which define validation rules for a certain resourceType.</p>
+<h1 id="prerequisites">Prerequisites<a class="headerlink" href="#prerequisites"
title="Permanent link">&para;</a></h1>
+<p>To use this validation frameworks the following bundles need to be deployed</p>
+<ol>
+<li><code>org.apace.sling.validation.api</code></li>
+<li><code>org.apache.sling.validation.core</code></li>
+</ol>
+<p>In addition a <a href="/documentation/the-sling-engine/service-authentication.html">service
resolver mapping</a> needs to be configured for the service name <code>org.apache.sling.validation.core</code>.
The bound service user needs at least read access to all resource resolver's search paths
(usually <code>/apps</code> and <code>/libs</code>).</p>
 <h1 id="basic-usage">Basic Usage<a class="headerlink" href="#basic-usage" title="Permanent
link">&para;</a></h1>
 <p>To validate a resource one first needs to get a <code>ValidationModel</code>
and then validate the resource with that model. Both functionalities are provided by the <code>ValidationService</code>
OSGi service:</p>
 <div class="codehilite"><pre><span class="k">try</span> <span
class="o">{</span>
@@ -331,7 +339,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. 1734538 by kwin on Fri, 11 Mar 2016 11:24:09 +0000
+        Rev. 1784572 by kwin on Mon, 27 Feb 2017 14:35:12 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project



Mime
View raw message