Class ModuleConfigVerifier
- All Implemented Interfaces:
PlugIn
Convenient implementation of PlugIn
that performs as many
verification tests on the information stored in the ModuleConfig
for this module as is practical. Based on the setting of the
fatal
property (which defaults to true
), the
detection of any such errors will cause a ServletException
to
be thrown from the init
method, which will ultimately cause
the initialization of your Struts controller servlet to fail.
- Since:
- Struts 1.1
- Version:
- $Rev$ $Date$
-
Field Summary
Modifier and TypeFieldDescriptionprotected ModuleConfig
TheModuleConfig
instance for our module.protected ActionServlet
TheActionServlet
instance we are associated with. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Receive notification that our owning module is being shut down.void
init
(ActionServlet servlet, ModuleConfig config) boolean
isFatal()
Return the "configuation errors are fatal" flag.void
setFatal
(boolean fatal) Set the "configuration errors are fatal" flag.protected boolean
Returntrue
if information returned byconfig.getActionMappingClass
is all valid; otherwise, log error messages and returnfalse
.protected boolean
Returntrue
if information returned byconfig.findForwardConfigs
is all valid; otherwise, log error messages and returnfalse
.protected boolean
Returntrue
if information returned byconfig.findMessageResourcesConfigs
is all valid; otherwise, log error messages and returnfalse
.protected boolean
Returntrue
if information returned byconfig.findPluginConfigs
is all valid; otherwise, log error messages and returnfalse
.
-
Field Details
-
config
The
ModuleConfig
instance for our module. -
servlet
The
ActionServlet
instance we are associated with.
-
-
Constructor Details
-
ModuleConfigVerifier
public ModuleConfigVerifier()
-
-
Method Details
-
isFatal
public boolean isFatal()Return the "configuation errors are fatal" flag.
-
setFatal
public void setFatal(boolean fatal) Set the "configuration errors are fatal" flag.
- Parameters:
fatal
- The new flag value
-
destroy
public void destroy()Receive notification that our owning module is being shut down.
-
init
- Specified by:
init
in interfacePlugIn
- Throws:
ServletException
-
verifyActionMappingClass
protected boolean verifyActionMappingClass()Return
true
if information returned byconfig.getActionMappingClass
is all valid; otherwise, log error messages and returnfalse
. -
verifyForwardConfigs
protected boolean verifyForwardConfigs()Return
true
if information returned byconfig.findForwardConfigs
is all valid; otherwise, log error messages and returnfalse
. -
verifyMessageResourcesConfigs
protected boolean verifyMessageResourcesConfigs()Return
true
if information returned byconfig.findMessageResourcesConfigs
is all valid; otherwise, log error messages and returnfalse
. -
verifyPlugInConfigs
protected boolean verifyPlugInConfigs()Return
true
if information returned byconfig.findPluginConfigs
is all valid; otherwise, log error messages and returnfalse
.
-