centralinfraservice

This commit is contained in:
insanity 2018-06-12 17:10:46 +09:00
parent e1fc32080b
commit c4a677f7b6
3 changed files with 17 additions and 4 deletions

View File

@ -50,7 +50,7 @@
<dependency> <dependency>
<groupId>com.loafle.overflow</groupId> <groupId>com.loafle.overflow</groupId>
<artifactId>commons-java</artifactId> <artifactId>commons-java</artifactId>
<version>1.0.51-SNAPSHOT</version> <version>1.0.53-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -15,6 +15,8 @@ import java.util.List;
public interface InfraDAO extends JpaRepository<Infra, Long> { public interface InfraDAO extends JpaRepository<Infra, Long> {
List<Infra> findAllByProbeId(Long probeId); List<Infra> findAllByProbeId(Long probeId);
List<Infra> findAllByProbeDomainId(Long probeDomainId);
Page<Infra> findAllByProbeId(Long probeId, Pageable pageable); Page<Infra> findAllByProbeId(Long probeId, Pageable pageable);
Page<Infra> findAllByProbeIdIn(List<Long> probeIds, Pageable pageable); Page<Infra> findAllByProbeIdIn(List<Long> probeIds, Pageable pageable);

View File

@ -269,9 +269,9 @@ public class CentralInfraService implements InfraService {
return infras; return infras;
} }
public InfraHost registByNoAuthProbe(Long probeID, InfraHost infraHost) public InfraHost registByNoAuthProbe(Long probeID, InfraHost infraHost) throws OverflowException {
throws OverflowException { // NoAuthProbeDescriptionNetwork networkInfo =
// NoAuthProbeDescriptionNetwork networkInfo = noAuthProbeDescription.getNetwork(); // noAuthProbeDescription.getNetwork();
// InfraHostIP infraHostIP = new InfraHostIP(); // InfraHostIP infraHostIP = new InfraHostIP();
// // FIXME getting IPType from networkInfo // // FIXME getting IPType from networkInfo
// infraHostIP.setMetaIPType(new MetaIPType((short) 1)); // infraHostIP.setMetaIPType(new MetaIPType((short) 1));
@ -306,8 +306,19 @@ public class CentralInfraService implements InfraService {
return this.infraDAO.findAllByProbeDomainId(domainID, PageUtil.getPageRequest(pageParams)); return this.infraDAO.findAllByProbeDomainId(domainID, PageUtil.getPageRequest(pageParams));
} }
@Override
public List<Infra> readAllInfraByProbeID(Long probeID) throws OverflowException {
return this.infraDAO.findAllByProbeId(probeID);
}
@Override
public List<Infra> readAllInfraByDomainID(Long domainID) throws OverflowException {
return this.infraDAO.findAllByProbeDomainId(domainID);
}
public List<InfraZone> readAllInfraZoneByProbeDomainID(Long probeDomainID) throws OverflowException { public List<InfraZone> readAllInfraZoneByProbeDomainID(Long probeDomainID) throws OverflowException {
return null; return null;
} }
} }