@Override public List<OTEServerLocation> getAll() throws URISyntaxException { Collection<ServiceHealth> healths = store.getAll(); List<OTEServerLocation> locations = new ArrayList<OTEServerLocation>(); for (ServiceHealth health : healths) { OTEServerLocationServiceHealth item = new OTEServerLocationServiceHealth(health); if (item.isValid()) { locations.add(item); } } return locations; }
@Override public List<OTEServerLocation> findServerByMachine(String regex) throws URISyntaxException { Collection<ServiceHealth> healths = store.getAll(); List<OTEServerLocation> locations = new ArrayList<OTEServerLocation>(); for (ServiceHealth health : healths) { OTEServerLocationServiceHealth item = new OTEServerLocationServiceHealth(health); if (item.isValid() && item.getMachineName().matches(regex)) { locations.add(item); } } return locations; }