package cn.hmsoft.ai.util;

import java.util.Map;

import cn.hmsoft.frame.module.FrameModuleConfig;
import cn.hmsoft.helper.BeanHelper;
import cn.hmsoft.helper.StringHelper;

/*********************
 * ai插件启动
 * 
 * @author zxq
 * @create 2019-08-23 16:38:30
 * @version 2.0.0
 * @email: revisit@126.com
 * @Company: www.hmsoft.cn
 */
public class AiModuleConfig extends FrameModuleConfig {

	@Override
	public String setModule_name() {
		return AiParamUtil.ModuleName;
	}

	@Override
	public String setModule_version() {
		return AiParamUtil.ModuleVersion;
	}

	@Override
	protected boolean start() throws Exception {
		// 设置参数
		Map<String, String> map = StringHelper.toMap(this.getModule().getModule_param());
		AiParamUtil.ParamMap = map;
		BeanHelper.setStaticFields(AiParamUtil.class, map);
		return true;
	}

	@Override
	protected boolean stop() throws Exception {
		
		return true;
	}

}
