public class DBConfigEditorTag extends CommonTagSupport
DBConfig.xmlの編集を行うためのタグです。 自分自身のコンテキストのDBConfig.xmlの編集及び、ファイルパスを指定して他の コンテキストのDBConfig.xmlの編集を行うことができます。 編集タイプは、type属性により、「DBドライバークラス」と「DBIDの設定情報」の2つを 切り替えることができます。 また、このタグ自体の機能としては、「取得」、「保存」、「情報」に分離されています。 (1)取得(command="GET") type属性で指定された情報を読み取り、DBTableModel形式に変換し、セッションに登録します。 (tableIdは"DEFAULT"です) (2)保存(command="SET") セッションからDBTableModelを読み取り、type属性で指定された情報の形式にオブジェクト化し、 DBConfig.xmlに保存します。 (DBTableModelを取得するtableIdは"DEFAULT"です) 保存を実行すると、元のDBConfig.xmlファイルと同じ場所に、タイプスタンプ付きのバックアップ ファイルが自動的に作成されます。 また、xmlFile(DBConfig.xml)を指定しない状態で、保存(command="SET")を行うと、 内部にキャッシュしている接続情報は、一旦全てクリアされます。 (3)情報(command="INFO") DBID情報のキーとタイトルから、プルダウンメニューを作成するための情報を画面出力します。 この値を、valueタグで取込み、columnタグのcodeKeyVal変数にセットすれば、DBIDの選択メニューを 作成できます。開発用に接続先を切り替える処理等に使います。
●形式:<dbConfigEditor command="..." type="..." xmlFile="..." />
●body:なし
●Tag定義:
<og:dbConfigEditor
command 【TAG】DBConfig.xmlに対する操作のコマンド (GET/SET/INFO)を指定します(初期値:GET)
type 【TAG】DBConfig.xmlに対する操作のタイプ(DBID/CLASS)を指定します(初期値:DBID)
xmlFile 【TAG】編集を行うDBConfig.xmlのファイルのパスを指定します(初期値:自身のDBConfig.xml)
debug 【TAG】デバッグ情報を出力するかどうか[true/false]を指定します(初期値:false)
/>
●使用例
・取得
<dbConfigEditor command="GET" type="{@TYPE}" xmlFile="{@DBCXML}" />
・保存
<dbConfigEditor command="SET" type="{@MEM.TYPE}" xmlFile="{@MEM.DBCXML}" />
・情報
<value command="SET" key="DBID_INFO" >
<dbConfigEditor command="INFO" />
</value>
<column name="DBID_INFO" codeKeyVal="{@DBID_INFO}" />BR, BUFFER_MIDDLE, CRbodyContentid, pageContextEVAL_BODY_BUFFERED, EVAL_BODY_TAGEVAL_BODY_AGAINEVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE| コンストラクタと説明 |
|---|
DBConfigEditorTag()
デフォルトコンストラクター
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
int |
doEndTag()
Taglibの終了タグが見つかったときに処理する doEndTag() を オーバーライドします。
|
int |
doStartTag()
Taglibの開始タグが見つかったときに処理する doStartTag() を オーバーライドします。
|
protected void |
release2()
タグリブオブジェクトをリリースします。
|
void |
setCommand(java.lang.String cmd)
【TAG】DBConfig.xmlに対する操作のコマンド (GET/SET/INFO)を指定します(初期値:GET)。
|
void |
setType(java.lang.String tp)
【TAG】DBConfig.xmlに対する操作のタイプ(DBID/CLASS)を指定します(初期値:DBID)。
|
void |
setXmlFile(java.lang.String file)
【TAG】編集を行うDBConfig.xmlのファイルのパスを指定します(初期値:自身のDBConfig.xml)。
|
java.lang.String |
toString()
このオブジェクトの文字列表現を返します。
|
add, add, addEventColumn, addEventColumn, check, commitTableObject, debugPrint, doAfterBody, doCatch, doFinally, get, getApplicationInfo, getAttributes, getBodyRawString, getBodyString, getContextAttribute, getContextPath, getCookie, getCSVParameter, getCSVParameter, getDataCondition, getDateFormat, getDBColumn, getDBFunctionName, getDocumentLink, getGUIInfo, getGUIInfoAttri, getHostName, getLabel, getLabelInterface, getLanguage, getLASTAttri, getLongLabel, getMsg, getMsglbl, getNVLAttri, getObject, getParameterNames, getParameterRows, getRequest, getRequestAttribute, getRequestCacheData, getRequestMethod, getRequestParameter, getRequestParameterValues, getRequestValue, getRequestValue, getRequestValues, getReservedParameter, getReservedValue, getResource, getSanitizedBodyString, getScope, getSessionAttribute, getSumRequestValue, getTagName, getTransaction, getUser, getUserEditInfo, getUserInfo, isAjaxSubmitRequest, isDebug, isNoTransitionRequest, isNull, jspPrint, makeUrl, removeContextAttribute, removeObject, removeRequestAttribute, removeSessionAttribute, set, setAjaxSubmitRequest, setCaseIf, setCaseKey, setCaseNN, setCaseNull, setCaseVal, setContextAttribute, setCookie, setDebug, setLanguage, setLbl, setNoTransitionRequest, setObject, setObject, setParameterNames, setParameterRows, setRequestAttribute, setRequestCacheData, setScope, setSessionAttribute, setUserInfo, startQueryTransaction, sys, sysBool, sysInt, useMainTrans, useQuotCheck, useTag, useXssCheckdoInitBody, getBodyContent, getPreviousOut, release, setBodyContentfindAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValueclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetParent, setPageContext, setParentpublic DBConfigEditorTag()
public int doStartTag()
doStartTag インタフェース内 TagdoStartTag クラス内 CommonTagSupportpublic int doEndTag()
doEndTag インタフェース内 TagdoEndTag クラス内 CommonTagSupportprotected void release2()
release2 クラス内 CommonTagSupportpublic void setCommand(java.lang.String cmd)
cmd - コマンドpublic void setType(java.lang.String tp)
tp - タイプpublic void setXmlFile(java.lang.String file)
file - DBConfig.xmlのファイルパスpublic java.lang.String toString()
toString クラス内 CommonTagSupportWebアプリケーションフレームワーク openGionCopyright (c) 2009 The openGion Project.