Package org.pentaho.platform.api.scheduler2.Job

Examples of org.pentaho.platform.api.scheduler2.Job.JobState


        setJobTrigger( scheduler, job, trigger );
        job.setUserName( jobDetail.getGroup() );
        return job;
      }
    } catch ( org.quartz.SchedulerException e ) {
      throw new SchedulerException( Messages.getInstance().getString(
          "QuartzScheduler.ERROR_0007_FAILED_TO_GET_JOB", jobId ), e ); //$NON-NLS-1$
    }
    return null;
  }
View Full Code Here


            }
          }
        }
      }
    } catch ( org.quartz.SchedulerException e ) {
      throw new SchedulerException(
          Messages.getInstance().getString( "QuartzScheduler.ERROR_0004_FAILED_TO_LIST_JOBS" ), e ); //$NON-NLS-1$
    }
    return jobs;
  }
View Full Code Here

  /** {@inheritDoc} */
  public void pause() throws SchedulerException {
    try {
      getQuartzScheduler().standby();
    } catch ( org.quartz.SchedulerException e ) {
      throw new SchedulerException( e );
    }
  }
View Full Code Here

  public void pauseJob( String jobId ) throws SchedulerException {
    try {
      Scheduler scheduler = getQuartzScheduler();
      scheduler.pauseJob( jobId, QuartzJobKey.parse( jobId ).getUserName() );
    } catch ( org.quartz.SchedulerException e ) {
      throw new SchedulerException( Messages.getInstance()
          .getString( "QuartzScheduler.ERROR_0005_FAILED_TO_PAUSE_JOBS" ), e ); //$NON-NLS-1$
    }
  }
View Full Code Here

  public void removeJob( String jobId ) throws SchedulerException {
    try {
      Scheduler scheduler = getQuartzScheduler();
      scheduler.deleteJob( jobId, QuartzJobKey.parse( jobId ).getUserName() );
    } catch ( org.quartz.SchedulerException e ) {
      throw new SchedulerException( Messages.getInstance()
          .getString( "QuartzScheduler.ERROR_0005_FAILED_TO_PAUSE_JOBS" ), e ); //$NON-NLS-1$
    }
  }
View Full Code Here

  /** {@inheritDoc} */
  public void start() throws SchedulerException {
    try {
      getQuartzScheduler().start();
    } catch ( org.quartz.SchedulerException e ) {
      throw new SchedulerException( e );
    }
  }
View Full Code Here

  public void resumeJob( String jobId ) throws SchedulerException {
    try {
      Scheduler scheduler = getQuartzScheduler();
      scheduler.resumeJob( jobId, QuartzJobKey.parse( jobId ).getUserName() );
    } catch ( org.quartz.SchedulerException e ) {
      throw new SchedulerException( Messages.getInstance().getString(
          "QuartzScheduler.ERROR_0005_FAILED_TO_RESUME_JOBS" ), e ); //$NON-NLS-1$
    }
  }
View Full Code Here

        schedulerStatus = SchedulerStatus.PAUSED;
      } else if ( getQuartzScheduler().isStarted() ) {
        schedulerStatus = SchedulerStatus.RUNNING;
      }
    } catch ( org.quartz.SchedulerException e ) {
      throw new SchedulerException( Messages.getInstance().getString(
          "QuartzScheduler.ERROR_0006_FAILED_TO_GET_SCHEDULER_STATUS" ), e ); //$NON-NLS-1$
    }
    return schedulerStatus;
  }
View Full Code Here

  public void shutdown() throws SchedulerException {
    try {
      boolean waitForJobsToComplete = true;
      getQuartzScheduler().shutdown( waitForJobsToComplete );
    } catch ( org.quartz.SchedulerException e ) {
      throw new SchedulerException( e );
    }
  }
View Full Code Here

   *          the user who is executing this job
   * @throws SchedulerException
   */
  public QuartzJobKey( String jobName, String username ) throws SchedulerException {
    if ( StringUtils.isEmpty( jobName ) ) {
      throw new SchedulerException( Messages.getInstance().getErrorString( "QuartzJobKey.ERROR_0000" ) ); //$NON-NLS-1$
    }
    if ( StringUtils.isEmpty( username ) ) {
      throw new SchedulerException( Messages.getInstance().getErrorString( "QuartzJobKey.ERROR_0001" ) ); //$NON-NLS-1$
    }
    userName = username;
    this.jobName = jobName;
    timeInMillis = System.currentTimeMillis();
  }
View Full Code Here

TOP

Related Classes of org.pentaho.platform.api.scheduler2.Job.JobState

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.