use of org.opennms.netmgt.config.datacollection.MibObjProperty in project opennms by OpenNMS.
the class DefaultDataCollectionConfigDao method getMibObjProperties.
@Override
public List<MibObjProperty> getMibObjProperties(final String cName, final String aSysoid, final String anAddress) {
LOG.debug("getMibObjProperties: collection: {} sysoid: {} address: {}", cName, aSysoid, anAddress);
if (aSysoid == null) {
LOG.debug("getMibObjProperties: aSysoid parameter is NULL...");
return new ArrayList<MibObjProperty>();
}
final SnmpCollection collection = getSnmpCollection(getContainer(), cName);
if (collection == null) {
return Collections.emptyList();
}
final Systems systems = collection.getSystems();
if (systems == null) {
return Collections.emptyList();
}
final List<SystemDef> systemList = new ArrayList<SystemDef>();
for (final SystemDef system : systems.getSystemDefs()) {
if (systemDefMatches(system, aSysoid, anAddress)) {
systemList.add(system);
}
}
final List<MibObjProperty> mibProperties = new ArrayList<MibObjProperty>();
for (final SystemDef system : systemList) {
for (final String grpName : system.getCollect().getIncludeGroups()) {
processGroupForProperties(cName, grpName, mibProperties);
}
}
return mibProperties;
}
Aggregations