ing
This commit is contained in:
parent
1d38963e91
commit
4357f7ea04
|
@ -1,18 +0,0 @@
|
|||
package com.loafle.overflow.model.discovery.type;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 6. 27.
|
||||
*/
|
||||
public enum PortType {
|
||||
TCP("TCP"),
|
||||
UDP("UDP"),
|
||||
TLS("TLS");
|
||||
|
||||
private String stringValue;
|
||||
PortType(String string) {stringValue = string;}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return stringValue;
|
||||
}
|
||||
}
|
|
@ -12,9 +12,10 @@ import java.util.Date;
|
|||
public class InfraHost extends Infra {
|
||||
// private long id;
|
||||
private InfraOS os;
|
||||
private long ip;
|
||||
private long mac;
|
||||
private Date createDate;
|
||||
private String ipV4;
|
||||
private String ipV6;
|
||||
private String mac;
|
||||
private Date createDate;
|
||||
|
||||
// @Id
|
||||
// @GeneratedValue(strategy= GenerationType.IDENTITY)
|
||||
|
@ -38,21 +39,31 @@ public class InfraHost extends Infra {
|
|||
|
||||
@Basic
|
||||
@Column(name = "IP", nullable = true)
|
||||
public long getIp() {
|
||||
return ip;
|
||||
public String getIpV4() {
|
||||
return ipV4;
|
||||
}
|
||||
|
||||
public void setIp(long ip) {
|
||||
this.ip = ip;
|
||||
public void setIpV4(String ipV4) {
|
||||
this.ipV4 = ipV4;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "IP", nullable = true)
|
||||
public String getIpV6() {
|
||||
return ipV6;
|
||||
}
|
||||
|
||||
public void setIpV6(String ipV4) {
|
||||
this.ipV6 = ipV4;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "MAC", nullable = true)
|
||||
public long getMac() {
|
||||
public String getMac() {
|
||||
return mac;
|
||||
}
|
||||
|
||||
public void setMac(long mac) {
|
||||
public void setMac(String mac) {
|
||||
this.mac = mac;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,17 +6,17 @@ import com.loafle.overflow.core.type.PortType;
|
|||
* Connection
|
||||
*/
|
||||
public class Connection {
|
||||
private String ip;
|
||||
private String ipV4;
|
||||
private int port;
|
||||
private PortType portType;
|
||||
private boolean ssl;
|
||||
|
||||
public String getIp() {
|
||||
return ip;
|
||||
public String getIpV4() {
|
||||
return ipV4;
|
||||
}
|
||||
|
||||
public void setIp(String ip) {
|
||||
this.ip = ip;
|
||||
public void getIpV4(String ipV4) {
|
||||
this.ipV4 = ipV4;
|
||||
}
|
||||
|
||||
public int getPort() {
|
||||
|
|
|
@ -10,5 +10,5 @@ import com.loafle.overflow.model.infra.InfraHost;
|
|||
public interface InfraHostService {
|
||||
InfraHost regist(InfraHost infraHost) throws OverflowException;
|
||||
InfraHost read(long id) throws OverflowException;
|
||||
InfraHost readByIp(long ip) throws OverflowException;
|
||||
InfraHost readByIp(String ip) throws OverflowException;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user