ValidatorPlugIn (Struts Core 1.3.10 API)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts.validator
Class ValidatorPlugIn

    java.lang.Object
      org.apache.struts.validator.ValidatorPlugIn

All Implemented Interfaces:
  PlugIn

    public class ValidatorPlugIn

extends Object
implements PlugIn

Loads `ValidatorResources` based on configuration in the struts-config.xml file.

Since:
  Struts 1.1
Version:
  $Rev: 483039 $ $Date: 2005-08-30 00:22:27 -0400 (Tue, 30 Aug 2005) $

Field Summary
`protected ValidatorResources` | `resources` The set of Form instances that have been created and initialized, keyed by the struts form name.
`static String` | `STOP_ON_ERROR_KEY` Application scope key that `StopOnError` is stored under.
`static String` | `VALIDATOR_KEY` Application scope key that `ValidatorResources` is stored under.

Constructor Summary
`ValidatorPlugIn()`

Method Summary
`void` | `destroy()` Gracefully shut down, releasing any resources that were allocated at initialization.
`protected void` | `destroyResources()` Destroy `ValidatorResources`.
`String` | `getPathnames()` Gets a comma delimitted list of Validator resources.
`void` | `init(ActionServlet servlet, ModuleConfig config)` Initialize and load our resources.
`protected void` | `initResources()` Initialize the validator resources for this module.
`boolean` | `isStopOnFirstError()` Gets the value for stopOnFirstError.
`void` | `setPathnames(String pathnames)` Sets a comma delimitted list of Validator resources.
`void` | `setStopOnFirstError(boolean stopOnFirstError)` Sets the value for stopOnFirstError.

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

Field Detail

### VALIDATOR_KEY

    public static final String VALIDATOR_KEY

  Application scope key that `ValidatorResources` is stored under.

  See Also:
    Constant Field Values

### STOP_ON_ERROR_KEY

    public static final String STOP_ON_ERROR_KEY

  Application scope key that `StopOnError` is stored under.

  Since:
    Struts 1.2
  See Also:
    Constant Field Values

### resources

    protected ValidatorResources resources

  The set of Form instances that have been created and initialized, keyed by the struts form name.

Constructor Detail

### ValidatorPlugIn

    public ValidatorPlugIn()

Method Detail

### getPathnames

    public String getPathnames()

  Gets a comma delimitted list of Validator resources.

  Returns:
    comma delimited list of Validator resource path names

### setPathnames

    public void setPathnames(String pathnames)

  Sets a comma delimitted list of Validator resources.

  Parameters:
    `pathnames` - delimited list of Validator resource path names

### isStopOnFirstError

    public boolean isStopOnFirstError()

  Gets the value for stopOnFirstError.

  Returns:
    A boolean indicating whether JavaScript validation should stop when it finds the first error (Struts 1.1 behaviour) or continue validation.
  Since:
    Struts 1.2

### setStopOnFirstError

    public void setStopOnFirstError(boolean stopOnFirstError)

  Sets the value for stopOnFirstError.

  Parameters:
    `stopOnFirstError` - A boolean indicating whether JavaScript validation should stop when it finds the first error (Struts 1.1 behaviour) or continue validation.
  Since:
    Struts 1.2

### init

    public void init(ActionServlet servlet,
                     ModuleConfig config)
              throws ServletException

  Initialize and load our resources.

  Specified by:
    `init` in interface `PlugIn`
  Parameters:
    `servlet` - The ActionServlet for our application
    `config` - The ModuleConfig for our owning module
  Throws:
    `ServletException` - if we cannot configure ourselves correctly

### destroy

    public void destroy()

  Gracefully shut down, releasing any resources that were allocated at initialization.

  Specified by:
    `destroy` in interface `PlugIn`

### initResources

    protected void initResources()
                          throws IOException,
                                 ServletException

  Initialize the validator resources for this module.

  Throws:
    `IOException` - if an input/output error is encountered
    `ServletException` - if we cannot initialize these resources

### destroyResources

    protected void destroyResources()

  Destroy `ValidatorResources`.

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 © 2000-2008 Apache Software Foundation. All Rights Reserved.