Commits

Anonymous committed afbe498

WW-1006 annotation docs

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

Comments (0)

Files changed (12)

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

  *
  * <pre>
  * <!-- START SNIPPET: example -->
+ * @ConversionErrorFieldValidator(message = "Default message", key = "i18n.key", shortCircuit = true)
  * <!-- END SNIPPET: example -->
  * </pre>
  *

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

  * <p/> <u>Annotation parameters:</u>
  *
  * <!-- START SNIPPET: parameters -->
- * <table>
- * <thead>
+ * <table class='confluenceTable'>
  * <tr>
- * <th>Parameter</th>
- * <th>Required</th>
- * <th>Default</th>
- * <th>Description</th>
+ * <th class='confluenceTh'> Parameter </th>
+ * <th class='confluenceTh'> Required </th>
+ * <th class='confluenceTh'> Default </th>
+ * <th class='confluenceTh'> Notes </th>
  * </tr>
- * </thead>
- * <tbody>
  * <tr>
- * <td>param</td>
- * <td>required</td>
- * <td>default</td>
- * <td>description</td>
+ * <td class='confluenceTd'> min </td>
+ * <td class='confluenceTd'> no </td>
+ * <td class='confluenceTd'>&nbsp;</td>
+ * <td class='confluenceTd'> Date property.  The minimum the date must be. </td>
+ * </tr>
+ * <tr>
+ * <td class='confluenceTd'> max </td>
+ * <td class='confluenceTd'> no </td>
+ * <td class='confluenceTd'>&nbsp;</td>
+ * <td class='confluenceTd'> Date property.  The maximum date can be. </td>
  * </tr>
- * </tbody>
  * </table>
+ *
+ * <p>If neither <em>min</em> nor <em>max</em> is set, nothing will be done.</p>
  * <!-- END SNIPPET: parameters -->
  *
  * <p/> <u>Example code:</u>
  *
  * <pre>
  * <!-- START SNIPPET: example -->
+ * @DateRangeFieldValidator(message = "Default message", key = "i18n.key", shortCircuit = true, min = "2005/01/01", max = "2005/12/31")
  * <!-- END SNIPPET: example -->
  * </pre>
  *

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

  *
  * <pre>
  * <!-- START SNIPPET: example -->
+ * @EmailValidator(message = "Default message", key = "i18n.key", shortCircuit = true)
  * <!-- END SNIPPET: example -->
  * </pre>
  *

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

  * <p/> <u>Annotation parameters:</u>
  *
  * <!-- START SNIPPET: parameters -->
- * <table>
- * <thead>
+ * <table class='confluenceTable'>
  * <tr>
- * <th>Parameter</th>
- * <th>Required</th>
- * <th>Default</th>
- * <th>Description</th>
+ * <th class='confluenceTh'> Parameter </th>
+ * <th class='confluenceTh'> Required </th>
+ * <th class='confluenceTh'> Default </th>
+ * <th class='confluenceTh'> Notes </th>
  * </tr>
- * </thead>
- * <tbody>
  * <tr>
- * <td>param</td>
- * <td>required</td>
- * <td>default</td>
- * <td>description</td>
+ * <td class='confluenceTd'> expression </td>
+ * <td class='confluenceTd'> yes </td>
+ * <td class='confluenceTd'>&nbsp;</td>
+ * <td class='confluenceTd'> An OGNL expression that returns a boolean value.  </td>
  * </tr>
- * </tbody>
  * </table>
  * <!-- END SNIPPET: parameters -->
  *
  *
  * <pre>
  * <!-- START SNIPPET: example -->
+ * @ExpressionValidator(message = "Default message", key = "i18n.key", shortCircuit = true, expression = "an OGNL expression" )
  * <!-- END SNIPPET: example -->
  * </pre>
  *

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

  * <p/> <u>Annotation parameters:</u>
  *
  * <!-- START SNIPPET: parameters -->
- * <table>
- * <thead>
+ * <table class='confluenceTable'>
  * <tr>
- * <th>Parameter</th>
- * <th>Required</th>
- * <th>Default</th>
- * <th>Description</th>
+ * <th class='confluenceTh'> Parameter </th>
+ * <th class='confluenceTh'> Required </th>
+ * <th class='confluenceTh'> Default </th>
+ * <th class='confluenceTh'> Notes </th>
  * </tr>
- * </thead>
- * <tbody>
  * <tr>
- * <td>param</td>
- * <td>required</td>
- * <td>default</td>
- * <td>description</td>
+ * <td class='confluenceTd'> expression </td>
+ * <td class='confluenceTd'> yes </td>
+ * <td class='confluenceTd'>&nbsp;</td>
+ * <td class='confluenceTd'> An OGNL expression that returns a boolean value.  </td>
  * </tr>
- * </tbody>
  * </table>
  * <!-- END SNIPPET: parameters -->
  *
  *
  * <pre>
  * <!-- START SNIPPET: example -->
+ * @FieldExpressionValidator(message = "Default message", key = "i18n.key", shortCircuit = true, expression = "an OGNL expression")
  * <!-- END SNIPPET: example -->
  * </pre>
  *

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

  * <p/> <u>Annotation parameters:</u>
  *
  * <!-- START SNIPPET: parameters -->
- * <table>
- * <thead>
+ * <table class='confluenceTable'>
  * <tr>
- * <th>Parameter</th>
- * <th>Required</th>
- * <th>Default</th>
- * <th>Description</th>
+ * <th class='confluenceTh'> Parameter </th>
+ * <th class='confluenceTh'> Required </th>
+ *
+ * <th class='confluenceTh'> Default </th>
+ * <th class='confluenceTh'> Notes </th>
+ * </tr>
+ * <tr>
+ * <td class='confluenceTd'> min </td>
+ * <td class='confluenceTd'> no </td>
+ * <td class='confluenceTd'>&nbsp;</td>
+ * <td class='confluenceTd'> Integer property.  The minimum the number must be. </td>
  * </tr>
- * </thead>
- * <tbody>
  * <tr>
- * <td>param</td>
- * <td>required</td>
- * <td>default</td>
- * <td>description</td>
+ * <td class='confluenceTd'> max </td>
+ * <td class='confluenceTd'> no </td>
+ * <td class='confluenceTd'>&nbsp;</td>
+ * <td class='confluenceTd'> Integer property.  The maximum number can be. </td>
  * </tr>
- * </tbody>
  * </table>
+ *
+ * <p>If neither <em>min</em> nor <em>max</em> is set, nothing will be done.</p>
+ *
+ * <p>The values for min and max must be inserted as String values so that "0" can be handled as a possible value.</p>
  * <!-- END SNIPPET: parameters -->
  *
  * <p/> <u>Example code:</u>
  *
  * <pre>
  * <!-- START SNIPPET: example -->
+ * @IntRangeFieldValidator(message = "Default message", key = "i18n.key", shortCircuit = true, min = "0", max = "42")
  * <!-- END SNIPPET: example -->
  * </pre>
  *

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

  *
  * <pre>
  * <!-- START SNIPPET: example -->
+ * @RequiredFieldValidator(message = "Default message", key = "i18n.key", shortCircuit = true)
  * <!-- END SNIPPET: example -->
  * </pre>
  *

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

  * <p/> <u>Annotation parameters:</u>
  *
  * <!-- START SNIPPET: parameters -->
- * <table>
- * <thead>
+ * <table class='confluenceTable'>
  * <tr>
- * <th>Parameter</th>
- * <th>Required</th>
- * <th>Default</th>
- * <th>Description</th>
+ * <th class='confluenceTh'> Parameter </th>
+ * <th class='confluenceTh'> Required </th>
+ * <th class='confluenceTh'> Default </th>
+ * <th class='confluenceTh'> Notes </th>
  * </tr>
- * </thead>
- * <tbody>
  * <tr>
- * <td>param</td>
- * <td>required</td>
- * <td>default</td>
- * <td>description</td>
+ * <td class='confluenceTd'> trim </td>
+ * <td class='confluenceTd'> no </td>
+ * <td class='confluenceTd'> true </td>
+ * <td class='confluenceTd'> Boolean property.  Determines whether the String is trimmed before performing the length check.  </td>
  * </tr>
- * </tbody>
  * </table>
  * <!-- END SNIPPET: parameters -->
  *
  *
  * <pre>
  * <!-- START SNIPPET: example -->
+ * @RequiredStringValidator(message = "Default message", key = "i18n.key", shortCircuit = true, trim = true)
  * <!-- END SNIPPET: example -->
  * </pre>
  *

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

  * <p/> <u>Annotation parameters:</u>
  *
  * <!-- START SNIPPET: parameters -->
- * <table>
- * <thead>
+ * <table class='confluenceTable'>
  * <tr>
- * <th>Parameter</th>
- * <th>Required</th>
- * <th>Default</th>
- * <th>Description</th>
+ * <th class='confluenceTh'> Parameter </th>
+ * <th class='confluenceTh'> Required </th>
+ * <th class='confluenceTh'> Default </th>
+ * <th class='confluenceTh'> Notes </th>
  * </tr>
- * </thead>
- * <tbody>
  * <tr>
- * <td>param</td>
- * <td>required</td>
- * <td>default</td>
- * <td>description</td>
+ * <td class='confluenceTd'> trim </td>
+ * <td class='confluenceTd'> no </td>
+ * <td class='confluenceTd'> true </td>
+ * <td class='confluenceTd'> Boolean property.  Determines whether the String is trimmed before performing the length check.  </td>
+ * </tr>
+ * <tr>
+ * <td class='confluenceTd'> minLength </td>
+ * <td class='confluenceTd'> no </td>
+ * <td class='confluenceTd'>&nbsp;</td>
+ * <td class='confluenceTd'> Integer property.  The minimum length the String must be. </td>
+ * </tr>
+ * <tr>
+ * <td class='confluenceTd'> maxLength </td>
+ * <td class='confluenceTd'> no </td>
+ * <td class='confluenceTd'>&nbsp;</td>
+ * <td class='confluenceTd'> Integer property.  The maximum length the String can be. </td>
  * </tr>
- * </tbody>
  * </table>
+ *
+ * <p>If neither <em>minLength</em> nor <em>maxLength</em> is set, nothing will be done.</p>
+ *
  * <!-- END SNIPPET: parameters -->
  *
  * <p/> <u>Example code:</u>
  *
  * <pre>
  * <!-- START SNIPPET: example -->
+ * @StringLengthFieldValidator(message = "Default message", key = "i18n.key", shortCircuit = true, trim = true, minLength = "5",  maxLength = "12")
  * <!-- END SNIPPET: example -->
  * </pre>
  *

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

  * <p/> <u>Annotation parameters:</u>
  *
  * <!-- START SNIPPET: parameters -->
- * <table>
- * <thead>
+ * <table class='confluenceTable'>
  * <tr>
- * <th>Parameter</th>
- * <th>Required</th>
- * <th>Default</th>
- * <th>Description</th>
+ * <th class='confluenceTh'> Parameter </th>
+ * <th class='confluenceTh'> Required </th>
+ * <th class='confluenceTh'> Default </th>
+ * <th class='confluenceTh'> Notes </th>
  * </tr>
- * </thead>
- * <tbody>
  * <tr>
- * <td>param</td>
- * <td>required</td>
- * <td>default</td>
- * <td>description</td>
+ * <td class='confluenceTd'> regex</td>
+ * <td class='confluenceTd'> yes </td>
+ * <td class='confluenceTd'> "." </td>
+ * <td class='confluenceTd'> String property.  The Regular Expression for which to check a match.  </td>
+ * </tr>
+ * <tr>
+ * <td class='confluenceTd'> caseSensitive</td>
+ * <td class='confluenceTd'> no </td>
+ * <td class='confluenceTd'> true </td>
+ * <td class='confluenceTd'> Whether the matching of alpha characters in the expression should be done case-sensitively. </td>
  * </tr>
- * </tbody>
  * </table>
  * <!-- END SNIPPET: parameters -->
  *
  *
  * <pre>
  * <!-- START SNIPPET: example -->
+ * @StringRegexValidator(message = "Default message", key = "i18n.key", shortCircuit = true, regex = "a regular expression", caseSensitive = true)
  * <!-- END SNIPPET: example -->
  * </pre>
  *

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

  *
  * <pre>
  * <!-- START SNIPPET: example -->
+ * @UrlValidator(message = "Default message", key = "i18n.key", shortCircuit = true)
  * <!-- END SNIPPET: example -->
  * </pre>
  *

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

  * <p/> <u>Annotation parameters:</u>
  *
  * <!-- START SNIPPET: parameters -->
- * <table>
- * <thead>
+ * <table class='confluenceTable'>
  * <tr>
- * <th>Parameter</th>
- * <th>Required</th>
- * <th>Default</th>
- * <th>Description</th>
+ * <th class='confluenceTh'> Parameter </th>
+ * <th class='confluenceTh'> Required </th>
+ * <th class='confluenceTh'> Default </th>
+ * <th class='confluenceTh'> Notes </th>
  * </tr>
- * </thead>
- * <tbody>
  * <tr>
- * <td>param</td>
- * <td>required</td>
- * <td>default</td>
- * <td>description</td>
+ * <td class='confluenceTd'> context </td>
+ * <td class='confluenceTd'> no </td>
+ * <td class='confluenceTd'> action alias </td>
+ * <td class='confluenceTd'> Determines the context to use for validating the Object property. If not defined, the context of the Action validation is propogated to the Object property validation.  In the case of Action validation, this context is the Action alias.  </td>
+ * </tr>
+ * <tr>
+ * <td class='confluenceTd'> appendPrefix </td>
+ * <td class='confluenceTd'> no </td>
+ * <td class='confluenceTd'> true </td>
+ * <td class='confluenceTd'> Determines whether the field name of this field validator should be prepended to the field name of the visited field to determine the full field name when an error occurs.  For example, suppose that the bean being validated has a "name" property.  If <em>appendPrefix</em> is true, then the field error will be stored under the field "bean.name".  If <em>appendPrefix</em> is false, then the field error will be stored under the field "name".  <br clear="all" /> <img class="emoticon" src="/images/icons/emoticons/warning.gif" height="16" width="16" align="absmiddle" alt="" border="0"/> If you are using the VisitorFieldValidator to validate the model from a ModelDriven Action, you should set <em>appendPrefix</em> to false unless you are using "model.name" to reference the properties on your model. </td>
  * </tr>
- * </tbody>
  * </table>
  * <!-- END SNIPPET: parameters -->
  *
  *
  * <pre>
  * <!-- START SNIPPET: example -->
+ * @VisitorFieldValidator(message = "Default message", key = "i18n.key", shortCircuit = true, context = "action alias", appendPrefix = true)
  * <!-- END SNIPPET: example -->
  * </pre>
  *
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.