use of org.opennms.netmgt.config.datacollection.ResourceTypes in project opennms by OpenNMS.
the class DefaultResourceTypesDao method getResourceTypes.
@Override
public Map<String, ResourceType> getResourceTypes() {
final Map<String, ResourceType> resourceTypesByName = new HashMap<>();
resourceTypesByName.putAll(DataCollectionConfigFactory.getInstance().getConfiguredResourceTypes());
final ResourceTypes configuredResourceTypes = getObject();
if (configuredResourceTypes != null) {
configuredResourceTypes.getResourceTypes().stream().forEach(r -> resourceTypesByName.put(r.getName(), r));
}
return resourceTypesByName;
}
Aggregations