org.apache.struts.validator
クラス ValidatorPlugIn

java.lang.Object
  拡張org.apache.struts.validator.ValidatorPlugIn
すべての実装インタフェース:
PlugIn

public class ValidatorPlugIn
extends java.lang.Object
implements PlugIn

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

導入されたバージョン:
Struts 1.1
バージョン:
$Revision: 1.1 $ $Date: 2004/10/20 03:26:41 $

フィールドの概要
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 STOP_ON_ERROR_KEY
          Application scope key that StopOnError is stored under.
private  boolean stopOnFirstError
          Informs the Validators if it has to stop validation when finding the first error or if it should continue.
static java.lang.String VALIDATOR_KEY
          Application scope key that ValidatorResources is stored under.
 
コンストラクタの概要
ValidatorPlugIn()
           
 
メソッドの概要
 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.
 boolean isStopOnFirstError()
          Gets the value for stopOnFirstError.
 void setPathnames(java.lang.String pathnames)
          Sets a comma delimitted list of Validator resources.
 void setStopOnFirstError(boolean stopOnFirstError)
          Sets the value for stopOnFirstError.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

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.

関連項目:
定数フィールド値

VALIDATOR_KEY

public static final java.lang.String VALIDATOR_KEY
Application scope key that ValidatorResources is stored under.

関連項目:
定数フィールド値

STOP_ON_ERROR_KEY

public static final java.lang.String STOP_ON_ERROR_KEY
Application scope key that StopOnError is stored under.

導入されたバージョン:
Struts 1.2
関連項目:
定数フィールド値

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.


stopOnFirstError

private boolean stopOnFirstError
Informs the Validators if it has to stop validation when finding the first error or if it should continue. Default to true to keep Struts 1.1 backwards compatibility.

コンストラクタの詳細

ValidatorPlugIn

public ValidatorPlugIn()
メソッドの詳細

getPathnames

public java.lang.String getPathnames()
Gets a comma delimitted list of Validator resources.

戻り値:
comma delimited list of Validator resource path names

setPathnames

public void setPathnames(java.lang.String pathnames)
Sets a comma delimitted list of Validator resources.

パラメータ:
pathnames - delimited list of Validator resource path names

isStopOnFirstError

public boolean isStopOnFirstError()
Gets the value for stopOnFirstError.

戻り値:
A boolean indicating whether JavaScript validation should stop when it finds the first error (Struts 1.1 behaviour) or continue validation.
導入されたバージョン:
Struts 1.2

setStopOnFirstError

public void setStopOnFirstError(boolean stopOnFirstError)
Sets the value for stopOnFirstError.

パラメータ:
stopOnFirstError - A boolean indicating whether JavaScript validation should stop when it finds the first error (Struts 1.1 behaviour) or continue validation.
導入されたバージョン:
Struts 1.2

init

public void init(ActionServlet servlet,
                 ModuleConfig config)
          throws javax.servlet.ServletException
Initialize and load our resources.

定義:
インタフェース PlugIn 内の init
パラメータ:
servlet - The ActionServlet for our application
config - The ModuleConfig for our owning module
例外:
javax.servlet.ServletException - if we cannot configure ourselves correctly

destroy

public void destroy()
Gracefully shut down, releasing any resources that were allocated at initialization.

定義:
インタフェース PlugIn 内の destroy

initResources

protected void initResources()
                      throws java.io.IOException,
                             javax.servlet.ServletException
Initialize the validator resources for this module.

例外:
java.io.IOException - if an input/output error is encountered
javax.servlet.ServletException - if we cannot initialize these resources

destroyResources

protected void destroyResources()
Destroy ValidatorResources.



このドキュメントは、Ja-Jakartaにより訳されました。コメントがある場合は、report@jajakarta.orgまでお願いします。
Copyright (C) 2000-2004 - Apache Software Foundation