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.businessobject.InternalBillingItem;
020 import org.kuali.kfs.fp.document.CapitalAssetEditable;
021 import org.kuali.kfs.fp.document.InternalBillingDocument;
022 import org.kuali.kfs.sys.web.struts.KualiAccountingDocumentFormBase;
023
024 /**
025 * This class is the action form for Internal Billing.
026 */
027 public class InternalBillingForm extends KualiAccountingDocumentFormBase implements CapitalAssetEditable{
028 protected static final long serialVersionUID = 1L;
029 protected InternalBillingItem newItem;
030
031 protected CapitalAssetInformation capitalAssetInformation;
032
033 public InternalBillingForm() {
034 super();
035 this.newItem = new InternalBillingItem();
036 this.setCapitalAssetInformation(new CapitalAssetInformation());
037 }
038
039 @Override
040 protected String getDefaultDocumentTypeName() {
041 return "IB";
042 }
043
044 /**
045 * @return Returns the internalBillingDocument.
046 */
047 public InternalBillingDocument getInternalBillingDocument() {
048 return (InternalBillingDocument) getDocument();
049 }
050
051 /**
052 * @param internalBillingDocument The internalBillingDocument to set.
053 */
054 public void setInternalBillingDocument(InternalBillingDocument internalBillingDocument) {
055 setDocument(internalBillingDocument);
056 }
057
058 /**
059 * @return Returns the newItem.
060 */
061 public InternalBillingItem getNewItem() {
062 return newItem;
063 }
064
065 /**
066 * @param newItem The newItem to set.
067 */
068 public void setNewItem(InternalBillingItem newItem) {
069 this.newItem = newItem;
070 }
071
072 /**
073 * @see org.kuali.kfs.fp.document.CapitalAssetEditable#getCapitalAssetInformation()
074 */
075 public CapitalAssetInformation getCapitalAssetInformation() {
076 return this.capitalAssetInformation;
077 }
078
079 /**
080 * @see org.kuali.kfs.fp.document.CapitalAssetEditable#setCapitalAssetInformation(org.kuali.kfs.fp.businessobject.CapitalAssetInformation)
081 */
082 public void setCapitalAssetInformation(CapitalAssetInformation capitalAssetInformation) {
083 this.capitalAssetInformation = capitalAssetInformation;
084 }
085 }