|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.commons.validator.ValidatorAction
Contains the information to dynamically instantiate
and run a validation method. This is the class
representation of a pluggable validator that can be defined
in an xml file.
Note: The validation method is assumed
to be thread safe.
Field Summary | |
---|---|
private java.lang.String |
classname
The full class name of the class containing the validation method associated with this action. |
private java.lang.String |
depends
The other ValidatorAction s that this
one depends on. |
private org.apache.commons.collections.FastHashMap |
hDependencies
A FastHashMap of the other
ValiadtorAction s this one depends
on (if any). |
private java.lang.Object |
instance
If the java method matching the correct signature isn't static, the instance is stored in the action. |
private java.lang.String |
javascript
An optional field to containing a JavaScript representation of the java method assocated with this action. |
private java.lang.String |
jsFunctionName
An optional field to contain the name to be used if JavaScript is generated. |
private java.util.List |
lMethodParams
A list of all the validation method's parameters. |
private java.lang.String |
method
The full method name of the validation to be performed. |
private java.lang.String |
methodParams
The method signature of the validation method. |
private java.lang.String |
msg
The default error message associated with this action. |
private java.lang.String |
name
The name of the validation. |
Constructor Summary | |
---|---|
ValidatorAction()
|
Method Summary | |
---|---|
java.lang.String |
getClassname()
Gets the class of the validator action. |
java.lang.Object |
getClassnameInstance()
Gets an instance based on the validator action's classname. |
java.util.Collection |
getDependencies()
Gets the dependencies as a Collection . |
java.lang.String |
getDepends()
Gets the dependencies of the validator action. |
java.lang.String |
getJavascript()
Gets the Javascript equivalent of the java class and method associated with this action. |
java.lang.String |
getJsFunctionName()
Gets the Javascript function name. |
java.lang.String |
getMethod()
Gets the name of method being called for the validator action. |
java.lang.String |
getMethodParams()
Gets the method parameters for the method. |
java.util.List |
getMethodParamsList()
Gets the method parameters for the method. |
java.lang.String |
getMsg()
Gets the message associated with the validator action. |
java.lang.String |
getName()
Gets the name of the validator action. |
boolean |
isDependency(java.lang.String key)
Checks whether or not the value passed in is in the depends field. |
void |
process(java.util.Map globalConstants)
Creates a FastHashMap for the isDependency method
based on depends. |
void |
setClassname(java.lang.String classname)
Sets the class of the validator action. |
void |
setClassnameInstance(java.lang.Object instance)
Sets an instance based on the validator action's classname. |
void |
setDepends(java.lang.String depends)
Sets the dependencies of the validator action. |
void |
setJavascript(java.lang.String javascript)
Sets the Javascript equivalent of the java class and method associated with this action. |
void |
setJsFunctionName(java.lang.String jsFunctionName)
Sets the Javascript function name. |
void |
setMethod(java.lang.String method)
Sets the name of method being called for the validator action. |
void |
setMethodParams(java.lang.String methodParams)
Sets the method parameters for the method. |
void |
setMsg(java.lang.String msg)
Sets the message associated with the validator action. |
void |
setName(java.lang.String name)
Sets the name of the validator action. |
java.lang.String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private java.lang.String name
private java.lang.String classname
private java.lang.String method
private java.lang.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.
private java.lang.String depends
ValidatorAction
s that this
one depends on. If any errors occur in an action
that this one depends on, this action will not
be processsed.
private java.lang.String msg
private java.lang.String jsFunctionName
private java.lang.String javascript
private java.lang.Object instance
private org.apache.commons.collections.FastHashMap hDependencies
FastHashMap
of the other
ValiadtorAction
s this one depends
on (if any).
private java.util.List lMethodParams
Constructor Detail |
public ValidatorAction()
Method Detail |
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String getClassname()
public void setClassname(java.lang.String classname)
public java.lang.String getMethod()
public void setMethod(java.lang.String method)
public java.lang.String getMethodParams()
public void setMethodParams(java.lang.String methodParams)
public java.util.List getMethodParamsList()
public java.lang.String getDepends()
public void setDepends(java.lang.String depends)
public java.lang.String getMsg()
public void setMsg(java.lang.String msg)
public java.lang.String getJsFunctionName()
public void setJsFunctionName(java.lang.String jsFunctionName)
public java.lang.String getJavascript()
public void setJavascript(java.lang.String javascript)
public java.lang.Object getClassnameInstance()
public void setClassnameInstance(java.lang.Object instance)
public void process(java.util.Map globalConstants)
FastHashMap
for the isDependency method
based on depends.
public boolean isDependency(java.lang.String key)
public java.util.Collection getDependencies()
Collection
.
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |