001package org.kuali.ole.deliver; 002 003import org.kuali.ole.deliver.api.EntityTypeContactInfoHelper; 004import org.kuali.ole.deliver.bo.OlePatronLoanDocument; 005import org.kuali.ole.deliver.bo.OlePatronLoanDocumentContract; 006import org.kuali.ole.deliver.bo.OlePatronLoanDocuments; 007import org.kuali.ole.deliver.bo.OlePatronLoanDocumentsContract; 008import org.kuali.rice.kim.api.identity.type.EntityTypeContactInfo; 009 010import java.sql.Timestamp; 011import java.util.Arrays; 012import java.util.Date; 013import java.util.List; 014import java.util.UUID; 015 016/** 017 * Created with IntelliJ IDEA. 018 * User: pvsubrah 019 * Date: 5/31/12 020 * Time: 12:11 PM 021 * To change this template use File | Settings | File Templates. 022 */ 023public class OlePatronLoanDocumentHelper { 024 025 private static final String ITEM_ID = "2222222222"; 026 private static final Date DUE_DATE =new java.sql.Date((new Timestamp(System.currentTimeMillis())).getTime()); 027 private static final String LOCATION = "indiana"; 028 private static final String AUTHOR = "author"; 029 private static final String TITLE = "the legend"; 030 private static final String CALLNUMBER = "1234567"; 031 private static final String MESSAGE_INFO="valid patron"; 032 033 034 private static final String ID="1"; 035 private static final boolean ACTIVE = true; 036 private static final Long VERSION_NUMBER = new Long(1); 037 private static final String OBJECT_ID = String.valueOf(UUID.randomUUID()); 038 039 private static final EntityTypeContactInfo ENTITY_TYPE_CONTACT = EntityTypeContactInfoHelper.create(); 040 041 042 public static OlePatronLoanDocuments create() { 043 return OlePatronLoanDocuments.Builder.create(new OlePatronLoanDocumentsContract() { 044 045 046 @Override 047 public String getId() { 048 return ID; 049 } 050 051 @Override 052 public Long getVersionNumber() { 053 return VERSION_NUMBER; 054 } 055 056 057 058 @Override 059 public List<? extends OlePatronLoanDocumentContract> getOlePatronLoanDocuments() { 060 return Arrays.asList(OlePatronLoanDocument.Builder.create(new OlePatronLoanDocumentContract() { 061 062 @Override 063 public String getMessageInfo() { 064 return MESSAGE_INFO; 065 } 066 067 @Override 068 public String getItemBarcode() { 069 return ITEM_ID; 070 } 071 072 @Override 073 public String getAuthor() { 074 return AUTHOR; 075 } 076 077 @Override 078 public String getTitle() { 079 return TITLE; 080 } 081 082 @Override 083 public Date getDueDate() { 084 return DUE_DATE; 085 } 086 087 @Override 088 public String getLocation() { 089 return LOCATION; 090 } 091 092 @Override 093 public String getCallNumber() { 094 return CALLNUMBER; 095 } 096 097 @Override 098 public String getId() { 099 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}