com.infoteria.asteria.flowengine2.flow
Class Component

java.lang.Object
  |
  +--com.infoteria.asteria.flowengine2.flow.Component
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
SimpleBranchComponent, SimpleComponent

public abstract class Component
extends java.lang.Object
implements java.lang.Cloneable

コンポーネントの基底クラス
すべてのコンポーネントに共通のプロパティとして「ExecuteCount」が最初から登録されています。


Field Summary
static int LOOP_CONTINUE
          executeLoopの返り値のシンボル、Loop処理を実行し、Loopは継続する
static int LOOP_END
          executeLoopの返り値のシンボル、Loop処理を実行し、Loopは終了した
static int LOOP_NOTHING
          executeLoopの返り値のシンボル、Loop処理を実行されなかった
static java.lang.String STATE_DEFAULT
          デフォルトの出力State
 
Constructor Summary
protected Component()
          コンストラクタ
 
Method Summary
 boolean cancel()
          コンポーネントのキャンセル処理を記述します。
キャンセル処理が正しく行えた場合はtrueを返します。
(デフォルトの実装では常にfalseを返します。)
 void checkLicense()
          ライセンスチェック処理を実装します。
3rdパーティー製のコンポーネントでライセンスチェックを実装する場合はこのメソッドをオーバーライドします。
 java.lang.Object clone()
          コンポーネントの複製を返します。
このメソッドは Class#newInstanceメソッドを用いて実装されています。
 void commit(ExecuteContext context)
          コミットの実行コードを記述します
 void endFlow(ExecuteContext context)
          個別のフロー実行終了時の処理を記述します
 void endFlow(ExecuteContext context, boolean abort)
          個別のフロー実行終了時の処理を記述します
 void endLoop(ExecuteContext context)
          ループ処理の終了時の処理を記述します
abstract  boolean execute(ExecuteContext context)
          コンポーネントの実行コードを記述します
 int executeLoop(ExecuteContext context)
          ループ処理の実行コードを記述します
protected  ComponentCompiler getCompiler()
          コンポーネントコンパイラを返します。
標準のコンパイラではなく自作のコンパイラを使用する場合はオーバーライドします。
abstract  ComponentEntrance getComponentEntrance()
          入力コネクタセットを取得します
abstract  ComponentExit getComponentExit(java.lang.String state)
          stateに対応する出力コネクタセットを取得します
 java.lang.String getComponentLibPath()
          [DATA_DIR]/system/lib/componentsフォルダーのパスを返します。
abstract  java.lang.String getComponentName()
          コンポーネントの登録名を取得します
 java.lang.String getConfPath()
          [DATA_DIR]/system/confフォルダーのパスを返します。
 java.lang.String getDataPath()
          [DATA_DIR]フォルダーのパスを返します。
 long getExecuteCount()
          コンポーネントの実行回数を返します。
 java.lang.String getFlowlibPath()
          Deprecated. getComponentLibPath()を使用してください。
 java.lang.String getFullName()
          プロジェクト名、フロー名を含む完全なコンポーネント名を取得します
 StreamDataObject getIgnoreThroughStream()
          エラー処理として「エラーを無視する」を選択した場合に出力するストリームを返します。
デフォルトではfalseを返します。
 java.lang.String getLicensePath()
          [DATA_DIR]/system/licenseフォルダーのパスを返します。
 java.lang.String getMessage(java.lang.String key)
          コンポーネント定義ファイルに定義したMessageを取得します。
 java.lang.String getMessage(java.lang.String key, java.lang.Object o1)
          パラメータを置換してコンポーネント定義ファイルに定義したMessageを取得します。
 java.lang.String getMessage(java.lang.String key, java.lang.Object o1, java.lang.Object o2)
          パラメータを置換してコンポーネント定義ファイルに定義したMessageを取得します。
 java.lang.String getMessage(java.lang.String key, java.lang.Object o1, java.lang.Object o2, java.lang.Object o3)
          パラメータを置換してコンポーネント定義ファイルに定義したMessageを取得します。
protected  java.lang.String getMessageResource(java.lang.String cname, java.lang.String key)
          ComponentManagerからメッセージリソースを取得します。
 java.lang.String getName()
          コンポーネント名を取得します
 Property getProperty(int index)
          indexに対応するプロパティを取得します
 Property getProperty(java.lang.String name)
          nameに対応するプロパティを取得します
 int getPropertyCount()
          登録されたプロパティの数を返します
 java.io.File getResourceAsFile(ResourceFile rf)
          指定したリソースファイルのファイルオブジェクトを返します。
 java.io.InputStream getResourceAsStream(ResourceFile rf)
          指定したリソースファイルの入力ストリームを返します。
 java.lang.String getState()
          コンポーネントの出力Stateを取得します
コンポーネントは出力Stateごとに出力先を変更することができます。
abstract  java.lang.String[] getStateArray()
          全ての出力Stateの配列を取得します
 boolean hasProperty(java.lang.String name)
          nameに対応するプロパティが存在する場合はtrue、存在しない場合はfalseを返します
 void init(ExecuteContext context)
          初期化処理を記述します
 void internalInit()
          コンポーネントの登録時に最初に1度だけ呼び出される初期化メソッドです。
例えば、カスタムコンポーネントでコネクションプールを実装する場合に、 コネクションプールを初期化する処理を記述するのにこのメソッドが利用できます。
 boolean isBreakPoint()
          このコンポーネントにブレイクポイントが設定されている場合trueを返します。
 boolean loopPossibility()
          このコンポーネントがループを生成する可能性がある場合は trueを返すようにオーバーライドします。
デフォルトではfalseを返します。
 PluginResponse pluginCall(TestContext context, PluginRequest request)
          プラグインから実行できるコールバックメソッドです。
registerPluginCallReceiverClass(Class)でReceiverクラスを登録した場合は特に実装する必要はありません。
protected  void preClone(Component c)
          clone実行後に最初に実行されるコールバックメソッドです。
必要に応じてオーバーライドします。
protected  void registerPluginCallReceiverClass(java.lang.Class clazz)
          pluginCall(com.infoteria.asteria.flowengine2.execute.TestContext, com.infoteria.asteria.flowengine2.soap.PluginRequest)で使用するReceiverクラスを登録します。
protected  void registerProperty(Property property)
          コンポーネントにプロパティを登録します
protected  void registerProperty(Property[] properties)
          コンポーネントにプロパティを登録します
protected  void registPriperty(Property[] properties)
          Deprecated. 代わりにregisterProperty(Property...)を使用してください。
protected  void registProperty(Property property)
          Deprecated. 代わりにregisterProperty(com.infoteria.asteria.flowlibrary2.property.Property)を使用してください。
protected  void registProperty(Property[] properties)
          Deprecated. 代わりにregisterProperty(Property...)を使用してください。
protected  void release()
          このコンポーネントに繋がるリンクを全て解除します
protected  boolean releaseComponentExit(java.lang.String state)
          このコンポーネントに繋がるリンクを全て解除します
 void resetMacro()
          プロパティ式をリセットします。
 void rollback(ExecuteContext context)
          ロールバックの実行コードを記述します
 void setExceptionParam(FlowException e)
          コンポーネント実行中にExceptionが発生した場合に呼び出されるメソッドです。
Exceptionに対してExceptionParamを設定する場合はオーバーライドして引数のExceptionに対してExceptionParamを設定します。
 void term(ExecuteContext context)
          終了処理を記述します
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATE_DEFAULT

public static final java.lang.String STATE_DEFAULT
デフォルトの出力State

LOOP_END

public static final int LOOP_END
executeLoopの返り値のシンボル、Loop処理を実行し、Loopは終了した

LOOP_CONTINUE

public static final int LOOP_CONTINUE
executeLoopの返り値のシンボル、Loop処理を実行し、Loopは継続する

LOOP_NOTHING

public static final int LOOP_NOTHING
executeLoopの返り値のシンボル、Loop処理を実行されなかった
Constructor Detail

Component

protected Component()
コンストラクタ
Method Detail

getComponentName

public abstract java.lang.String getComponentName()
コンポーネントの登録名を取得します

getState

public java.lang.String getState()
コンポーネントの出力Stateを取得します
コンポーネントは出力Stateごとに出力先を変更することができます。

getComponentEntrance

public abstract ComponentEntrance getComponentEntrance()
入力コネクタセットを取得します

getComponentExit

public abstract ComponentExit getComponentExit(java.lang.String state)
stateに対応する出力コネクタセットを取得します

getStateArray

public abstract java.lang.String[] getStateArray()
全ての出力Stateの配列を取得します

getName

public java.lang.String getName()
コンポーネント名を取得します

getFullName

public java.lang.String getFullName()
プロジェクト名、フロー名を含む完全なコンポーネント名を取得します

execute

public abstract boolean execute(ExecuteContext context)
                         throws FlowException
コンポーネントの実行コードを記述します

executeLoop

public int executeLoop(ExecuteContext context)
                throws FlowException
ループ処理の実行コードを記述します

commit

public void commit(ExecuteContext context)
            throws FlowException
コミットの実行コードを記述します

rollback

public void rollback(ExecuteContext context)
              throws FlowException
ロールバックの実行コードを記述します

internalInit

public void internalInit()
コンポーネントの登録時に最初に1度だけ呼び出される初期化メソッドです。
例えば、カスタムコンポーネントでコネクションプールを実装する場合に、 コネクションプールを初期化する処理を記述するのにこのメソッドが利用できます。

init

public void init(ExecuteContext context)
          throws FlowException
初期化処理を記述します

endLoop

public void endLoop(ExecuteContext context)
             throws FlowException
ループ処理の終了時の処理を記述します

endFlow

public void endFlow(ExecuteContext context)
個別のフロー実行終了時の処理を記述します

endFlow

public void endFlow(ExecuteContext context,
                    boolean abort)
個別のフロー実行終了時の処理を記述します

term

public void term(ExecuteContext context)
終了処理を記述します

cancel

public boolean cancel()
コンポーネントのキャンセル処理を記述します。
キャンセル処理が正しく行えた場合はtrueを返します。
(デフォルトの実装では常にfalseを返します。)

loopPossibility

public boolean loopPossibility()
このコンポーネントがループを生成する可能性がある場合は trueを返すようにオーバーライドします。
デフォルトではfalseを返します。

registProperty

protected void registProperty(Property property)
Deprecated. 代わりにregisterProperty(com.infoteria.asteria.flowlibrary2.property.Property)を使用してください。

コンポーネントにプロパティを登録します

registerProperty

protected void registerProperty(Property property)
コンポーネントにプロパティを登録します
Parameters:
property - 登録するプロパティ

registPriperty

protected void registPriperty(Property[] properties)
Deprecated. 代わりにregisterProperty(Property...)を使用してください。

コンポーネントにプロパティを登録します

registProperty

protected void registProperty(Property[] properties)
Deprecated. 代わりにregisterProperty(Property...)を使用してください。

コンポーネントにプロパティを登録します

registerProperty

protected void registerProperty(Property[] properties)
コンポーネントにプロパティを登録します

getProperty

public Property getProperty(java.lang.String name)
nameに対応するプロパティを取得します

hasProperty

public boolean hasProperty(java.lang.String name)
nameに対応するプロパティが存在する場合はtrue、存在しない場合はfalseを返します

getPropertyCount

public int getPropertyCount()
登録されたプロパティの数を返します

getProperty

public Property getProperty(int index)
indexに対応するプロパティを取得します

setExceptionParam

public void setExceptionParam(FlowException e)
コンポーネント実行中にExceptionが発生した場合に呼び出されるメソッドです。
Exceptionに対してExceptionParamを設定する場合はオーバーライドして引数のExceptionに対してExceptionParamを設定します。

getMessageResource

protected java.lang.String getMessageResource(java.lang.String cname,
                                              java.lang.String key)
ComponentManagerからメッセージリソースを取得します。

getMessage

public java.lang.String getMessage(java.lang.String key)
コンポーネント定義ファイルに定義したMessageを取得します。

getMessage

public java.lang.String getMessage(java.lang.String key,
                                   java.lang.Object o1)
パラメータを置換してコンポーネント定義ファイルに定義したMessageを取得します。

getMessage

public java.lang.String getMessage(java.lang.String key,
                                   java.lang.Object o1,
                                   java.lang.Object o2)
パラメータを置換してコンポーネント定義ファイルに定義したMessageを取得します。

getMessage

public java.lang.String getMessage(java.lang.String key,
                                   java.lang.Object o1,
                                   java.lang.Object o2,
                                   java.lang.Object o3)
パラメータを置換してコンポーネント定義ファイルに定義したMessageを取得します。

preClone

protected void preClone(Component c)
clone実行後に最初に実行されるコールバックメソッドです。
必要に応じてオーバーライドします。

clone

public java.lang.Object clone()
コンポーネントの複製を返します。
このメソッドは Class#newInstanceメソッドを用いて実装されています。
Overrides:
clone in class java.lang.Object

release

protected void release()
このコンポーネントに繋がるリンクを全て解除します

releaseComponentExit

protected boolean releaseComponentExit(java.lang.String state)
このコンポーネントに繋がるリンクを全て解除します

getCompiler

protected ComponentCompiler getCompiler()
コンポーネントコンパイラを返します。
標準のコンパイラではなく自作のコンパイラを使用する場合はオーバーライドします。

getExecuteCount

public long getExecuteCount()
コンポーネントの実行回数を返します。

checkLicense

public void checkLicense()
                  throws LicenseException
ライセンスチェック処理を実装します。
3rdパーティー製のコンポーネントでライセンスチェックを実装する場合はこのメソッドをオーバーライドします。
Throws:
LicenseException - ライセンスチェックでエラーとなった場合

isBreakPoint

public boolean isBreakPoint()
このコンポーネントにブレイクポイントが設定されている場合trueを返します。

registerPluginCallReceiverClass

protected void registerPluginCallReceiverClass(java.lang.Class clazz)
pluginCall(com.infoteria.asteria.flowengine2.execute.TestContext, com.infoteria.asteria.flowengine2.soap.PluginRequest)で使用するReceiverクラスを登録します。
Parameters:
clazz - Receiverクラス

pluginCall

public PluginResponse pluginCall(TestContext context,
                                 PluginRequest request)
                          throws FlowException
プラグインから実行できるコールバックメソッドです。
registerPluginCallReceiverClass(Class)でReceiverクラスを登録した場合は特に実装する必要はありません。

getIgnoreThroughStream

public StreamDataObject getIgnoreThroughStream()
                                        throws StreamException
エラー処理として「エラーを無視する」を選択した場合に出力するストリームを返します。
デフォルトではfalseを返します。

resetMacro

public void resetMacro()
プロパティ式をリセットします。

getFlowlibPath

public java.lang.String getFlowlibPath()
Deprecated. getComponentLibPath()を使用してください。

[DATA_DIR]/system/lib/componentsフォルダーのパスを返します。
Returns:
componentsフォルダーのパス

getComponentLibPath

public java.lang.String getComponentLibPath()
[DATA_DIR]/system/lib/componentsフォルダーのパスを返します。
Returns:
componentsフォルダーのパス

getDataPath

public java.lang.String getDataPath()
[DATA_DIR]フォルダーのパスを返します。
Returns:
[DATA_DIR]フォルダーのパス

getConfPath

public java.lang.String getConfPath()
[DATA_DIR]/system/confフォルダーのパスを返します。
Returns:
confフォルダーのパス

getLicensePath

public java.lang.String getLicensePath()
[DATA_DIR]/system/licenseフォルダーのパスを返します。
Returns:
licenseフォルダーのパス

getResourceAsStream

public java.io.InputStream getResourceAsStream(ResourceFile rf)
                                        throws java.io.IOException
指定したリソースファイルの入力ストリームを返します。
Parameters:
rf - リソースファイル
Returns:
リソースファイルの入力ストリーム
Throws:
java.io.IOException -  

getResourceAsFile

public java.io.File getResourceAsFile(ResourceFile rf)
指定したリソースファイルのファイルオブジェクトを返します。
Parameters:
rf - リソースファイル
Returns:
リソースファイルのファイルオブジェクト