修改BaseIpCfg格式,删除src/dst相关属性,新增ip/port pattern,ip/port address
This commit is contained in:
@@ -40,54 +40,11 @@ public class BaseIpCfg extends BaseCfg<BaseIpCfg> {
|
|||||||
@Expose
|
@Expose
|
||||||
@SerializedName("ipType")
|
@SerializedName("ipType")
|
||||||
protected Integer ipType;
|
protected Integer ipType;
|
||||||
/**
|
protected Integer ipPattern;
|
||||||
* 源IP地址
|
protected String ipAddress;
|
||||||
*/
|
protected Integer portPattern;
|
||||||
@Expose
|
protected String port;
|
||||||
@SerializedName("srcIp")
|
|
||||||
protected String srcIp ;
|
|
||||||
/**
|
|
||||||
* 源地址掩码
|
|
||||||
*/
|
|
||||||
@Expose
|
|
||||||
@SerializedName("srcIpMask")
|
|
||||||
protected String srcIpMask ;
|
|
||||||
/**
|
|
||||||
* 源端口
|
|
||||||
*/
|
|
||||||
@Expose
|
|
||||||
@SerializedName("srcPort")
|
|
||||||
protected String srcPort ;
|
|
||||||
/**
|
|
||||||
* 源端口掩码
|
|
||||||
*/
|
|
||||||
@Expose
|
|
||||||
@SerializedName("srcPortMask")
|
|
||||||
protected String srcPortMask ;
|
|
||||||
/**
|
|
||||||
* 目的IP地址
|
|
||||||
*/
|
|
||||||
@Expose
|
|
||||||
@SerializedName("dstIp")
|
|
||||||
protected String dstIp ;
|
|
||||||
/**
|
|
||||||
* 目的地址掩码
|
|
||||||
*/
|
|
||||||
@Expose
|
|
||||||
@SerializedName("dstIpMask")
|
|
||||||
protected String dstIpMask ;
|
|
||||||
/**
|
|
||||||
* 目的端口
|
|
||||||
*/
|
|
||||||
@Expose
|
|
||||||
@SerializedName("dstPort")
|
|
||||||
protected String dstPort ;
|
|
||||||
/**
|
|
||||||
* 目的端口掩码
|
|
||||||
*/
|
|
||||||
@Expose
|
|
||||||
@SerializedName("dstPortMask")
|
|
||||||
protected String dstPortMask ;
|
|
||||||
/**
|
/**
|
||||||
* 方向
|
* 方向
|
||||||
*/
|
*/
|
||||||
@@ -120,118 +77,7 @@ public class BaseIpCfg extends BaseCfg<BaseIpCfg> {
|
|||||||
public void setIpType(Integer ipType) {
|
public void setIpType(Integer ipType) {
|
||||||
this.ipType = ipType;
|
this.ipType = ipType;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* srcIp
|
|
||||||
* @return srcIp
|
|
||||||
*/
|
|
||||||
|
|
||||||
public String getSrcIp() {
|
|
||||||
return srcIp;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @param srcIp the srcIp to set
|
|
||||||
*/
|
|
||||||
public void setSrcIp(String srcIp) {
|
|
||||||
this.srcIp = srcIp;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* srcIpMask
|
|
||||||
* @return srcIpMask
|
|
||||||
*/
|
|
||||||
|
|
||||||
public String getSrcIpMask() {
|
|
||||||
return srcIpMask;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @param srcIpMask the srcIpMask to set
|
|
||||||
*/
|
|
||||||
public void setSrcIpMask(String srcIpMask) {
|
|
||||||
this.srcIpMask = srcIpMask;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* srcPort
|
|
||||||
* @return srcPort
|
|
||||||
*/
|
|
||||||
|
|
||||||
public String getSrcPort() {
|
|
||||||
return srcPort;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @param srcPort the srcPort to set
|
|
||||||
*/
|
|
||||||
public void setSrcPort(String srcPort) {
|
|
||||||
this.srcPort = srcPort;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* srcPortMask
|
|
||||||
* @return srcPortMask
|
|
||||||
*/
|
|
||||||
|
|
||||||
public String getSrcPortMask() {
|
|
||||||
return srcPortMask;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @param srcPortMask the srcPortMask to set
|
|
||||||
*/
|
|
||||||
public void setSrcPortMask(String srcPortMask) {
|
|
||||||
this.srcPortMask = srcPortMask;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* dstIp
|
|
||||||
* @return dstIp
|
|
||||||
*/
|
|
||||||
|
|
||||||
public String getDstIp() {
|
|
||||||
return dstIp;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @param dstIp the dstIp to set
|
|
||||||
*/
|
|
||||||
public void setDstIp(String dstIp) {
|
|
||||||
this.dstIp = dstIp;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* dstIpMask
|
|
||||||
* @return dstIpMask
|
|
||||||
*/
|
|
||||||
|
|
||||||
public String getDstIpMask() {
|
|
||||||
return dstIpMask;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @param dstIpMask the dstIpMask to set
|
|
||||||
*/
|
|
||||||
public void setDstIpMask(String dstIpMask) {
|
|
||||||
this.dstIpMask = dstIpMask;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* dstPort
|
|
||||||
* @return dstPort
|
|
||||||
*/
|
|
||||||
|
|
||||||
public String getDstPort() {
|
|
||||||
return dstPort;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @param dstPort the dstPort to set
|
|
||||||
*/
|
|
||||||
public void setDstPort(String dstPort) {
|
|
||||||
this.dstPort = dstPort;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* dstPortMask
|
|
||||||
* @return dstPortMask
|
|
||||||
*/
|
|
||||||
|
|
||||||
public String getDstPortMask() {
|
|
||||||
return dstPortMask;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @param dstPortMask the dstPortMask to set
|
|
||||||
*/
|
|
||||||
public void setDstPortMask(String dstPortMask) {
|
|
||||||
this.dstPortMask = dstPortMask;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* direction
|
* direction
|
||||||
* @return direction
|
* @return direction
|
||||||
@@ -274,13 +120,66 @@ public class BaseIpCfg extends BaseCfg<BaseIpCfg> {
|
|||||||
public void setProtocolId(Integer protocolId) {
|
public void setProtocolId(Integer protocolId) {
|
||||||
this.protocolId = protocolId;
|
this.protocolId = protocolId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ipPattern
|
||||||
|
* @return ipPattern
|
||||||
|
*/
|
||||||
|
|
||||||
|
public Integer getIpPattern() {
|
||||||
|
return ipPattern;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param ipPattern the ipPattern to set
|
||||||
|
*/
|
||||||
|
public void setIpPattern(Integer ipPattern) {
|
||||||
|
this.ipPattern = ipPattern;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* ipAddress
|
||||||
|
* @return ipAddress
|
||||||
|
*/
|
||||||
|
|
||||||
|
public String getIpAddress() {
|
||||||
|
return ipAddress;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param ipAddress the ipAddress to set
|
||||||
|
*/
|
||||||
|
public void setIpAddress(String ipAddress) {
|
||||||
|
this.ipAddress = ipAddress;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* portPattern
|
||||||
|
* @return portPattern
|
||||||
|
*/
|
||||||
|
|
||||||
|
public Integer getPortPattern() {
|
||||||
|
return portPattern;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param portPattern the portPattern to set
|
||||||
|
*/
|
||||||
|
public void setPortPattern(Integer portPattern) {
|
||||||
|
this.portPattern = portPattern;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* port
|
||||||
|
* @return port
|
||||||
|
*/
|
||||||
|
|
||||||
|
public String getPort() {
|
||||||
|
return port;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param port the port to set
|
||||||
|
*/
|
||||||
|
public void setPort(String port) {
|
||||||
|
this.port = port;
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public void initDefaultValue(){
|
public void initDefaultValue(){
|
||||||
super.initDefaultValue();
|
super.initDefaultValue();
|
||||||
// this.srcIp ="0.0.0.0";
|
|
||||||
this.srcPortMask = "65535" ;
|
|
||||||
// this.dstIp = "0.0.0.0" ;
|
|
||||||
this.dstPortMask = "65535";
|
|
||||||
this.direction = 0;
|
this.direction = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user