public class ModuleConfigVerifier extends Object implements 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.
Modifier and Type | Field and Description |
---|---|
protected ModuleConfig |
config
The
ModuleConfig instance for our module. |
protected ActionServlet |
servlet
The
ActionServlet instance we are associated with. |
Constructor and Description |
---|
ModuleConfigVerifier() |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Receive notification that our owning module is being shut down.
|
void |
init(ActionServlet servlet,
ModuleConfig config)
Receive notification that the specified module is being started
up.
|
boolean |
isFatal()
Return the "configuation errors are fatal" flag.
|
void |
setFatal(boolean fatal)
Set the "configuration errors are fatal" flag.
|
protected boolean |
verifyActionMappingClass()
Return
true if information returned by
config.getActionMappingClass is all valid; otherwise, log
error messages and return false . |
protected boolean |
verifyForwardConfigs()
Return
true if information returned by
config.findForwardConfigs is all valid; otherwise, log
error messages and return false . |
protected boolean |
verifyMessageResourcesConfigs()
Return
true if information returned by
config.findMessageResourcesConfigs is all valid;
otherwise, log error messages and return false . |
protected boolean |
verifyPlugInConfigs()
Return
true if information returned by
config.findPluginConfigs is all valid; otherwise, log
error messages and return false . |
protected ModuleConfig config
The ModuleConfig
instance for our module.
protected ActionServlet servlet
The ActionServlet
instance we are associated with.
public boolean isFatal()
Return the "configuation errors are fatal" flag.
public void setFatal(boolean fatal)
Set the "configuration errors are fatal" flag.
fatal
- The new flag valuepublic void destroy()
Receive notification that our owning module is being shut down.
public void init(ActionServlet servlet, ModuleConfig config) throws javax.servlet.ServletException
PlugIn
Receive notification that the specified module is being started up.
protected boolean verifyActionMappingClass()
Return true
if information returned by
config.getActionMappingClass
is all valid; otherwise, log
error messages and return false
.
protected boolean verifyForwardConfigs()
Return true
if information returned by
config.findForwardConfigs
is all valid; otherwise, log
error messages and return false
.
protected boolean verifyMessageResourcesConfigs()
Return true
if information returned by
config.findMessageResourcesConfigs
is all valid;
otherwise, log error messages and return false
.
protected boolean verifyPlugInConfigs()
Return true
if information returned by
config.findPluginConfigs
is all valid; otherwise, log
error messages and return false
.
Copyright © 2000–2016 Apache Software Foundation. All rights reserved.