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