Search in sources :

Example 1 with ResourceTypes

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;
}
Also used : ResourceTypes(org.opennms.netmgt.config.datacollection.ResourceTypes) HashMap(java.util.HashMap) ResourceType(org.opennms.netmgt.config.datacollection.ResourceType)

Aggregations

HashMap (java.util.HashMap)1 ResourceType (org.opennms.netmgt.config.datacollection.ResourceType)1 ResourceTypes (org.opennms.netmgt.config.datacollection.ResourceTypes)1