2018-02-07 14:51:11 +08:00
|
|
|
|
/**
|
|
|
|
|
|
*@Title: BaseEnhancedStringConfig.java
|
|
|
|
|
|
*@Package com.nis.domain.restful
|
|
|
|
|
|
*@Description TODO
|
|
|
|
|
|
*@author dell
|
|
|
|
|
|
*@date 2018年2月5日 下午5:42:52
|
|
|
|
|
|
*@version 版本号
|
|
|
|
|
|
*/
|
|
|
|
|
|
package com.nis.domain.configuration;
|
|
|
|
|
|
|
2018-10-18 17:20:42 +08:00
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
2018-06-06 14:54:14 +08:00
|
|
|
|
import org.apache.commons.lang3.StringEscapeUtils;
|
2018-10-18 17:20:42 +08:00
|
|
|
|
import org.apache.taglibs.standard.functions.Functions;
|
2018-06-06 14:54:14 +08:00
|
|
|
|
|
2018-03-05 16:30:16 +08:00
|
|
|
|
import com.google.gson.annotations.Expose;
|
|
|
|
|
|
import com.google.gson.annotations.SerializedName;
|
2018-10-15 10:14:01 +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: BaseEnhancedStringConfig.java
|
|
|
|
|
|
* @Description: 基础增强字符串类配置
|
|
|
|
|
|
* @author (wx)
|
|
|
|
|
|
* @date 2018年2月5日 下午5:42:52
|
|
|
|
|
|
* @version V1.0
|
|
|
|
|
|
*/
|
2018-02-23 09:34:58 +08:00
|
|
|
|
public class ComplexkeywordCfg extends BaseCfg<ComplexkeywordCfg>{
|
2018-02-07 14:51:11 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
|
|
|
|
|
*
|
|
|
|
|
|
* @since 1.0.0
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
private static final long serialVersionUID = -1417089397345367232L;
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 匹配区域
|
|
|
|
|
|
*/
|
2018-03-05 16:30:16 +08:00
|
|
|
|
@Expose
|
2018-10-15 10:14:01 +08:00
|
|
|
|
@ExcelField(title="district",sort=301)
|
2018-03-05 16:30:16 +08:00
|
|
|
|
@SerializedName("district")
|
2018-02-07 14:51:11 +08:00
|
|
|
|
protected String district ;
|
2018-03-27 14:42:22 +08:00
|
|
|
|
protected String districtShowName;
|
2018-02-07 14:51:11 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 关键字
|
|
|
|
|
|
*/
|
2018-03-05 16:30:16 +08:00
|
|
|
|
@Expose
|
|
|
|
|
|
@SerializedName("keywords")
|
2018-10-15 10:14:01 +08:00
|
|
|
|
@ExcelField(title="key_word",sort=302)
|
2018-05-22 17:30:52 +08:00
|
|
|
|
protected String cfgKeywords;
|
2018-03-27 14:42:22 +08:00
|
|
|
|
protected String keywordsShowName;
|
2018-02-07 14:51:11 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 表达式类型
|
|
|
|
|
|
*/
|
2018-03-05 16:30:16 +08:00
|
|
|
|
@Expose
|
|
|
|
|
|
@SerializedName("exprType")
|
2018-10-15 10:14:01 +08:00
|
|
|
|
@ExcelField(title="expression_type",dictType="EXPRESSION_TYPE",sort=303)
|
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=304)
|
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=305)
|
|
|
|
|
|
protected Integer isHex;
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 是否hex
|
|
|
|
|
|
*/
|
|
|
|
|
|
@ExcelField(title="is_case_insenstive",sort=306)
|
|
|
|
|
|
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
|
|
|
|
/**
|
|
|
|
|
|
* district
|
|
|
|
|
|
* @return district
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
public String getDistrict() {
|
|
|
|
|
|
return district;
|
|
|
|
|
|
}
|
2018-10-22 15:14:32 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* copy属性使用
|
|
|
|
|
|
*/
|
2018-10-24 13:32:30 +08:00
|
|
|
|
protected Long dnsStrategyId;
|
2018-11-02 16:59:03 +08:00
|
|
|
|
protected Integer appCode;//仅用于copy属性使用
|
|
|
|
|
|
protected Integer behavCode;//仅用于copy属性使用
|
|
|
|
|
|
protected Integer specServiceId;//仅用于copy属性使用
|
2018-10-22 15:14:32 +08:00
|
|
|
|
|
2018-11-02 16:59:03 +08:00
|
|
|
|
public Integer getAppCode() {
|
|
|
|
|
|
return appCode;
|
|
|
|
|
|
}
|
|
|
|
|
|
public void setAppCode(Integer appCode) {
|
|
|
|
|
|
this.appCode = appCode;
|
|
|
|
|
|
}
|
|
|
|
|
|
public Integer getBehavCode() {
|
|
|
|
|
|
return behavCode;
|
|
|
|
|
|
}
|
|
|
|
|
|
public void setBehavCode(Integer behavCode) {
|
|
|
|
|
|
this.behavCode = behavCode;
|
|
|
|
|
|
}
|
|
|
|
|
|
public Integer getSpecServiceId() {
|
|
|
|
|
|
return specServiceId;
|
|
|
|
|
|
}
|
|
|
|
|
|
public void setSpecServiceId(Integer specServiceId) {
|
|
|
|
|
|
this.specServiceId = specServiceId;
|
|
|
|
|
|
}
|
2018-10-24 13:32:30 +08:00
|
|
|
|
public Long getDnsStrategyId() {
|
2018-10-22 15:14:32 +08:00
|
|
|
|
return dnsStrategyId;
|
|
|
|
|
|
}
|
2018-10-24 13:32:30 +08:00
|
|
|
|
public void setDnsStrategyId(Long dnsStrategyId) {
|
2018-10-22 15:14:32 +08:00
|
|
|
|
this.dnsStrategyId = dnsStrategyId;
|
|
|
|
|
|
}
|
2018-02-07 14:51:11 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* @param district the district to set
|
|
|
|
|
|
*/
|
|
|
|
|
|
public void setDistrict(String district) {
|
|
|
|
|
|
this.district = district;
|
|
|
|
|
|
}
|
2018-05-22 17:30:52 +08:00
|
|
|
|
public String getCfgKeywords() {
|
2018-06-06 14:54:14 +08:00
|
|
|
|
// cfgKeywords = StringEscapeUtils.unescapeHtml4(cfgKeywords);
|
2018-05-22 17:30:52 +08:00
|
|
|
|
return cfgKeywords;
|
2018-02-07 14:51:11 +08:00
|
|
|
|
}
|
2018-05-22 17:30:52 +08:00
|
|
|
|
public void setCfgKeywords(String cfgKeywords) {
|
|
|
|
|
|
this.cfgKeywords = cfgKeywords;
|
2018-02-07 14:51:11 +08:00
|
|
|
|
}
|
2018-06-04 14:31:26 +08:00
|
|
|
|
public String getDistrictShowName() {
|
|
|
|
|
|
return districtShowName;
|
|
|
|
|
|
}
|
|
|
|
|
|
public void setDistrictShowName(String districtShowName) {
|
|
|
|
|
|
this.districtShowName = districtShowName;
|
|
|
|
|
|
}
|
2018-02-07 14:51:11 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* exprType
|
|
|
|
|
|
* 继承此类的类会覆盖该方法写自己的缺省值
|
|
|
|
|
|
* @return exprType
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
public Integer getExprType() {
|
2018-02-28 10:55:39 +08:00
|
|
|
|
return this.exprType;
|
2018-02-07 14:51:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @param exprType the exprType to set
|
|
|
|
|
|
*/
|
|
|
|
|
|
public void setExprType(Integer exprType) {
|
|
|
|
|
|
this.exprType = exprType;
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
|
|
|
* matchMethod
|
|
|
|
|
|
* 继承此类的类会覆盖该方法写自己的缺省值
|
|
|
|
|
|
* @return matchMethod
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
public Integer getMatchMethod() {
|
2018-02-28 10:55:39 +08:00
|
|
|
|
return this.matchMethod;
|
2018-02-07 14:51:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @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
|
|
|
|
}
|
2018-10-15 10:14:01 +08:00
|
|
|
|
public Integer getIsHex() {
|
2018-10-20 15:36:22 +08:00
|
|
|
|
return isHex;
|
2018-10-15 10:14:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
public void setIsHex(Integer isHex) {
|
2018-10-20 15:36:22 +08:00
|
|
|
|
this.isHex =isHex;
|
2018-10-15 10:14:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
public Integer getIsCaseInsenstive() {
|
2018-10-20 15:36:22 +08:00
|
|
|
|
return isCaseInsenstive;
|
2018-10-15 10:14:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
public void setIsCaseInsenstive(Integer isCaseInsenstive) {
|
2018-10-20 15:36:22 +08:00
|
|
|
|
this.isCaseInsenstive =isCaseInsenstive;
|
2018-10-15 10:14:01 +08:00
|
|
|
|
}
|
2018-02-23 09:34:58 +08:00
|
|
|
|
/* (non-Javadoc)
|
|
|
|
|
|
* @see com.nis.domain.configuration.BaseCfg#initDefaultValue()
|
|
|
|
|
|
*/
|
|
|
|
|
|
@Override
|
2018-02-28 12:16:37 +08:00
|
|
|
|
public void initDefaultValue() {
|
2018-02-23 09:34:58 +08:00
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
|
super.initDefaultValue();
|
2018-02-28 10:55:39 +08:00
|
|
|
|
this.exprType=0;
|
2018-02-23 09:34:58 +08:00
|
|
|
|
this.isHexbin = 0 ;
|
2018-02-28 10:55:39 +08:00
|
|
|
|
this.matchMethod=3;
|
|
|
|
|
|
}
|
2018-10-18 17:20:42 +08:00
|
|
|
|
|
|
|
|
|
|
public static List<ComplexkeywordCfg> replaceComplexKeyList(List<ComplexkeywordCfg> list){
|
|
|
|
|
|
for (int i = 0; i < list.size(); i++) {
|
|
|
|
|
|
ComplexkeywordCfg base=(ComplexkeywordCfg)list.get(i);
|
2018-10-22 09:15:30 +08:00
|
|
|
|
base.setIsHex(base.getIsHexbin());
|
2019-01-27 12:46:18 +08:00
|
|
|
|
// '默认为0:大小写不敏感,且非HEX;1:HEX格式二进制;2:大小写敏感,且非HEX',
|
|
|
|
|
|
if(base.getIsHexbin()==2){
|
|
|
|
|
|
base.setIsCaseInsenstive(1);
|
|
|
|
|
|
}else{
|
|
|
|
|
|
base.setIsCaseInsenstive(0);
|
|
|
|
|
|
}
|
2018-10-18 17:20:42 +08:00
|
|
|
|
base.setCfgKeywords(Functions.replace(base.getCfgKeywords(), "***and***"," "));
|
|
|
|
|
|
}
|
|
|
|
|
|
return list;
|
|
|
|
|
|
}
|
2018-11-11 19:36:53 +08:00
|
|
|
|
public Integer getIndex() {
|
|
|
|
|
|
return index;
|
|
|
|
|
|
}
|
|
|
|
|
|
public void setIndex(Integer index) {
|
|
|
|
|
|
this.index = index;
|
|
|
|
|
|
}
|
2018-02-07 14:51:11 +08:00
|
|
|
|
}
|