package com.qmth.jkserver.core.kw;

import com.qmth.jkserver.core.exception.JkServerException;
import com.qmth.jkserver.core.kw.plugin.KcTempDataGenerator;
import com.qmth.jkserver.core.kw.plugin.PaperTempDataGenerator;
import com.qmth.jkserver.core.kw.plugin.RoomMonitorTempDataGenerator;
import com.qmth.jkserver.core.kw.plugin.StudentAdditionalTempDataGenerator;
import com.qmth.jkserver.core.kw.plugin.StudentTempDataGenerator;

/**
 * 根据上传的文件生成临时数据存储的工厂类
 * @author tianjun
 *
 */
public class KwTempDataGeneratorFactory {
	
	public static IKwTempDataGenerator getInstance(String uploadType){
		switch (uploadType) {
			case "kc":
				return new KcTempDataGenerator();//考场
			case "roomMonitor":
				return new RoomMonitorTempDataGenerator();//考情监控数据包
			case "student":
				return new StudentTempDataGenerator();//考务考生
			case "paper":
				return new PaperTempDataGenerator();//试卷
			case "studentAdditional":
				return new StudentAdditionalTempDataGenerator();//汇总工具导出的考生信息
			default:
				throw new JkServerException("未知的考务文件上传类型,"+uploadType);
		}
	}

}
