1 package org.kuali.ole.docstore.common.document;
2
3 /**
4 * Created with IntelliJ IDEA.
5 * User: sambasivam
6 * Date: 12/13/13
7 * Time: 3:29 PM
8 * To change this template use File | Settings | File Templates.
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 * <p>Java class for docstoreDocument complex type.
22 * <p/>
23 * <p>The following schema fragment specifies the expected content contained within this class.
24 * <p/>
25 * <pre>
26 * <complexType name="docstoreDocument">
27 * <complexContent>
28 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
29 * <sequence>
30 * <element name="active" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
31 * <element name="category" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
32 * <element name="content" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
33 * <element name="contentObject" type="{http://www.w3.org/2001/XMLSchema}anyType" minOccurs="0"/>
34 * <element name="createdBy" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
35 * <element name="createdOn" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
36 * <element name="fastAdd" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
37 * <element name="format" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
38 * <element name="id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
39 * <element name="localId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
40 * <element name="public" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
41 * <element name="staffOnly" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
42 * <element name="status" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
43 * <element name="statusUpdatedBy" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
44 * <element name="statusUpdatedOn" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
45 * <element name="type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
46 * <element name="updatedBy" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
47 * <element name="updatedOn" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
48 * </sequence>
49 * </restriction>
50 * </complexContent>
51 * </complexType>
52 * </pre>
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 * Gets the value of the active property.
129 */
130 public boolean isActive() {
131 return active;
132 }
133
134 /**
135 * Sets the value of the active property.
136 */
137 public void setActive(boolean value) {
138 this.active = value;
139 }
140
141 /**
142 * Gets the value of the category property.
143 *
144 * @return possible object is
145 * {@link String }
146 */
147 public String getCategory() {
148 return category;
149 }
150
151 /**
152 * Sets the value of the category property.
153 *
154 * @param value allowed object is
155 * {@link String }
156 */
157 public void setCategory(String value) {
158 this.category = value;
159 }
160
161 /**
162 * Gets the value of the content property.
163 *
164 * @return possible object is
165 * {@link String }
166 */
167 public String getContent() {
168 return content;
169 }
170
171 /**
172 * Sets the value of the content property.
173 *
174 * @param value allowed object is
175 * {@link String }
176 */
177 public void setContent(String value) {
178 this.content = value;
179 }
180
181 /**
182 * Gets the value of the contentObject property.
183 *
184 * @return possible object is
185 * {@link Object }
186 */
187 public Object getContentObject() {
188 return contentObject;
189 }
190
191 /**
192 * Sets the value of the contentObject property.
193 *
194 * @param value allowed object is
195 * {@link Object }
196 */
197 public void setContentObject(Object value) {
198 this.contentObject = value;
199 }
200
201 /**
202 * Gets the value of the createdBy property.
203 *
204 * @return possible object is
205 * {@link String }
206 */
207 public String getCreatedBy() {
208 return createdBy;
209 }
210
211 /**
212 * Sets the value of the createdBy property.
213 *
214 * @param value allowed object is
215 * {@link String }
216 */
217 public void setCreatedBy(String value) {
218 this.createdBy = value;
219 }
220
221 /**
222 * Gets the value of the createdOn property.
223 *
224 * @return possible object is
225 * {@link String }
226 */
227 public String getCreatedOn() {
228 return createdOn;
229 }
230
231 /**
232 * Sets the value of the createdOn property.
233 *
234 * @param value allowed object is
235 * {@link String }
236 */
237 public void setCreatedOn(String value) {
238 this.createdOn = value;
239 }
240
241 /**
242 * Gets the value of the fastAdd property.
243 */
244 public boolean isFastAdd() {
245 return fastAdd;
246 }
247
248 /**
249 * Sets the value of the fastAdd property.
250 */
251 public void setFastAdd(boolean value) {
252 this.fastAdd = value;
253 }
254
255 /**
256 * Gets the value of the format property.
257 *
258 * @return possible object is
259 * {@link String }
260 */
261 public String getFormat() {
262 return format;
263 }
264
265 /**
266 * Sets the value of the format property.
267 *
268 * @param value allowed object is
269 * {@link String }
270 */
271 public void setFormat(String value) {
272 this.format = value;
273 }
274
275 /**
276 * Gets the value of the id property.
277 *
278 * @return possible object is
279 * {@link String }
280 */
281 public String getId() {
282 return id;
283 }
284
285 /**
286 * Sets the value of the id property.
287 *
288 * @param value allowed object is
289 * {@link String }
290 */
291 public void setId(String value) {
292 this.id = value;
293 }
294
295 /**
296 * Gets the value of the localId property.
297 *
298 * @return possible object is
299 * {@link String }
300 */
301 public String getLocalId() {
302 return localId;
303 }
304
305 /**
306 * Sets the value of the localId property.
307 *
308 * @param value allowed object is
309 * {@link String }
310 */
311 public void setLocalId(String value) {
312 this.localId = value;
313 }
314
315 /**
316 * Gets the value of the public property.
317 */
318 public boolean isPublic() {
319 return _public;
320 }
321
322 /**
323 * Sets the value of the public property.
324 */
325 public void setPublic(boolean value) {
326 this._public = value;
327 }
328
329 /**
330 * Gets the value of the staffOnly property.
331 */
332 public boolean isStaffOnly() {
333 return staffOnly;
334 }
335
336 /**
337 * Sets the value of the staffOnly property.
338 */
339 public void setStaffOnly(boolean value) {
340 this.staffOnly = value;
341 }
342
343 /**
344 * Gets the value of the status property.
345 *
346 * @return possible object is
347 * {@link String }
348 */
349 public String getStatus() {
350 return status;
351 }
352
353 /**
354 * Sets the value of the status property.
355 *
356 * @param value allowed object is
357 * {@link String }
358 */
359 public void setStatus(String value) {
360 this.status = value;
361 }
362
363 /**
364 * Gets the value of the statusUpdatedBy property.
365 *
366 * @return possible object is
367 * {@link String }
368 */
369 public String getStatusUpdatedBy() {
370 return statusUpdatedBy;
371 }
372
373 /**
374 * Sets the value of the statusUpdatedBy property.
375 *
376 * @param value allowed object is
377 * {@link String }
378 */
379 public void setStatusUpdatedBy(String value) {
380 this.statusUpdatedBy = value;
381 }
382
383 /**
384 * Gets the value of the statusUpdatedOn property.
385 *
386 * @return possible object is
387 * {@link String }
388 */
389 public String getStatusUpdatedOn() {
390 return statusUpdatedOn;
391 }
392
393 /**
394 * Sets the value of the statusUpdatedOn property.
395 *
396 * @param value allowed object is
397 * {@link String }
398 */
399 public void setStatusUpdatedOn(String value) {
400 this.statusUpdatedOn = value;
401 }
402
403 /**
404 * Gets the value of the type property.
405 *
406 * @return possible object is
407 * {@link String }
408 */
409 public String getType() {
410 return type;
411 }
412
413 /**
414 * Sets the value of the type property.
415 *
416 * @param value allowed object is
417 * {@link String }
418 */
419 public void setType(String value) {
420 this.type = value;
421 }
422
423 /**
424 * Gets the value of the updatedBy property.
425 *
426 * @return possible object is
427 * {@link String }
428 */
429 public String getUpdatedBy() {
430 return updatedBy;
431 }
432
433 /**
434 * Sets the value of the updatedBy property.
435 *
436 * @param value allowed object is
437 * {@link String }
438 */
439 public void setUpdatedBy(String value) {
440 this.updatedBy = value;
441 }
442
443 /**
444 * Gets the value of the updatedOn property.
445 *
446 * @return possible object is
447 * {@link String }
448 */
449 public String getUpdatedOn() {
450 return updatedOn;
451 }
452
453 /**
454 * Sets the value of the updatedOn property.
455 *
456 * @param value allowed object is
457 * {@link String }
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 }