org.apache.struts.plugins
クラス ModuleConfigVerifier

java.lang.Object
  拡張org.apache.struts.plugins.ModuleConfigVerifier
すべての実装インタフェース:
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.

導入されたバージョン:
Struts 1.1
バージョン:
$Revision: 1.1 $ $Date: 2004/10/20 03:26:53 $

フィールドの概要
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.
 
コンストラクタの概要
ModuleConfigVerifier()
           
 
メソッドの概要
 void 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.
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.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

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.

コンストラクタの詳細

ModuleConfigVerifier

public ModuleConfigVerifier()
メソッドの詳細

isFatal

public boolean isFatal()

Return the "configuation errors are fatal" flag.


setFatal

public void setFatal(boolean fatal)

Set the "configuration errors are fatal" flag.

パラメータ:
fatal - The new flag value

destroy

public void destroy()

Receive notification that our owning module is being shut down.

定義:
インタフェース PlugIn 内の destroy

init

public void init(ActionServlet servlet,
                 ModuleConfig config)
          throws javax.servlet.ServletException
インタフェース PlugIn の記述:

モジュールが起動する通知を受け取ります。

Receive notification that the specified module is being started up.

定義:
インタフェース PlugIn 内の init
パラメータ:
servlet - このウェッブアプリケーションの全てのモジュールを処理するActionServlet
@param servlet ActionServlet that is managing all the modules in this web application
config - このプラグインに関連付けられたモジュールのModuleConfig
@param config ModuleConfig for the module with which this plug-in is associated
例外:
javax.servlet.ServletException - このPlugInの初期化が成功できなかった場合
@exception ServletException if this PlugIn 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.

パラメータ:
message - The message to be logged

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.



このドキュメントは、Ja-Jakartaにより訳されました。コメントがある場合は、report@jajakarta.orgまでお願いします。
Copyright (C) 2000-2004 - Apache Software Foundation