View Javadoc

1   package org.kuali.ole.license.bo;
2   
3   import org.apache.commons.lang.StringUtils;
4   import org.kuali.rice.core.api.CoreApiServiceLocator;
5   import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
6   
7   import java.sql.Timestamp;
8   
9   /**
10   * OleAgreementDocumentMetadata is the business object class for Agreement.
11   */
12  public class OleAgreementDocumentMetadata extends PersistableBusinessObjectBase{
13      private Timestamp uploadedDate;
14      private String uploadedBy;
15      private String agreementType;
16      private String agreementName;
17      private String agreementFileName;
18      private String agreementNotes;
19      private String agreementVersion;
20      private String agreementMimeType;
21      private String agreementUUID;
22      private String oleAgreementDocumentId;
23      private String oleLicenseRequestId;
24      private OleLicenseRequestBo oleLicenseRequestBo;
25  
26      /**
27       *  Gets the uploadedDate attribute.
28       * @return  Returns the uploadedDate
29       */
30      public Timestamp getUploadedDate() {
31          return uploadedDate;
32      }
33  
34      /**
35       * Sets the uploadedDate attribute value.
36       * @param uploadedDate The uploadedDate to set.
37       */
38      public void setUploadedDate(Timestamp uploadedDate) {
39          this.uploadedDate = uploadedDate;
40      }
41  
42      /**
43       *  Gets the uploadedBy attribute.
44       * @return  Returns the uploadedBy
45       */
46      public String getUploadedBy() {
47          return uploadedBy;
48      }
49  
50      /**
51       * Sets the uploadedBy attribute value.
52       * @param uploadedBy The uploadedBy to set.
53       */
54      public void setUploadedBy(String uploadedBy) {
55          this.uploadedBy = uploadedBy;
56      }
57  
58      /**
59       *  Gets the agreementType attribute.
60       * @return  Returns the agreementType
61       */
62      public String getAgreementType() {
63          return agreementType;
64      }
65  
66      /**
67       * Sets the agreementType attribute value.
68       * @param agreementType The agreementType to set.
69       */
70      public void setAgreementType(String agreementType) {
71          this.agreementType = agreementType;
72      }
73  
74      /**
75       *  Gets the agreementName attribute.
76       * @return  Returns the agreementName
77       */
78      public String getAgreementName() {
79          return agreementName;
80      }
81  
82      /**
83       * Sets the agreementName attribute value.
84       * @param agreementName The agreementName to set.
85       */
86      public void setAgreementName(String agreementName) {
87          this.agreementName = agreementName;
88      }
89  
90      /**
91       *  Gets the agreementFileName attribute.
92       * @return  Returns the agreementFileName
93       */
94      public String getAgreementFileName() {
95          return agreementFileName;
96      }
97  
98      /**
99       * Sets the agreementFileName attribute value.
100      * @param agreementFileName The agreementFileName to set.
101      */
102     public void setAgreementFileName(String agreementFileName) {
103         this.agreementFileName = agreementFileName;
104     }
105 
106     /**
107      *  Gets the agreementNotes attribute.
108      * @return  Returns the agreementNotes
109      */
110     public String getAgreementNotes() {
111         return agreementNotes;
112     }
113 
114     /**
115      * Sets the agreementNotes attribute value.
116      * @param agreementNotes The agreementNotes to set.
117      */
118     public void setAgreementNotes(String agreementNotes) {
119         this.agreementNotes = agreementNotes;
120     }
121 
122     /**
123      *  Gets the agreementVersion attribute.
124      * @return  Returns the agreementVersion
125      */
126     public String getAgreementVersion() {
127         return agreementVersion;
128     }
129 
130     /**
131      * Sets the agreementVersion attribute value.
132      * @param agreementVersion The agreementVersion to set.
133      */
134     public void setAgreementVersion(String agreementVersion) {
135         this.agreementVersion = agreementVersion;
136     }
137 
138     /**
139      *  Gets the agreementMimeType attribute.
140      * @return  Returns the agreementMimeType
141      */
142     public String getAgreementMimeType() {
143         return agreementMimeType;
144     }
145 
146     /**
147      * Sets the agreementMimeType attribute value.
148      * @param agreementMimeType The agreementMimeType to set.
149      */
150     public void setAgreementMimeType(String agreementMimeType) {
151         this.agreementMimeType = agreementMimeType;
152     }
153 
154     /**
155      *  Gets the agreementUUID attribute.
156      * @return  Returns the agreementUUID
157      */
158     public String getAgreementUUID() {
159         return agreementUUID;
160     }
161 
162     /**
163      * Sets the agreementUUID attribute value.
164      * @param agreementUUID The agreementUUID to set.
165      */
166     public void setAgreementUUID(String agreementUUID) {
167         this.agreementUUID = agreementUUID;
168     }
169 
170     /**
171      *  Gets the oleAgreementDocumentId attribute.
172      * @return  Returns the oleAgreementDocumentId
173      */
174     public String getOleAgreementDocumentId() {
175         return oleAgreementDocumentId;
176     }
177 
178     /**
179      * Sets the oleAgreementDocumentId attribute value.
180      * @param oleAgreementDocumentId The oleAgreementDocumentId to set.
181      */
182     public void setOleAgreementDocumentId(String oleAgreementDocumentId) {
183         this.oleAgreementDocumentId = oleAgreementDocumentId;
184     }
185 
186     /**
187      *  Gets the oleLicenseRequestId attribute.
188      * @return  Returns the oleLicenseRequestId
189      */
190     public String getOleLicenseRequestId() {
191         return oleLicenseRequestId;
192     }
193 
194     /**
195      * Sets the oleLicenseRequestId attribute value.
196      * @param oleLicenseRequestId The oleLicenseRequestId to set.
197      */
198     public void setOleLicenseRequestId(String oleLicenseRequestId) {
199         this.oleLicenseRequestId = oleLicenseRequestId;
200     }
201 
202     /**
203      *  Gets the oleLicenseRequestBo attribute.
204      * @return  Returns the oleLicenseRequestBo
205      */
206     public OleLicenseRequestBo getOleLicenseRequestBo() {
207         return oleLicenseRequestBo;
208     }
209 
210     /**
211      * Sets the oleLicenseRequestBo attribute value.
212      * @param oleLicenseRequestBo The oleLicenseRequestBo to set.
213      */
214     public void setOleLicenseRequestBo(OleLicenseRequestBo oleLicenseRequestBo) {
215         this.oleLicenseRequestBo = oleLicenseRequestBo;
216     }
217 
218     /**
219      *  Gets the isComplete attribute.
220      * @return  boolean
221      */
222     public boolean isComplete() {
223         return StringUtils.isNotBlank(agreementFileName) && StringUtils.isNotBlank(agreementMimeType);
224     }
225 
226     /**
227      * Sets the setUploadedDate attribute value.
228      *
229      * */
230     public void setCurrentTimeStamp() {
231         final Timestamp now = CoreApiServiceLocator.getDateTimeService().getCurrentTimestamp();
232         this.setUploadedDate(now);
233     }
234 }