use of org.opennms.netmgt.config.poller.Service in project opennms by OpenNMS.
the class PollerConfigServlet method deleteThese.
/**
* <p>deleteThese</p>
*
* @param deleteServices a {@link java.util.List} object.
* @throws java.io.IOException if any.
*/
public void deleteThese(java.util.List<String> deleteServices) throws IOException {
for (String svcname : deleteServices) {
if (pkg != null) {
Collection<Service> svcColl = pkg.getServices();
if (svcColl != null) {
for (Service svc : svcColl) {
if (svc != null) {
if (svc.getName().equals(svcname)) {
pkg.removeService(svc);
removeMonitor(svc.getName());
break;
}
}
}
}
}
}
}
use of org.opennms.netmgt.config.poller.Service in project opennms by OpenNMS.
the class PollerConfigServlet method initPollerServices.
/**
* <p>initPollerServices</p>
*/
public void initPollerServices() {
Collection<org.opennms.netmgt.config.poller.Package> packageColl = pollerConfig.getPackages();
if (packageColl != null) {
Iterator<org.opennms.netmgt.config.poller.Package> pkgiter = packageColl.iterator();
if (pkgiter.hasNext()) {
pkg = pkgiter.next();
Collection<Service> svcColl = pkg.getServices();
for (Service svcProp : svcColl) {
pollerServices.put(svcProp.getName(), svcProp);
}
}
}
}
Aggregations