dlr         01/06/13 09:02:04

  Modified:    docs/services intake-service.html
  Log:
  Added Henning's recent additions to the Intake service documentation.  This was 
regenerated by checking out the jakarta-site2 module at the same directory level as 
jakarta-turbine and doing a 'ant docs' from Turbine's build directory.
  
  Revision  Changes    Path
  1.21      +157 -12   jakarta-turbine/docs/services/intake-service.html
  
  Index: intake-service.html
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/docs/services/intake-service.html,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- intake-service.html       2001/06/01 17:10:31     1.20
  +++ intake-service.html       2001/06/13 16:02:01     1.21
  @@ -15,6 +15,8 @@
               <meta name="email" value="[EMAIL PROTECTED]">
                                           <meta name="author" value="Jon S. Stevens">
               <meta name="email" value="[EMAIL PROTECTED]">
  +                                        <meta name="author" value="Henning P. 
Schmiedehausen">
  +            <meta name="email" value="[EMAIL PROTECTED]">
               
               <title>Turbine - Turbine Services - Intake Service</title>
           </head>
  @@ -346,20 +348,20 @@
               mapToObject=&quot;om.AttributeValue&quot;&gt;
       &lt;field name=&quot;Value&quot; key=&quot;val&quot; type=&quot;String&quot;&gt;
           &lt;rule name=&quot;maxLength&quot; value=&quot;255&quot;&gt;Value length 
cannot be &amp;gt; 255&lt;/rule&gt;
  -        &lt;required-message&gt;This module requires data for this 
  +        &lt;rule name=&quot;required&quot; value=&quot;true&quot;&gt;This module 
requires data for this 
                             attribute.
  -        &lt;/required-message&gt;
  +        &lt;/rule&gt;
       &lt;/field&gt;
       &lt;field name=&quot;Url&quot; key=&quot;url&quot; type=&quot;String&quot; 
mapToProperty=&quot;Value&quot;&gt;
           &lt;rule name=&quot;maxLength&quot; value=&quot;255&quot;&gt;Url length 
cannot be &amp;gt; 255&lt;/rule&gt;
           &lt;rule name=&quot;mask&quot; value=&quot;^$|http.+&quot;&gt;Please enter 
an url starting with &quot;http&quot;&lt;/rule&gt;
  -        &lt;required-message&gt;This module requires a valid 
url.&lt;/required-message&gt;
  +        &lt;rule name=&quot;required&quot; value=&quot;true&quot;&gt;This module 
requires a valid url.&lt;/rule&gt;
       &lt;/field&gt;
       &lt;field name=&quot;OptionId&quot; key=&quot;optionid&quot; 
type=&quot;NumberKey&quot;&gt;
           &lt;rule name=&quot;mask&quot; value=&quot;^$|[0-9]+&quot;&gt;Please select 
a valid choice&lt;/rule&gt;
  -        &lt;required-message&gt;This module requires that you select an option 
  +        &lt;rule name=&quot;required&quot; value=&quot;true&quot;&gt;This module 
requires that you select an option 
                             for this attribute.
  -        &lt;/required-message&gt;
  +        &lt;/rule&gt;
       &lt;/field&gt;
   &lt;/group&gt;
   
  @@ -414,10 +416,153 @@
   Email, Url, or Date, will be added that will add functionality that is 
   difficult or not possible with a simple regex mask.
   </p>
  -                                                <p>
  +                            </blockquote>
  +        </p>
  +      </td></tr>
  +      <tr><td><br/></td></tr>
  +    </table>
  +                                                <table border="0" cellspacing="0" 
cellpadding="2" width="100%">
  +      <tr><td bgcolor="#525D76">
  +        <font color="#ffffff" face="arial,helvetica,sanserif">
  +          <a name="Field Rules"><strong>Field Rules</strong></a>
  +        </font>
  +      </td></tr>
  +      <tr><td><br/></td></tr>
  +      <tr><td>
  +        <blockquote>
  +                                    <p>
   The field can define rule elements.  The basic fields include rules for
   minimum and maximum, lengths and values, as well as a regex mask.
   </p>
  +                                                <p>The basic validator can do four 
different checks:</p>
  +                                                <p>required - Must this element be 
present or not? If it is not
  +required, some of the following checks, namely the minLength may not
  +work as expected.</p>
  +                                                    <div align="left">
  +    <table cellspacing="4" cellpadding="0" border="0">
  +    <tr>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" 
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" 
height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" 
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  +    </tr>
  +    <tr>
  +      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" 
height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#ffffff"><pre>
  + &lt;rule type=&quot;required&quot; value=&quot;true&quot;&gt;This field must be 
present&lt;/rule&gt;
  +</pre></td>
  +      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" 
height="1" vspace="0" hspace="0" border="0"/></td>
  +    </tr>
  +    <tr>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" 
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" 
height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" 
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  +    </tr>
  +    </table>
  +    </div>
  +                                                <p> minLength - The minium length 
of the input string. Note that one of the
  + most obvious uses of this check, namely that the length is at least 1
  + character should not be done here but with "required" above. The following
  + example does <b>not</b> work!</p>
  +                                                    <div align="left">
  +    <table cellspacing="4" cellpadding="0" border="0">
  +    <tr>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" 
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" 
height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" 
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  +    </tr>
  +    <tr>
  +      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" 
height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#ffffff"><pre>
  + &lt;rule type=&quot;minLength&quot; value=&quot;1&quot;&gt;This form field must be 
filled out&lt;/rule&gt;
  +</pre></td>
  +      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" 
height="1" vspace="0" hspace="0" border="0"/></td>
  +    </tr>
  +    <tr>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" 
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" 
height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" 
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  +    </tr>
  +    </table>
  +    </div>
  +                                                <p>If the field is not required, 
then the following checks are (of course)
  + not done if the field is not present at all! So the check above is always
  + true unless there is also a "required" rule but then you don't need this
  + check no longer. The following example is much better:</p>
  +                                                    <div align="left">
  +    <table cellspacing="4" cellpadding="0" border="0">
  +    <tr>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" 
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" 
height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" 
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  +    </tr>
  +    <tr>
  +      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" 
height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#ffffff"><pre>
  + &lt;rule type=&quot;required&quot; value=&quot;true&quot;&gt;This field must be 
present&lt;/rule&gt;
  + &lt;rule type=&quot;minLength&quot; value=&quot;8&quot;&gt;This field must have at 
least eight characters!&lt;/rule&gt;
  +</pre></td>
  +      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" 
height="1" vspace="0" hspace="0" border="0"/></td>
  +    </tr>
  +    <tr>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" 
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" 
height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" 
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  +    </tr>
  +    </table>
  +    </div>
  +                                                <p>maxLength - The maximum length 
of the input string. This is pretty
  + straightforward. If the field is longer than this rule, you get an
  + error.</p>
  +                                                    <div align="left">
  +    <table cellspacing="4" cellpadding="0" border="0">
  +    <tr>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" 
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" 
height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" 
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  +    </tr>
  +    <tr>
  +      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" 
height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#ffffff"><pre>
  + &lt;rule type=&quot;maxLength&quot; value=&quot;64&quot;&gt;This field must have 
64 or less characters!&lt;/rule&gt;
  +</pre></td>
  +      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" 
height="1" vspace="0" hspace="0" border="0"/></td>
  +    </tr>
  +    <tr>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" 
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" 
height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" 
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  +    </tr>
  +    </table>
  +    </div>
  +                                                <p>mask - A regular expression mask 
which the input field must fit. This
  +  is very useful if you enter some formatted data (e.g. a date) into a
  +  string field and want to rule out some of the basic errors. The
  +  regular expressions are taken from the <A 
HREF="http://jakarta.apache.org/regexp/";>Jakarta Regexp package</A>
  +  and are described in the javadocs <A 
HREF="http://jakarta.apache.org/regexp/apidocs/org/apache/regexp/RE.html";>
  +  here</A>.</p>
  +                                                    <div align="left">
  +    <table cellspacing="4" cellpadding="0" border="0">
  +    <tr>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" 
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" 
height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" 
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  +    </tr>
  +    <tr>
  +      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" 
height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#ffffff"><pre>
  +&lt;rule type=&quot;mask&quot; value=&quot;\d\d?\.\d\d?\.\d\d\d?\d?&quot;&gt;The 
date format is invalid!&lt;/rule&gt;
  +</pre></td>
  +      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" 
height="1" vspace="0" hspace="0" border="0"/></td>
  +    </tr>
  +    <tr>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" 
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" 
height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" 
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  +    </tr>
  +    </table>
  +    </div>
  +                                                <p>Note that you can have only one 
mask rule per field. It is not
  +  possible to use multiple masks for a single field.</p>
                               </blockquote>
           </p>
         </td></tr>
  @@ -838,14 +983,14 @@
         <td bgcolor="#ffffff"><pre>
   &lt;field name=&quot;Value&quot; key=&quot;val&quot; type=&quot;String&quot;&gt;
       &lt;rule name=&quot;maxLength&quot; value=&quot;255&quot;&gt;Value length 
cannot be &amp;gt; 255&lt;/rule&gt;
  -    &lt;required-message&gt;This module requires data for this 
  +    &lt;rule name=&quot;required&quot; value=&quot;true&quot;&gt;This module 
requires data for this 
                         attribute.
  -    &lt;/required-message&gt;
  +    &lt;/rule&gt;
   &lt;/field&gt;
   &lt;field name=&quot;Url&quot; key=&quot;url&quot; type=&quot;String&quot; 
mapToProperty=&quot;Value&quot;&gt;
       &lt;rule name=&quot;maxLength&quot; value=&quot;255&quot;&gt;Url length cannot 
be &amp;gt; 255&lt;/rule&gt;
       &lt;rule name=&quot;mask&quot; value=&quot;^$|http.+&quot;&gt;Please enter an 
url starting with &quot;http&quot;&lt;/rule&gt;
  -    &lt;required-message&gt;This module requires a valid 
url.&lt;/required-message&gt;
  +    &lt;rule name=&quot;required&quot; value=&quot;true&quot;&gt;This module 
requires a valid url.&lt;/rule&gt;
   &lt;/field&gt;
   </pre></td>
         <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" 
height="1" vspace="0" hspace="0" border="0"/></td>
  @@ -1017,14 +1162,14 @@
         <td bgcolor="#ffffff"><pre>
       &lt;field name=&quot;Value&quot; key=&quot;val&quot; type=&quot;String&quot;&gt;
           &lt;rule name=&quot;maxLength&quot; value=&quot;255&quot;&gt;Value length 
cannot be &amp;gt; 255&lt;/rule&gt;
  -        &lt;required-message&gt;This module requires data for this 
  +        &lt;rule name=&quot;required&quot; value=&quot;true&quot;&gt;This module 
requires data for this 
                             attribute.
  -        &lt;/required-message&gt;
  +        &lt;/rule&gt;
       &lt;/field&gt;
       &lt;field name=&quot;Url&quot; key=&quot;url&quot; type=&quot;String&quot; 
mapToProperty=&quot;Value&quot;&gt;
           &lt;rule name=&quot;maxLength&quot; value=&quot;255&quot;&gt;Url length 
cannot be &amp;gt; 255&lt;/rule&gt;
           &lt;rule name=&quot;mask&quot; value=&quot;^$|http.+&quot;&gt;Please enter 
an url starting with &quot;http&quot;&lt;/rule&gt;
  -        &lt;required-message&gt;This module requires a valid 
url.&lt;/required-message&gt;
  +        &lt;rule name=&quot;required&quot; value=&quot;true&quot;&gt;This module 
requires a valid url.&lt;/rule&gt;
       &lt;/field&gt;
   </pre></td>
         <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" 
height="1" vspace="0" hspace="0" border="0"/></td>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to