/** * Gets the parent SNMP Collections. * <p>The list of SNMP collection that are referencing a given systemDefName</p> * * @param dataCollectionConfigDao the data collection configuration DAO * @param systemDefName the system definition name * @return the parent collections. */ private Set<String> getParentCollections(final DataCollectionConfigDao dataCollectionConfigDao, String systemDefName) { Set<String> collectionMap = new TreeSet<>(); for (final SnmpCollection collection : dataCollectionConfigDao.getRootDataCollection().getSnmpCollections()) { for (final SystemDef systemDef : collection.getSystems().getSystemDefs()) { if (systemDefName.equals(systemDef.getName())) { collectionMap.add(collection.getName()); } } } return collectionMap; }
/** * Gets the parent SNMP Collections. * <p>The list of SNMP collection that are referencing a given systemDefName</p> * * @param dataCollectionConfigDao the data collection configuration DAO * @param systemDefName the system definition name * @return the parent collections. */ private Set<String> getParentCollections(final DataCollectionConfigDao dataCollectionConfigDao, String systemDefName) { Set<String> collectionMap = new TreeSet<>(); for (final SnmpCollection collection : dataCollectionConfigDao.getRootDataCollection().getSnmpCollections()) { for (final SystemDef systemDef : collection.getSystems().getSystemDefs()) { if (systemDefName.equals(systemDef.getName())) { collectionMap.add(collection.getName()); } } } return collectionMap; }
final DatacollectionConfig dataCollectionConfig = dataCollectionConfigDao.getRootDataCollection(); File file = ConfigFileConstants.getFile(ConfigFileConstants.DATA_COLLECTION_CONF_FILE_NAME); logger.info("Saving data colleciton configuration on " + file);
/** * Gets the parent groups. * <p>The list of groups per SNMP collection that are referencing a given resourceTypeName</p> * * @param dataCollectionConfigDao the data collection configuration DAO * @param resourceTypeName the resource type name * @return the parent groups. */ private Set<String> getParentGroups(final DataCollectionConfigDao dataCollectionConfigDao, String resourceTypeName) { Set<String> groupMap = new TreeSet<>(); for (final SnmpCollection collection : dataCollectionConfigDao.getRootDataCollection().getSnmpCollections()) { for (final Group group : collection.getGroups().getGroups()) { for (final MibObj mibObj : group.getMibObjs()) { if (mibObj.getInstance().equals(resourceTypeName)) { groupMap.add(group.getName() + '@' + collection.getName()); } } } } return groupMap; }
final DatacollectionConfig dataCollectionConfig = dataCollectionConfigDao.getRootDataCollection(); File file = ConfigFileConstants.getFile(ConfigFileConstants.DATA_COLLECTION_CONF_FILE_NAME); logger.info("Saving data colleciton configuration on " + file);
/** * 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 groups. * <p>The list of groups per SNMP collection that are referencing a given resourceTypeName</p> * * @param dataCollectionConfigDao the data collection configuration DAO * @param resourceTypeName the resource type name * @return the parent groups. */ private Set<String> getParentGroups(final DataCollectionConfigDao dataCollectionConfigDao, String resourceTypeName) { Set<String> groupMap = new TreeSet<>(); for (final SnmpCollection collection : dataCollectionConfigDao.getRootDataCollection().getSnmpCollections()) { for (final Group group : collection.getGroups().getGroups()) { for (final MibObj mibObj : group.getMibObjs()) { if (mibObj.getInstance().equals(resourceTypeName)) { groupMap.add(group.getName() + '@' + collection.getName()); } } } } return groupMap; }
/** * 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; }
addStyleName("light"); final List<SnmpCollection> snmpCollections = dataCollectionConfigDao.getRootDataCollection().getSnmpCollections(); final SnmpCollectionTable snmpCollectionTable = new SnmpCollectionTable(snmpCollections);
addStyleName("light"); final List<SnmpCollection> snmpCollections = dataCollectionConfigDao.getRootDataCollection().getSnmpCollections(); final SnmpCollectionTable snmpCollectionTable = new SnmpCollectionTable(snmpCollections);