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 public class AttributeTypeParameter implements Localizable
47 {
48
49 private String _strName;
50 private String _strLabelKey;
51 private String _strDescriptionKey;
52 private List<String> _listDefaultValue = new ArrayList<String>( );
53 private List<String> _listValues = new ArrayList<String>( );
54 private Locale _locale;
55
56
57
58
59
60
61 public String getName( )
62 {
63 return _strName;
64 }
65
66
67
68
69
70
71 public Locale getLocale( )
72 {
73 return _locale;
74 }
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
93 public void setName( String strName )
94 {
95 _strName = strName;
96 }
97
98
99
100
101
102
103 public String getLabelKey( )
104 {
105 return _strLabelKey;
106 }
107
108
109
110
111
112
113
114 public void setLabelKey( String strLabelKey )
115 {
116 _strLabelKey = strLabelKey;
117 }
118
119
120
121
122
123
124 public String getDescriptionKey( )
125 {
126 return _strDescriptionKey;
127 }
128
129
130
131
132
133
134
135 public void setDescriptionKey( String strDescriptionKey )
136 {
137 _strDescriptionKey = strDescriptionKey;
138 }
139
140
141
142
143
144
145
146 public void setValueList( List<String> listValues )
147 {
148 _listValues.clear( );
149 _listValues.addAll( listValues );
150 }
151
152
153
154
155
156 public List<String> getValueList( )
157 {
158 List<String> returnList = new ArrayList<String>( );
159 returnList.addAll( _listValues );
160
161 return returnList;
162 }
163
164
165
166
167
168
169 public String getLabel( )
170 {
171 return I18nService.getLocalizedString( _strLabelKey, _locale );
172 }
173
174
175
176
177
178
179 public String getDescription( )
180 {
181 return I18nService.getLocalizedString( _strDescriptionKey, _locale );
182 }
183
184
185
186
187
188
189 public List<String> getDefaultValue( )
190 {
191 List<String> returnList = new ArrayList<String>( );
192 returnList.addAll( _listDefaultValue );
193
194 return returnList;
195 }
196
197
198
199
200
201
202
203 public void setDefaultValue( List<String> listDefaultValue )
204 {
205 _listDefaultValue.clear( );
206 _listDefaultValue.addAll( listDefaultValue );
207 }
208 }