|
Woolpack API | |||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectwoolpack.action.ActionInvoker
public class ActionInvoker
アクションを実行するクラスです。
invoke(Object, String, Map)メソッドは、
アクションidに対するアクション定義を検索し、
root からActionDef.getComponentEL()でコンポーネントを取得し、
inputMap の値をコンポーネントに設定し、
root のメソッドActionDef.getMethodEL()を実行し、
実行結果にマッチする遷移先定義をActionDef.getForwardDefIterable()から検索します。
アクション定義に遷移先定義が見つからない場合、
コンストラクタ引数のForwardDefの一覧から遷移先定義を検索します。
適用しているデザインパターン:Template Method。
| コンストラクタの概要 | |
|---|---|
ActionInvoker(Fn<java.lang.String,ActionDef,java.lang.RuntimeException> switching,
ForwardDef... array)
|
|
ActionInvoker(Fn<java.lang.String,ActionDef,java.lang.RuntimeException> switching,
java.lang.Iterable<ForwardDef> iterable)
|
|
| メソッドの概要 | |
|---|---|
static ActionResult |
findId(java.lang.Iterable<ForwardDef> iterable,
java.lang.Object aReturnedObject)
遷移先定義を検索して実行結果を返します。 |
java.lang.Iterable<ForwardDef> |
getIterable()
|
Fn<java.lang.String,ActionDef,java.lang.RuntimeException> |
getSwitching()
|
protected void |
handleRuntimeException(java.lang.RuntimeException exception)
setValuesTo(Object, Map, ActionInvoker)が失敗した際に呼び出されます(called)。 |
ActionResult |
invoke(java.lang.Object root,
java.lang.String id,
java.util.Map inputMap)
アクションを実行します。 |
void |
setIterable(java.lang.Iterable<ForwardDef> iterable)
|
void |
setSwitching(Fn<java.lang.String,ActionDef,java.lang.RuntimeException> switching)
|
static void |
setValuesTo(java.lang.Object root,
java.util.Map inputMap,
ActionInvoker invoker)
inputMap の値を root に設定します。 |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
|---|
public ActionInvoker(Fn<java.lang.String,ActionDef,java.lang.RuntimeException> switching,
java.lang.Iterable<ForwardDef> iterable)
switching - アクション id とアクション定義の対応表。iterable - 遷移先定義の一覧。
public ActionInvoker(Fn<java.lang.String,ActionDef,java.lang.RuntimeException> switching,
ForwardDef... array)
switching - アクション id とアクション定義の対応表。array - 遷移先定義の一覧。| メソッドの詳細 |
|---|
public ActionResult invoke(java.lang.Object root,
java.lang.String id,
java.util.Map inputMap)
root - コンポーネントとメソッド検索の基点。id - アクション id。inputMap - 入力値のMap。ServletRequest.getParameterMap()
またはそれを
ValidatorUtils.convert(Map)
で変換した結果が渡されることを想定しています。
ForwardDefNotFoundRuntimeException - 該当する遷移先定義が見つからない場合。
public static void setValuesTo(java.lang.Object root,
java.util.Map inputMap,
ActionInvoker invoker)
root - 基点。null なら設定しません。inputMap - 設定する値のMap。
java.lang.NullPointerException - inputMap が null の場合。protected void handleRuntimeException(java.lang.RuntimeException exception)
setValuesTo(Object, Map, ActionInvoker)が失敗した際に呼び出されます(called)。
デフォルトは何もしません。
exception - setValuesTo(Object, Map, ActionInvoker)が失敗した際のエラーオブジェクト。
public static ActionResult findId(java.lang.Iterable<ForwardDef> iterable,
java.lang.Object aReturnedObject)
iterable - 遷移先定義の一覧。aReturnedObject - メソッドが返却したオブジェクト。
ForwardDefNotFoundRuntimeException - 該当する遷移先定義が見つからない場合。public java.lang.Iterable<ForwardDef> getIterable()
public void setIterable(java.lang.Iterable<ForwardDef> iterable)
public Fn<java.lang.String,ActionDef,java.lang.RuntimeException> getSwitching()
public void setSwitching(Fn<java.lang.String,ActionDef,java.lang.RuntimeException> switching)
|
Woolpack API | |||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||