Class ModuleConfigVerifier

java.lang.Object
org.apache.struts.extras.plugins.ModuleConfigVerifier
All Implemented Interfaces:
PlugIn

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.

Since:
Struts 1.1
Version:
$Rev$ $Date$
  • Field Details

  • 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.

      Specified by:
      destroy in interface PlugIn
    • init

      public void init(ActionServlet servlet, ModuleConfig config) throws ServletException
      Specified by:
      init in interface PlugIn
      Throws:
      ServletException
    • verifyActionMappingClass

      protected boolean verifyActionMappingClass()

      Return true if information returned by config.getActionMappingClass is all valid; otherwise, log error messages and return false.

    • verifyForwardConfigs

      protected boolean verifyForwardConfigs()

      Return true if information returned by config.findForwardConfigs is all valid; otherwise, log error messages and return false.

    • verifyMessageResourcesConfigs

      protected boolean verifyMessageResourcesConfigs()

      Return true if information returned by config.findMessageResourcesConfigs is all valid; otherwise, log error messages and return false.

    • verifyPlugInConfigs

      protected boolean verifyPlugInConfigs()

      Return true if information returned by config.findPluginConfigs is all valid; otherwise, log error messages and return false.