2018-02-07 14:51:11 +08:00
|
|
|
|
/**
|
|
|
|
|
|
*@Title: BaseStringConfig.java
|
|
|
|
|
|
*@Package com.nis.domain.restful
|
|
|
|
|
|
*@Description TODO
|
|
|
|
|
|
*@author dell
|
|
|
|
|
|
*@date 2018年2月5日 下午5:26:02
|
|
|
|
|
|
*@version 版本号
|
|
|
|
|
|
*/
|
|
|
|
|
|
package com.nis.domain.configuration;
|
|
|
|
|
|
|
2018-09-25 11:56:04 +08:00
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
2018-10-18 17:20:42 +08:00
|
|
|
|
import org.apache.taglibs.standard.functions.Functions;
|
|
|
|
|
|
|
2018-03-05 16:30:16 +08:00
|
|
|
|
import com.google.gson.annotations.Expose;
|
|
|
|
|
|
import com.google.gson.annotations.SerializedName;
|
2018-06-13 09:30:03 +08:00
|
|
|
|
import com.nis.util.excel.ExcelField;
|
2018-03-05 16:30:16 +08:00
|
|
|
|
|
2018-02-07 14:51:11 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* @ClassName: BaseStringConfig.java
|
|
|
|
|
|
* @Description: 基础字符串类配置
|
|
|
|
|
|
* @author (dell)
|
|
|
|
|
|
* @date 2018年2月5日 下午5:26:02
|
|
|
|
|
|
* @version V1.0
|
|
|
|
|
|
*/
|
2018-06-29 12:44:33 +08:00
|
|
|
|
public class BaseStringCfg<T> extends BaseCfg<T> {
|
2018-02-07 14:51:11 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
|
|
|
|
|
*
|
|
|
|
|
|
* @since 1.0.0
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
private static final long serialVersionUID = -2040598274024301785L;
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 配置关键字
|
|
|
|
|
|
*/
|
2018-03-05 16:30:16 +08:00
|
|
|
|
@Expose
|
|
|
|
|
|
@SerializedName("keywords")
|
2018-10-15 10:14:01 +08:00
|
|
|
|
@ExcelField(title="key_word",sort=201)
|
2018-02-07 14:51:11 +08:00
|
|
|
|
protected String cfgKeywords;
|
2018-03-29 14:56:27 +08:00
|
|
|
|
protected String cfgKeywordsShowName;
|
2018-06-29 12:44:33 +08:00
|
|
|
|
|
2018-02-07 14:51:11 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* @param cfgKeywords the cfgKeywords to set
|
|
|
|
|
|
*/
|
|
|
|
|
|
public void setCfgKeywords(String cfgKeywords) {
|
|
|
|
|
|
this.cfgKeywords = cfgKeywords;
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 表达式类型
|
|
|
|
|
|
*/
|
2018-03-05 16:30:16 +08:00
|
|
|
|
@Expose
|
2018-10-15 10:14:01 +08:00
|
|
|
|
@ExcelField(title="expression_type",dictType="EXPRESSION_TYPE",sort=202)
|
2018-03-05 16:30:16 +08:00
|
|
|
|
@SerializedName("exprType")
|
2018-02-07 14:51:11 +08:00
|
|
|
|
protected Integer exprType ;
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 匹配方式
|
|
|
|
|
|
*/
|
2018-03-05 16:30:16 +08:00
|
|
|
|
@Expose
|
2018-10-15 10:14:01 +08:00
|
|
|
|
@ExcelField(title="match_method",dictType="MATCH_METHOD",sort=203)
|
2018-03-05 16:30:16 +08:00
|
|
|
|
@SerializedName("matchMethod")
|
2018-02-07 14:51:11 +08:00
|
|
|
|
protected Integer matchMethod ;
|
2018-10-15 10:14:01 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 是否hex
|
|
|
|
|
|
*/
|
|
|
|
|
|
@ExcelField(title="is_hex",sort=204)
|
|
|
|
|
|
protected Integer isHex;
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 是否hex
|
|
|
|
|
|
*/
|
|
|
|
|
|
@ExcelField(title="is_case_insenstive",sort=205)
|
|
|
|
|
|
protected Integer isCaseInsenstive;
|
2018-02-07 14:51:11 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 是否hex二进制
|
|
|
|
|
|
*/
|
2018-03-05 16:30:16 +08:00
|
|
|
|
@Expose
|
|
|
|
|
|
@SerializedName("isHexbin")
|
2018-02-23 09:34:58 +08:00
|
|
|
|
protected Integer isHexbin;
|
2018-02-07 14:51:11 +08:00
|
|
|
|
|
2018-09-25 11:56:04 +08:00
|
|
|
|
private List<NtcSubscribeIdCfg> ntcSubscribeIdCfgList;
|
|
|
|
|
|
private NtcSubscribeIdCfg ntcSubscribeIdCfg;
|
2018-10-11 18:54:05 +08:00
|
|
|
|
private IpPortCfg ipPort;
|
2018-09-25 11:56:04 +08:00
|
|
|
|
|
2018-10-11 18:54:05 +08:00
|
|
|
|
|
|
|
|
|
|
public IpPortCfg getIpPort() {
|
|
|
|
|
|
return ipPort;
|
|
|
|
|
|
}
|
|
|
|
|
|
public void setIpPort(IpPortCfg ipPort) {
|
|
|
|
|
|
this.ipPort = ipPort;
|
|
|
|
|
|
}
|
2018-02-07 14:51:11 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* exprType
|
|
|
|
|
|
* @return exprType
|
|
|
|
|
|
*/
|
|
|
|
|
|
public Integer getExprType() {
|
|
|
|
|
|
return exprType;
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @param exprType the exprType to set
|
|
|
|
|
|
*/
|
|
|
|
|
|
public void setExprType(Integer exprType) {
|
|
|
|
|
|
this.exprType = exprType;
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
|
|
|
* matchMethod
|
|
|
|
|
|
* @return matchMethod
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
public Integer getMatchMethod() {
|
|
|
|
|
|
return matchMethod;
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @param matchMethod the matchMethod to set
|
|
|
|
|
|
*/
|
|
|
|
|
|
public void setMatchMethod(Integer matchMethod) {
|
|
|
|
|
|
this.matchMethod = matchMethod;
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
|
|
|
* isHexbin
|
|
|
|
|
|
* @return isHexbin
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
public Integer getIsHexbin() {
|
|
|
|
|
|
return isHexbin;
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @param isHexbin the isHexbin to set
|
|
|
|
|
|
*/
|
|
|
|
|
|
public void setIsHexbin(Integer isHexbin) {
|
|
|
|
|
|
this.isHexbin = isHexbin;
|
|
|
|
|
|
}
|
2018-02-23 09:34:58 +08:00
|
|
|
|
/* (non-Javadoc)
|
|
|
|
|
|
* @see com.nis.domain.configuration.BaseCfg#initDefaultValue()
|
|
|
|
|
|
*/
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public void initDefaultValue() {
|
|
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
|
super.initDefaultValue();
|
|
|
|
|
|
this.isHexbin = 0;
|
|
|
|
|
|
}
|
2018-03-29 14:56:27 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* cfgKeywordsShowName
|
|
|
|
|
|
* @return cfgKeywordsShowName
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
public String getCfgKeywordsShowName() {
|
|
|
|
|
|
return cfgKeywordsShowName;
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @param cfgKeywordsShowName the cfgKeywordsShowName to set
|
|
|
|
|
|
*/
|
|
|
|
|
|
public void setCfgKeywordsShowName(String cfgKeywordsShowName) {
|
|
|
|
|
|
this.cfgKeywordsShowName = cfgKeywordsShowName;
|
|
|
|
|
|
}
|
2018-05-22 18:59:19 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* cfgKeywords
|
|
|
|
|
|
* @return cfgKeywords
|
|
|
|
|
|
*/
|
2018-02-07 14:51:11 +08:00
|
|
|
|
|
2018-05-22 18:59:19 +08:00
|
|
|
|
public String getCfgKeywords() {
|
2018-06-06 14:54:14 +08:00
|
|
|
|
// cfgKeywords = StringEscapeUtils.unescapeHtml4(cfgKeywords);
|
2018-06-01 16:55:49 +08:00
|
|
|
|
/*cfgKeywords = cfgKeywords.replace("&", "\\&");
|
|
|
|
|
|
cfgKeywords = cfgKeywords.replace(" ", "\\b");
|
|
|
|
|
|
cfgKeywords = cfgKeywords.replace("\\", "\\\\");
|
|
|
|
|
|
cfgKeywords = cfgKeywords.replace(",", "&");*/
|
2018-05-22 18:59:19 +08:00
|
|
|
|
return cfgKeywords;
|
|
|
|
|
|
}
|
2018-09-25 11:56:04 +08:00
|
|
|
|
public List<NtcSubscribeIdCfg> getNtcSubscribeIdCfgList() {
|
|
|
|
|
|
return ntcSubscribeIdCfgList;
|
|
|
|
|
|
}
|
|
|
|
|
|
public void setNtcSubscribeIdCfgList(List<NtcSubscribeIdCfg> ntcSubscribeIdCfgList) {
|
|
|
|
|
|
this.ntcSubscribeIdCfgList = ntcSubscribeIdCfgList;
|
|
|
|
|
|
}
|
|
|
|
|
|
public NtcSubscribeIdCfg getNtcSubscribeIdCfg() {
|
|
|
|
|
|
return ntcSubscribeIdCfg;
|
|
|
|
|
|
}
|
|
|
|
|
|
public void setNtcSubscribeIdCfg(NtcSubscribeIdCfg ntcSubscribeIdCfg) {
|
|
|
|
|
|
this.ntcSubscribeIdCfg = ntcSubscribeIdCfg;
|
|
|
|
|
|
}
|
2018-10-15 10:14:01 +08:00
|
|
|
|
public Integer getIsHex() {
|
|
|
|
|
|
return isHex=this.isHexbin;
|
|
|
|
|
|
}
|
|
|
|
|
|
public void setIsHex(Integer isHex) {
|
|
|
|
|
|
this.isHex = this.isHexbin;
|
|
|
|
|
|
}
|
|
|
|
|
|
public Integer getIsCaseInsenstive() {
|
|
|
|
|
|
return isCaseInsenstive=this.isHexbin;
|
|
|
|
|
|
}
|
|
|
|
|
|
public void setIsCaseInsenstive(Integer isCaseInsenstive) {
|
|
|
|
|
|
this.isCaseInsenstive =this.isHexbin;;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2018-10-18 17:20:42 +08:00
|
|
|
|
public static List<BaseStringCfg> replaceBaseKeyList(List<BaseStringCfg> list){
|
|
|
|
|
|
for (int i = 0; i < list.size(); i++) {
|
|
|
|
|
|
BaseStringCfg base=(BaseStringCfg)list.get(i);
|
|
|
|
|
|
base.setCfgKeywords(Functions.replace(base.getCfgKeywords(), "***and***"," "));
|
|
|
|
|
|
}
|
|
|
|
|
|
return list;
|
|
|
|
|
|
}
|
2018-10-15 10:14:01 +08:00
|
|
|
|
|
2018-02-07 14:51:11 +08:00
|
|
|
|
}
|