This commit is contained in:
insanity 2018-06-11 14:30:15 +09:00
parent 8f49aa427d
commit 24825ba850
3 changed files with 12 additions and 32 deletions

View File

@ -13,7 +13,7 @@
<groupId>com.loafle.overflow</groupId> <groupId>com.loafle.overflow</groupId>
<artifactId>commons-java</artifactId> <artifactId>commons-java</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<version>1.0.22-SNAPSHOT</version> <version>1.0.23-SNAPSHOT</version>
<name>com.loafle.overflow.commons-java</name> <name>com.loafle.overflow.commons-java</name>
<properties> <properties>

View File

@ -17,7 +17,7 @@ public class Target {
private Long id; private Long id;
private Infra infra; private Infra infra;
private String displayName; private String name;
private String description; private String description;
private Integer sensorCount; private Integer sensorCount;
private Date createDate; private Date createDate;
@ -35,13 +35,13 @@ public class Target {
this.id = id; this.id = id;
} }
@Column(name = "DISPLAY_NAME") @Column(name = "NAME")
public String getDisplayName() { public String getName() {
return displayName; return name;
} }
public void setDisplayName(String displayName) { public void setName(String name) {
this.displayName = displayName; this.name = name;
} }
@Column(name = "DESCRIPTION") @Column(name = "DESCRIPTION")
@ -82,34 +82,10 @@ public class Target {
return infra; return infra;
} }
/**
* @param infra the infra to set
*/
public void setInfra(Infra infra) { public void setInfra(Infra infra) {
this.infra = infra; this.infra = infra;
} }
// @ManyToOne
// @JoinColumn(name = "PROBE_ID", nullable = false)
// @OnDelete(action = OnDeleteAction.CASCADE)
// public Probe getProbe() {
// return probe;
// }
//
// public void setProbe(Probe probe) {
// this.probe = probe;
// }
//
// @ManyToOne
// @JoinColumn(name = "INFRA_ID", nullable = false)
// public Infra getInfra() {
// return infra;
// }
//
// public void setInfra(Infra infra) {
// this.infra = infra;
// }
@Temporal(TemporalType.TIMESTAMP) @Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false) @Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {

View File

@ -8,6 +8,7 @@ import com.loafle.overflow.core.model.PageParams;
import com.loafle.overflow.model.discovery.Host; import com.loafle.overflow.model.discovery.Host;
import com.loafle.overflow.model.discovery.Service; import com.loafle.overflow.model.discovery.Service;
import com.loafle.overflow.model.infra.Infra; import com.loafle.overflow.model.infra.Infra;
import com.loafle.overflow.model.infra.InfraHost;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
@ -29,5 +30,8 @@ public interface InfraService {
Page<Infra> readAllByDomainID(Long domainID, PageParams pageParams) throws OverflowException; Page<Infra> readAllByDomainID(Long domainID, PageParams pageParams) throws OverflowException;
@WebappAPI @WebappAPI
List<Infra> regist(Long probeID, List<Host> hosts, List<Service> services) throws OverflowException; InfraHost regist(Long probeID, Host host) throws OverflowException;
@WebappAPI
InfraService regist(Long probeID, Service service) throws OverflowException;
} }