View Javadoc
1   /*
2    * The Kuali Financial System, a comprehensive financial management system for higher education.
3    * 
4    * Copyright 2005-2014 The Kuali Foundation
5    * 
6    * This program is free software: you can redistribute it and/or modify
7    * it under the terms of the GNU Affero General Public License as
8    * published by the Free Software Foundation, either version 3 of the
9    * License, or (at your option) any later version.
10   * 
11   * This program is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   * GNU Affero General Public License for more details.
15   * 
16   * You should have received a copy of the GNU Affero General Public License
17   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18   */
19  package org.kuali.kfs.module.cam.document.web.struts;
20  
21  import javax.servlet.http.HttpServletRequest;
22  
23  import org.apache.struts.action.ActionMapping;
24  import org.kuali.kfs.module.cam.document.AssetTransferDocument;
25  import org.kuali.kfs.sys.context.SpringContext;
26  import org.kuali.kfs.sys.document.web.struts.FinancialSystemTransactionalDocumentFormBase;
27  import org.kuali.rice.kns.service.BusinessObjectDictionaryService;
28  
29  public class AssetTransferForm extends FinancialSystemTransactionalDocumentFormBase {
30      protected boolean loanNoteAdded;
31  
32      public AssetTransferForm() {
33          super();
34      }
35  
36      @Override
37      protected String getDefaultDocumentTypeName() {
38          return "AT";
39      }
40      
41      public AssetTransferDocument getAssetTransferDocument() {
42          return (AssetTransferDocument) getDocument();
43      }
44  
45      @Override
46      public void populate(HttpServletRequest request) {
47          super.populate(request);
48          SpringContext.getBean(BusinessObjectDictionaryService.class).performForceUppercase(getAssetTransferDocument());
49      }
50  
51      @Override
52      public void reset(ActionMapping mapping, HttpServletRequest request) {
53          super.reset(mapping, request);
54          getAssetTransferDocument().setInterdepartmentalSalesIndicator(false);
55      }
56  
57      public boolean isLoanNoteAdded() {
58          return loanNoteAdded;
59      }
60  
61      public void setLoanNoteAdded(boolean loanNoteAdded) {
62          this.loanNoteAdded = loanNoteAdded;
63      }
64  
65  }