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.io.Serializable;
22 import java.util.ArrayList;
23 import java.util.Collection;
24 import java.util.Collections;
25 import java.util.List;
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41 public class Attribute extends org.apache.myfaces.config.element.Attribute implements Serializable
42 {
43 private List<String> _description;
44 private List<String> _displayName;
45 private List<String> _icon;
46 private String _attributeName;
47 private String _attributeClass;
48 private String _defaultValue;
49 private String _suggestedValue;
50 private List<String> _attributeExtension;
51
52
53 public void addDescription(String value)
54 {
55 if(_description == null)
56 {
57 _description = new ArrayList<String>();
58 }
59
60 _description.add(value);
61 }
62
63 public Collection<? extends String> getDescriptions()
64 {
65 if(_description == null)
66 {
67 return Collections.emptyList();
68 }
69
70 return _description;
71 }
72
73 public void addDisplayName(String value)
74 {
75 if(_displayName == null)
76 {
77 _displayName = new ArrayList<String>();
78 }
79
80 _displayName.add(value);
81 }
82
83 public Collection<? extends String> getDisplayNames()
84 {
85 if(_displayName == null)
86 {
87 return Collections.emptyList();
88 }
89
90 return _displayName;
91 }
92
93 public void addIcon(String value)
94 {
95 if(_icon == null)
96 {
97 _icon = new ArrayList<String>();
98 }
99
100 _icon.add(value);
101 }
102
103 public Collection<? extends String> getIcons()
104 {
105 if(_icon == null)
106 {
107 return Collections.emptyList();
108 }
109
110 return _icon;
111 }
112
113 public void setAttributeName(String attributeName)
114 {
115 _attributeName = attributeName;
116 }
117
118 public String getAttributeName()
119 {
120 return _attributeName;
121 }
122
123 public void setAttributeClass(String attributeClass)
124 {
125 _attributeClass = attributeClass;
126 }
127
128 public String getAttributeClass()
129 {
130 return _attributeClass;
131 }
132
133 public void setDefaultValue(String defaultValue)
134 {
135 _defaultValue = defaultValue;
136 }
137
138 public String getDefaultValue()
139 {
140 return _defaultValue;
141 }
142
143 public void setSuggestedValue(String suggestedValue)
144 {
145 _suggestedValue = suggestedValue;
146 }
147
148 public String getSuggestedValue()
149 {
150 return _suggestedValue;
151 }
152
153 public void addAttributeExtension(String attributeExtension)
154 {
155 if(_attributeExtension == null)
156 {
157 _attributeExtension = new ArrayList<String>();
158 }
159
160 _attributeExtension.add(attributeExtension);
161 }
162
163 public Collection<? extends String> getAttributeExtensions()
164 {
165 if(_attributeExtension == null)
166 {
167 return Collections.emptyList();
168 }
169
170 return _attributeExtension;
171 }
172 }