use of org.netxms.client.objects.Condition in project netxms by netxms.
the class ServiceComponentsElement method addServiceComponents.
/**
* Add parent services for given object
*
* @param object
*/
private void addServiceComponents(AbstractObject object, long parentElementId) {
Iterator<Long> it = object.getChildren();
while (it.hasNext()) {
long objectId = it.next();
AbstractObject child = session.findObjectById(objectId);
if ((child != null) && ((child instanceof Container) || (child instanceof Cluster) || (child instanceof Node) || (child instanceof Condition))) {
long elementId = mapPage.createElementId();
mapPage.addElement(new NetworkMapObject(elementId, objectId));
mapPage.addLink(new NetworkMapLink(NetworkMapLink.NORMAL, parentElementId, elementId));
addServiceComponents(child, elementId);
}
}
}
Aggregations