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