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.spaces;
35
36 import fr.paris.lutece.portal.service.rbac.RBACResource;
37 import fr.paris.lutece.portal.service.workgroup.AdminWorkgroupResource;
38
39 import java.util.ArrayList;
40
41
42
43
44 public class DocumentSpace implements RBACResource, AdminWorkgroupResource
45 {
46 public static final String RESOURCE_TYPE = "DOCUMENT_SPACE";
47
48
49 private int _nIdSpace;
50 private int _nIdParent;
51 private String _strName;
52 private String _strDescription;
53 private String _strViewType;
54 private int _nIdIcon;
55 private String _strIconUrl;
56 private ArrayList<String> _listDocumentType = new ArrayList<String>( );
57 private boolean _bDocumentCreationAllowed;
58 private String _strWorkgroup;
59
60
61
62
63
64
65 public int getId( )
66 {
67 return _nIdSpace;
68 }
69
70
71
72
73
74
75
76 public void setId( int nIdSpace )
77 {
78 _nIdSpace = nIdSpace;
79 }
80
81
82
83
84
85
86 public int getIdParent( )
87 {
88 return _nIdParent;
89 }
90
91
92
93
94
95
96
97 public void setIdParent( int nIdParent )
98 {
99 _nIdParent = nIdParent;
100 }
101
102
103
104
105
106
107 public String getName( )
108 {
109 return _strName;
110 }
111
112
113
114
115
116
117
118 public void setName( String strName )
119 {
120 _strName = strName;
121 }
122
123
124
125
126
127
128 public String getDescription( )
129 {
130 return _strDescription;
131 }
132
133
134
135
136
137
138
139 public void setDescription( String strDescription )
140 {
141 _strDescription = strDescription;
142 }
143
144
145
146
147
148
149 public String getViewType( )
150 {
151 return _strViewType;
152 }
153
154
155
156
157
158
159
160 public void setViewType( String strViewType )
161 {
162 _strViewType = strViewType;
163 }
164
165
166
167
168
169
170 public int getIdIcon( )
171 {
172 return _nIdIcon;
173 }
174
175
176
177
178
179
180
181 public void setIdIcon( int nIdIcon )
182 {
183 _nIdIcon = nIdIcon;
184 }
185
186
187
188
189
190
191 public String getIconUrl( )
192 {
193 return _strIconUrl;
194 }
195
196
197
198
199
200
201
202 public void setIconUrl( String strIconUrl )
203 {
204 _strIconUrl = strIconUrl;
205 }
206
207
208
209
210
211
212 public boolean isDocumentCreationAllowed( )
213 {
214 return _bDocumentCreationAllowed;
215 }
216
217
218
219
220
221
222
223 public void setDocumentCreationAllowed( boolean bDocumentCreationAllowed )
224 {
225 _bDocumentCreationAllowed = bDocumentCreationAllowed;
226 }
227
228
229
230
231
232
233
234 public void addAllowedDocumentType( String strDocumentType )
235 {
236 _listDocumentType.add( strDocumentType );
237 }
238
239
240
241
242 public void resetAllowedDocumentTypesList( )
243 {
244 _listDocumentType.clear( );
245 }
246
247
248
249
250
251
252 public String [ ] getAllowedDocumentTypes( )
253 {
254 String [ ] checkedItems = new String [ _listDocumentType.size( )];
255
256 int nIndex = 0;
257
258 for ( String strType : _listDocumentType )
259 {
260 checkedItems [nIndex] = strType;
261 nIndex++;
262 }
263
264 return checkedItems;
265 }
266
267
268
269
270
271
272
273
274
275 public String getResourceTypeCode( )
276 {
277 return RESOURCE_TYPE;
278 }
279
280
281
282
283
284
285 public String getResourceId( )
286 {
287 return "" + getId( );
288 }
289
290
291
292
293
294 public String getWorkgroup( )
295 {
296 return _strWorkgroup;
297 }
298
299
300
301
302
303
304
305 public void setWorkgroup( String workGroup )
306 {
307 _strWorkgroup = workGroup;
308 }
309 }