/** * Returns the name to which the given node is associated, or null if the if node * is associated to either the default location, or no location. * * @param node * @return */ public static String getLocationNameOrNullIfDefault(OnmsNode node) { final String locationName = node.getLocation() != null ? node.getLocation().getLocationName() : null; return isDefaultLocationName(locationName) ? null : locationName; }
@Override public ResourcePath getPath() { if (MonitoringLocationUtils.isDefaultLocationName(m_location)) { return ResourcePath.get(m_ipAddress); } else { return ResourcePath.get(ResourcePath.sanitize(m_location), m_ipAddress); } }
/** * Returns the name to which the given node is associated, or null if the if node * is associated to either the default location, or no location. * * @param node * @return */ public static String getLocationNameOrNullIfDefault(OnmsNode node) { final String locationName = node.getLocation() != null ? node.getLocation().getLocationName() : null; return isDefaultLocationName(locationName) ? null : locationName; }
if (MonitoringLocationUtils.isDefaultLocationName(request.getLocation())) { request.setProviderRequest(providerRequest); } else {
public OnmsNode createUndiscoveredNode(final String ipAddress, final String foreignSource, final String locationString) { final String effectiveForeignSource = foreignSource == null ? FOREIGN_SOURCE_FOR_DISCOVERED_NODES : foreignSource; final String effectiveLocationName = MonitoringLocationUtils.isDefaultLocationName(locationString) ? null : locationString;
public OnmsNode createUndiscoveredNode(final String ipAddress, final String foreignSource, final String locationString) { final String effectiveForeignSource = foreignSource == null ? FOREIGN_SOURCE_FOR_DISCOVERED_NODES : foreignSource; final String effectiveLocationName = MonitoringLocationUtils.isDefaultLocationName(locationString) ? null : locationString;
if (MonitoringLocationUtils.isDefaultLocationName(request.getLocation())) {
if (MonitoringLocationUtils.isDefaultLocationName(request.getLocation())) {