## xdoclet.modules.spring
Class SpringValidatorTagsHandler

    java.lang.Object
      xdoclet.template.TemplateTagHandler
          xdoclet.XDocletTagSupport
              xdoclet.tagshandler.AbstractProgramElementTagsHandler
                  xdoclet.modules.spring.SpringValidatorTagsHandler

public class SpringValidatorTagsHandler
extends AbstractProgramElementTagsHandler

Spring Validator tag handler tags

Version:
  $Revision: 1.3 $
Author:
  Matt Raible (matt@raibledesigns.com)
xdoclet.taghandler
  namespace="CommonsValidator"
created
  April 26, 2004

Field Summary

Fields inherited from class xdoclet.tagshandler.AbstractProgramElementTagsHandler
`currentToken, matchPattern, tagTokenizer`

Fields inherited from class xdoclet.XDocletTagSupport
`FOR_CLASS, FOR_CONSTRUCTOR, FOR_FIELD, FOR_METHOD, PARAMETER_DELIMITER`

Constructor Summary
`SpringValidatorTagsHandler()`

Method Summary
`String` `argIndex(Properties props)` Current argument index number (0 to 3).
`String` `argName(Properties props)` Current argument name - only valid if argument is for a specific validator type.
`String` `argValue(Properties props)` Current argument value, which is either an inline value or resource key.
`String` `fieldName(Properties props)` Returns the current fields name.
`void` `forAllFieldArgs(String template, Properties attributes)` Iterates over all arguments for the current field.
`void` `forAllFields(String template, Properties attributes)` Iterates the body for each field of the current form requiring validation.
`void` `forAllForms(String template, Properties attributes)` Iterates over all POJOs and evaluates the body of the tag for each class.
`String` `formName(Properties attributes)` Gets the "name" attribute for the <form> element in the xml descriptor.
`void` `ifArgIsForType(String template, Properties attributes)` Evaluates the body if the current argument is a validator-specific argument.
`void` `ifArgIsResource(String template, Properties attributes)` Evaluates body if current argument is a resource key.
`void` `ifArgIsValue(String template, Properties attributes)` Evaluates the body if the current argument is an inline value rather than a resource key.
`void` `ifFormHasFields(String template, Properties attributes)` Evaluates the body if form has fields requiring validation.
`void` `ifNoArg0(String template, Properties attributes)` Evaluates the body if there is no arg0 specified.
`String` `validatorList(Properties props)` Returns a comma-separated list of the specified validator types.

Methods inherited from class xdoclet.tagshandler.AbstractProgramElementTagsHandler

`checkForWrap, currentToken, exceptionList, firstSentenceDescriptionOfCurrentMember, forAllMembers, forAllMemberTags, forAllMemberTagTokens, getAllClasses, getClassNameFor, getFullClassNameFor, getFullSuperclassNameFor, getIndentChars, getXExecutableMemberForMemberName, getXExecutableMemberForMemberName, hasExecutableMember_OLD, hasExecutableMember, makeCopyOfArray, matchValue, memberComment, setMatchValue, skipToken`

Methods inherited from class xdoclet.XDocletTagSupport

`delimit, expandClassName, generate, getCurrentClass, getCurrentClassTag, getCurrentConstructor, getCurrentField, getCurrentFieldTag, getCurrentMethod, getCurrentMethodTag, getCurrentPackage, getDocletContext, getEngine, getExpandedDelimitedTagValue, getTagValue, getTagValue, getTagValue, hasHavingClassTag, hasTag, isTagValueEqual, mandatoryParamNotFound, mandatoryTemplateTagParamNotFound, modifiers, popCurrentClass, pushCurrentClass, setCurrentClass, setCurrentClassTag, setCurrentConstructor, setCurrentField, setCurrentFieldTag, setCurrentMethod, setCurrentMethodTag, setCurrentPackage`

Methods inherited from class xdoclet.template.TemplateTagHandler
`getXJavaDoc, setXJavaDoc`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SpringValidatorTagsHandler

    public SpringValidatorTagsHandler()

Method Detail

### forAllForms

    public void forAllForms(String template,
                            Properties attributes)
                     throws XDocletException

  Iterates over all POJOs and evaluates the body of the tag for each class.

  Parameters:
    `template` - The body of the block tag
    `attributes` - The attributes of the template tag
  Throws:
    `XDocletException`
  doc.tag
    type="block"

### formName

    public String formName(Properties attributes)
                    throws XDocletException

  Gets the "name" attribute for the <form> element in the xml descriptor. This should be the "path" form attribute if this is a ValidatorActionForm or the "name" attribute otherwise.

  Parameters:
    `attributes` - The content tag attributes.
  Returns:
    form name
  Throws:
    `XDocletException` - if anything goes awry.
  doc.tag
    type="content"

### forAllFieldArgs

    public void forAllFieldArgs(String template,
                                Properties attributes)
                         throws XDocletException

  Iterates over all arguments for the current field.

  Parameters:
    `template` - The body of the block tag
    `attributes` - The attributes of the template tag
  Throws:
    `XDocletException`
  doc.tag
    type="block"

### argIndex

    public String argIndex(Properties props)

  Current argument index number (0 to 3).

  Parameters:
    `props` - The attributes of the template tag
  Returns:
    argument index
  doc.tag
    type="content"

### argName

    public String argName(Properties props)

  Current argument name - only valid if argument is for a specific validator type.

  Parameters:
    `props` - The attributes of the template tag
  Returns:
    argument name
  doc.tag
    type="content"

### argValue

    public String argValue(Properties props)

  Current argument value, which is either an inline value or resource key.

  Parameters:
    `props` - The attributes of the template tag
  Returns:
    argument value
  doc.tag
    type="content"

### ifArgIsResource

    public void ifArgIsResource(String template,
                                Properties attributes)
                         throws XDocletException

  Evaluates body if current argument is a resource key.

  Parameters:
    `template` - The body of the block tag
    `attributes` - The attributes of the template tag
  Throws:
    `XDocletException`
  doc.tag
    type="block"

### ifArgIsValue

    public void ifArgIsValue(String template,
                             Properties attributes)
                      throws XDocletException

  Evaluates the body if the current argument is an inline value rather than a resource key.

  Parameters:
    `template` - The body of the block tag
    `attributes` - The attributes of the template tag
  Throws:
    `XDocletException`
  doc.tag
    type="block"

### ifArgIsForType

    public void ifArgIsForType(String template,
                               Properties attributes)
                        throws XDocletException

  Evaluates the body if the current argument is a validator-specific argument.

  Parameters:
    `template` - The body of the block tag
    `attributes` - The attributes of the template tag
  Throws:
    `XDocletException`
  doc.tag
    type="block"

### ifNoArg0

    public void ifNoArg0(String template,
                         Properties attributes)
                  throws XDocletException

  Evaluates the body if there is no arg0 specified.

  Parameters:
    `template` - The body of the block tag
    `attributes` - The attributes of the template tag
  Throws:
    `XDocletException`
  doc.tag
    type="block"

### ifFormHasFields

    public void ifFormHasFields(String template,
                                Properties attributes)
                         throws XDocletException

  Evaluates the body if form has fields requiring validation.

  Parameters:
    `template` - The body of the block tag
    `attributes` - The attributes of the template tag
  Throws:
    `XDocletException`
  doc.tag
    type="block"

### forAllFields

    public void forAllFields(String template,
                             Properties attributes)
                      throws XDocletException

  Iterates the body for each field of the current form requiring validation.

  Parameters:
    `template` - The body of the block tag
    `attributes` - The attributes of the template tag
  Throws:
    `XDocletException`
  doc.tag
    type="block"

### fieldName

    public String fieldName(Properties props)

  Returns the current fields name.

  Parameters:
    `props` - The attributes of the template tag
  Returns:
    current field's name
  doc.tag
    type="content"

### validatorList

    public String validatorList(Properties props)

  Returns a comma-separated list of the specified validator types.

  Parameters:
    `props` - The attributes of the template tag
  Returns:
    validator type list
  doc.tag
    type="content"

http://xdoclet.sourceforge.net/