Coverage Report - org.seasar.cubby.action.ActionContext
 
Classes in this File Line Coverage Branch Coverage Complexity
ActionContext
N/A
N/A
0
 
 1  
 /*
 2  
  * Copyright 2004-2009 the Seasar Foundation and the Others.
 3  
  *
 4  
  * Licensed under the Apache License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  *     http://www.apache.org/licenses/LICENSE-2.0
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 13  
  * either express or implied. See the License for the specific language
 14  
  * governing permissions and limitations under the License.
 15  
  */
 16  
 package org.seasar.cubby.action;
 17  
 
 18  
 import java.lang.reflect.Method;
 19  
 import java.util.Map;
 20  
 
 21  
 /**
 22  
  * アクションのコンテキストです。
 23  
  * 
 24  
  * @author baba
 25  
  * @since 2.0.0
 26  
  */
 27  
 public interface ActionContext {
 28  
 
 29  
         /**
 30  
          * アクションを取得します。
 31  
          * 
 32  
          * @return アクション
 33  
          */
 34  
         Object getAction();
 35  
 
 36  
         /**
 37  
          * アクションクラスを取得します。
 38  
          * 
 39  
          * @return アクションクラス
 40  
          */
 41  
         Class<?> getActionClass();
 42  
 
 43  
         /**
 44  
          * アクションメソッドを取得します。
 45  
          * 
 46  
          * @return アクションメソッド
 47  
          */
 48  
         Method getActionMethod();
 49  
 
 50  
         /**
 51  
          * 指定されたアクションからアクションメソッドに対応するフォームオブジェクトを取得します。
 52  
          * 
 53  
          * @return フォームオブジェクト
 54  
          * @throws ActionException
 55  
          *             &#064;Formでフォームオブジェクトとなるプロパティを指定しているが、そのプロパティが
 56  
          *             <code>null</code> だった場合
 57  
          */
 58  
         Object getFormBean();
 59  
 
 60  
         /**
 61  
          * フォームオブジェクトのすべてのプロパティに要求パラメータをバインドするかを示します。
 62  
          * 
 63  
          * @return フォームオブジェクトのすべてのプロパティに要求パラメータをバインドする場合は <code>true</code>
 64  
          *         、そうでない場合は <code>false</code>
 65  
          */
 66  
         boolean isBindRequestParameterToAllProperties();
 67  
 
 68  
         /**
 69  
          * アクションメソッドの実行前に呼ばれます。
 70  
          * <p>
 71  
          * {@link Action#invokeInitializeMethod(Method)} を呼び出します。
 72  
          * </p>
 73  
          */
 74  
         void invokeInitializeMethod();
 75  
 
 76  
         /**
 77  
          * フォーワードの直前に呼ばれます。
 78  
          * <p>
 79  
          * {@link Action#invokePreRenderMethod(Method)} を呼び出します。
 80  
          * </p>
 81  
          */
 82  
         void invokePreRenderMethod();
 83  
 
 84  
         /**
 85  
          * フォワードの直後に呼ばれます。
 86  
          * <p>
 87  
          * {@link Action#invokePostRenderMethod(Method)} を呼び出します。
 88  
          * </p>
 89  
          */
 90  
         void invokePostRenderMethod();
 91  
 
 92  
         /**
 93  
          * アクションエラーを取得します。
 94  
          * 
 95  
          * @return アクションエラー
 96  
          */
 97  
         ActionErrors getActionErrors();
 98  
 
 99  
         /**
 100  
          * 揮発性メッセージを取得します。
 101  
          * 
 102  
          * @return 揮発性メッセージ
 103  
          */
 104  
         Map<String, Object> getFlashMap();
 105  
 
 106  
         /**
 107  
          * 揮発性メッセージをクリアします。
 108  
          */
 109  
         void clearFlash();
 110  
 
 111  
 }