Mercurial > hg > AnnotationManagerN4J
annotate src/main/java/de/mpiwg/itgroup/annotations/Annotation.java @ 105:7417f5915181 default tip
check admin permission before changing permissions.
Enum for typesafe actions.
author | casties |
---|---|
date | Fri, 10 Feb 2017 15:45:35 +0100 |
parents | acd44dfec9c8 |
children |
rev | line source |
---|---|
4 | 1 /** |
2 * | |
3 */ | |
4 package de.mpiwg.itgroup.annotations; | |
5 | |
70 | 6 /* |
7 * #%L | |
8 * AnnotationManager | |
9 * %% | |
10 * Copyright (C) 2012 - 2014 MPIWG Berlin | |
11 * %% | |
12 * This program is free software: you can redistribute it and/or modify | |
13 * it under the terms of the GNU Lesser General Public License as | |
14 * published by the Free Software Foundation, either version 3 of the | |
15 * License, or (at your option) any later version. | |
16 * | |
17 * This program is distributed in the hope that it will be useful, | |
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 * GNU General Lesser Public License for more details. | |
21 * | |
22 * You should have received a copy of the GNU General Lesser Public | |
23 * License along with this program. If not, see | |
24 * <http://www.gnu.org/licenses/lgpl-3.0.html>. | |
25 * #L% | |
26 */ | |
27 | |
50 | 28 import java.io.UnsupportedEncodingException; |
16 | 29 import java.util.Set; |
30 | |
50 | 31 import org.apache.commons.codec.binary.Base64; |
32 | |
15 | 33 import de.mpiwg.itgroup.annotations.neo4j.AnnotationStore; |
34 | |
4 | 35 /** |
36 * @author casties | |
37 * | |
38 */ | |
39 public class Annotation { | |
40 /** | |
41 * The URI of this annotation. | |
42 */ | |
43 protected String uri; | |
44 | |
45 /** | |
46 * The annotation (body) text. | |
47 */ | |
48 protected String bodyText; | |
49 | |
50 /** | |
51 * The URI of the annotation text | |
52 */ | |
53 protected String bodyUri; | |
54 | |
55 /** | |
48
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
56 * The annotation target. |
4 | 57 */ |
48
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
58 protected Target target; |
4 | 59 |
60 /** | |
61 * The fragment part of the annotation target. | |
62 */ | |
63 protected String targetFragment; | |
64 | |
65 /** | |
40
03e0f7574224
saving and loading resource targets should work now (no searching yet)
casties
parents:
20
diff
changeset
|
66 * The types of annotation target fragments. |
4 | 67 * |
68 */ | |
69 public static enum FragmentTypes { | |
84 | 70 XPOINTER, AREA, WKT |
4 | 71 }; |
72 | |
73 /** | |
74 * The type of the annotation target fragment. | |
75 */ | |
76 protected FragmentTypes fragmentType; | |
77 | |
76 | 78 /** |
79 * The selected text of the annotation target. | |
80 */ | |
81 protected String quote; | |
40
03e0f7574224
saving and loading resource targets should work now (no searching yet)
casties
parents:
20
diff
changeset
|
82 |
03e0f7574224
saving and loading resource targets should work now (no searching yet)
casties
parents:
20
diff
changeset
|
83 /** |
48
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
84 * The Resource that is annotated e.g. a book. |
40
03e0f7574224
saving and loading resource targets should work now (no searching yet)
casties
parents:
20
diff
changeset
|
85 * The target is part of this resource e.g. a page of a book. |
03e0f7574224
saving and loading resource targets should work now (no searching yet)
casties
parents:
20
diff
changeset
|
86 */ |
48
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
87 protected Resource resource; |
40
03e0f7574224
saving and loading resource targets should work now (no searching yet)
casties
parents:
20
diff
changeset
|
88 |
4 | 89 /** |
9 | 90 * The creator of this annotation. |
4 | 91 */ |
9 | 92 protected Actor creator; |
5 | 93 |
94 /** | |
4 | 95 * The creation date of this annotation. |
96 */ | |
97 protected String created; | |
98 | |
10 | 99 /** |
95
acd44dfec9c8
added last update field for annotations in database.
casties
parents:
84
diff
changeset
|
100 * The last update date of this annotation. |
acd44dfec9c8
added last update field for annotations in database.
casties
parents:
84
diff
changeset
|
101 */ |
acd44dfec9c8
added last update field for annotations in database.
casties
parents:
84
diff
changeset
|
102 protected String updated; |
acd44dfec9c8
added last update field for annotations in database.
casties
parents:
84
diff
changeset
|
103 |
acd44dfec9c8
added last update field for annotations in database.
casties
parents:
84
diff
changeset
|
104 /** |
10 | 105 * The user or group that has admin permissions. |
106 * null means any user. | |
107 */ | |
108 protected Actor adminPermission; | |
109 | |
110 /** | |
111 * The user or group that has delete permissions. | |
112 * null means any user. | |
113 */ | |
114 protected Actor deletePermission; | |
115 | |
116 /** | |
117 * The user or group that has update permissions. | |
118 * null means any user. | |
119 */ | |
120 protected Actor updatePermission; | |
121 | |
122 /** | |
123 * The user or group that has read permissions. | |
124 * null means any user. | |
125 */ | |
126 protected Actor readPermission; | |
16 | 127 |
128 /** | |
129 * List of tags on this Annotation. | |
130 */ | |
131 protected Set<String> tags; | |
14
629e15b345aa
permissions mostly work. need more server-side checking.
casties
parents:
10
diff
changeset
|
132 |
629e15b345aa
permissions mostly work. need more server-side checking.
casties
parents:
10
diff
changeset
|
133 /** |
105 | 134 * Enum of actions (for permissions). |
135 */ | |
136 public static enum Action { | |
137 read, update, create, delete, admin | |
138 } | |
139 | |
140 /** | |
20
715aa11d138b
fixes in permission handling: admin and delete default to creator.
casties
parents:
16
diff
changeset
|
141 * Returns if the requested action is allowed for the given user on this annotation. |
14
629e15b345aa
permissions mostly work. need more server-side checking.
casties
parents:
10
diff
changeset
|
142 * |
629e15b345aa
permissions mostly work. need more server-side checking.
casties
parents:
10
diff
changeset
|
143 * @param action |
15 | 144 * @param user |
145 * @param store AnnotationStore to check group membership | |
14
629e15b345aa
permissions mostly work. need more server-side checking.
casties
parents:
10
diff
changeset
|
146 * @return |
629e15b345aa
permissions mostly work. need more server-side checking.
casties
parents:
10
diff
changeset
|
147 */ |
105 | 148 public boolean isActionAllowed(Action action, Person user, AnnotationStore store) { |
149 if (action == Action.read) { | |
14
629e15b345aa
permissions mostly work. need more server-side checking.
casties
parents:
10
diff
changeset
|
150 Actor reader = getReadPermission(); |
629e15b345aa
permissions mostly work. need more server-side checking.
casties
parents:
10
diff
changeset
|
151 if (reader == null) { |
20
715aa11d138b
fixes in permission handling: admin and delete default to creator.
casties
parents:
16
diff
changeset
|
152 // if not specified then everybody is allowed |
14
629e15b345aa
permissions mostly work. need more server-side checking.
casties
parents:
10
diff
changeset
|
153 return true; |
629e15b345aa
permissions mostly work. need more server-side checking.
casties
parents:
10
diff
changeset
|
154 } else { |
15 | 155 return reader.isEquivalentWith(user, store); |
14
629e15b345aa
permissions mostly work. need more server-side checking.
casties
parents:
10
diff
changeset
|
156 } |
105 | 157 } else if (action == Action.update) { |
14
629e15b345aa
permissions mostly work. need more server-side checking.
casties
parents:
10
diff
changeset
|
158 // require at least an authenticated user |
15 | 159 if (user == null) return false; |
14
629e15b345aa
permissions mostly work. need more server-side checking.
casties
parents:
10
diff
changeset
|
160 Actor updater = getUpdatePermission(); |
629e15b345aa
permissions mostly work. need more server-side checking.
casties
parents:
10
diff
changeset
|
161 if (updater == null) { |
20
715aa11d138b
fixes in permission handling: admin and delete default to creator.
casties
parents:
16
diff
changeset
|
162 // if not specified then everybody is allowed |
14
629e15b345aa
permissions mostly work. need more server-side checking.
casties
parents:
10
diff
changeset
|
163 return true; |
629e15b345aa
permissions mostly work. need more server-side checking.
casties
parents:
10
diff
changeset
|
164 } else { |
15 | 165 return updater.isEquivalentWith(user, store); |
14
629e15b345aa
permissions mostly work. need more server-side checking.
casties
parents:
10
diff
changeset
|
166 } |
105 | 167 } else if (action == Action.delete) { |
14
629e15b345aa
permissions mostly work. need more server-side checking.
casties
parents:
10
diff
changeset
|
168 // require at least an authenticated user |
15 | 169 if (user == null) return false; |
20
715aa11d138b
fixes in permission handling: admin and delete default to creator.
casties
parents:
16
diff
changeset
|
170 Actor deleter = getDeletePermission(); |
715aa11d138b
fixes in permission handling: admin and delete default to creator.
casties
parents:
16
diff
changeset
|
171 if (deleter == null) { |
715aa11d138b
fixes in permission handling: admin and delete default to creator.
casties
parents:
16
diff
changeset
|
172 // if not specified then only creator is allowed |
715aa11d138b
fixes in permission handling: admin and delete default to creator.
casties
parents:
16
diff
changeset
|
173 deleter = creator; |
14
629e15b345aa
permissions mostly work. need more server-side checking.
casties
parents:
10
diff
changeset
|
174 } |
20
715aa11d138b
fixes in permission handling: admin and delete default to creator.
casties
parents:
16
diff
changeset
|
175 return deleter.isEquivalentWith(user, store); |
105 | 176 } else if (action == Action.admin) { |
14
629e15b345aa
permissions mostly work. need more server-side checking.
casties
parents:
10
diff
changeset
|
177 // require at least an authenticated user |
15 | 178 if (user == null) return false; |
14
629e15b345aa
permissions mostly work. need more server-side checking.
casties
parents:
10
diff
changeset
|
179 Actor admin = getAdminPermission(); |
629e15b345aa
permissions mostly work. need more server-side checking.
casties
parents:
10
diff
changeset
|
180 if (admin == null) { |
20
715aa11d138b
fixes in permission handling: admin and delete default to creator.
casties
parents:
16
diff
changeset
|
181 // if not specified then only creator is allowed |
715aa11d138b
fixes in permission handling: admin and delete default to creator.
casties
parents:
16
diff
changeset
|
182 admin = creator; |
14
629e15b345aa
permissions mostly work. need more server-side checking.
casties
parents:
10
diff
changeset
|
183 } |
20
715aa11d138b
fixes in permission handling: admin and delete default to creator.
casties
parents:
16
diff
changeset
|
184 return admin.isEquivalentWith(user, store); |
14
629e15b345aa
permissions mostly work. need more server-side checking.
casties
parents:
10
diff
changeset
|
185 } |
629e15b345aa
permissions mostly work. need more server-side checking.
casties
parents:
10
diff
changeset
|
186 return false; |
629e15b345aa
permissions mostly work. need more server-side checking.
casties
parents:
10
diff
changeset
|
187 } |
629e15b345aa
permissions mostly work. need more server-side checking.
casties
parents:
10
diff
changeset
|
188 |
4 | 189 /** |
190 * @return the uri | |
191 */ | |
192 public String getUri() { | |
193 return uri; | |
194 } | |
195 | |
196 /** | |
197 * @param uri the uri to set | |
198 */ | |
199 public void setUri(String uri) { | |
200 this.uri = uri; | |
201 } | |
202 | |
203 /** | |
50 | 204 * Returns an URL-compatible id. |
205 * Currently the uri as base64 encoded string. | |
206 * @return | |
207 */ | |
208 public String getUrlId() { | |
209 if (uri == null) return null; | |
210 try { | |
211 return Base64.encodeBase64URLSafeString(uri.getBytes("UTF-8")); | |
212 } catch (UnsupportedEncodingException e) { | |
213 return null; | |
214 } | |
215 } | |
216 | |
217 public static String decodeId(String id) { | |
218 if (id == null) return null; | |
219 try { | |
220 return new String(Base64.decodeBase64(id), "UTF-8"); | |
221 } catch (UnsupportedEncodingException e) { | |
222 return null; | |
223 } | |
224 } | |
225 | |
226 /** | |
4 | 227 * @return the bodyText |
228 */ | |
229 public String getBodyText() { | |
230 return bodyText; | |
231 } | |
232 | |
233 /** | |
234 * @param bodyText the bodyText to set | |
235 */ | |
236 public void setBodyText(String bodyText) { | |
237 this.bodyText = bodyText; | |
238 } | |
239 | |
240 /** | |
241 * @return the bodyUri | |
242 */ | |
243 public String getBodyUri() { | |
244 return bodyUri; | |
245 } | |
246 | |
247 /** | |
248 * @param bodyUri the bodyUri to set | |
249 */ | |
250 public void setBodyUri(String bodyUri) { | |
251 this.bodyUri = bodyUri; | |
252 } | |
253 | |
254 /** | |
48
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
255 * @return the target |
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
256 */ |
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
257 public Target getTarget() { |
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
258 return target; |
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
259 } |
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
260 |
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
261 /** |
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
262 * @param target the target to set |
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
263 */ |
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
264 public void setTarget(Target target) { |
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
265 this.target = target; |
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
266 } |
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
267 |
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
268 /** |
4 | 269 * @return the targetBaseUri |
270 */ | |
271 public String getTargetBaseUri() { | |
48
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
272 if (target == null) return null; |
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
273 return target.getUri(); |
4 | 274 } |
275 | |
276 /** | |
277 * @return the targetFragment | |
278 */ | |
279 public String getTargetFragment() { | |
280 return targetFragment; | |
281 } | |
282 | |
283 /** | |
284 * @param targetFragment the targetFragment to set | |
285 */ | |
286 public void setTargetFragment(String targetFragment) { | |
287 this.targetFragment = targetFragment; | |
288 } | |
289 | |
290 /** | |
291 * @return the targetType | |
292 */ | |
293 public FragmentTypes getFragmentType() { | |
294 return fragmentType; | |
295 } | |
296 | |
297 /** | |
298 * @param fragmentType the fragmentType to set | |
299 */ | |
300 public void setFragmentType(FragmentTypes fragmentType) { | |
301 this.fragmentType = fragmentType; | |
302 } | |
303 | |
304 /** | |
76 | 305 * @return the quote |
306 */ | |
307 public String getQuote() { | |
308 return quote; | |
309 } | |
310 | |
311 /** | |
312 * @param quote the quote to set | |
313 */ | |
314 public void setQuote(String quote) { | |
315 this.quote = quote; | |
316 } | |
317 | |
318 /** | |
48
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
319 * @return the resource |
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
320 */ |
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
321 public Resource getResource() { |
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
322 return resource; |
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
323 } |
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
324 |
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
325 /** |
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
326 * @param resource the resource to set |
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
327 */ |
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
328 public void setResource(Resource resource) { |
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
329 this.resource = resource; |
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
330 } |
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
331 |
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
332 /** |
40
03e0f7574224
saving and loading resource targets should work now (no searching yet)
casties
parents:
20
diff
changeset
|
333 * @return the resourceUri |
03e0f7574224
saving and loading resource targets should work now (no searching yet)
casties
parents:
20
diff
changeset
|
334 */ |
03e0f7574224
saving and loading resource targets should work now (no searching yet)
casties
parents:
20
diff
changeset
|
335 public String getResourceUri() { |
48
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
336 if (resource == null) return null; |
0e00bf8e27fb
targets and resources of Annotation object are objects now.
casties
parents:
40
diff
changeset
|
337 return resource.getUri(); |
40
03e0f7574224
saving and loading resource targets should work now (no searching yet)
casties
parents:
20
diff
changeset
|
338 } |
03e0f7574224
saving and loading resource targets should work now (no searching yet)
casties
parents:
20
diff
changeset
|
339 |
03e0f7574224
saving and loading resource targets should work now (no searching yet)
casties
parents:
20
diff
changeset
|
340 /** |
9 | 341 * @return the creator |
342 */ | |
343 public Actor getCreator() { | |
344 return creator; | |
345 } | |
346 | |
347 /** | |
348 * @param creator the creator to set | |
349 */ | |
350 public void setCreator(Actor creator) { | |
351 this.creator = creator; | |
352 } | |
353 | |
354 /** | |
4 | 355 * @return the creatorUri |
356 */ | |
357 public String getCreatorUri() { | |
9 | 358 if (creator != null) { |
359 return creator.getUri(); | |
360 } | |
361 return null; | |
4 | 362 } |
363 | |
364 /** | |
5 | 365 * @return the creatorName |
366 */ | |
367 public String getCreatorName() { | |
9 | 368 if (creator != null) { |
369 return creator.getName(); | |
370 } | |
371 return null; | |
5 | 372 } |
373 | |
374 /** | |
4 | 375 * @return the created |
376 */ | |
377 public String getCreated() { | |
378 return created; | |
379 } | |
380 | |
381 /** | |
382 * @param created the created to set | |
383 */ | |
384 public void setCreated(String created) { | |
385 this.created = created; | |
386 } | |
10 | 387 |
95
acd44dfec9c8
added last update field for annotations in database.
casties
parents:
84
diff
changeset
|
388 public String getUpdated() { |
acd44dfec9c8
added last update field for annotations in database.
casties
parents:
84
diff
changeset
|
389 return updated; |
acd44dfec9c8
added last update field for annotations in database.
casties
parents:
84
diff
changeset
|
390 } |
acd44dfec9c8
added last update field for annotations in database.
casties
parents:
84
diff
changeset
|
391 |
acd44dfec9c8
added last update field for annotations in database.
casties
parents:
84
diff
changeset
|
392 public void setUpdated(String updated) { |
acd44dfec9c8
added last update field for annotations in database.
casties
parents:
84
diff
changeset
|
393 this.updated = updated; |
acd44dfec9c8
added last update field for annotations in database.
casties
parents:
84
diff
changeset
|
394 } |
acd44dfec9c8
added last update field for annotations in database.
casties
parents:
84
diff
changeset
|
395 |
acd44dfec9c8
added last update field for annotations in database.
casties
parents:
84
diff
changeset
|
396 /** |
10 | 397 * @return the adminPermission |
398 */ | |
399 public Actor getAdminPermission() { | |
20
715aa11d138b
fixes in permission handling: admin and delete default to creator.
casties
parents:
16
diff
changeset
|
400 if (adminPermission != null) { |
715aa11d138b
fixes in permission handling: admin and delete default to creator.
casties
parents:
16
diff
changeset
|
401 return adminPermission; |
715aa11d138b
fixes in permission handling: admin and delete default to creator.
casties
parents:
16
diff
changeset
|
402 } else { |
715aa11d138b
fixes in permission handling: admin and delete default to creator.
casties
parents:
16
diff
changeset
|
403 // if not specified then only creator is allowed |
715aa11d138b
fixes in permission handling: admin and delete default to creator.
casties
parents:
16
diff
changeset
|
404 return this.creator; |
715aa11d138b
fixes in permission handling: admin and delete default to creator.
casties
parents:
16
diff
changeset
|
405 } |
10 | 406 } |
407 | |
408 /** | |
409 * @param adminPermission the adminPermission to set | |
410 */ | |
411 public void setAdminPermission(Actor adminPermission) { | |
412 this.adminPermission = adminPermission; | |
413 } | |
414 | |
415 /** | |
416 * @return the deletePermission | |
417 */ | |
418 public Actor getDeletePermission() { | |
20
715aa11d138b
fixes in permission handling: admin and delete default to creator.
casties
parents:
16
diff
changeset
|
419 if (deletePermission != null) { |
715aa11d138b
fixes in permission handling: admin and delete default to creator.
casties
parents:
16
diff
changeset
|
420 return deletePermission; |
715aa11d138b
fixes in permission handling: admin and delete default to creator.
casties
parents:
16
diff
changeset
|
421 } else { |
715aa11d138b
fixes in permission handling: admin and delete default to creator.
casties
parents:
16
diff
changeset
|
422 // if not specified then only creator is allowed |
715aa11d138b
fixes in permission handling: admin and delete default to creator.
casties
parents:
16
diff
changeset
|
423 return this.creator; |
715aa11d138b
fixes in permission handling: admin and delete default to creator.
casties
parents:
16
diff
changeset
|
424 } |
10 | 425 } |
426 | |
427 /** | |
428 * @param deletePermission the deletePermission to set | |
429 */ | |
430 public void setDeletePermission(Actor deletePermission) { | |
431 this.deletePermission = deletePermission; | |
432 } | |
433 | |
434 /** | |
435 * @return the updatePermission | |
436 */ | |
437 public Actor getUpdatePermission() { | |
438 return updatePermission; | |
439 } | |
440 | |
441 /** | |
442 * @param updatePermission the updatePermission to set | |
443 */ | |
444 public void setUpdatePermission(Actor updatePermission) { | |
445 this.updatePermission = updatePermission; | |
446 } | |
447 | |
448 /** | |
449 * @return the readPermission | |
450 */ | |
451 public Actor getReadPermission() { | |
452 return readPermission; | |
453 } | |
454 | |
455 /** | |
456 * @param readPermission the readPermission to set | |
457 */ | |
458 public void setReadPermission(Actor readPermission) { | |
459 this.readPermission = readPermission; | |
460 } | |
16 | 461 |
462 /** | |
463 * @return the tags | |
464 */ | |
465 public Set<String> getTags() { | |
466 return tags; | |
467 } | |
468 | |
469 /** | |
470 * @param tags the tags to set | |
471 */ | |
472 public void setTags(Set<String> tags) { | |
473 this.tags = tags; | |
474 } | |
4 | 475 |
476 | |
477 } |