Author: buildbot
Date: Mon Mar  6 14:46:31 2017
New Revision: 1007822

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 Mar  6 14:46:31 2017
@@ -1 +1 @@
-1785656
+1785657

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 Mar  6 14:46:31 2017
@@ -183,10 +183,12 @@ h2:hover > .headerlink, h3:hover > .head
 
 <p>All methods to retrieve a validation model support a boolean parameter 
<code>considerResourceSuperTypeModels</code>. If this is set to true, the 
validation model is not only being looked up for exactly the given resource 
type but also for all its resource super types. The returned model is then a 
merged model of all found validation model along the resource type 
hierarchy.</p>
 <h2 id="validationresult">ValidationResult<a class="headerlink" 
href="#validationresult" title="Permanent link">&para;</a></h2>
-<p>The <code>ValidationResult</code> indicates whether a given 
<code>Resource</code> or <code>ValueMap</code> is valid or invalid according to 
a given validation model. In the latter case it aggregates one or more 
<code>ValidationFailure</code>s. Each <code>ValidationFailure</code> is 
encapsulating an error message and a severity. The severity may be set on the 
following locations (where locations on top may overwrite severity from 
locations below):
-1. validation model (per use case of a <code>Validator</code>)
-1. severity defined on the <code>Validator</code>
-1. the default severity (may be set through the OSGi configuration for PID 
"org.apache.sling.validation.impl.ValidationServiceImpl", is 0 by default)</p>
+<p>The <code>ValidationResult</code> indicates whether a given 
<code>Resource</code> or <code>ValueMap</code> is valid or invalid according to 
a given validation model. In the latter case it aggregates one or more 
<code>ValidationFailure</code>s. Each <code>ValidationFailure</code> is 
encapsulating an error message and a severity. The severity may be set on the 
following locations (where locations on top may overwrite severity from 
locations below):</p>
+<ol>
+<li>validation model (per use case of a <code>Validator</code>)</li>
+<li>severity defined on the <code>Validator</code></li>
+<li>the default severity (may be set through the OSGi configuration for PID 
"org.apache.sling.validation.impl.ValidationServiceImpl", is 0 by default)</li>
+</ol>
 <p>You have to use a <code>ResourceBundle</code> (<a 
href="/documentation/bundles/internationalization-support-i18n.html">Internationalization
 Support</a>) to resolve the message for a specific locale. By default Sling 
Validation comes only with English failure messages.</p>
 <h1 id="validation-model-resources">Validation Model Resources<a 
class="headerlink" href="#validation-model-resources" title="Permanent 
link">&para;</a></h1>
 <p>The <code>ValidationModel</code> is constructed from resources with the 
resourceType <strong>sling/validation/model</strong>. Those resources are 
considered validation model resources if they are located below the Sling 
ResourceResolver search paths (<em>/apps</em> and <em>/libs</em>).</p>
@@ -199,6 +201,7 @@ h2:hover > .headerlink, h3:hover > .head
 <th>Type</th>
 <th>Description</th>
 <th>Mandatory</th>
+<th>Example</th>
 </tr>
 </thead>
 <tbody>
@@ -208,6 +211,7 @@ h2:hover > .headerlink, h3:hover > .head
 <td><code>String</code></td>
 <td>Always <code>sling/validation/model</code>, otherwise model will never be 
picked up by Sling Validation.</td>
 <td>yes</td>
+<td><code>sling/validation/model</code></td>
 </tr>
 <tr>
 <td><code>validatedResourceType</code></td>
@@ -215,6 +219,7 @@ h2:hover > .headerlink, h3:hover > .head
 <td><code>String</code></td>
 <td>The resource type of the resource for which this validation model should 
be applied. Must always be relative (i.e. not start with a "/").</td>
 <td>yes</td>
+<td><code>my/own/resourcetype</code></td>
 </tr>
 <tr>
 <td><code>applicablePaths</code></td>
@@ -222,6 +227,7 @@ h2:hover > .headerlink, h3:hover > .head
 <td><code>String[]</code></td>
 <td>Path prefixes which restrict the validation model to resources which are 
below one of the given prefixes. No wildcards are supported. If not given, 
there is no path restriction. If there are multiple validation models 
registered for the same resource type the one with the longest matching 
applicablePath is chosen.</td>
 <td>no</td>
+<td><code>/content/mysite</code></td>
 </tr>
 <tr>
 <td><code>properties\&lt;propertyName&gt;</code></td>
@@ -229,6 +235,7 @@ h2:hover > .headerlink, h3:hover > .head
 <td>-</td>
 <td>This resource ensures that the property with the name 
<code>&lt;propertyName&gt;</code> is there. The resource name has no longer a 
meaning if the property <code>nameRegex</code> is set on this node.</td>
 <td>no</td>
+<td><code>false</code></td>
 </tr>
 <tr>
 <td><code>properties\&lt;propertyName&gt;\optional</code></td>
@@ -236,6 +243,7 @@ h2:hover > .headerlink, h3:hover > .head
 <td><code>Boolean</code></td>
 <td>If <code>true</code> it is not an error if there is no property with the 
given <code>&lt;propertyName&gt;</code> or none matching the  
<code>nameRegex</code>. If not set or <code>false</code> the property must be 
there.</td>
 <td>no</td>
+<td><code>false</code></td>
 </tr>
 <tr>
 <td><code>properties\&lt;propertyName&gt;\propertyMultiple</code></td>
@@ -243,6 +251,7 @@ h2:hover > .headerlink, h3:hover > .head
 <td><code>Boolean</code></td>
 <td>If <code>true</code> only multivalue properties are allowed with the name 
<code>&lt;propertyName&gt;</code> or matching the <code>nameRegex</code>. If 
not set or <code>false</code>, multi- and single-value properties are 
accepted.</td>
 <td>no</td>
+<td><code>false</code></td>
 </tr>
 <tr>
 <td><code>properties\&lt;propertyName&gt;\nameRegex</code></td>
@@ -250,6 +259,7 @@ h2:hover > .headerlink, h3:hover > .head
 <td><code>String</code></td>
 <td>If set the <code>&lt;propertyName&gt;</code> has no longer a meaning. 
Rather all properties which match the given regular expression are considered. 
At least one match is required, otherwise the validated resource/valuemap is 
considered invalid.</td>
 <td>no</td>
+<td><code>property[0-8]</code></td>
 </tr>
 <tr>
 
<td><code>properties\&lt;propertyName&gt;\validators\&lt;validatorId&gt;</code></td>
@@ -257,6 +267,7 @@ h2:hover > .headerlink, h3:hover > .head
 <td>-</td>
 <td>The <code>&lt;validatorId&gt;</code> must be the id of a validator. The id 
is given by the OSGi service property <code>validator.id</code> set in the 
validator. Each validators node might have arbitrarily many child resources 
(one per validator).</td>
 <td>no</td>
+<td><code>false</code></td>
 </tr>
 <tr>
 
<td><code>properties\&lt;propertyName&gt;\validators\&lt;validatorId&gt;\validatorArguments</code></td>
@@ -264,6 +275,7 @@ h2:hover > .headerlink, h3:hover > .head
 <td><code>String[]</code></td>
 <td>The parametrization for the validator with the id  
<code>&lt;validatorId&gt;</code>. Each value must have the pattern 
<code>key=value</code>. The parametrization differs per validator.</td>
 <td>no</td>
+<td><code>regex=^[a-z]*$</code></td>
 </tr>
 <tr>
 
<td><code>properties\&lt;propertyName&gt;\validators\&lt;validatorId&gt;\severity</code></td>
@@ -271,6 +283,7 @@ h2:hover > .headerlink, h3:hover > .head
 <td><code>Integer</code></td>
 <td>The severity which should be set on all emitted validation failures by 
this validator.</td>
 <td>no</td>
+<td><code>0</code></td>
 </tr>
 <tr>
 <td><code>children\&lt;resourceName&gt;</code></td>
@@ -278,6 +291,7 @@ h2:hover > .headerlink, h3:hover > .head
 <td>-</td>
 <td>This resource ensures that the resource with the name 
<code>&lt;resourceName&gt;</code> is there. The resource name has no longer a 
meaning if the property <code>nameRegex</code> is set on this node.</td>
 <td>no</td>
+<td><code>child1</code></td>
 </tr>
 <tr>
 <td><code>children\&lt;resourceName&gt;\nameRegex</code></td>
@@ -285,6 +299,7 @@ h2:hover > .headerlink, h3:hover > .head
 <td><code>String</code></td>
 <td>If set the <code>&lt;resourceName&gt;</code> has no longer a meaning. 
Rather all resources whose name match the given regular expression are 
considered. At least one match is required, otherwise the validated 
resource/valuemap is considered invalid.</td>
 <td>no</td>
+<td><code>child[1-9]</code></td>
 </tr>
 <tr>
 <td><code>children\&lt;resourceName&gt;\optional</code></td>
@@ -292,6 +307,7 @@ h2:hover > .headerlink, h3:hover > .head
 <td><code>Boolean</code></td>
 <td>If <code>true</code> it is not an error if there is no resource with the 
given <code>&lt;resourceName&gt;</code> or none matching the  
<code>nameRegex</code>. If not set or <code>false</code> the resource must be 
there.</td>
 <td>no</td>
+<td><code>false</code></td>
 </tr>
 <tr>
 <td><code>children\&lt;resourceName&gt;\properties</code></td>
@@ -299,6 +315,7 @@ h2:hover > .headerlink, h3:hover > .head
 <td>-</td>
 <td>The properties can be configured on the child level in the same way as on 
the root level.</td>
 <td>no</td>
+<td>-</td>
 </tr>
 </tbody>
 </table>
@@ -367,7 +384,7 @@ Each validator needs to specify one type
 <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. 1785620 by kwin on Mon, 6 Mar 2017 10:21:05 +0000
+        Rev. 1785657 by kwin on Mon, 6 Mar 2017 14:46:22 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Sling, Sling, Apache, the Apache feather logo, and the Apache 
Sling project


Reply via email to