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 will mark all backup groups in the database so that they will not be scrubbed when the nightly scrubber step runs
26   * again.
27   */
28  public class MarkScrubbableBackupGroupsAsUnscrubbableStep extends AbstractStep implements TestingStep {
29      private OriginEntryGroupService originEntryGroupService;
30  
31      /**
32       * Marks all scrubbable backup groups as unscrubbable
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(java.lang.String)
38       */
39      public boolean execute(String jobName, Date jobRunDate) throws InterruptedException {
40          //TODO:- This step is not running. 
41          //originEntryGroupService.markScrubbableBackupGroupsAsUnscrubbable();
42          return true;
43      }
44  
45      /**
46       * Sets the originEntryGroupSerivce, allowing the injection of an implementation of that service
47       * 
48       * @param originEntryGroupService an implementation originEntryGroupService to set
49       * @see org.kuali.ole.gl.service.OriginEntryGroupService
50       */
51      public void setOriginEntryGroupService(OriginEntryGroupService originEntryGroupService) {
52          this.originEntryGroupService = originEntryGroupService;
53      }
54  }