View Javadoc
1   /*
2    * Copyright 2006 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.module.purap.batch;
17  
18  import org.kuali.ole.module.purap.batch.service.MigratePurapStatCodeToWorkflowDocumentService;
19  import org.kuali.ole.sys.batch.AbstractWrappedBatchStep;
20  import org.kuali.ole.sys.batch.service.WrappedBatchExecutorService.CustomBatchExecutor;
21  
22  /**
23   * step to move status code from purap documents to applicationdocumentstatus on workflow documents side.
24   */
25  public class MigratePurapStatCodeToWorkflowDocumentStep extends AbstractWrappedBatchStep {
26  
27      protected MigratePurapStatCodeToWorkflowDocumentService migratePurapStatCodeToWorkflowDocumentService;
28      protected static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(MigratePurapStatCodeToWorkflowDocumentStep.class);
29      protected String batchFileDirectoryName;
30  
31      /**
32       * Overridden to run the auto disapprove process.
33       *
34       * @see org.kuali.ole.batch.Step#execute(java.lang.String)
35       */
36      @Override
37      protected CustomBatchExecutor getCustomBatchExecutor() {
38          return new CustomBatchExecutor() {
39              public boolean execute() {
40                  boolean success = true;
41                  success = migratePurapStatCodeToWorkflowDocumentService.migratePurapStatCodeToWorkflowDocuments();
42  
43                  return success;
44              }
45          };
46      }
47  
48      /**
49       * This method sets the batchFileDirectoryName
50       *
51       * @param batchFileDirectoryName
52       */
53      public void setBatchFileDirectoryName(String batchFileDirectoryName) {
54          this.batchFileDirectoryName = batchFileDirectoryName;
55      }
56  
57      /**
58       * Gets the migratePurapStatCodeToWorkflowDocumentService attribute.
59       *
60       * @return Returns the migratePurapStatCodeToWorkflowDocumentService
61       */
62  
63      public MigratePurapStatCodeToWorkflowDocumentService getMigratePurapStatCodeToWorkflowDocumentService() {
64          return migratePurapStatCodeToWorkflowDocumentService;
65      }
66  
67      /**
68       * Sets the migratePurapStatCodeToWorkflowDocumentService attribute.
69       *
70       * @param migratePurapStatCodeToWorkflowDocumentService
71       *         The migratePurapStatCodeToWorkflowDocumentService to set.
72       */
73      public void setMigratePurapStatCodeToWorkflowDocumentService(MigratePurapStatCodeToWorkflowDocumentService migratePurapStatCodeToWorkflowDocumentService) {
74          this.migratePurapStatCodeToWorkflowDocumentService = migratePurapStatCodeToWorkflowDocumentService;
75      }
76  }