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.gl.batch;
17  
18  import java.util.Date;
19  
20  import org.kuali.ole.gl.service.OriginEntryGroupService;
21  import org.kuali.ole.sys.batch.AbstractStep;
22  import org.kuali.ole.sys.batch.TestingStep;
23  
24  /**
25   * This step, which would only be run in testing or extraordinary production circumstances, stops the posting fo any postable
26   * scrubber groups.
27   */
28  public class MarkPostableScrubberValidGroupsAsUnpostableStep extends AbstractStep implements TestingStep {
29      private OriginEntryGroupService originEntryGroupService;
30  
31      /**
32       * Marks all ready-to-be-posted scrubber groups as unpostable
33       * 
34       * @param jobName the name of the job this step is being run as part of
35       * @param jobRunDate the time/date the job is being run
36       * @return true if the step completed successfully, false if otherwise
37       * @see org.kuali.ole.sys.batch.Step#execute(String, Date)
38       */
39      public boolean execute(String jobName, Date jobRunDate) throws InterruptedException {
40          
41          //TODO:- need to check
42          //originEntryGroupService.markPostableScrubberValidGroupsAsUnpostable();
43          return true;
44      }
45  
46      /**
47       * Sets the originEntryGroupSerivce, allowing the injection of an implementation of that service
48       * 
49       * @param originEntryGroupService the originEntryGroupService to set
50       * @see org.kuali.ole.gl.service.OriginEntryGroupService
51       */
52      public void setOriginEntryGroupService(OriginEntryGroupService originEntryGroupService) {
53          this.originEntryGroupService = originEntryGroupService;
54      }
55  }