View Javadoc
1   /*
2    * Copyright 2007 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.fp.batch;
17  
18  import java.util.Date;
19  
20  import org.kuali.ole.fp.batch.service.ProcurementCardCreateDocumentService;
21  import org.kuali.ole.sys.batch.AbstractStep;
22  
23  /**
24   * This step will call a service method to create the procurement card documents from the loaded transaction table.
25   */
26  public class ProcurementCardCreateDocumentsStep extends AbstractStep {
27      private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(ProcurementCardCreateDocumentsStep.class);
28      private ProcurementCardCreateDocumentService procurementCardDocumentService;
29  
30      /**
31       * Name of the parameter to use to check if ProcurementCardDefault accounting defaults are turned on
32       */
33      public static final String USE_ACCOUNTING_DEFAULT_PARAMETER_NAME = "PROCUREMENT_CARD_ACCOUNTING_DEFAULT_IND";
34      /**
35       * Name of the parameter to use to check if ProcurementCardDefault card holder defaults are turned on
36       */
37      public static final String USE_CARD_HOLDER_DEFAULT_PARAMETER_NAME = "PROCUREMENT_CARD_HOLDER_DEFAULT_IND";
38  
39      /**
40       * @see org.kuali.ole.sys.batch.Step#execute(java.lang.String, java.util.Date)
41       */
42      public boolean execute(String jobName, Date jobRunDate) {
43          return procurementCardDocumentService.createProcurementCardDocuments();
44      }
45  
46      /**
47       * @param procurementCardDocumentService The procurementCardDocumentService to set.
48       */
49      public void setProcurementCardCreateDocumentService(ProcurementCardCreateDocumentService procurementCardDocumentService) {
50          this.procurementCardDocumentService = procurementCardDocumentService;
51      }
52  }