2009/05/20 - Apache Shale has been retired.
For more information, please explore the Attic.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.shale.tiger.config;
19
20 import java.util.HashMap;
21 import java.util.Map;
22 import org.apache.shale.tiger.managed.config.ManagedBeanConfig;
23
24 /***
25 * <p>Configuration bean representing the entire contents of zero or more
26 * <code>faces-config.xml</code> resources.</p>
27 */
28 public class FacesConfigConfig {
29
30 /*** Creates a new instance of FacesConfigConfig. */
31 public FacesConfigConfig() {
32 }
33
34
35 /***
36 * <p>Map of {@link ManagedBeanConfig} elements for all defined
37 * managed bean configurations, keyed by managed bean name.</p>
38 */
39 private Map<String,ManagedBeanConfig> managedBeans =
40 new HashMap<String,ManagedBeanConfig>();
41
42
43 /***
44 * <p>Add a new managed bean configuration element.</p>
45 *
46 * @param config {@link ManagedBeanConfig} element to be added
47 */
48 public void addManagedBean(ManagedBeanConfig config) {
49 this.managedBeans.put(config.getName(), config);
50 }
51
52
53 /***
54 * <p>Return the {@link ManagedBeanConfig} element for the specified
55 * managed bean name, if any; otherwise, return <code>null</code>.</p>
56 *
57 * @param name Name of the managed bean configuration to return
58 */
59 public ManagedBeanConfig getManagedBean(String name) {
60 return this.managedBeans.get(name);
61 }
62
63
64 /***
65 * <p>Return a map of defined {@link ManagedBeanConfig} elements,
66 * keyed by managed bean name.</p>
67 */
68 public Map<String,ManagedBeanConfig> getManagedBeans() {
69 return this.managedBeans;
70 }
71
72
73 }