1 /* 2 * Copyright 2006 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.module.purap.document; 17 18 import org.kuali.ole.module.purap.businessobject.PurchaseOrderContractLanguage; 19 import org.kuali.ole.sys.context.SpringContext; 20 import org.kuali.ole.sys.document.FinancialSystemMaintainable; 21 import org.kuali.rice.core.api.datetime.DateTimeService; 22 import org.kuali.rice.kns.document.MaintenanceDocument; 23 24 import java.util.Map; 25 26 /** 27 * A special implementation of Maintainable specifically for PurchaseOrderContractLanguage 28 * maintenance page to override the behavior when the PurchaseOrderContractLanguage 29 * maintenance document is copied. 30 */ 31 public class PurchaseOrderContractLanguageMaintainableImpl extends FinancialSystemMaintainable { 32 33 /** 34 * Overrides the method in KualiMaintainableImpl to set the contract language create date 35 * to current date. 36 * 37 * @see org.kuali.rice.kns.maintenance.KualiMaintainableImpl#processAfterCopy() 38 */ 39 @Override 40 public void processAfterCopy(MaintenanceDocument document, Map<String, String[]> parameters) { 41 PurchaseOrderContractLanguage pocl = (PurchaseOrderContractLanguage) super.getBusinessObject(); 42 pocl.setContractLanguageCreateDate(SpringContext.getBean(DateTimeService.class).getCurrentSqlDate()); 43 super.processAfterCopy(document, parameters); 44 } 45 46 }