package com.yeejoin.amos.maintenance.quartz;

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

public class MsgJobService implements Job{
	
	private IJobService jobService;
	
	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException {
		JobDataMap jobDataMap = context.getJobDetail().getJobDataMap();
		setJobService((IJobService) jobDataMap.get("jobService"));
		jobService.msgJobPerform(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;
	}
}
