1 package org.kuali.ole.deliver;
2
3 import org.kuali.ole.deliver.api.EntityTypeContactInfoHelper;
4 import org.kuali.ole.deliver.bo.OlePatronLoanDocument;
5 import org.kuali.ole.deliver.bo.OlePatronLoanDocumentContract;
6 import org.kuali.ole.deliver.bo.OlePatronLoanDocuments;
7 import org.kuali.ole.deliver.bo.OlePatronLoanDocumentsContract;
8 import org.kuali.rice.kim.api.identity.type.EntityTypeContactInfo;
9
10 import java.sql.Timestamp;
11 import java.util.Arrays;
12 import java.util.Date;
13 import java.util.List;
14 import java.util.UUID;
15
16
17
18
19
20
21
22
23 public class OlePatronLoanDocumentHelper {
24
25 private static final String ITEM_ID = "2222222222";
26 private static final Date DUE_DATE =new java.sql.Date((new Timestamp(System.currentTimeMillis())).getTime());
27 private static final String LOCATION = "indiana";
28 private static final String AUTHOR = "author";
29 private static final String TITLE = "the legend";
30 private static final String CALLNUMBER = "1234567";
31 private static final String MESSAGE_INFO="valid patron";
32
33
34 private static final String ID="1";
35 private static final boolean ACTIVE = true;
36 private static final Long VERSION_NUMBER = new Long(1);
37 private static final String OBJECT_ID = String.valueOf(UUID.randomUUID());
38
39 private static final EntityTypeContactInfo ENTITY_TYPE_CONTACT = EntityTypeContactInfoHelper.create();
40
41
42 public static OlePatronLoanDocuments create() {
43 return OlePatronLoanDocuments.Builder.create(new OlePatronLoanDocumentsContract() {
44
45
46 @Override
47 public String getId() {
48 return ID;
49 }
50
51 @Override
52 public Long getVersionNumber() {
53 return VERSION_NUMBER;
54 }
55
56
57
58 @Override
59 public List<? extends OlePatronLoanDocumentContract> getOlePatronLoanDocuments() {
60 return Arrays.asList(OlePatronLoanDocument.Builder.create(new OlePatronLoanDocumentContract() {
61
62 @Override
63 public String getMessageInfo() {
64 return MESSAGE_INFO;
65 }
66
67 @Override
68 public String getItemBarcode() {
69 return ITEM_ID;
70 }
71
72 @Override
73 public String getAuthor() {
74 return AUTHOR;
75 }
76
77 @Override
78 public String getTitle() {
79 return TITLE;
80 }
81
82 @Override
83 public Date getDueDate() {
84 return DUE_DATE;
85 }
86
87 @Override
88 public String getLocation() {
89 return LOCATION;
90 }
91
92 @Override
93 public String getCallNumber() {
94 return CALLNUMBER;
95 }
96
97 @Override
98 public String getId() {
99 return ID;
100 }
101
102 @Override
103 public Long getVersionNumber() {
104 return VERSION_NUMBER;
105 }
106
107 }).build());
108 }
109
110 }).build();
111 }
112
113
114
115 }