|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.struts.validator.ValidatorPlugIn
Loads ValidatorResources
based on configuration in the
struts-config.xml file.
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 |
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. |
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. |
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. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private static org.apache.commons.logging.Log log
private ModuleConfig config
private ActionServlet servlet
ActionServlet
owning this application.private static final java.lang.String RESOURCE_DELIM
public static final java.lang.String VALIDATOR_KEY
ValidatorResources
is stored under.public static final java.lang.String STOP_ON_ERROR_KEY
StopOnError
is stored under.protected org.apache.commons.validator.ValidatorResources resources
private java.lang.String pathnames
private boolean stopOnFirstError
true
to
keep Struts 1.1 backwards compatibility.Constructor Detail |
public ValidatorPlugIn()
Method Detail |
public java.lang.String getPathnames()
public void setPathnames(java.lang.String pathnames)
pathnames
- delimited list of Validator resource path namespublic boolean isStopOnFirstError()
public void setStopOnFirstError(boolean stopOnFirstError)
stopOnFirstError
- A boolean indicating whether JavaScript
validation should stop when it finds the first error
(Struts 1.1 behaviour) or continue validation.public void init(ActionServlet servlet, ModuleConfig config) throws javax.servlet.ServletException
init
in interface PlugIn
servlet
- The ActionServlet for our applicationconfig
- The ModuleConfig for our owning modulejavax.servlet.ServletException
- if we cannot configure ourselves correctlypublic void destroy()
destroy
in interface PlugIn
protected void initResources() throws java.io.IOException, javax.servlet.ServletException
java.io.IOException
- if an input/output error is encounteredjavax.servlet.ServletException
- if we cannot initialize these resourcesprotected void destroyResources()
ValidatorResources
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |