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 * Logicクラス用の {@link ComponentCreator}です。
26 * <P>
27 * 決められた命名規約に従って、クラスからLogicクラスのコンポーネント定義を作成します。 作成されるコンポーネント定義の各種属性は以下になります。
28 *
29 * <table>
30 * <tr>
31 * <th>サフィックス</th>
32 * <td>{@link NamingConvention#getLogicSuffix() Logic(デフォルト)}</td>
33 * </tr>
34 * <tr>
35 * <th>インスタンス定義</th>
36 * <td>SINGLETON</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 UrumaLogicCreator extends ComponentCreatorImpl {
61
62 /**
63 * 指定された{@link NamingConvention 命名規約}に従った{@link UrumaProviderCreator}を作成します。
64 *
65 * @param namingConvention
66 */
67 public UrumaLogicCreator(final NamingConvention namingConvention) {
68 super(namingConvention);
69 setNameSuffix(namingConvention.getLogicSuffix());
70 setInstanceDef(InstanceDefFactory.SINGLETON);
71 }
72
73 /**
74 * {@link ComponentCustomizer}を返します。
75 *
76 * @return コンポーネントカスタマイザ
77 */
78 public ComponentCustomizer getLogicCustomizer() {
79 return getCustomizer();
80 }
81
82 /**
83 * {@link ComponentCustomizer}を設定します。
84 *
85 * @param customizer
86 * コンポーネントカスタマイザ
87 */
88 public void setLogicCustomizer(final ComponentCustomizer customizer) {
89 setCustomizer(customizer);
90 }
91 }