Commits

Anonymous committed 1536da9

WW-1006 annotation docs
o preparing SNIPPETs

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@696e221344d-f017-0410-9bd5-d282ab1896d7

Comments (0)

Files changed (17)

tiger/src/java/com/opensymphony/xwork/validator/annotations/ConversionErrorFieldValidator.java

 import java.lang.annotation.*;
 
 /**
- * <code>ConversionErrorFieldValidator</code>
- *
+ * <!-- START SNIPPET: description -->
  * This validator checks if there are any conversion errors for a field and applies them if they exist.
  * See <a href="http://wiki.opensymphony.com/display/XW/Type+Conversion+Error+Handling">Type Conversion Error Handling</a> for details.
+ * <!-- END SNIPPET: description -->
+ *
+ * <p/> <u>Annotation usage:</u>
+ *
+ * <!-- START SNIPPET: usage -->
+ *
+ * <!-- END SNIPPET: usage -->
+ *
+ * <p/> <u>Annotation parameters:</u>
+ *
+ * <!-- START SNIPPET: parameters -->
+ * <table>
+ * <thead>
+ * <tr>
+ * <th>Parameter</th>
+ * <th>Required</th>
+ * <th>Default</th>
+ * <th>Description</th>
+ * </tr>
+ * </thead>
+ * <tbody>
+ * <tr>
+ * <td>param</td>
+ * <td>required</td>
+ * <td>default</td>
+ * <td>description</td>
+ * </tr>
+ * </tbody>
+ * </table>
+ * <!-- END SNIPPET: parameters -->
+ *
+ * <p/> <u>Example code:</u>
+ *
+ * <pre>
+ * <!-- START SNIPPET: example -->
+ * <!-- END SNIPPET: example -->
+ * </pre>
  *
  * @author Rainer Hermanns
  * @version $Id$

tiger/src/java/com/opensymphony/xwork/validator/annotations/CustomValidator.java

 import java.lang.annotation.*;
 
 /**
- * <code>CustomValidator</code>
+ * <!-- START SNIPPET: description -->
+ * <!-- END SNIPPET: description -->
+ *
+ * <p/> <u>Annotation usage:</u>
+ *
+ * <!-- START SNIPPET: usage -->
+ *
+ * <!-- END SNIPPET: usage -->
+ *
+ * <p/> <u>Annotation parameters:</u>
+ *
+ * <!-- START SNIPPET: parameters -->
+ * <table>
+ * <thead>
+ * <tr>
+ * <th>Parameter</th>
+ * <th>Required</th>
+ * <th>Default</th>
+ * <th>Description</th>
+ * </tr>
+ * </thead>
+ * <tbody>
+ * <tr>
+ * <td>param</td>
+ * <td>required</td>
+ * <td>default</td>
+ * <td>description</td>
+ * </tr>
+ * </tbody>
+ * </table>
+ * <!-- END SNIPPET: parameters -->
+ *
+ * <p/> <u>Example code:</u>
+ *
+ * <pre>
+ * <!-- START SNIPPET: example -->
+ * <!-- END SNIPPET: example -->
+ * </pre>
  *
  * @author jepjep
  * @author Rainer Hermanns

tiger/src/java/com/opensymphony/xwork/validator/annotations/DateRangeFieldValidator.java

 import java.lang.annotation.*;
 
 /**
- * <code>DateRangeFieldValidator</code>
- *
+ * <!-- START SNIPPET: description -->
  * This validator checks that a date field has a value within a specified range.
+ * <!-- END SNIPPET: description -->
+ *
+ * <p/> <u>Annotation usage:</u>
+ *
+ * <!-- START SNIPPET: usage -->
+ *
+ * <!-- END SNIPPET: usage -->
+ *
+ * <p/> <u>Annotation parameters:</u>
+ *
+ * <!-- START SNIPPET: parameters -->
+ * <table>
+ * <thead>
+ * <tr>
+ * <th>Parameter</th>
+ * <th>Required</th>
+ * <th>Default</th>
+ * <th>Description</th>
+ * </tr>
+ * </thead>
+ * <tbody>
+ * <tr>
+ * <td>param</td>
+ * <td>required</td>
+ * <td>default</td>
+ * <td>description</td>
+ * </tr>
+ * </tbody>
+ * </table>
+ * <!-- END SNIPPET: parameters -->
+ *
+ * <p/> <u>Example code:</u>
+ *
+ * <pre>
+ * <!-- START SNIPPET: example -->
+ * <!-- END SNIPPET: example -->
+ * </pre>
  *
  * @author Rainer Hermanns
  * @version $Id$

tiger/src/java/com/opensymphony/xwork/validator/annotations/EmailValidator.java

 import java.lang.annotation.*;
 
 /**
- * <code>EmailValidator</code>
- *
+ * <!-- START SNIPPET: description -->
  * This validator checks that a field is a valid e-mail address if it contains a non-empty String.
+ * <!-- END SNIPPET: description -->
+ *
+ * <p/> <u>Annotation usage:</u>
+ *
+ * <!-- START SNIPPET: usage -->
+ *
+ * <!-- END SNIPPET: usage -->
+ *
+ * <p/> <u>Annotation parameters:</u>
+ *
+ * <!-- START SNIPPET: parameters -->
+ * <table>
+ * <thead>
+ * <tr>
+ * <th>Parameter</th>
+ * <th>Required</th>
+ * <th>Default</th>
+ * <th>Description</th>
+ * </tr>
+ * </thead>
+ * <tbody>
+ * <tr>
+ * <td>param</td>
+ * <td>required</td>
+ * <td>default</td>
+ * <td>description</td>
+ * </tr>
+ * </tbody>
+ * </table>
+ * <!-- END SNIPPET: parameters -->
+ *
+ * <p/> <u>Example code:</u>
+ *
+ * <pre>
+ * <!-- START SNIPPET: example -->
+ * <!-- END SNIPPET: example -->
+ * </pre>
  *
  * @author Rainer Hermanns
  * @version $Id$

tiger/src/java/com/opensymphony/xwork/validator/annotations/ExpressionValidator.java

 import java.lang.annotation.*;
 
 /**
- * <code>ExpressionValidator</code>
+ * <!-- START SNIPPET: description -->
+ * <!-- END SNIPPET: description -->
+ *
+ * <p/> <u>Annotation usage:</u>
+ *
+ * <!-- START SNIPPET: usage -->
+ *
+ * <!-- END SNIPPET: usage -->
+ *
+ * <p/> <u>Annotation parameters:</u>
+ *
+ * <!-- START SNIPPET: parameters -->
+ * <table>
+ * <thead>
+ * <tr>
+ * <th>Parameter</th>
+ * <th>Required</th>
+ * <th>Default</th>
+ * <th>Description</th>
+ * </tr>
+ * </thead>
+ * <tbody>
+ * <tr>
+ * <td>param</td>
+ * <td>required</td>
+ * <td>default</td>
+ * <td>description</td>
+ * </tr>
+ * </tbody>
+ * </table>
+ * <!-- END SNIPPET: parameters -->
+ *
+ * <p/> <u>Example code:</u>
+ *
+ * <pre>
+ * <!-- START SNIPPET: example -->
+ * <!-- END SNIPPET: example -->
+ * </pre>
  *
  * @author Rainer Hermanns
  * @version $Id$

tiger/src/java/com/opensymphony/xwork/validator/annotations/FieldExpressionValidator.java

 import java.lang.annotation.*;
 
 /**
- * <code>FieldExpressionValidator</code>
- *
+ * <!-- START SNIPPET: description -->
  * This validator uses an OGNL expression to perform its validator.
  * The error message will be added to the field if the expression returns
  * false when it is evaluated against the value stack.
+ * <!-- END SNIPPET: description -->
+ *
+ * <p/> <u>Annotation usage:</u>
+ *
+ * <!-- START SNIPPET: usage -->
+ *
+ * <!-- END SNIPPET: usage -->
+ *
+ * <p/> <u>Annotation parameters:</u>
+ *
+ * <!-- START SNIPPET: parameters -->
+ * <table>
+ * <thead>
+ * <tr>
+ * <th>Parameter</th>
+ * <th>Required</th>
+ * <th>Default</th>
+ * <th>Description</th>
+ * </tr>
+ * </thead>
+ * <tbody>
+ * <tr>
+ * <td>param</td>
+ * <td>required</td>
+ * <td>default</td>
+ * <td>description</td>
+ * </tr>
+ * </tbody>
+ * </table>
+ * <!-- END SNIPPET: parameters -->
+ *
+ * <p/> <u>Example code:</u>
+ *
+ * <pre>
+ * <!-- START SNIPPET: example -->
+ * <!-- END SNIPPET: example -->
+ * </pre>
  *
  * @author Rainer Hermanns
  * @version $Id$

tiger/src/java/com/opensymphony/xwork/validator/annotations/IntRangeFieldValidator.java

 import java.lang.annotation.*;
 
 /**
- * <code>IntRangeFieldValidator</code>
- *
+ * <!-- START SNIPPET: description -->
  * This validator checks that a numeric field has a value within a specified range.
  * If neither min nor max is set, nothing will be done.
+ * <!-- END SNIPPET: description -->
+ *
+ * <p/> <u>Annotation usage:</u>
+ *
+ * <!-- START SNIPPET: usage -->
+ *
+ * <!-- END SNIPPET: usage -->
+ *
+ * <p/> <u>Annotation parameters:</u>
+ *
+ * <!-- START SNIPPET: parameters -->
+ * <table>
+ * <thead>
+ * <tr>
+ * <th>Parameter</th>
+ * <th>Required</th>
+ * <th>Default</th>
+ * <th>Description</th>
+ * </tr>
+ * </thead>
+ * <tbody>
+ * <tr>
+ * <td>param</td>
+ * <td>required</td>
+ * <td>default</td>
+ * <td>description</td>
+ * </tr>
+ * </tbody>
+ * </table>
+ * <!-- END SNIPPET: parameters -->
+ *
+ * <p/> <u>Example code:</u>
+ *
+ * <pre>
+ * <!-- START SNIPPET: example -->
+ * <!-- END SNIPPET: example -->
+ * </pre>
+ *
  *
  * @author Rainer Hermanns
  * @version $Id$

tiger/src/java/com/opensymphony/xwork/validator/annotations/RegexFieldValidator.java

 import java.lang.annotation.*;
 
 /**
- * <code>RegexFieldValidator</code>
+ * <!-- START SNIPPET: description -->
+ * <!-- END SNIPPET: description -->
+ *
+ * <p/> <u>Annotation usage:</u>
+ *
+ * <!-- START SNIPPET: usage -->
+ *
+ * <!-- END SNIPPET: usage -->
+ *
+ * <p/> <u>Annotation parameters:</u>
+ *
+ * <!-- START SNIPPET: parameters -->
+ * <table>
+ * <thead>
+ * <tr>
+ * <th>Parameter</th>
+ * <th>Required</th>
+ * <th>Default</th>
+ * <th>Description</th>
+ * </tr>
+ * </thead>
+ * <tbody>
+ * <tr>
+ * <td>param</td>
+ * <td>required</td>
+ * <td>default</td>
+ * <td>description</td>
+ * </tr>
+ * </tbody>
+ * </table>
+ * <!-- END SNIPPET: parameters -->
+ *
+ * <p/> <u>Example code:</u>
+ *
+ * <pre>
+ * <!-- START SNIPPET: example -->
+ * <!-- END SNIPPET: example -->
+ * </pre>
  *
  * @author <a href="mailto:hermanns@aixcept.de">Rainer Hermanns</a>
  * @version $Id$

tiger/src/java/com/opensymphony/xwork/validator/annotations/RequiredFieldValidator.java

 import java.lang.annotation.*;
 
 /**
- * <code>RequiredFieldValidator</code>
- *
+ * <!-- START SNIPPET: description -->
  * This validator checks that a field is non-null.
+ * <!-- END SNIPPET: description -->
+ *
+ * <p/> <u>Annotation usage:</u>
+ *
+ * <!-- START SNIPPET: usage -->
+ *
+ * <!-- END SNIPPET: usage -->
+ *
+ * <p/> <u>Annotation parameters:</u>
+ *
+ * <!-- START SNIPPET: parameters -->
+ * <table>
+ * <thead>
+ * <tr>
+ * <th>Parameter</th>
+ * <th>Required</th>
+ * <th>Default</th>
+ * <th>Description</th>
+ * </tr>
+ * </thead>
+ * <tbody>
+ * <tr>
+ * <td>param</td>
+ * <td>required</td>
+ * <td>default</td>
+ * <td>description</td>
+ * </tr>
+ * </tbody>
+ * </table>
+ * <!-- END SNIPPET: parameters -->
+ *
+ * <p/> <u>Example code:</u>
+ *
+ * <pre>
+ * <!-- START SNIPPET: example -->
+ * <!-- END SNIPPET: example -->
+ * </pre>
+ *
  *
  * @author Rainer Hermanns
  * @version $Id$

tiger/src/java/com/opensymphony/xwork/validator/annotations/RequiredStringValidator.java

 import java.lang.annotation.*;
 
 /**
- * <code>RequiredStringValidator</code>
- *
+ * <!-- START SNIPPET: description -->
  * This validator checks that a String field is not empty (i.e. non-null with a length > 0).
+ * <!-- END SNIPPET: description -->
+ *
+ * <p/> <u>Annotation usage:</u>
+ *
+ * <!-- START SNIPPET: usage -->
+ *
+ * <!-- END SNIPPET: usage -->
+ *
+ * <p/> <u>Annotation parameters:</u>
+ *
+ * <!-- START SNIPPET: parameters -->
+ * <table>
+ * <thead>
+ * <tr>
+ * <th>Parameter</th>
+ * <th>Required</th>
+ * <th>Default</th>
+ * <th>Description</th>
+ * </tr>
+ * </thead>
+ * <tbody>
+ * <tr>
+ * <td>param</td>
+ * <td>required</td>
+ * <td>default</td>
+ * <td>description</td>
+ * </tr>
+ * </tbody>
+ * </table>
+ * <!-- END SNIPPET: parameters -->
+ *
+ * <p/> <u>Example code:</u>
+ *
+ * <pre>
+ * <!-- START SNIPPET: example -->
+ * <!-- END SNIPPET: example -->
+ * </pre>
+ *
  *
  * @author Rainer Hermanns
  * @version $Id$

tiger/src/java/com/opensymphony/xwork/validator/annotations/StringLengthFieldValidator.java

 import java.lang.annotation.*;
 
 /**
- * <code>StringLengthFieldValidator</code>
- *
+ * <!-- START SNIPPET: description -->
  * This validator checks that a String field is of the right length. It assumes that the field is a String.
  * If neither minLength nor maxLength is set, nothing will be done.
+ * <!-- END SNIPPET: description -->
+ *
+ * <p/> <u>Annotation usage:</u>
+ *
+ * <!-- START SNIPPET: usage -->
+ *
+ * <!-- END SNIPPET: usage -->
+ *
+ * <p/> <u>Annotation parameters:</u>
+ *
+ * <!-- START SNIPPET: parameters -->
+ * <table>
+ * <thead>
+ * <tr>
+ * <th>Parameter</th>
+ * <th>Required</th>
+ * <th>Default</th>
+ * <th>Description</th>
+ * </tr>
+ * </thead>
+ * <tbody>
+ * <tr>
+ * <td>param</td>
+ * <td>required</td>
+ * <td>default</td>
+ * <td>description</td>
+ * </tr>
+ * </tbody>
+ * </table>
+ * <!-- END SNIPPET: parameters -->
+ *
+ * <p/> <u>Example code:</u>
+ *
+ * <pre>
+ * <!-- START SNIPPET: example -->
+ * <!-- END SNIPPET: example -->
+ * </pre>
  *
  * @author Rainer Hermanns
  * @version $Id$

tiger/src/java/com/opensymphony/xwork/validator/annotations/StringRegexValidator.java

 import java.lang.annotation.*;
 
 /**
- * <code>StringRegexValidator</code>
+ * <!-- START SNIPPET: description -->
+ * <!-- END SNIPPET: description -->
+ *
+ * <p/> <u>Annotation usage:</u>
+ *
+ * <!-- START SNIPPET: usage -->
+ *
+ * <!-- END SNIPPET: usage -->
+ *
+ * <p/> <u>Annotation parameters:</u>
+ *
+ * <!-- START SNIPPET: parameters -->
+ * <table>
+ * <thead>
+ * <tr>
+ * <th>Parameter</th>
+ * <th>Required</th>
+ * <th>Default</th>
+ * <th>Description</th>
+ * </tr>
+ * </thead>
+ * <tbody>
+ * <tr>
+ * <td>param</td>
+ * <td>required</td>
+ * <td>default</td>
+ * <td>description</td>
+ * </tr>
+ * </tbody>
+ * </table>
+ * <!-- END SNIPPET: parameters -->
+ *
+ * <p/> <u>Example code:</u>
+ *
+ * <pre>
+ * <!-- START SNIPPET: example -->
+ * <!-- END SNIPPET: example -->
+ * </pre>
  *
  * @author <a href="mailto:hermanns@aixcept.de">Rainer Hermanns</a>
  * @version $Id$

tiger/src/java/com/opensymphony/xwork/validator/annotations/UrlValidator.java

 import java.lang.annotation.*;
 
 /**
- * <code>UrlValidator</code>
- *
+ * <!-- START SNIPPET: description -->
  * This validator checks that a field is a valid URL.
+ * <!-- END SNIPPET: description -->
+ *
+ * <p/> <u>Annotation usage:</u>
+ *
+ * <!-- START SNIPPET: usage -->
+ *
+ * <!-- END SNIPPET: usage -->
+ *
+ * <p/> <u>Annotation parameters:</u>
+ *
+ * <!-- START SNIPPET: parameters -->
+ * <table>
+ * <thead>
+ * <tr>
+ * <th>Parameter</th>
+ * <th>Required</th>
+ * <th>Default</th>
+ * <th>Description</th>
+ * </tr>
+ * </thead>
+ * <tbody>
+ * <tr>
+ * <td>param</td>
+ * <td>required</td>
+ * <td>default</td>
+ * <td>description</td>
+ * </tr>
+ * </tbody>
+ * </table>
+ * <!-- END SNIPPET: parameters -->
+ *
+ * <p/> <u>Example code:</u>
+ *
+ * <pre>
+ * <!-- START SNIPPET: example -->
+ * <!-- END SNIPPET: example -->
+ * </pre>
  *
  * @author Rainer Hermanns
  * @version $Id$

tiger/src/java/com/opensymphony/xwork/validator/annotations/Validation.java

 import java.lang.annotation.*;
 
 /**
- * <code>Validation</code>
+ * <!-- START SNIPPET: description -->
+ * <!-- END SNIPPET: description -->
+ *
+ * <p/> <u>Annotation usage:</u>
+ *
+ * <!-- START SNIPPET: usage -->
+ *
+ * <!-- END SNIPPET: usage -->
+ *
+ * <p/> <u>Annotation parameters:</u>
+ *
+ * <!-- START SNIPPET: parameters -->
+ * <table>
+ * <thead>
+ * <tr>
+ * <th>Parameter</th>
+ * <th>Required</th>
+ * <th>Default</th>
+ * <th>Description</th>
+ * </tr>
+ * </thead>
+ * <tbody>
+ * <tr>
+ * <td>param</td>
+ * <td>required</td>
+ * <td>default</td>
+ * <td>description</td>
+ * </tr>
+ * </tbody>
+ * </table>
+ * <!-- END SNIPPET: parameters -->
+ *
+ * <p/> <u>Example code:</u>
+ *
+ * <pre>
+ * <!-- START SNIPPET: example -->
+ * <!-- END SNIPPET: example -->
+ * </pre>
  *
  * @author Rainer Hermanns
  * @version $Id$

tiger/src/java/com/opensymphony/xwork/validator/annotations/ValidationParameter.java

 import java.lang.annotation.Target;
 
 /**
+ * <!-- START SNIPPET: description -->
+ * <!-- END SNIPPET: description -->
+ *
+ * <p/> <u>Annotation usage:</u>
+ *
+ * <!-- START SNIPPET: usage -->
+ *
+ * <!-- END SNIPPET: usage -->
+ *
+ * <p/> <u>Annotation parameters:</u>
+ *
+ * <!-- START SNIPPET: parameters -->
+ * <table>
+ * <thead>
+ * <tr>
+ * <th>Parameter</th>
+ * <th>Required</th>
+ * <th>Default</th>
+ * <th>Description</th>
+ * </tr>
+ * </thead>
+ * <tbody>
+ * <tr>
+ * <td>param</td>
+ * <td>required</td>
+ * <td>default</td>
+ * <td>description</td>
+ * </tr>
+ * </tbody>
+ * </table>
+ * <!-- END SNIPPET: parameters -->
+ *
+ * <p/> <u>Example code:</u>
+ *
+ * <pre>
+ * <!-- START SNIPPET: example -->
+ * <!-- END SNIPPET: example -->
+ * </pre>
+ *
  * @author jepjep
  * @author Rainer Hermanns
  */

tiger/src/java/com/opensymphony/xwork/validator/annotations/Validations.java

 import java.lang.annotation.Target;
 
 /**
+ * <!-- START SNIPPET: description -->
+ * <!-- END SNIPPET: description -->
+ *
+ * <p/> <u>Annotation usage:</u>
+ *
+ * <!-- START SNIPPET: usage -->
+ *
+ * <!-- END SNIPPET: usage -->
+ *
+ * <p/> <u>Annotation parameters:</u>
+ *
+ * <!-- START SNIPPET: parameters -->
+ * <table>
+ * <thead>
+ * <tr>
+ * <th>Parameter</th>
+ * <th>Required</th>
+ * <th>Default</th>
+ * <th>Description</th>
+ * </tr>
+ * </thead>
+ * <tbody>
+ * <tr>
+ * <td>param</td>
+ * <td>required</td>
+ * <td>default</td>
+ * <td>description</td>
+ * </tr>
+ * </tbody>
+ * </table>
+ * <!-- END SNIPPET: parameters -->
+ *
+ * <p/> <u>Example code:</u>
+ *
+ * <pre>
+ * <!-- START SNIPPET: example -->
+ * <!-- END SNIPPET: example -->
+ * </pre>
+ *
  * @author jepjep
  * @author Rainer Hermanns
  * @version $Id$

tiger/src/java/com/opensymphony/xwork/validator/annotations/VisitorFieldValidator.java

 import java.lang.annotation.*;
 
 /**
- * <code>VisitorFieldValidator</code>
- *
+ * <!-- START SNIPPET: description -->
  * The validator allows you to forward validator to object properties of your action
  * using the objects own validator files. This allows you to use the ModelDriven development
  * pattern and manage your validations for your models in one place, where they belong, next to
  * The VisitorFieldValidator can handle either simple Object properties, Collections of Objects, or Arrays.
  * The error message for the VisitorFieldValidator will be appended in front of validator messages added
  * by the validations for the Object message.
+ * <!-- END SNIPPET: description -->
+ *
+ * <p/> <u>Annotation usage:</u>
+ *
+ * <!-- START SNIPPET: usage -->
+ *
+ * <!-- END SNIPPET: usage -->
+ *
+ * <p/> <u>Annotation parameters:</u>
+ *
+ * <!-- START SNIPPET: parameters -->
+ * <table>
+ * <thead>
+ * <tr>
+ * <th>Parameter</th>
+ * <th>Required</th>
+ * <th>Default</th>
+ * <th>Description</th>
+ * </tr>
+ * </thead>
+ * <tbody>
+ * <tr>
+ * <td>param</td>
+ * <td>required</td>
+ * <td>default</td>
+ * <td>description</td>
+ * </tr>
+ * </tbody>
+ * </table>
+ * <!-- END SNIPPET: parameters -->
+ *
+ * <p/> <u>Example code:</u>
+ *
+ * <pre>
+ * <!-- START SNIPPET: example -->
+ * <!-- END SNIPPET: example -->
+ * </pre>
  *
  * @author Rainer Hermanns
  * @version $Id$