sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r1007547 - in /websites/staging/sling/trunk/content: ./ documentation/bundles/validation.html
Date Thu, 02 Mar 2017 07:35:53 GMT
Author: buildbot
Date: Thu Mar  2 07:35:53 2017
New Revision: 1007547

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 07:35:53 2017
@@ -1 +1 @@
-1785078
+1785079

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
07:35:53 2017
@@ -200,7 +200,7 @@ This documentation is still work in prog
 <td><code>sling:resourceType</code></td>
 <td>Property</td>
 <td><code>String</code></td>
-<td>Always <code>sling/validation/model</code>, otherwise node will never
be picked up by Sling Validation.</td>
+<td>Always <code>sling/validation/model</code>, otherwise model will never
be picked up by Sling Validation.</td>
 <td>yes</td>
 </tr>
 <tr>
@@ -249,7 +249,7 @@ This documentation is still work in prog
 <td><code>properties\&lt;propertyName&gt;\validators\&lt;validatorId&gt;</code></td>
 <td>Resource</td>
 <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>validation.id</code> set in
the validator. Each validators node might have arbitrarily many child resources (one per validator).</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>
 </tr>
 <tr>
@@ -350,7 +350,7 @@ To overwrite some property or child from
 </tbody>
 </table>
 <h1 id="writing-validators">Writing Validators<a class="headerlink" href="#writing-validators"
title="Permanent link">&para;</a></h1>
-<p>To write a validator one needs to implement the <a href="hhttps://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).
+<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>
@@ -359,7 +359,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. 1785078 by kwin on Thu, 2 Mar 2017 07:32:47 +0000
+        Rev. 1785079 by kwin on Thu, 2 Mar 2017 07:35:44 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project



Mime
View raw message