qa-prevention-gwj/src/main/java/com/zcloud/service/map/AssemblyBeanFactory.java

43 lines
1015 B
Java
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package com.zcloud.service.map;
import org.apache.commons.lang.StringUtils;
import java.util.HashMap;
import java.util.Map;
/**
* 说明TODO
* 作者wangxuan
* 官网www.zcloudchina.com
*/
public class AssemblyBeanFactory {
private static Map<String, AbsFireSourcesHandel> strategyMap = new HashMap<>();
/**
* @Description: 获取组装数据工厂类
* xfsy01 消防水源
* xfbf01 消防泵房
* xfjyd01 防救援队
* xfkzs01 消防控制室
*/
public static AbsFireSourcesHandel getInvokeStrategy(String type) {
return strategyMap.get(type);
}
/**
* @Description: 注册组装数据工厂类
* xfsy01 消防水源
* xfbf01 消防泵房
* xfjyd01 防救援队
* xfkzs01 消防控制室
*/
public static void register(String type, AbsFireSourcesHandel handler) {
if (StringUtils.isEmpty(type) && handler == null) {
return;
}
strategyMap.put(type, handler);
}
}