org.apache.commons.validator
クラス ValidatorAction

java.lang.Object
  拡張org.apache.commons.validator.ValidatorAction
すべての実装インタフェース:
Serializable

public class ValidatorAction
extends Object
implements Serializable

動的にインスタンス化され、実行される妥当性チェック処理の情報を保持します。 このクラスはXMLファイルに定義される入れ替え可能な妥当性チェックを表現します。
    注: 妥当性チェックメソッドはスレッドセーフとみなされます。

バージョン:
$Revision: 1.1.1.1 $ $Date: 2004/02/13 10:02:01 $
作成者:
David Winterfeldt
関連項目:
直列化された形式
翻訳者:
日置 聡

フィールドの概要
private  String classname
          The full class name of the class containing the validation method associated with this action.
private  String depends
          The other ValidatorActions that this one depends on.
private  org.apache.commons.collections.FastHashMap hDependencies
          A FastHashMap of the other ValiadtorActions this one depends on (if any).
private  Object instance
          If the java method matching the correct signature isn't static, the instance is stored in the action.
private  String javascript
          An optional field to containing a JavaScript representation of the java method assocated with this action.
private  String jsFunctionName
          An optional field to contain the name to be used if JavaScript is generated.
private  List lMethodParams
          A list of all the validation method's parameters.
private  String method
          The full method name of the validation to be performed.
private  String methodParams
          The method signature of the validation method.
private  String msg
          The default error message associated with this action.
private  String name
          The name of the validation.
 
コンストラクタの概要
ValidatorAction()
           
 
メソッドの概要
 String getClassname()
          Gets the class of the validator action.
 Object getClassnameInstance()
          Gets an instance based on the validator action's classname.
 Collection getDependencies()
          Gets the dependencies as a Collection.
 String getDepends()
          Gets the dependencies of the validator action.
 String getJavascript()
          Gets the Javascript equivalent of the java class and method associated with this action.
 String getJsFunctionName()
          Gets the Javascript function name.
 String getMethod()
          Gets the name of method being called for the validator action.
 String getMethodParams()
          Gets the method parameters for the method.
 List getMethodParamsList()
          Gets the method parameters for the method.
 String getMsg()
          Gets the message associated with the validator action.
 String getName()
          Gets the name of the validator action.
 boolean isDependency(String key)
          Checks whether or not the value passed in is in the depends field.
 void process(Map globalConstants)
          Creates a FastHashMap for the isDependency method based on depends.
 void setClassname(String classname)
          Sets the class of the validator action.
 void setClassnameInstance(Object instance)
          Sets an instance based on the validator action's classname.
 void setDepends(String depends)
          Sets the dependencies of the validator action.
 void setJavascript(String javascript)
          Sets the Javascript equivalent of the java class and method associated with this action.
 void setJsFunctionName(String jsFunctionName)
          Sets the Javascript function name.
 void setMethod(String method)
          Sets the name of method being called for the validator action.
 void setMethodParams(String methodParams)
          Sets the method parameters for the method.
 void setMsg(String msg)
          Sets the message associated with the validator action.
 void setName(String name)
          Sets the name of the validator action.
 String toString()
          Returns a string representation of the object.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

name

private String name
The name of the validation.


classname

private String classname
The full class name of the class containing the validation method associated with this action.


method

private String method
The full method name of the validation to be performed. The method must be thread safe.


methodParams

private String methodParams

The method signature of the validation method. This should be a comma delimited list of the full class names of each parameter in the correct order that the method takes.

Note: java.lang.Object is reserved for the JavaBean that is being validated. The ValidatorAction and Field that are associated with a fields validation will automatically be populated if they are specified in the method signature.


depends

private String depends
The other ValidatorActions that this one depends on. If any errors occur in an action that this one depends on, this action will not be processsed.


msg

private String msg
The default error message associated with this action.


jsFunctionName

private String jsFunctionName
An optional field to contain the name to be used if JavaScript is generated.


javascript

private String javascript
An optional field to containing a JavaScript representation of the java method assocated with this action.


instance

private Object instance
If the java method matching the correct signature isn't static, the instance is stored in the action. This assumes the method is thread safe.


hDependencies

private org.apache.commons.collections.FastHashMap hDependencies
A FastHashMap of the other ValiadtorActions this one depends on (if any).


lMethodParams

private List lMethodParams
A list of all the validation method's parameters.

コンストラクタの詳細

ValidatorAction

public ValidatorAction()
メソッドの詳細

getName

public String getName()
Gets the name of the validator action.


setName

public void setName(String name)
Sets the name of the validator action.


getClassname

public String getClassname()
Gets the class of the validator action.


setClassname

public void setClassname(String classname)
Sets the class of the validator action.


getMethod

public String getMethod()
Gets the name of method being called for the validator action.


setMethod

public void setMethod(String method)
Sets the name of method being called for the validator action.


getMethodParams

public String getMethodParams()
Gets the method parameters for the method.


setMethodParams

public void setMethodParams(String methodParams)
Sets the method parameters for the method.


getMethodParamsList

public List getMethodParamsList()
Gets the method parameters for the method.


getDepends

public String getDepends()
Gets the dependencies of the validator action.


setDepends

public void setDepends(String depends)
Sets the dependencies of the validator action.


getMsg

public String getMsg()
Gets the message associated with the validator action.


setMsg

public void setMsg(String msg)
Sets the message associated with the validator action.


getJsFunctionName

public String getJsFunctionName()
Gets the Javascript function name. This is optional and can be used instead of validator action name for the name of the Javascript function/object.


setJsFunctionName

public void setJsFunctionName(String jsFunctionName)
Sets the Javascript function name. This is optional and can be used instead of validator action name for the name of the Javascript function/object.


getJavascript

public String getJavascript()
Gets the Javascript equivalent of the java class and method associated with this action.


setJavascript

public void setJavascript(String javascript)
Sets the Javascript equivalent of the java class and method associated with this action.


getClassnameInstance

public Object getClassnameInstance()
Gets an instance based on the validator action's classname.


setClassnameInstance

public void setClassnameInstance(Object instance)
Sets an instance based on the validator action's classname.


process

public void process(Map globalConstants)
Creates a FastHashMap for the isDependency method based on depends.


isDependency

public boolean isDependency(String key)
Checks whether or not the value passed in is in the depends field.


getDependencies

public Collection getDependencies()
Gets the dependencies as a Collection.


toString

public String toString()
Returns a string representation of the object.



このドキュメントは、Ja-Jakartaにより訳されました。 コメントがある場合は report@jajakarta.orgまでお願いします。
Translated into Japanese by jajakarta.org. The original page is here.
Copyright (c) 2002-2003 - Apache Software Foundation