Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.opensymphony.xwork2.validator
Class ValidatorFileParser

    java.lang.Object
      com.opensymphony.xwork2.validator.ValidatorFileParser

    public class ValidatorFileParser

extends Object

Parse the validation file. (eg. MyAction-validation.xml, MyAction-actionAlias-validation.xml) to return a List of ValidatorConfig encapsulating the validator information.

Author:
  Jason Carreira, James House, tm_jee ( tm_jee (at) yahoo.co.uk ), Rob Harrop, Rene Gielen
See Also:
  `ValidatorConfig`

Field Summary
`(package private) static String` | `MULTI_TEXTVALUE_SEPARATOR`

Constructor Summary
`ValidatorFileParser()`

Method Summary
`private static void` | `addValidatorConfigs(NodeList validatorNodes, Map extraParams, List validatorCfgs)`
`static String` | `getTextValue(Element valueEle)` Extract trimmed text value from the given DOM element, ignoring XML comments.
`static List` | `parseActionValidatorConfigs(InputStream is, String resourceName)` Parse resource for a list of ValidatorConfig objects.
`static void` | `parseValidatorDefinitions(InputStream is)` Deprecated. Use parseValidatorDefinitions(InputStream, String)
`static void` | `parseValidatorDefinitions(InputStream is, String resourceName)` Deprecated.
`static void` | `parseValidatorDefinitions(InputStream is, String resourceName, ObjectFactory objectFactory)` Parses validator definitions

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

Field Detail

### MULTI_TEXTVALUE_SEPARATOR

    static final String MULTI_TEXTVALUE_SEPARATOR

See Also:
  Constant Field Values

Constructor Detail

### ValidatorFileParser

    public ValidatorFileParser()

Method Detail

### parseActionValidatorConfigs

    public static List parseActionValidatorConfigs(InputStream is,
                                                   String resourceName)

  Parse resource for a list of ValidatorConfig objects.

  Parameters:
    `is` - input stream to the resource
    `resourceName` - file name of the resource
  Returns:
    List list of ValidatorConfig

### parseValidatorDefinitions

    public static void parseValidatorDefinitions(InputStream is)

  Deprecated. Use parseValidatorDefinitions(InputStream, String)

  Parses validator definitions

  Parameters:
    `is` - The input stream

### parseValidatorDefinitions

    public static void parseValidatorDefinitions(InputStream is,
                                                 String resourceName)

  Deprecated.

  Parses validator definitions

  Parameters:
    `is` - The input stream
    `resourceName` - The location of the input stream

### parseValidatorDefinitions

    public static void parseValidatorDefinitions(InputStream is,
                                                 String resourceName,
                                                 ObjectFactory objectFactory)

  Parses validator definitions

  Parameters:
    `is` - The input stream
    `resourceName` - The location of the input stream
  Since:
    1.2

### getTextValue

    public static String getTextValue(Element valueEle)

  Extract trimmed text value from the given DOM element, ignoring XML comments. Appends all CharacterData nodes and EntityReference nodes into a single String value, excluding Comment nodes. This method is based on a method originally found in DomUtils class of Springframework.

  See Also:
    `CharacterData`, `EntityReference`, `Comment`

### addValidatorConfigs

    private static void addValidatorConfigs(NodeList validatorNodes,
                                            Map extraParams,
                                            List validatorCfgs)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2007 OpenSymphony. All Rights Reserved.