com.opensymphony.xwork2.validator

## Interface ValidatorFileParser

- All Known Implementing Classes:
    DefaultValidatorFileParser

      public interface ValidatorFileParser

  This class serves 2 purpose :
  - Parse the validation config file. (eg. MyAction-validation.xml, MyAction-actionAlias-validation.xml) to return a List of ValidatorConfig encapsulating the validator information.
  - Parse the validator definition file, (eg. validators.xml) that defines the `Validator`s registered with XWork.
  Author:
    Jason Carreira, James House, tm_jee ( tm_jee (at) yahoo.co.uk ), Rob Harrop, Rene Gielen
  See Also:
    `ValidatorConfig`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<ValidatorConfig>` | `parseActionValidatorConfigs(ValidatorFactory validatorFactory, InputStream is, String resourceName)` Parse resource for a list of ValidatorConfig objects (configuring which validator(s) are being applied to a particular field etc.)
    `void` | `parseValidatorDefinitions(Map<String,String> validators, InputStream is, String resourceName)` Parses validator definitions (register various validators with XWork).

- - ### Method Detail

    - #### parseActionValidatorConfigs

          List<ValidatorConfig> parseActionValidatorConfigs(ValidatorFactory validatorFactory,
                                                            InputStream is,
                                                            String resourceName)

      Parse resource for a list of ValidatorConfig objects (configuring which validator(s) are being applied to a particular field etc.)
      Parameters:
        `validatorFactory` - a validator factory
        `is` - input stream to the resource
        `resourceName` - file name of the resource
      Returns:
        List list of ValidatorConfig

    - #### parseValidatorDefinitions

          void parseValidatorDefinitions(Map<String,String> validators,
                                         InputStream is,
                                         String resourceName)

      Parses validator definitions (register various validators with XWork).
      Parameters:
        `validators` - map of validators
        `is` - The input stream
        `resourceName` - The location of the input stream

Copyright © 2000–2025 Apache Software Foundation. All rights reserved.