提交配置基础类
This commit is contained in:
241
src/main/java/com/nis/domain/configuration/DnsIpCfg.java
Normal file
241
src/main/java/com/nis/domain/configuration/DnsIpCfg.java
Normal file
@@ -0,0 +1,241 @@
|
||||
/**
|
||||
*@Title: DnsIpConfig.java
|
||||
*@Package com.nis.domain.restful
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年2月5日 下午2:57:17
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/**
|
||||
* @ClassName: DnsIpConfig.java
|
||||
* @Description: TODO
|
||||
* @author (dell)
|
||||
* @date 2018年2月5日 下午2:57:17
|
||||
* @version V1.0
|
||||
*/
|
||||
public class DnsIpCfg extends BaseCfg {
|
||||
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
private static final long serialVersionUID = -4476190616323264876L;
|
||||
/**
|
||||
* ip类型
|
||||
*/
|
||||
private Integer ipType;
|
||||
/**
|
||||
* 源IP地址
|
||||
*/
|
||||
private String srcIp ="0.0.0.0";
|
||||
/**
|
||||
* 源地址掩码
|
||||
*/
|
||||
private String srcIpMask ;
|
||||
/**
|
||||
* 源端口
|
||||
*/
|
||||
private String srcPort ;
|
||||
/**
|
||||
* 源端口掩码
|
||||
*/
|
||||
private String srcPortMask = "65535" ;
|
||||
/**
|
||||
* 目的IP地址
|
||||
*/
|
||||
private String dstIp = "0.0.0.0" ;
|
||||
/**
|
||||
* 目的地址掩码
|
||||
*/
|
||||
private String dstIpMask ;
|
||||
/**
|
||||
* 目的端口
|
||||
*/
|
||||
private String dstPort ;
|
||||
/**
|
||||
* 目的端口掩码
|
||||
*/
|
||||
private String dstPortMask = "65535";
|
||||
/**
|
||||
* 方向
|
||||
*/
|
||||
private Integer direction = 0;
|
||||
/**
|
||||
* 方向
|
||||
*/
|
||||
private Integer protocol ;
|
||||
/**
|
||||
* ipType
|
||||
* @return ipType
|
||||
*/
|
||||
|
||||
public Integer getIpType() {
|
||||
return ipType;
|
||||
}
|
||||
/**
|
||||
* @param ipType the ipType to set
|
||||
*/
|
||||
public void setIpType(Integer 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() {
|
||||
if(!StringUtils.isBlank(srcIpMask))
|
||||
return srcIpMask;
|
||||
else if(4==this.ipType)
|
||||
return "255.255.255.255";
|
||||
else if(6==this.ipType)
|
||||
return "FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF";
|
||||
else
|
||||
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() {
|
||||
if(!StringUtils.isBlank(dstIpMask))
|
||||
return dstIpMask;
|
||||
else if(4==this.ipType)
|
||||
return "255.255.255.255";
|
||||
else if(6==this.ipType)
|
||||
return "FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF";
|
||||
else
|
||||
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
|
||||
* @return direction
|
||||
*/
|
||||
|
||||
public Integer getDirection() {
|
||||
return direction;
|
||||
}
|
||||
/**
|
||||
* @param direction the direction to set
|
||||
*/
|
||||
public void setDirection(Integer direction) {
|
||||
this.direction = direction;
|
||||
}
|
||||
/**
|
||||
* protocol
|
||||
* @return protocol
|
||||
*/
|
||||
|
||||
public Integer getProtocol() {
|
||||
return protocol;
|
||||
}
|
||||
/**
|
||||
* @param protocol the protocol to set
|
||||
*/
|
||||
public void setProtocol(Integer protocol) {
|
||||
this.protocol = protocol;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user