1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 package fr.paris.lutece.plugins.document.business.attributes;
35
36 import fr.paris.lutece.portal.service.i18n.I18nService;
37 import fr.paris.lutece.portal.service.i18n.Localizable;
38
39 import java.util.ArrayList;
40 import java.util.List;
41 import java.util.Locale;
42
43
44
45
46
47 public class AttributeTypeParameter implements Localizable
48 {
49
50 private String _strName;
51 private String _strLabelKey;
52 private String _strDescriptionKey;
53 private List<String> _listDefaultValue = new ArrayList<String>( );
54 private List<String> _listValues = new ArrayList<String>( );
55 private Locale _locale;
56
57
58
59
60
61
62 public String getName( )
63 {
64 return _strName;
65 }
66
67
68
69
70
71
72 public Locale getLocale( )
73 {
74 return _locale;
75 }
76
77
78
79
80
81
82 public void setLocale( Locale locale )
83 {
84 _locale = locale;
85 }
86
87
88
89
90
91
92 public void setName( String strName )
93 {
94 _strName = strName;
95 }
96
97
98
99
100
101
102 public String getLabelKey( )
103 {
104 return _strLabelKey;
105 }
106
107
108
109
110
111
112 public void setLabelKey( String strLabelKey )
113 {
114 _strLabelKey = strLabelKey;
115 }
116
117
118
119
120
121
122 public String getDescriptionKey( )
123 {
124 return _strDescriptionKey;
125 }
126
127
128
129
130
131
132 public void setDescriptionKey( String strDescriptionKey )
133 {
134 _strDescriptionKey = strDescriptionKey;
135 }
136
137
138
139
140
141 public void setValueList( List<String> listValues )
142 {
143 _listValues.clear( );
144 _listValues.addAll( listValues );
145 }
146
147
148
149
150
151 public List<String> getValueList( )
152 {
153 List<String> returnList = new ArrayList<String>( );
154 returnList.addAll( _listValues );
155
156 return returnList;
157 }
158
159
160
161
162
163
164 public String getLabel( )
165 {
166 return I18nService.getLocalizedString( _strLabelKey, _locale );
167 }
168
169
170
171
172
173
174 public String getDescription( )
175 {
176 return I18nService.getLocalizedString( _strDescriptionKey, _locale );
177 }
178
179
180
181
182
183
184 public List<String> getDefaultValue( )
185 {
186 List<String> returnList = new ArrayList<String>( );
187 returnList.addAll( _listDefaultValue );
188
189 return returnList;
190 }
191
192
193
194
195
196 public void setDefaultValue( List<String> listDefaultValue )
197 {
198 _listDefaultValue.clear( );
199 _listDefaultValue.addAll( listDefaultValue );
200 }
201 }