Author: buildbot
Date: Mon Mar  6 15:20:13 2017
New Revision: 1007824

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 15:20:13 2017
@@ -1 +1 @@
-1785657
+1785662

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 15:20:13 2017
@@ -187,7 +187,7 @@ h2:hover > .headerlink, h3:hover > .head
 <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>
+<li>the default severity (may be set through the OSGi configuration for PID 
<code>org.apache.sling.validation.impl.ValidationServiceImpl</code>, 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>
@@ -378,13 +378,14 @@ 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 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>
+<p>In addition the OSGi service must expose a String property named 
<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 
always chosen.</p>
+<p>A validator may also expose a service property named 
<code>validation.severity</code> with an Integer value. This defines the 
default severity of the Validator (which may be overwritten in the validation 
model).</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. 1785657 by kwin on Mon, 6 Mar 2017 14:46:22 +0000
+        Rev. 1785662 by kwin on Mon, 6 Mar 2017 15:20:04 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Sling, Sling, Apache, the Apache feather logo, and the Apache 
Sling project


Reply via email to