1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
package org.apache.myfaces.config.impl.digester.elements; |
20 | |
|
21 | |
import java.util.List; |
22 | |
import java.util.ArrayList; |
23 | |
import java.util.Iterator; |
24 | |
import java.util.Collections; |
25 | |
|
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
|
34 | |
|
35 | |
|
36 | |
|
37 | |
|
38 | |
|
39 | |
|
40 | 0 | public class Attribute |
41 | |
{ |
42 | |
private List<String> _description; |
43 | |
private List<String> _displayName; |
44 | |
private List<String> _icon; |
45 | |
private String _attributeName; |
46 | |
private String _attributeClass; |
47 | |
private String _defaultValue; |
48 | |
private String _suggestedValue; |
49 | |
private List<String> _attributeExtension; |
50 | |
|
51 | |
|
52 | |
public void addDescription(String value) |
53 | |
{ |
54 | 0 | if(_description == null) |
55 | 0 | _description = new ArrayList<String>(); |
56 | |
|
57 | 0 | _description.add(value); |
58 | 0 | } |
59 | |
|
60 | |
public Iterator<String> getDescriptions() |
61 | |
{ |
62 | 0 | if(_description==null) |
63 | 0 | return Collections.EMPTY_LIST.iterator(); |
64 | |
|
65 | 0 | return _description.iterator(); |
66 | |
} |
67 | |
|
68 | |
public void addDisplayName(String value) |
69 | |
{ |
70 | 0 | if(_displayName == null) |
71 | 0 | _displayName = new ArrayList<String>(); |
72 | |
|
73 | 0 | _displayName.add(value); |
74 | 0 | } |
75 | |
|
76 | |
public Iterator<String> getDisplayNames() |
77 | |
{ |
78 | 0 | if(_displayName==null) |
79 | 0 | return Collections.EMPTY_LIST.iterator(); |
80 | |
|
81 | 0 | return _displayName.iterator(); |
82 | |
} |
83 | |
|
84 | |
public void addIcon(String value) |
85 | |
{ |
86 | 0 | if(_icon == null) |
87 | 0 | _icon = new ArrayList<String>(); |
88 | |
|
89 | 0 | _icon.add(value); |
90 | 0 | } |
91 | |
|
92 | |
public Iterator<String> getIcons() |
93 | |
{ |
94 | 0 | if(_icon==null) |
95 | 0 | return Collections.EMPTY_LIST.iterator(); |
96 | |
|
97 | 0 | return _icon.iterator(); |
98 | |
} |
99 | |
|
100 | |
public void setAttributeName(String attributeName) |
101 | |
{ |
102 | 0 | _attributeName = attributeName; |
103 | 0 | } |
104 | |
|
105 | |
public String getAttributeName() |
106 | |
{ |
107 | 0 | return _attributeName; |
108 | |
} |
109 | |
|
110 | |
public void setAttributeClass(String attributeClass) |
111 | |
{ |
112 | 0 | _attributeClass = attributeClass; |
113 | 0 | } |
114 | |
|
115 | |
public String getAttributeClass() |
116 | |
{ |
117 | 0 | return _attributeClass; |
118 | |
} |
119 | |
|
120 | |
public void setDefaultValue(String defaultValue) |
121 | |
{ |
122 | 0 | _defaultValue = defaultValue; |
123 | 0 | } |
124 | |
|
125 | |
public String getDefaultValue() |
126 | |
{ |
127 | 0 | return _defaultValue; |
128 | |
} |
129 | |
|
130 | |
public void setSuggestedValue(String suggestedValue) |
131 | |
{ |
132 | 0 | _suggestedValue = suggestedValue; |
133 | 0 | } |
134 | |
|
135 | |
public String getSuggestedValue() |
136 | |
{ |
137 | 0 | return _suggestedValue; |
138 | |
} |
139 | |
|
140 | |
public void addAttributeExtension(String attributeExtension) |
141 | |
{ |
142 | 0 | if(_attributeExtension == null) |
143 | 0 | _attributeExtension = new ArrayList<String>(); |
144 | |
|
145 | 0 | _attributeExtension.add(attributeExtension); |
146 | 0 | } |
147 | |
|
148 | |
public Iterator<String> getAttributeExtensions() |
149 | |
{ |
150 | 0 | if(_attributeExtension==null) |
151 | 0 | return Collections.EMPTY_LIST.iterator(); |
152 | |
|
153 | 0 | return _attributeExtension.iterator(); |
154 | |
} |
155 | |
} |