public void refresh() { List<GeolocationInfo> locations = geolocationService.getLocations(new GeolocationQueryBuilder() .withIncludeAcknowledgedAlarms(false) .withStatusCalculationStrategy(StatusCalculationStrategy.Alarms) .withSeverity(GeolocationSeverity.Normal) .build()); // apply acl filter if enabled if (m_aclsEnabled) { Map<Integer, String> nodes = m_nodeDao.getAllLabelsById(); locations = locations.stream() .filter(l -> nodes.containsKey(l.getNodeInfo().getNodeId())) .collect(Collectors.toList()); } // Convert m_activeNodes = locations.stream() .map(NodeMapComponent::createMapNode) .collect(Collectors.toMap(l -> Integer.valueOf(l.getNodeId()), Function.identity())); showNodes(m_activeNodes); }
public GeolocationQueryBuilder withNodeIds(Integer... nodeIds) { withNodeIds(Arrays.asList(nodeIds)); return this; }
return Collections.emptyList(); final List<GeolocationInfo> locations = geolocationService.getLocations(new GeolocationQueryBuilder() .withNodeIds(nodeIds) .withStatusCalculationStrategy(StatusCalculationStrategy.None) .build()); final List<Marker> markers = locations.stream() .filter(locationInfo -> locationInfo.getCoordinates() != null)
return Collections.emptyList(); final List<GeolocationInfo> locations = geolocationService.getLocations(new GeolocationQueryBuilder() .withNodeIds(nodeIds) .withStatusCalculationStrategy(StatusCalculationStrategy.None) .build()); final List<Marker> markers = locations.stream() .filter(locationInfo -> locationInfo.getCoordinates() != null)
public void refresh() { List<GeolocationInfo> locations = geolocationService.getLocations(new GeolocationQueryBuilder() .withIncludeAcknowledgedAlarms(false) .withStatusCalculationStrategy(StatusCalculationStrategy.Alarms) .withSeverity(GeolocationSeverity.Normal) .build()); // apply acl filter if enabled if (m_aclsEnabled) { Map<Integer, String> nodes = m_nodeDao.getAllLabelsById(); locations = locations.stream() .filter(l -> nodes.containsKey(l.getNodeInfo().getNodeId())) .collect(Collectors.toList()); } // Convert m_activeNodes = locations.stream() .map(NodeMapComponent::createMapNode) .collect(Collectors.toMap(l -> Integer.valueOf(l.getNodeId()), Function.identity())); showNodes(m_activeNodes); }