View Javadoc
1   /*
2    * Copyright 2005 The Kuali Foundation
3    * 
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    * http://www.opensource.org/licenses/ecl2.php
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.ole.fp.document.web.struts;
17  
18  import org.kuali.ole.fp.document.PreEncumbranceDocument;
19  import org.kuali.ole.sys.web.struts.KualiAccountingDocumentFormBase;
20  
21  /**
22   * This class is the Struts specific form object that works in conjunction with the pojo utilities to build the UI.
23   */
24  public class PreEncumbranceForm extends KualiAccountingDocumentFormBase {
25      private static final long serialVersionUID = 1L;
26  
27      /**
28       * Constructs a PreEncumbranceForm.java.
29       */
30      public PreEncumbranceForm() {
31          super();
32      }
33  
34      @Override
35      protected String getDefaultDocumentTypeName() {
36          return "OLE_PE";
37      }
38      
39      /**
40       * @return Returns the preEncumbranceDocument.
41       */
42      public PreEncumbranceDocument getPreEncumbranceDocument() {
43          return (PreEncumbranceDocument) getDocument();
44      }
45  
46      /**
47       * @param preEncumbranceDocument The preEncumbranceDocument to set.
48       */
49      public void setPreEncumbranceDocument(PreEncumbranceDocument preEncumbranceDocument) {
50          setDocument(preEncumbranceDocument);
51      }
52  
53      /**
54       * This method returns the reversal date in the format MMM d, yyyy.
55       * 
56       * @return String
57       */
58      public String getFormattedReversalDate() {
59          return formatReversalDate(getPreEncumbranceDocument().getReversalDate());
60      }
61  }