KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > inversoft > verge > mvc > controller > actionflow > config > ActionFlowConfigFactory


1 /*
2  * Copyright (c) 2003, Inversoft
3  *
4  * This software is distribuable under the GNU Lesser General Public License.
5  * For more information visit gnu.org.
6  */

7 package com.inversoft.verge.mvc.controller.actionflow.config;
8
9
10 import com.inversoft.config.ConfigBuilder;
11 import com.inversoft.config.ConfigFactory;
12 import com.inversoft.config.ConfigRegistry;
13 import com.inversoft.config.ConfigurationException;
14
15
16 /**
17  * <p>
18  * This class is the main configuration factory for the
19  * ActionFlow system. This is used to construct the builders
20  * and registry objects for use with the ActionFlow system.
21  * </p>
22  *
23  * @author Brian Pontarelli
24  * @since 2.0
25  * @version 2.0
26  */

27 public class ActionFlowConfigFactory implements ConfigFactory {
28
29     /**
30      * The builder instance
31      */

32     private ActionFlowConfigBuilder builder;
33
34
35     /**
36      * Constructs a new <code>ActionFlowConfigFactory</code>
37      */

38     public ActionFlowConfigFactory() throws ConfigurationException {
39         builder = new ActionFlowConfigBuilder();
40     }
41
42
43     /**
44      * Returns the instance of the {@link ActionFlowConfigBuilder
45      * ActionFlowConfigBuilder} class, which is the same instance that is returned
46      * for every call to this method.
47      *
48      * @return A the instance of ActionFlowConfigBuilder
49      */

50     public ConfigBuilder createBuilder() {
51         return builder;
52     }
53
54     /**
55      * Returns a new instance of the {@link ActionFlowConfigRegistry
56      * ActionFlowConfigRegistry} class. This does not effect the current
57      * singleton instance until {@link
58      * ActionFlowConfigRegistry#setInstance(ActionFlowConfigRegistry)
59      * setInstance} is called.
60      *
61      *
62      * @return A new instance of ActionFlowConfigRegistry
63      */

64     public ConfigRegistry createRegistry() {
65         return new ActionFlowConfigRegistry();
66     }
67 }
68
Popular Tags