001 /* 002 * Copyright 2011 The Kuali Foundation. 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 package org.kuali.kfs.sys.service; 017 018 import org.kuali.rice.kns.service.ModuleService; 019 020 /** 021 * This class defines methods needed for batch to run successfully when there are dependencies on jobs that are run on external systems. 022 * Implementations of this interface are able to keep track of external job status and report it to the scheduler service. 023 * 024 */ 025 public interface BatchModuleService { 026 027 /** 028 * This method returns whether a job is run on an external system. 029 * 030 * @param jobName a job name, such that calling {@link #isResponsibleForJob(String)} with this job name would return true 031 * @return whether this job runs from an external system 032 */ 033 public boolean isExternalJob(String jobName); 034 035 /** 036 * This method returns the status of the given external job. 037 * 038 * @param jobName a job name, such that calling {@link #isResponsibleForJob(String)} with this job name would return true 039 * @return one of the status code constants defined in {@link org.kuali.kfs.sys.batch.service.SchedulerService} 040 */ 041 public String getExternalJobStatus(String jobName); 042 043 }