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.managed.config;
19
20 import java.util.ArrayList;
21 import java.util.List;
22
23 /***
24 * <p>Representation of the runtime relevant contents of a JavaServer Faces
25 * <code><map-entries></code> configuration element.</p>
26 */
27 public class MapEntriesConfig {
28
29 /*** Creates a new instance of MapEntriesConfig. */
30 public MapEntriesConfig() {
31 }
32
33 /***
34 * Holds value of property keyType.
35 */
36 private String keyType;
37
38 /***
39 * Getter for property keyType.
40 * @return Value of property keyType.
41 */
42 public String getKeyType() {
43
44 return this.keyType;
45 }
46
47 /***
48 * Setter for property keyType.
49 * @param keyType New value of property keyType.
50 */
51 public void setKeyType(String keyType) {
52
53 this.keyType = keyType;
54 }
55
56 /***
57 * Holds value of property valueType.
58 */
59 private String valueType;
60
61 /***
62 * Getter for property valueType.
63 * @return Value of property valueType.
64 */
65 public String getValueType() {
66
67 return this.valueType;
68 }
69
70 /***
71 * Setter for property valueType.
72 * @param valueType New value of property valueType.
73 */
74 public void setValueType(String valueType) {
75
76 this.valueType = valueType;
77 }
78
79
80 /***
81 * <p><code>List</code> of map entry configurations for this
82 * map entries configuration.</p>
83 */
84 private List<MapEntryConfig> entries = new ArrayList<MapEntryConfig>();
85
86
87 /***
88 * <p>Add a map entry configuration to the list for this
89 * map entries configuration.</p>
90 *
91 * @param entry The map entry configuration to add
92 */
93 public void addEntry(MapEntryConfig entry) {
94 this.entries.add(entry);
95 }
96
97
98 /***
99 * <p>Return the list of map entry configurations for this
100 * map entries configuration.</p>
101 */
102 public List<MapEntryConfig> getEntries() {
103 return this.entries;
104 }
105
106
107 /***
108 * <p>REturn the map entry configuration for the specified key, if any;
109 * otherwise, return <code>null</code>.</p>
110 *
111 * @param key Key for which to return a map entry configuration
112 */
113 public MapEntryConfig getEntry(String key) {
114 for (MapEntryConfig entry : entries) {
115 if (key.equals(entry.getKey())) {
116 return entry;
117 }
118 }
119 return null;
120 }
121
122
123 }