KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > config > impl > digester > elements > FacesConfig


1 /*
2  * Copyright 2004 The Apache Software Foundation.
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, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.myfaces.config.impl.digester.elements;
17
18 import java.util.ArrayList JavaDoc;
19 import java.util.List JavaDoc;
20 import java.util.HashMap JavaDoc;
21 import java.util.Map JavaDoc;
22
23 import org.apache.myfaces.config.impl.digester.elements.Application;
24 import org.apache.myfaces.config.impl.digester.elements.Converter;
25
26
27 /**
28  * @author <a HREF="mailto:oliver@rossmueller.com">Oliver Rossmueller</a>
29  */

30 public class FacesConfig
31 {
32
33     private List JavaDoc applications = new ArrayList JavaDoc();
34     private List JavaDoc factories = new ArrayList JavaDoc();
35     private Map JavaDoc components = new HashMap JavaDoc();
36     private List JavaDoc converters = new ArrayList JavaDoc();
37     private List JavaDoc managedBeans = new ArrayList JavaDoc();
38     private List JavaDoc navigationRules = new ArrayList JavaDoc();
39     private List JavaDoc renderKits = new ArrayList JavaDoc();
40     private List JavaDoc lifecyclePhaseListener = new ArrayList JavaDoc();
41     private Map JavaDoc validators = new HashMap JavaDoc();
42
43
44     public void addApplication(Application application)
45     {
46         applications.add(application);
47     }
48
49
50     public void addFactory(Factory factory)
51     {
52         factories.add(factory);
53     }
54
55
56     public void addComponent(String JavaDoc componentType, String JavaDoc componentClass)
57     {
58         components.put(componentType, componentClass);
59     }
60
61
62     public void addConverter(Converter converter)
63     {
64         converters.add(converter);
65     }
66
67
68     public void addManagedBean(ManagedBean bean)
69     {
70         managedBeans.add(bean);
71     }
72
73
74     public void addNavigationRule(NavigationRule rule)
75     {
76         navigationRules.add(rule);
77     }
78
79
80     public void addRenderKit(RenderKit renderKit)
81     {
82         renderKits.add(renderKit);
83     }
84
85
86     public void addLifecyclePhaseListener(String JavaDoc value)
87     {
88         lifecyclePhaseListener.add(value);
89     }
90
91
92     public void addValidator(String JavaDoc id, String JavaDoc validatorClass)
93     {
94         validators.put(id, validatorClass);
95     }
96
97
98     public List JavaDoc getApplications()
99     {
100         return applications;
101     }
102
103
104     public List JavaDoc getFactories()
105     {
106         return factories;
107     }
108
109
110     public Map JavaDoc getComponents()
111     {
112         return components;
113     }
114
115
116     public List JavaDoc getConverters()
117     {
118         return converters;
119     }
120
121
122     public List JavaDoc getManagedBeans()
123     {
124         return managedBeans;
125     }
126
127
128     public List JavaDoc getNavigationRules()
129     {
130         return navigationRules;
131     }
132
133
134     public List JavaDoc getRenderKits()
135     {
136         return renderKits;
137     }
138
139
140     public List JavaDoc getLifecyclePhaseListener()
141     {
142         return lifecyclePhaseListener;
143     }
144
145
146     public Map JavaDoc getValidators()
147     {
148         return validators;
149     }
150 }
151
Popular Tags