01: /*
02: * Copyright 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.PurchaseOrderQuoteLanguage;
22:
23: /*
24: * THIS CODE IS NOT USED IN RELEASE 2 BUT THE CODE WAS LEFT IN TO
25: * FACILITATE TURNING IT BACK ON EARLY IN THE DEVELOPMENT CYCLE OF RELEASE 3.
26: *
27: * A special implementation of Maintainable specifically for PurchaseOrderQuoteLanguage
28: * maintenance page to override the behavior when the PurchaseOrderQuoteLanguage
29: * maintenance document is copied.
30: */
31: public class PurchaseOrderQuoteLanguageMaintainableImpl extends
32: KualiMaintainableImpl {
33:
34: /**
35: * Overrides the method in KualiMaintainableImpl to invoke the
36: * initializePoQuoteLanguage to set the create date to the current date.
37: *
38: * @see org.kuali.core.maintenance.KualiMaintainableImpl#processAfterCopy()
39: */
40: @Override
41: public void processAfterCopy() {
42: intializePoQuoteLangauge();
43: }
44:
45: /**
46: * Sets the create date of the PurchaseOrderQuoteLanguage document to the
47: * current date.
48: */
49: private void intializePoQuoteLangauge() {
50: // set create date
51: PurchaseOrderQuoteLanguage poql = (PurchaseOrderQuoteLanguage) super
52: .getBusinessObject();
53: poql.setPurchaseOrderQuoteLanguageCreateDate(SpringContext
54: .getBean(DateTimeService.class).getCurrentSqlDate());
55: }
56: }
|