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 public static final String NO_INFO_CALL_NUMBER_TYPE_CODE = "NOINFO";
96
97 public enum OperationType {CREATE, UPDATE, DELETE, NONE};
98 public enum ResultType {SUCCESS, FAILURE};
99
100 public OperationType operation;
101 public ResultType result;
102 public String message="";
103
104 protected boolean active = false;
105 protected String category;
106 protected String content;
107 @XmlTransient
108 protected Object contentObject;
109 protected String createdBy;
110 protected String createdOn;
111 protected boolean fastAdd = false;
112 protected String format;
113 protected String id;
114 protected String localId;
115 @XmlElement(name = "public")
116 protected boolean _public = false;
117 protected boolean staffOnly = false;
118 protected String status;
119 protected String statusUpdatedBy;
120 protected String statusUpdatedOn;
121 protected String type;
122 protected String updatedBy;
123 protected String updatedOn;
124 protected String lastUpdated;
125 protected String displayLabel;
126 protected String sortedValue;
127
128
129
130
131 public boolean isActive() {
132 return active;
133 }
134
135
136
137
138 public void setActive(boolean value) {
139 this.active = value;
140 }
141
142
143
144
145
146
147
148 public String getCategory() {
149 return category;
150 }
151
152
153
154
155
156
157
158 public void setCategory(String value) {
159 this.category = value;
160 }
161
162
163
164
165
166
167
168 public String getContent() {
169 return content;
170 }
171
172
173
174
175
176
177
178 public void setContent(String value) {
179 this.content = value;
180 }
181
182
183
184
185
186
187
188 public Object getContentObject() {
189 return contentObject;
190 }
191
192
193
194
195
196
197
198 public void setContentObject(Object value) {
199 this.contentObject = value;
200 }
201
202
203
204
205
206
207
208 public String getCreatedBy() {
209 return createdBy;
210 }
211
212
213
214
215
216
217
218 public void setCreatedBy(String value) {
219 this.createdBy = value;
220 }
221
222
223
224
225
226
227
228 public String getCreatedOn() {
229 return createdOn;
230 }
231
232
233
234
235
236
237
238 public void setCreatedOn(String value) {
239 this.createdOn = value;
240 }
241
242
243
244
245 public boolean isFastAdd() {
246 return fastAdd;
247 }
248
249
250
251
252 public void setFastAdd(boolean value) {
253 this.fastAdd = value;
254 }
255
256
257
258
259
260
261
262 public String getFormat() {
263 return format;
264 }
265
266
267
268
269
270
271
272 public void setFormat(String value) {
273 this.format = value;
274 }
275
276
277
278
279
280
281
282 public String getId() {
283 return id;
284 }
285
286
287
288
289
290
291
292 public void setId(String value) {
293 this.id = value;
294 }
295
296
297
298
299
300
301
302 public String getLocalId() {
303 return localId;
304 }
305
306
307
308
309
310
311
312 public void setLocalId(String value) {
313 this.localId = value;
314 }
315
316
317
318
319 public boolean isPublic() {
320 return _public;
321 }
322
323
324
325
326 public void setPublic(boolean value) {
327 this._public = value;
328 }
329
330
331
332
333 public boolean isStaffOnly() {
334 return staffOnly;
335 }
336
337
338
339
340 public void setStaffOnly(boolean value) {
341 this.staffOnly = value;
342 }
343
344
345
346
347
348
349
350 public String getStatus() {
351 return status;
352 }
353
354
355
356
357
358
359
360 public void setStatus(String value) {
361 this.status = value;
362 }
363
364
365
366
367
368
369
370 public String getStatusUpdatedBy() {
371 return statusUpdatedBy;
372 }
373
374
375
376
377
378
379
380 public void setStatusUpdatedBy(String value) {
381 this.statusUpdatedBy = value;
382 }
383
384
385
386
387
388
389
390 public String getStatusUpdatedOn() {
391 return statusUpdatedOn;
392 }
393
394
395
396
397
398
399
400 public void setStatusUpdatedOn(String value) {
401 this.statusUpdatedOn = value;
402 }
403
404
405
406
407
408
409
410 public String getType() {
411 return type;
412 }
413
414
415
416
417
418
419
420 public void setType(String value) {
421 this.type = value;
422 }
423
424
425
426
427
428
429
430 public String getUpdatedBy() {
431 return updatedBy;
432 }
433
434
435
436
437
438
439
440 public void setUpdatedBy(String value) {
441 this.updatedBy = value;
442 }
443
444
445
446
447
448
449
450 public String getUpdatedOn() {
451 return updatedOn;
452 }
453
454
455
456
457
458
459
460 public void setUpdatedOn(String value) {
461 this.updatedOn = value;
462 }
463
464 public String getLastUpdated() {
465 return lastUpdated;
466 }
467
468 public void setLastUpdated(String lastUpdated) {
469 this.lastUpdated = lastUpdated;
470 }
471
472 public String getDisplayLabel() {
473 return displayLabel;
474 }
475
476 public void setDisplayLabel(String displayLabel) {
477 this.displayLabel = displayLabel;
478 }
479
480 public String getSortedValue() {
481 return sortedValue;
482 }
483
484 public void setSortedValue(String sortedValue) {
485 this.sortedValue = sortedValue;
486 }
487
488 public abstract String serialize(Object object);
489
490 public abstract Object deserialize(String content);
491
492 public abstract Object deserializeContent(Object object);
493
494 public abstract Object deserializeContent(String content);
495
496 public abstract String serializeContent(Object object);
497
498 public OperationType getOperation() {
499 return operation;
500 }
501
502 public void setOperation(OperationType operation) {
503 this.operation = operation;
504 }
505
506 public ResultType getResult() {
507 return result;
508 }
509
510 public void setResult(ResultType result) {
511 this.result = result;
512 }
513
514 public String getMessage() {
515 return message;
516 }
517
518 public void setMessage(String message) {
519 this.message = message;
520 }
521 }