@Override public Object generateCell(Table source, Object itemId, Object columnId) { final SystemDef s = container.getItem(itemId).getBean(); return s.getCollect() == null ? 0 : s.getCollect().getIncludeGroups().size(); } });
@Override public Object generateCell(Table source, Object itemId, Object columnId) { final SystemDef s = container.getItem(itemId).getBean(); return s.getCollect() == null ? 0 : s.getCollect().getIncludeGroups().size(); } });
@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<>(); } 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<>(); for (final SystemDef system : systems.getSystemDefs()) { if (systemDefMatches(system, aSysoid, anAddress)) { systemList.add(system); } } final List<MibObjProperty> mibProperties = new ArrayList<>(); for (final SystemDef system : systemList) { for (final String grpName : system.getCollect().getIncludeGroups()) { processGroupForProperties(cName, grpName, mibProperties); } } return mibProperties; }
/** * Gets the parent system definitions. * <p>The list of systemDef per SNMP collection that are referencing a given groupName</p> * * @param dataCollectionConfigDao the data collection configuration DAO * @param groupName the group name * @return the parent system definitions. */ private Set<String> getParentSystemDefs(final DataCollectionConfigDao dataCollectionConfigDao, String groupName) { Set<String> systemDefMap = new TreeSet<>(); for (final SnmpCollection collection : dataCollectionConfigDao.getRootDataCollection().getSnmpCollections()) { for (final SystemDef systemDef : collection.getSystems().getSystemDefs()) { for (final String group : systemDef.getCollect().getIncludeGroups()) { if (group.equals(groupName)) { systemDefMap.add(systemDef.getName() + '@' + collection.getName()); } } } } return systemDefMap; }
/** * Gets the parent system definitions. * <p>The list of systemDef per SNMP collection that are referencing a given groupName</p> * * @param dataCollectionConfigDao the data collection configuration DAO * @param groupName the group name * @return the parent system definitions. */ private Set<String> getParentSystemDefs(final DataCollectionConfigDao dataCollectionConfigDao, String groupName) { Set<String> systemDefMap = new TreeSet<>(); for (final SnmpCollection collection : dataCollectionConfigDao.getRootDataCollection().getSnmpCollections()) { for (final SystemDef systemDef : collection.getSystems().getSystemDefs()) { for (final String group : systemDef.getCollect().getIncludeGroups()) { if (group.equals(groupName)) { systemDefMap.add(systemDef.getName() + '@' + collection.getName()); } } } } return systemDefMap; }
for (final String grpName : system.getCollect().getIncludeGroups()) { processGroupName(cName, grpName, ifType, mibObjectList);
private void doVisit(SystemDef systemDef, DataCollectionVisitor visitor) { visitor.visitSystemDef(systemDef); // handle the choice between sysOid and sysOidMask doVisit(systemDef.getSystemDefChoice(), visitor); // handle ipList doVisit(systemDef.getIpList(), visitor); // handle collect doVisit(systemDef.getCollect(), visitor); visitor.completeSystemDef(systemDef); }
collection.getSystems().addSystemDef(systemDef); for (String groupName : systemDef.getCollect().getIncludeGroups()) { Group group = getMibObjectGroup(groupName, dataCollectionGroupName); if (group == null) {