info.dragonlady.scriptlet
クラス ESEngine

java.lang.Object
  上位を拡張 info.dragonlady.scriptlet.ESEngine

public class ESEngine
extends java.lang.Object

サーバサイドスクリプトの初期読み込み、およびシリンダの実行要求を行う、
フレームワークの中核クラス
Scriptletクラスからは、必ずexecuteScript関数を呼出す必要があります。

作成者:
nobu

フィールドの概要
protected static java.lang.String bodyTagOnloadAttrPt
           
protected  java.io.StringWriter bufferWriter
           
protected  java.lang.String contentCharcode
           
protected static java.lang.String defaultScriptletCharcode
           
static java.lang.String defaultScriptletName
           
protected static java.lang.String scriptLoadAttrPt
           
protected static java.lang.String serverScriptEndTag
           
protected static java.lang.String serverScriptTag
           
protected static java.lang.String serverValidationEndTag
           
protected static java.lang.String serverValidationTag
           
 
メソッドの概要
protected  info.dragonlady.scriptlet.ESEngine.HtmlParser craeteHtmlParser(ESCylinder cylinder)
          内部非公開クラスHtmlParserを生成する関数
protected static java.lang.String createOnLoadScript(Scriptlet scriptlet, java.lang.String fileName, java.lang.String functionName)
          BodyタグのOnLoadイベント用のスクリプトテンプレートを生成する関数
protected  void directoryReflexive(java.lang.String absolutePath, java.io.File dir)
           
protected static java.lang.String escape(java.lang.String target)
          HTMLエスケープ
static void exceptionProc(Scriptlet scriptlet, java.lang.Exception e)
          エラー処理時のスクリプトを実行する関数
例外発生時のスクリプトファイル名:サーブレット名_error.ses
サーブレット名はweb.xmlに定義されたurl-pattern要素内の値
static void executeScript(Scriptlet scriptlet)
          サーバサイドスクリプトを実行する関数
初期化時のスクリプトファイル名:サーブレット名_init.ses
処理実行時のスクリプトファイル名:サーブレット名_exec.ses
例外発生時のスクリプトファイル名:サーブレット名_error.ses
サーブレット名はweb.xmlに定義されたurl-pattern要素内の値
 java.lang.String getContentCharcode()
          スクリプトレットの文字コードを応答する デフォルトはUTF-8
 java.lang.String getScriptletDirPath()
          スクリプトの格納パスを応答する関数
protected  void initialize(java.lang.String basePath)
          このクラスのインスタンス生成時に一度だけ実行される初期化関数
protected  java.lang.String loadScript(java.io.File file)
          サーバサイドスクリプトを読み込む関数
protected static void print(org.w3c.dom.Node node, java.lang.StringBuffer buffer)
          XML(DOM)の文字列表現を作成する。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

serverScriptTag

protected static final java.lang.String serverScriptTag
関連項目:
定数フィールド値

serverValidationTag

protected static final java.lang.String serverValidationTag
関連項目:
定数フィールド値

serverScriptEndTag

protected static final java.lang.String serverScriptEndTag
関連項目:
定数フィールド値

serverValidationEndTag

protected static final java.lang.String serverValidationEndTag
関連項目:
定数フィールド値

bodyTagOnloadAttrPt

protected static final java.lang.String bodyTagOnloadAttrPt
関連項目:
定数フィールド値

scriptLoadAttrPt

protected static final java.lang.String scriptLoadAttrPt
関連項目:
定数フィールド値

defaultScriptletCharcode

protected static final java.lang.String defaultScriptletCharcode
関連項目:
定数フィールド値

contentCharcode

protected java.lang.String contentCharcode

bufferWriter

protected java.io.StringWriter bufferWriter

defaultScriptletName

public static final java.lang.String defaultScriptletName
関連項目:
定数フィールド値
メソッドの詳細

craeteHtmlParser

protected final info.dragonlady.scriptlet.ESEngine.HtmlParser craeteHtmlParser(ESCylinder cylinder)
                                                                        throws java.io.IOException
内部非公開クラスHtmlParserを生成する関数

パラメータ:
cylinder:生成したシリンダ -
scriptlet:呼び出し元のスクリプトレット -
例外:
java.io.IOException

loadScript

protected final java.lang.String loadScript(java.io.File file)
                                     throws java.io.FileNotFoundException,
                                            java.io.IOException
サーバサイドスクリプトを読み込む関数

パラメータ:
file:サーバサイドスクリプトのファイル -
例外:
java.io.FileNotFoundException
java.io.IOException

initialize

protected void initialize(java.lang.String basePath)
                   throws java.io.FileNotFoundException,
                          java.io.IOException
このクラスのインスタンス生成時に一度だけ実行される初期化関数

パラメータ:
basePath:サーバサイドスクリプトの格納パス -
例外:
java.io.FileNotFoundException
java.io.IOException

directoryReflexive

protected void directoryReflexive(java.lang.String absolutePath,
                                  java.io.File dir)
                           throws java.io.FileNotFoundException,
                                  java.io.IOException
パラメータ:
absolutePath -
dir -
例外:
java.io.FileNotFoundException
java.io.IOException

createOnLoadScript

protected static java.lang.String createOnLoadScript(Scriptlet scriptlet,
                                                     java.lang.String fileName,
                                                     java.lang.String functionName)
                                              throws java.util.InvalidPropertiesFormatException,
                                                     java.io.FileNotFoundException,
                                                     java.io.IOException
BodyタグのOnLoadイベント用のスクリプトテンプレートを生成する関数

パラメータ:
scriptlet -
fileName -
functionName -
戻り値:
例外:
java.util.InvalidPropertiesFormatException
java.io.FileNotFoundException
java.io.IOException

getContentCharcode

public java.lang.String getContentCharcode()
スクリプトレットの文字コードを応答する デフォルトはUTF-8

戻り値:

executeScript

public static void executeScript(Scriptlet scriptlet)
                          throws ESException
サーバサイドスクリプトを実行する関数
初期化時のスクリプトファイル名:サーブレット名_init.ses
処理実行時のスクリプトファイル名:サーブレット名_exec.ses
例外発生時のスクリプトファイル名:サーブレット名_error.ses
サーブレット名はweb.xmlに定義されたurl-pattern要素内の値

パラメータ:
scriptlet:呼び出し元のスクリプトレット -
例外:
ESException

getScriptletDirPath

public java.lang.String getScriptletDirPath()
スクリプトの格納パスを応答する関数

戻り値:

exceptionProc

public static void exceptionProc(Scriptlet scriptlet,
                                 java.lang.Exception e)
                          throws ESException
エラー処理時のスクリプトを実行する関数
例外発生時のスクリプトファイル名:サーブレット名_error.ses
サーブレット名はweb.xmlに定義されたurl-pattern要素内の値

パラメータ:
scriptlet:呼び出し元のスクリプトレット -
e:スクリプトに渡したい例外オブジェクト -
例外:
ESException

print

protected static void print(org.w3c.dom.Node node,
                            java.lang.StringBuffer buffer)
XML(DOM)の文字列表現を作成する。

パラメータ:
node:文字列表現にするDOMオブジェクト -
buffer:文字列表現を格納するバッファ -

escape

protected static java.lang.String escape(java.lang.String target)
HTMLエスケープ

パラメータ:
target:テキストノードの内容 -