|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
org.apache.struts.plugins Class ModuleConfigVerifier
java.lang.Object | +--org.apache.struts.plugins.ModuleConfigVerifier
- All Implemented Interfaces:
- PlugIn
- public class ModuleConfigVerifier
- extends java.lang.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.
Under all circumstances, errors that are detected will be logged via
calls to ServletContext.log
.
- Since:
- Struts 1.1
- Version:
- $Rev: 54929 $ $Date: 2004-10-16 17:38:42 +0100 (Sat, 16 Oct 2004) $
Field Summary | |
protected ModuleConfig |
config
The ModuleConfig instance for our module. |
private boolean |
fatal
Should the existence of configuration errors be fatal. |
protected ActionServlet |
servlet
The ActionServlet instance we are associated with. |
Constructor Summary | |
ModuleConfigVerifier()
|
Method Summary | |
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. |
protected void |
log(java.lang.String message)
Log the specified message to our servlet context log, after a header including the module prefix. |
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 . |
Methods inherited from class java.lang.Object |
|
Field Detail |
config
protected ModuleConfig config
The
ModuleConfig
instance for our module.
servlet
protected ActionServlet servlet
The
ActionServlet
instance we are associated with.
fatal
private boolean fatal
Should the existence of configuration errors be fatal.
Constructor Detail |
ModuleConfigVerifier
public ModuleConfigVerifier()
Method Detail |
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
public void init(ActionServlet servlet, ModuleConfig config) throws javax.servlet.ServletException
- Description copied from interface:
PlugIn
Receive notification that the specified module is being started up.
- Following copied from interface:
org.apache.struts.action.PlugIn
- Parameters:
servlet
- ActionServlet that is managing all the modules in this web applicationconfig
- ModuleConfig for the module with which this plug-in is associated- Throws:
javax.servlet.ServletException
- if thisPlugIn
cannot be successfully initialized
log
protected void log(java.lang.String message)
Log the specified message to our servlet context log, after a header including the module prefix.
- Parameters:
message
- The message to be logged
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
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2000-2005 - The Apache Software Foundation