|
intra-mart(R) 5.0 |
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object jp.co.intra_mart.foundation.sap.common.general_purpose.BapiController
BAPIコントローラクラス
機能は以下の通り
コンストラクタの概要 | |
BapiController(String propertyName)
プロパティファイル名のメンバ変数への設定、プロパティファイルの読込と 各PropertyListの生成処理を行います。 |
|
BapiController(String propertyName,
ConnectionManager connectionManager)
コネクションマネージャのセット、 プロパティファイル名のメンバ変数への設定、プロパティファイルの読込と 各PropertyListの生成処理を行います。 |
メソッドの概要 | |
void |
clear()
セットしたパラメータ、ストラクチャ、テーブル、BAPIの実行結果をクリアします。 |
void |
executeBapi()
BAPI実行部のメソッド。JCO.Connectionを生成し、JCO.Functionの生成、 BAPI引渡しパラメータの生成を行いBAPI実行を行います。またBAPI実行結果から BapiHashオブジェクトの生成とBapiHashListへの追加、 BapiReturnオブジェクトの生成とBapiReturnListへの追加を行います。 なお、このクラスのコンストラクタ呼び出し時にConnectionManagerを指定した場合、 トランザクション処理は自動的に実行されません。 |
ArrayList |
getBapiHashList()
BapiHashの一覧を取得します。 |
ArrayList |
getBapiReturnList()
BapiReturnの一覧を取得します。 |
String |
getErrMessage()
BAPIの実行結果でBapiReturnのType情報が正常("S" / "")以外のBapiReturn オブジェクトのメッセージ情報を全て返します。 |
ArrayList |
getExpExpList()
プロパティ情報(export(Export))の一覧を取得します。 |
String |
getExportParam(String propKey)
export(Export)情報を返します。 |
ArrayList |
getExpStrList()
プロパティ情報(structure(Export))の一覧を取得します。 |
ArrayList |
getExpTblList()
プロパティ情報(table(Export))の一覧を取得します。 |
ArrayList |
getImpImpList()
プロパティ情報(import(Import))の一覧を取得します。 |
ArrayList |
getImpStrList()
プロパティ情報(structure(Import))一覧を取得します。 |
ArrayList |
getImpTblList()
プロパティ情報(table(Import))の一覧を取得します。 |
Properties |
getProperty()
プロパティファイル情報を取得します。 |
String |
getPropertyName()
プロパティファイル名を取得します。 |
BapiReturn |
getReturn()
BAPI実行結果を取得します。 |
Iterator |
getReturnList()
BAPI実行結果の一覧を取得します。 |
HashMap |
getStructureParam(String paramName)
structure(Export)情報を返します。 |
Iterator |
getTableParam(String paramName)
table(Export)情報を返します。 |
boolean |
isSuccess()
BAPI実行が正常に行われたか判定します。BAPI実行結果であるBapiReturn のType情報が正常("S" / "")であった場合"true"をそれ以外は"false"を返します。 |
void |
putImportParam(String key,
String val)
引数に指定された条件でBapiHashオブジェクト(入力/出力区分="import", パラメタ属性="import")を生成し、一覧に格納します。 |
void |
putStructParam(String key,
String val,
String structName)
引数に指定された条件でBapiHashオブジェクト(入力/出力区分="import", パラメタ属性="structure",パラメタ名=第3引数)を生成し、一覧に格納します。 |
void |
putTableParam(String key,
String val,
String tableName,
int recordNo)
引数に指定された条件でBapiHashオブジェクト(入力/出力区分="import", パラメタ属性="table",パラメタ名=第3引数,レコード番号=第4引数)を生成し、 一覧に格納します。 |
void |
setBapiHashList(ArrayList bapiHashList)
BapiHashの一覧を設定します。 |
void |
setBapiReturnList(ArrayList bapiReturnList)
BapiReturnの一覧を設定します。 |
void |
setExpExpList(ArrayList expExpList)
プロパティ情報(export(Export))の一覧を設定します。 |
void |
setExpStrList(ArrayList expStrList)
プロパティ情報(structure(Export))の一覧を設定します。 |
void |
setExpTblList(ArrayList expTblList)
プロパティ情報(table(Export))の一覧を設定します。 |
void |
setImpImpList(ArrayList impImpList)
プロパティ情報(import(Import))の一覧を設定します。 |
void |
setImpStrList(ArrayList impStrList)
プロパティ情報(structure(Import))の一覧を設定します。 |
void |
setImpTblList(ArrayList impTblList)
プロパティ情報(table(Import))の一覧を設定します。 |
void |
setProperty(Properties property)
プロパティファイル情報を設定します。 |
void |
setPropertyName(String propertyName)
プロパティファイル名を設定します。 |
String |
toString()
デバッグ用のメソッドです。 |
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
コンストラクタの詳細 |
public BapiController(String propertyName, ConnectionManager connectionManager) throws SAPGeneralSystemException, SAPAuthSystemException, SAPGeneralAppException
propertyName
- BAPIコントローラが使用するプロパティファイル名connectionManager
- コネクション管理オブジェクト
SAPGeneralSystemException
- 汎用系システム例外処理
SAPAuthSystemException
- 認証系システム例外処理
SAPGeneralAppException
- 汎用系アプリケーション例外public BapiController(String propertyName) throws SAPGeneralSystemException, SAPAuthSystemException, SAPGeneralAppException
propertyName
- BAPIコントローラが使用するプロパティファイル名
SAPGeneralSystemException
- 汎用系システム例外処理
SAPAuthSystemException
- 認証系システム例外処理
SAPGeneralAppException
- 汎用系アプリケーション例外メソッドの詳細 |
public void putImportParam(String key, String val) throws SAPGeneralSystemException, SAPGeneralAppException
key
- BapiHashに設定するHashMapのキーval
- BapiHashに設定するHashMapの値
SAPGeneralSystemException
- 汎用系システム例外処理
SAPGeneralAppException
- 汎用系アプリケーション例外処理public void putStructParam(String key, String val, String structName) throws SAPGeneralSystemException, SAPGeneralAppException
key
- BapiHashに設定するHashMapのキーval
- BapiHashに設定するHashMapの値structName
- BapiHashに設定するparamTypeの値
SAPGeneralSystemException
- 汎用系システム例外処理
SAPGeneralAppException
- 汎用系アプリケーション例外処理public void putTableParam(String key, String val, String tableName, int recordNo) throws SAPGeneralSystemException, SAPGeneralAppException
key
- BapiHashに設定するHashMapのキーval
- BapiHashに設定するHashMapの値tableName
- BapiHashに設定するparamTypeの値recordNo
- BapiHashに設定するrecordNoの値
SAPGeneralSystemException
- 汎用系システム例外処理
SAPGeneralAppException
- 汎用系アプリケーション例外処理public void executeBapi() throws SAPGeneralSystemException, SAPGeneralAppException, SAPAuthSystemException, SAPAuthAppException
SAPGeneralSystemException
- 汎用系システム例外処理
SAPAuthSystemException
- 認証系システム例外処理
SAPGeneralAppException
- 汎用系アプリケーション例外処理
SAPAuthAppException
- 認証系アプリケーション例外処理public boolean isSuccess() throws SAPGeneralSystemException
SAPGeneralSystemException
- 汎用系システム例外処理public String getErrMessage() throws SAPGeneralSystemException
SAPGeneralSystemException
- 汎用系システム例外処理public String getExportParam(String propKey) throws SAPGeneralSystemException
propKey
- 検索条件となるPropertyKey
SAPGeneralSystemException
- 汎用系システム例外処理public HashMap getStructureParam(String paramName) throws SAPGeneralSystemException
paramName
- 検索条件となるParamName
SAPGeneralSystemException
- 汎用系システム例外処理public Iterator getTableParam(String paramName) throws SAPGeneralSystemException
paramName
- 検索条件となるParamName
SAPGeneralSystemException
- 汎用系システム例外処理public Iterator getReturnList()
public BapiReturn getReturn()
public ArrayList getBapiHashList()
public Properties getProperty()
public String getPropertyName()
public ArrayList getImpImpList()
public ArrayList getImpStrList()
public ArrayList getImpTblList()
public ArrayList getExpExpList()
public ArrayList getExpStrList()
public ArrayList getExpTblList()
public ArrayList getBapiReturnList()
public void setBapiHashList(ArrayList bapiHashList)
bapiHashList
- BapiHashListpublic void setProperty(Properties property)
property
- Propertypublic void setPropertyName(String propertyName)
propertyName
- propertyNamepublic void setImpImpList(ArrayList impImpList)
impImpList
- impImpListpublic void setImpStrList(ArrayList impStrList)
impStrList
- impStrListpublic void setImpTblList(ArrayList impTblList)
impTblList
- impTblListpublic void setExpExpList(ArrayList expExpList)
expExpList
- expExpListpublic void setExpStrList(ArrayList expStrList)
expStrList
- expStrListpublic void setExpTblList(ArrayList expTblList)
expTblList
- expTblListpublic void setBapiReturnList(ArrayList bapiReturnList)
bapiReturnList
- bapiReturnListpublic String toString()
public void clear()
セットしたパラメータ、ストラクチャ、テーブル、BAPIの実行結果をクリアします。
BapiControllerを複数回使用する場合、一度putImportParam()などを実行した後に 同じパラメータをセットする前に実行する必要があります。
実行例は次のようになります。
BapiController bapiController = new BapiController(...); bapiController.putImportParam(...); bapiController.putStructParam(...); ... executeBapi(); //クリア bapiController.clear(); //BapiControllerを再利用する bapiController.putImportParam(...); bapiController.putStructParam(...); ... executeBapi();
|
intra-mart(R) 5.0 |
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |