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