01: /*
02: * Copyright 2006-2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
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.module.purap.maintenance;
17:
18: import org.kuali.core.maintenance.KualiMaintainableImpl;
19: import org.kuali.core.service.DateTimeService;
20: import org.kuali.kfs.context.SpringContext;
21: import org.kuali.module.purap.bo.PurchaseOrderContractLanguage;
22:
23: /**
24: * A special implementation of Maintainable specifically for PurchaseOrderContractLanguage
25: * maintenance page to override the behavior when the PurchaseOrderContractLanguage
26: * maintenance document is copied.
27: */
28: public class PurchaseOrderContractLanguageMaintainableImpl extends
29: KualiMaintainableImpl {
30:
31: /**
32: * Overrides the method in KualiMaintainableImpl to set the contract language create date
33: * to current date.
34: *
35: * @see org.kuali.core.maintenance.KualiMaintainableImpl#processAfterCopy()
36: */
37: @Override
38: public void processAfterCopy() {
39: PurchaseOrderContractLanguage pocl = (PurchaseOrderContractLanguage) super
40: .getBusinessObject();
41: pocl.setContractLanguageCreateDate(SpringContext.getBean(
42: DateTimeService.class).getCurrentSqlDate());
43: }
44:
45: }
|