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 2017/03/02 13:35:21 UTC

svn commit: r1007561 - in /websites/staging/sling/trunk/content: ./ documentation/bundles/validation.html

Author: buildbot
Date: Thu Mar  2 13:35:21 2017
New Revision: 1007561

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 Thu Mar  2 13:35:21 2017
@@ -1 +1 @@
-1785080
+1785133

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 Thu Mar  2 13:35:21 2017
@@ -114,10 +114,6 @@ h2:hover > .headerlink, h3:hover > .head
   visibility: hidden;
 }
 h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style>
-<div class="note">
-This documentation is still work in progress!
-</div>
-
 <div class="toc">
 <ul>
 <li><a href="#prerequisites">Prerequisites</a></li>
@@ -253,14 +249,14 @@ This documentation is still work in prog
 <td>no</td>
 </tr>
 <tr>
-<td><code>properties\&lt;propertyName&gt;\validators\&lt;validatorName&gt;\validatorArguments</code></td>
+<td><code>properties\&lt;propertyName&gt;\validators\&lt;validatorId&gt;\validatorArguments</code></td>
 <td>Property</td>
 <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>
 </tr>
 <tr>
-<td><code>properties\&lt;propertyName&gt;\validators\&lt;validatorName&gt;\severity</code></td>
+<td><code>properties\&lt;propertyName&gt;\validators\&lt;validatorId&gt;\severity</code></td>
 <td>Property</td>
 <td><code>Integer</code></td>
 <td>The severity which should be set on all emitted validation failures by this validator.</td>
@@ -353,13 +349,13 @@ To overwrite some property or child from
 <p>To write a validator one needs to implement the <a href="https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/api/src/main/java/org/apache/sling/validation/spi/Validator.java"><code>org.apache.sling.validation.spi.Validator</code></a> interface in an OSGi service (look at <a href="https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/core/src/main/java/org/apache/sling/validation/impl/validators/RegexValidator.java"><code>org.apache.sling.validation.core.RegexValidator</code></a> for an example).
 That interface defines the method <code>validate</code>. That is called for each property which is bound to the validator through the validation model.
 Each validator needs to specify one type parameter which defines upon which classes the validator can act (usually <code>String</code>). Array types are also supported here. Collection types are not supported. If a property value cannot be converted to the requested type from the validator (through <code>ValueMap.get(name, type)</code>), validation will fail.</p>
-<p>In addition that OSGi service needs to expose a property called <code>validation.id</code>. The value of this property should start with the providing bundle symbolic name. Only through this value the validator can be referenced from validation models. If multiple validators have the same <code>validation.id</code> value the one with the highest service ranking gets chosen.</p>
+<p>In addition that OSGi service needs to expose a property called <code>validation.id</code>. The value of this property should always start with the providing bundle's symbolic name. Only through this value the validator can be referenced from validation models. If multiple validators have the same <code>validation.id</code> value the one with the highest service ranking gets chosen.</p>
 <h1 id="references">References<a class="headerlink" href="#references" title="Permanent link">&para;</a></h1>
 <ol>
 <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. 1785080 by kwin on Thu, 2 Mar 2017 07:36:59 +0000
+        Rev. 1785133 by kwin on Thu, 2 Mar 2017 13:35:06 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project