001 /* 002 * Copyright 2011 The Kuali Foundation. 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 package org.kuali.kfs.fp.document.web.struts; 017 018 import org.kuali.kfs.fp.businessobject.CapitalAssetInformation; 019 import org.kuali.kfs.fp.document.CapitalAssetEditable; 020 import org.kuali.kfs.fp.document.DistributionOfIncomeAndExpenseDocument; 021 import org.kuali.kfs.sys.web.struts.KualiAccountingDocumentFormBase; 022 023 /** 024 * This class is the action form for Distribution of Income and Expense. 025 */ 026 public class DistributionOfIncomeAndExpenseForm extends KualiAccountingDocumentFormBase implements CapitalAssetEditable{ 027 028 protected CapitalAssetInformation capitalAssetInformation; 029 030 /** 031 * Constructs a DistributionOfIncomeAndExpenseForm.java. 032 */ 033 public DistributionOfIncomeAndExpenseForm() { 034 super(); 035 this.setCapitalAssetInformation(new CapitalAssetInformation()); 036 } 037 038 @Override 039 protected String getDefaultDocumentTypeName() { 040 return "DI"; 041 } 042 043 /** 044 * @return Returns the DistributionOfIncomeAndExpenseDocument. 045 */ 046 public DistributionOfIncomeAndExpenseDocument getDistributionOfIncomeAndExpenseDocument() { 047 return (DistributionOfIncomeAndExpenseDocument) getDocument(); 048 } 049 050 /** 051 * @param distributionOfIncomeAndExpenseDocument 052 */ 053 public void setDistributionOfIncomeAndExpenseDocument(DistributionOfIncomeAndExpenseDocument distributionOfIncomeAndExpenseDocument) { 054 setDocument(distributionOfIncomeAndExpenseDocument); 055 } 056 057 /** 058 * @see org.kuali.kfs.fp.document.CapitalAssetEditable#getCapitalAssetInformation() 059 */ 060 public CapitalAssetInformation getCapitalAssetInformation() { 061 return capitalAssetInformation; 062 } 063 064 /** 065 * @see org.kuali.kfs.fp.document.CapitalAssetEditable#setCapitalAssetInformation(org.kuali.kfs.fp.businessobject.CapitalAssetInformation) 066 */ 067 public void setCapitalAssetInformation(CapitalAssetInformation capitalAssetInformation) { 068 this.capitalAssetInformation = capitalAssetInformation; 069 } 070 }