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 java.lang.Object
implements PlugIn

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

Since:
  Struts 1.1
Version:
  $Revision: 1.1 $ $Date: 2003-08-22 09:43:31 +0100 (Fri, 22 Aug 2003) $
Author:
  David Winterfeldt

Field Summary
`private ModuleConfig` | `config` The module configuration for our owning module.
`private static org.apache.commons.logging.Log` | `log` Commons Logging instance.
`private java.lang.String` | `pathnames` A comma delimitted list of Validator resource.
`private static java.lang.String` | `RESOURCE_DELIM` Delimitter for Validator resources.
`protected org.apache.commons.validator.ValidatorResources` | `resources` The set of Form instances that have been created and initialized, keyed by the struts form name.
`private ActionServlet` | `servlet` The `ActionServlet` owning this application.
`static java.lang.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`.
`java.lang.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.
`void` | `setPathnames(java.lang.String pathnames)` Sets a comma delimitted list of Validator resources.

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

Field Detail

### log

    private static org.apache.commons.logging.Log log

  Commons Logging instance.

### config

    private ModuleConfig config

  The module configuration for our owning module.

### servlet

    private ActionServlet servlet

  The `ActionServlet` owning this application.

### RESOURCE_DELIM

    private static final java.lang.String RESOURCE_DELIM

  Delimitter for Validator resources.

  See Also:
    Constant Field Values

### VALIDATOR_KEY

    public static final java.lang.String VALIDATOR_KEY

  Application scope key that `ValidatorResources` is stored under.

  See Also:
    Constant Field Values

### resources

    protected org.apache.commons.validator.ValidatorResources resources

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

### pathnames

    private java.lang.String pathnames

  A comma delimitted list of Validator resource.

Constructor Detail

### ValidatorPlugIn

    public ValidatorPlugIn()

Method Detail

### getPathnames

    public java.lang.String getPathnames()

  Gets a comma delimitted list of Validator resources.

  Returns:
    comma delimited list of Validator resource path names

### setPathnames

    public void setPathnames(java.lang.String pathnames)

  Sets a comma delimitted list of Validator resources.

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

### init

    public void init(ActionServlet servlet,
                     ModuleConfig config)
              throws javax.servlet.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:
    `javax.servlet.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 java.io.IOException,
                                 javax.servlet.ServletException

  Initialize the validator resources for this module.

  Throws:
    `java.io.IOException` - if an input/output error is encountered, not thrown by this implementation
    `javax.servlet.ServletException` - if we cannot initialize these resources, not thrown by this implementation

### 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-2003 - Apache Software Foundation