package com.yeejoin.amos.supervision.quartz;

import org.quartz.Job;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;


public class PlanTaskJobService implements Job {

	private IJobService jobService;
	
	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException {
		JobDataMap jobDataMap = context.getJobDetail().getJobDataMap();
		setJobService((IJobService) jobDataMap.get("jobService"));
		jobService.planTaskJobPerform(Long.valueOf(jobDataMap.get("id").toString()),jobDataMap.get("jobType").toString(),jobDataMap.get("jobName").toString());
	}
	
	public IJobService getJobService() {
		return jobService;
	}

	public void setJobService(IJobService jobService) {
		this.jobService = jobService;
	}

}
