diff --git a/pom.xml b/pom.xml index 6a2c3c9..d8d5ef6 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ com.loafle.overflow commons-java jar - 1.0.22-SNAPSHOT + 1.0.23-SNAPSHOT com.loafle.overflow.commons-java diff --git a/src/main/java/com/loafle/overflow/model/target/Target.java b/src/main/java/com/loafle/overflow/model/target/Target.java index 462a443..aa57273 100644 --- a/src/main/java/com/loafle/overflow/model/target/Target.java +++ b/src/main/java/com/loafle/overflow/model/target/Target.java @@ -17,7 +17,7 @@ public class Target { private Long id; private Infra infra; - private String displayName; + private String name; private String description; private Integer sensorCount; private Date createDate; @@ -35,13 +35,13 @@ public class Target { this.id = id; } - @Column(name = "DISPLAY_NAME") - public String getDisplayName() { - return displayName; + @Column(name = "NAME") + public String getName() { + return name; } - public void setDisplayName(String displayName) { - this.displayName = displayName; + public void setName(String name) { + this.name = name; } @Column(name = "DESCRIPTION") @@ -82,34 +82,10 @@ public class Target { return infra; } - /** - * @param infra the infra to set - */ public void setInfra(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) @Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false) public Date getCreateDate() { diff --git a/src/main/java/com/loafle/overflow/service/central/infra/InfraService.java b/src/main/java/com/loafle/overflow/service/central/infra/InfraService.java index 299c8dd..dcd30fa 100644 --- a/src/main/java/com/loafle/overflow/service/central/infra/InfraService.java +++ b/src/main/java/com/loafle/overflow/service/central/infra/InfraService.java @@ -8,6 +8,7 @@ import com.loafle.overflow.core.model.PageParams; import com.loafle.overflow.model.discovery.Host; import com.loafle.overflow.model.discovery.Service; import com.loafle.overflow.model.infra.Infra; +import com.loafle.overflow.model.infra.InfraHost; import org.springframework.data.domain.Page; @@ -29,5 +30,8 @@ public interface InfraService { Page readAllByDomainID(Long domainID, PageParams pageParams) throws OverflowException; @WebappAPI - List regist(Long probeID, List hosts, List services) throws OverflowException; + InfraHost regist(Long probeID, Host host) throws OverflowException; + + @WebappAPI + InfraService regist(Long probeID, Service service) throws OverflowException; }