1 /*
2 * Copyright 2004-2008 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.uruma.desc;
17
18 import java.lang.reflect.Method;
19 import java.util.List;
20
21 import org.seasar.framework.beans.BeanDesc;
22 import org.seasar.uruma.annotation.InitializeMethod;
23 import org.seasar.uruma.annotation.PostOpenMethod;
24 import org.seasar.uruma.binding.context.ApplicationContextDef;
25 import org.seasar.uruma.binding.method.EventListenerDef;
26 import org.seasar.uruma.jobs.ProgressMonitor;
27
28 /**
29 * パートアクションクラスのメタデータを扱うためのインターフェースです。<br />
30 * パートアクションクラスは、ウィンドウパートで発生したイベントを処理するためのクラスで、POJO として実現されます。<br />
31 *
32 * @author y-komori
33 */
34 public interface PartActionDesc {
35 /**
36 * {@link InitializeMethod} アノテーションが付加されたメソッドを取得します。<br />
37 *
38 * @return {@link InitializeMethod} アノテーションが付加されたメソッド
39 */
40 public Method getInitializeMethod();
41
42 /**
43 * {@link InitializeMethod} アノテーションが付加されたメソッドを実行します。<br />
44 *
45 * @param target
46 * ターゲットオブジェクト
47 */
48 public void invokeInitializeMethod(Object target);
49
50 /**
51 * {@link PostOpenMethod} アノテーションが付加されたメソッドを取得します。<br />
52 *
53 * @return {@link PostOpenMethod} アノテーションが付加されたメソッド
54 */
55 public Method getPostOpenMethod();
56
57 /**
58 * {@link PostOpenMethod} アノテーションが付加されたメソッドを実行します。<br />
59 *
60 * @param target
61 * ターゲットオブジェクト
62 */
63 public void invokePostOpenMethod(Object target);
64
65 /**
66 * {@link EventListenerDef} のリストを取得します。<br />
67 *
68 * @return {@link EventListenerDef} のリスト
69 */
70 public List<EventListenerDef> getEventListenerDefList();
71
72 /**
73 * {@link ApplicationContextDef} のリストを取得します<br />
74 *
75 * @return {@link ApplicationContextDef} のリスト
76 */
77 public List<ApplicationContextDef> getApplicationContextDefList();
78
79 /**
80 * {@link Class} オブジェクトを取得します<br />
81 *
82 * @return {@link Class}
83 */
84 public Class<?> getPartActionClass();
85
86 /**
87 * {@link BeanDesc}を取得します<br />
88 *
89 * @return {@link BeanDesc}
90 */
91 public BeanDesc getBeanDesc();
92
93 /**
94 * パートアクションオブジェクトに {@link ProgressMonitor} をセットします。<br />
95 * セット対象は、パートアクションオブジェクトのプロパティのうち、 {@link ProgressMonitor}
96 * がセット可能なものの最初プロパティです。<br />
97 * セット対象のプロパティが存在しない場合は、なにも行いません。
98 *
99 * @param target
100 * パートアクションオブジェクト
101 * @param monitor
102 * {@link ProgressMonitor} オブジェクト
103 */
104 public void injectProgressMonitor(Object target, ProgressMonitor monitor);
105 }