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
FieldsModifier and TypeFieldDescriptionprotected ModuleConfigTheModuleConfiginstance for our module.protected ActionServletTheActionServletinstance we are associated with. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Receive notification that our owning module is being shut down.voidinit(ActionServlet servlet, ModuleConfig config) booleanisFatal()Return the "configuation errors are fatal" flag.voidsetFatal(boolean fatal) Set the "configuration errors are fatal" flag.protected booleanReturntrueif information returned byconfig.getActionMappingClassis all valid; otherwise, log error messages and returnfalse.protected booleanReturntrueif information returned byconfig.findForwardConfigsis all valid; otherwise, log error messages and returnfalse.protected booleanReturntrueif information returned byconfig.findMessageResourcesConfigsis all valid; otherwise, log error messages and returnfalse.protected booleanReturntrueif information returned byconfig.findPluginConfigsis all valid; otherwise, log error messages and returnfalse.
-
Field Details
-
config
The
ModuleConfiginstance for our module. -
servlet
The
ActionServletinstance 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:
initin interfacePlugIn- Throws:
ServletException
-
verifyActionMappingClass
protected boolean verifyActionMappingClass()Return
trueif information returned byconfig.getActionMappingClassis all valid; otherwise, log error messages and returnfalse. -
verifyForwardConfigs
protected boolean verifyForwardConfigs()Return
trueif information returned byconfig.findForwardConfigsis all valid; otherwise, log error messages and returnfalse. -
verifyMessageResourcesConfigs
protected boolean verifyMessageResourcesConfigs()Return
trueif information returned byconfig.findMessageResourcesConfigsis all valid; otherwise, log error messages and returnfalse. -
verifyPlugInConfigs
protected boolean verifyPlugInConfigs()Return
trueif information returned byconfig.findPluginConfigsis all valid; otherwise, log error messages and returnfalse.
-