1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.module.cg.web.struts;
17
18 import java.util.Date;
19
20 import org.kuali.ole.module.cg.document.ProposalAwardCloseDocument;
21 import org.kuali.ole.module.cg.service.CloseService;
22 import org.kuali.ole.sys.context.SpringContext;
23 import org.kuali.ole.sys.document.web.struts.FinancialSystemTransactionalDocumentFormBase;
24 import org.kuali.rice.core.web.format.DateFormatter;
25
26 public class CloseForm extends FinancialSystemTransactionalDocumentFormBase {
27
28 public CloseForm() {
29 super();
30 setFormatterType("document.userInitiatedCloseDate", DateFormatter.class);
31 setFormatterType("document.closeOnOrBeforeDate", DateFormatter.class);
32 }
33
34 @Override
35 protected String getDefaultDocumentTypeName() {
36 return "OLE_CLOS";
37 }
38
39 public ProposalAwardCloseDocument getMostRecentClose() {
40 return SpringContext.getBean(CloseService.class).getMostRecentClose();
41 }
42
43 public ProposalAwardCloseDocument getCloseDocument() {
44 return (ProposalAwardCloseDocument) getDocument();
45 }
46
47 public void setClose(ProposalAwardCloseDocument document) {
48 setDocument(document);
49 }
50
51 public Date getUserInitiatedCloseDate() {
52 return getCloseDocument().getUserInitiatedCloseDate();
53 }
54
55 public void setUserInitiatedCloseDate(Date date) {
56 getCloseDocument().setUserInitiatedCloseDate(new java.sql.Date(date.getTime()));
57 }
58
59 public Date getCloseOnOrBeforeDate() {
60 return getCloseDocument().getCloseOnOrBeforeDate();
61 }
62
63 public void setCloseOnOrBeforeDate(Date date) {
64 getCloseDocument().setCloseOnOrBeforeDate(new java.sql.Date(date.getTime()));
65 }
66
67 }