1 package org.kuali.ole.docstore.common.document;
2
3
4
5
6
7
8
9
10
11 import javax.xml.bind.annotation.*;
12
13
14 import javax.xml.bind.annotation.XmlAccessorType;
15 import javax.xml.bind.annotation.XmlElement;
16 import javax.xml.bind.annotation.XmlSeeAlso;
17 import javax.xml.bind.annotation.XmlType;
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54 @XmlAccessorType(XmlAccessType.FIELD)
55 @XmlType(name = "docstoreDocument", propOrder = {
56 "active",
57 "category",
58 "content",
59 "createdBy",
60 "createdOn",
61 "fastAdd",
62 "format",
63 "id",
64 "localId",
65 "_public",
66 "staffOnly",
67 "status",
68 "statusUpdatedBy",
69 "statusUpdatedOn",
70 "type",
71 "updatedBy",
72 "updatedOn",
73 "lastUpdated",
74 "displayLabel",
75 "sortedValue",
76 "operation",
77 "result",
78 "message"
79 })
80 @XmlSeeAlso({
81 Bib.class
82 })
83 public abstract class DocstoreDocument {
84
85 public static final String ID = "ID";
86 public static final String CREATED_BY = "CREATEDBY";
87 public static final String UPDATED_BY = "UPDATEDBY";
88 public static final String DATE_ENTERED = "DATEENTERED";
89 public static final String DATE_UPDATED = "DATEUPDATED";
90 public static final String STATUS = "STATUS";
91 public static final String STATUS_UPDATED_ON = "STATUSUPDATEDON";
92 public static final String DESTINATION_FIELD_DONOR_CODE = "Donor Code";
93 public static final String DESTINATION_FIELD_DONOR_PUBLIC_DISPLAY = "Donor Public Display";
94 public static final String DESTINATION_FIELD_DONOR_NOTE = "Donor Note";
95
96 public enum OperationType {CREATE, UPDATE, DELETE};
97 public enum ResultType {SUCCESS, FAILURE};
98
99 public OperationType operation;
100 public ResultType result;
101 public String message="";
102
103 protected boolean active = false;
104 protected String category;
105 protected String content;
106 @XmlTransient
107 protected Object contentObject;
108 protected String createdBy;
109 protected String createdOn;
110 protected boolean fastAdd = false;
111 protected String format;
112 protected String id;
113 protected String localId;
114 @XmlElement(name = "public")
115 protected boolean _public = false;
116 protected boolean staffOnly = false;
117 protected String status;
118 protected String statusUpdatedBy;
119 protected String statusUpdatedOn;
120 protected String type;
121 protected String updatedBy;
122 protected String updatedOn;
123 protected String lastUpdated;
124 protected String displayLabel;
125 protected String sortedValue;
126
127
128
129
130 public boolean isActive() {
131 return active;
132 }
133
134
135
136
137 public void setActive(boolean value) {
138 this.active = value;
139 }
140
141
142
143
144
145
146
147 public String getCategory() {
148 return category;
149 }
150
151
152
153
154
155
156
157 public void setCategory(String value) {
158 this.category = value;
159 }
160
161
162
163
164
165
166
167 public String getContent() {
168 return content;
169 }
170
171
172
173
174
175
176
177 public void setContent(String value) {
178 this.content = value;
179 }
180
181
182
183
184
185
186
187 public Object getContentObject() {
188 return contentObject;
189 }
190
191
192
193
194
195
196
197 public void setContentObject(Object value) {
198 this.contentObject = value;
199 }
200
201
202
203
204
205
206
207 public String getCreatedBy() {
208 return createdBy;
209 }
210
211
212
213
214
215
216
217 public void setCreatedBy(String value) {
218 this.createdBy = value;
219 }
220
221
222
223
224
225
226
227 public String getCreatedOn() {
228 return createdOn;
229 }
230
231
232
233
234
235
236
237 public void setCreatedOn(String value) {
238 this.createdOn = value;
239 }
240
241
242
243
244 public boolean isFastAdd() {
245 return fastAdd;
246 }
247
248
249
250
251 public void setFastAdd(boolean value) {
252 this.fastAdd = value;
253 }
254
255
256
257
258
259
260
261 public String getFormat() {
262 return format;
263 }
264
265
266
267
268
269
270
271 public void setFormat(String value) {
272 this.format = value;
273 }
274
275
276
277
278
279
280
281 public String getId() {
282 return id;
283 }
284
285
286
287
288
289
290
291 public void setId(String value) {
292 this.id = value;
293 }
294
295
296
297
298
299
300
301 public String getLocalId() {
302 return localId;
303 }
304
305
306
307
308
309
310
311 public void setLocalId(String value) {
312 this.localId = value;
313 }
314
315
316
317
318 public boolean isPublic() {
319 return _public;
320 }
321
322
323
324
325 public void setPublic(boolean value) {
326 this._public = value;
327 }
328
329
330
331
332 public boolean isStaffOnly() {
333 return staffOnly;
334 }
335
336
337
338
339 public void setStaffOnly(boolean value) {
340 this.staffOnly = value;
341 }
342
343
344
345
346
347
348
349 public String getStatus() {
350 return status;
351 }
352
353
354
355
356
357
358
359 public void setStatus(String value) {
360 this.status = value;
361 }
362
363
364
365
366
367
368
369 public String getStatusUpdatedBy() {
370 return statusUpdatedBy;
371 }
372
373
374
375
376
377
378
379 public void setStatusUpdatedBy(String value) {
380 this.statusUpdatedBy = value;
381 }
382
383
384
385
386
387
388
389 public String getStatusUpdatedOn() {
390 return statusUpdatedOn;
391 }
392
393
394
395
396
397
398
399 public void setStatusUpdatedOn(String value) {
400 this.statusUpdatedOn = value;
401 }
402
403
404
405
406
407
408
409 public String getType() {
410 return type;
411 }
412
413
414
415
416
417
418
419 public void setType(String value) {
420 this.type = value;
421 }
422
423
424
425
426
427
428
429 public String getUpdatedBy() {
430 return updatedBy;
431 }
432
433
434
435
436
437
438
439 public void setUpdatedBy(String value) {
440 this.updatedBy = value;
441 }
442
443
444
445
446
447
448
449 public String getUpdatedOn() {
450 return updatedOn;
451 }
452
453
454
455
456
457
458
459 public void setUpdatedOn(String value) {
460 this.updatedOn = value;
461 }
462
463 public String getLastUpdated() {
464 return lastUpdated;
465 }
466
467 public void setLastUpdated(String lastUpdated) {
468 this.lastUpdated = lastUpdated;
469 }
470
471 public String getDisplayLabel() {
472 return displayLabel;
473 }
474
475 public void setDisplayLabel(String displayLabel) {
476 this.displayLabel = displayLabel;
477 }
478
479 public String getSortedValue() {
480 return sortedValue;
481 }
482
483 public void setSortedValue(String sortedValue) {
484 this.sortedValue = sortedValue;
485 }
486
487 public abstract String serialize(Object object);
488
489 public abstract Object deserialize(String content);
490
491 public abstract Object deserializeContent(Object object);
492
493 public abstract Object deserializeContent(String content);
494
495 public abstract String serializeContent(Object object);
496
497 public OperationType getOperation() {
498 return operation;
499 }
500
501 public void setOperation(OperationType operation) {
502 this.operation = operation;
503 }
504
505 public ResultType getResult() {
506 return result;
507 }
508
509 public void setResult(ResultType result) {
510 this.result = result;
511 }
512
513 public String getMessage() {
514 return message;
515 }
516
517 public void setMessage(String message) {
518 this.message = message;
519 }
520 }