org.pentaho.platform.api.engine
Interface ISubscriptionScheduler

All Known Implementing Classes:
QuartzSubscriptionScheduler

public interface ISubscriptionScheduler

Interface class between the subscription repository and the implementation of the scheduler.

Author:
dmoran

Method Summary
 IScheduledJob deleteJob(String jobName)
          Delete the job.
 IScheduledJob executeJob(String jobName)
          Execute the job.
 String getCronSummary(String cron)
           
 IScheduledJob getScheduledJob(String schedRef)
          Returns the IScheduledJob for the passed in schedule reference from the scheduling system
 Map<String,IScheduledJob> getScheduledJobMap()
           
 List getScheduledJobs()
          Returns a List of all IScheduledJobs that are currently in the subscription scheduling system
 int getSchedulerState()
           
 IScheduledJob pauseJob(String jobName)
          Pause the job.
 void pauseScheduler()
           
 IScheduledJob resumeJob(String jobName)
          Resume the job.
 void resumeScheduler()
           
 IScheduledJob scheduleJob(ISchedule schedule)
           
 List syncSchedule(List newSchedules)
          Synchronizes schedules between the subscription repos and the scheduling system
 IScheduledJob syncSchedule(String oldScheduleReference, ISchedule newSchedule)
          Synchronizes schedules between the subscription repos and the scheduling system
 

Method Detail

syncSchedule

IScheduledJob syncSchedule(String oldScheduleReference,
                           ISchedule newSchedule)
                           throws SubscriptionSchedulerException
Synchronizes schedules between the subscription repos and the scheduling system

Parameters:
oldSchedule - The name of the schedule to modify or delete. If null, then the operation is treated as an add.
newSchedule - The schedule to modify or add. If null, then the operation is treated as an delete.
Returns:
true if successfull
Throws:
SubscriptionSchedulerException

syncSchedule

List syncSchedule(List newSchedules)
                  throws Exception
Synchronizes schedules between the subscription repos and the scheduling system

Parameters:
newSchedules - The list of schedules that should exist. Any schedules not in the list should be deleted
Returns:
list of exception messages
Throws:
Exception

getScheduledJobs

List getScheduledJobs()
Returns a List of all IScheduledJobs that are currently in the subscription scheduling system


getScheduledJob

IScheduledJob getScheduledJob(String schedRef)
                              throws SubscriptionSchedulerException
Returns the IScheduledJob for the passed in schedule reference from the scheduling system

Throws:
Exception
SubscriptionSchedulerException

getScheduledJobMap

Map<String,IScheduledJob> getScheduledJobMap()
                                             throws Exception
Throws:
Exception

pauseJob

IScheduledJob pauseJob(String jobName)
                       throws Exception
Pause the job. NOTE: in the quartz implementation, the value of the jobName parameter should be the trigger name associated with the job to be paused.

Parameters:
jobName -
Returns:
Throws:
Exception

resumeJob

IScheduledJob resumeJob(String jobName)
                        throws Exception
Resume the job. NOTE: in the quartz implementation, the value of the jobName parameter should be the trigger name associated with the job to be resumed.

Parameters:
jobName -
Returns:
Throws:
Exception

executeJob

IScheduledJob executeJob(String jobName)
                         throws Exception
Execute the job. NOTE: in the quartz implementation, the value of the jobName parameter should be the trigger name associated with the job to be executed.

Parameters:
jobName -
Returns:
Throws:
Exception

deleteJob

IScheduledJob deleteJob(String jobName)
                        throws Exception
Delete the job. NOTE: in the quartz implementation, the value of the jobName parameter should be the trigger name associated with the job to be deleted.

Parameters:
jobName -
Returns:
Throws:
Exception

scheduleJob

IScheduledJob scheduleJob(ISchedule schedule)
                          throws Exception
Throws:
Exception

getSchedulerState

int getSchedulerState()
                      throws Exception
Throws:
Exception

pauseScheduler

void pauseScheduler()
                    throws Exception
Throws:
Exception

resumeScheduler

void resumeScheduler()
                     throws Exception
Throws:
Exception

getCronSummary

String getCronSummary(String cron)
                      throws Exception
Throws:
Exception