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.container.creator;
17
18 import org.seasar.framework.container.ComponentCreator;
19 import org.seasar.framework.container.ComponentCustomizer;
20 import org.seasar.framework.container.creator.ComponentCreatorImpl;
21 import org.seasar.framework.container.deployer.InstanceDefFactory;
22 import org.seasar.framework.convention.NamingConvention;
23
24 /**
25 * Formクラス用の {@link ComponentCreator}です。
26 * <P>
27 * 決められた命名規約に従って、クラスからFormクラスのコンポーネント定義を作成します。 作成されるコンポーネント定義の各種属性は以下になります。
28 *
29 * <table>
30 * <tr>
31 * <th>サフィックス</th>
32 * <td>Form</td>
33 * </tr>
34 * <tr>
35 * <th>インスタンス定義</th>
36 * <td>PROTOTYPE</td>
37 * </tr>
38 * <tr>
39 * <th>自動バインディング</th>
40 * <td>auto</td>
41 * </tr>
42 * <tr>
43 * <th>外部バインディング</th>
44 * <td>無効</td>
45 * </tr>
46 * <tr>
47 * <th>インターフェース</th>
48 * <td>対象外</td>
49 * </tr>
50 * <tr>
51 * <th>抽象クラス</th>
52 * <td>対象外</td>
53 * </tr>
54 * </table>
55 * </p>
56 *
57 * @author y.suggami
58 *
59 */
60 public class UrumaFormCreator extends ComponentCreatorImpl {
61
62 /**
63 * 指定された{@link NamingConvention 命名規約}に従った{@link UrumaFormCreator}を作成します。
64 *
65 * @param namingConvention
66 * 命名規約
67 */
68 public UrumaFormCreator(final NamingConvention namingConvention) {
69 super(namingConvention);
70 setNameSuffix("Form");
71 setInstanceDef(InstanceDefFactory.PROTOTYPE);
72 }
73
74 /**
75 * {@link ComponentCustomizer}を返します。
76 *
77 * @return コンポーネントカスタマイザ
78 */
79 public ComponentCustomizer getActionCustomizer() {
80 return getCustomizer();
81 }
82
83 /**
84 * {@link ComponentCustomizer}を設定します。
85 *
86 * @param customizer
87 * コンポーネントカスタマイザ
88 */
89 public void setActionCustomizer(final ComponentCustomizer customizer) {
90 setCustomizer(customizer);
91 }
92 }