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 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 if(_description == null)
55 _description = new ArrayList<String>();
56
57 _description.add(value);
58 }
59
60 public Iterator<String> getDescriptions()
61 {
62 if(_description==null)
63 return Collections.EMPTY_LIST.iterator();
64
65 return _description.iterator();
66 }
67
68 public void addDisplayName(String value)
69 {
70 if(_displayName == null)
71 _displayName = new ArrayList<String>();
72
73 _displayName.add(value);
74 }
75
76 public Iterator<String> getDisplayNames()
77 {
78 if(_displayName==null)
79 return Collections.EMPTY_LIST.iterator();
80
81 return _displayName.iterator();
82 }
83
84 public void addIcon(String value)
85 {
86 if(_icon == null)
87 _icon = new ArrayList<String>();
88
89 _icon.add(value);
90 }
91
92 public Iterator<String> getIcons()
93 {
94 if(_icon==null)
95 return Collections.EMPTY_LIST.iterator();
96
97 return _icon.iterator();
98 }
99
100 public void setAttributeName(String attributeName)
101 {
102 _attributeName = attributeName;
103 }
104
105 public String getAttributeName()
106 {
107 return _attributeName;
108 }
109
110 public void setAttributeClass(String attributeClass)
111 {
112 _attributeClass = attributeClass;
113 }
114
115 public String getAttributeClass()
116 {
117 return _attributeClass;
118 }
119
120 public void setDefaultValue(String defaultValue)
121 {
122 _defaultValue = defaultValue;
123 }
124
125 public String getDefaultValue()
126 {
127 return _defaultValue;
128 }
129
130 public void setSuggestedValue(String suggestedValue)
131 {
132 _suggestedValue = suggestedValue;
133 }
134
135 public String getSuggestedValue()
136 {
137 return _suggestedValue;
138 }
139
140 public void addAttributeExtension(String attributeExtension)
141 {
142 if(_attributeExtension == null)
143 _attributeExtension = new ArrayList<String>();
144
145 _attributeExtension.add(attributeExtension);
146 }
147
148 public Iterator<String> getAttributeExtensions()
149 {
150 if(_attributeExtension==null)
151 return Collections.EMPTY_LIST.iterator();
152
153 return _attributeExtension.iterator();
154 }
155 }