use of org.netxms.client.maps.NetworkMapLink in project netxms by netxms.
the class LinkEditor method update.
/**
* Update network map link
*/
public void update() {
mapPage.removeLink(link);
long[] bp = link.getBendPoints();
link = new NetworkMapLink(name, type, link.getElement1(), link.getElement2(), connectorName1, connectorName2, dciList.toArray(new SingleDciConfig[dciList.size()]), link.getFlags(), link.isLocked());
link.setColor(color);
link.setStatusObject(statusObject);
link.setRouting(routingAlgorithm);
link.setBendPoints(bp);
link.getConfig().setUseActiveThresholds(useActiveThresholds);
mapPage.addLink(link);
modified = true;
}
use of org.netxms.client.maps.NetworkMapLink 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