Search in sources :

Example 1 with DCIImageConfiguration

use of org.netxms.client.maps.configs.DCIImageConfiguration in project netxms by netxms.

the class AbstractNetworkMapView method addDciToRequestList.

/**
 * Goes thought all links and trys to add to request list required DCIs.
 */
protected void addDciToRequestList() {
    Collection<NetworkMapLink> linkList = mapPage.getLinks();
    for (NetworkMapLink item : linkList) {
        if (item.hasDciData()) {
            for (SingleDciConfig value : item.getDciAsList()) {
                if (value.type == SingleDciConfig.ITEM) {
                    dciValueProvider.addDci(value.getNodeId(), value.dciId, mapPage);
                } else {
                    dciValueProvider.addDci(value.getNodeId(), value.dciId, value.column, value.instance, mapPage);
                }
            }
        }
    }
    Collection<NetworkMapElement> mapElements = mapPage.getElements();
    for (NetworkMapElement element : mapElements) {
        if (element instanceof NetworkMapDCIContainer) {
            NetworkMapDCIContainer item = (NetworkMapDCIContainer) element;
            if (item.hasDciData()) {
                for (SingleDciConfig value : item.getObjectDCIArray()) {
                    if (value.type == SingleDciConfig.ITEM) {
                        dciValueProvider.addDci(value.getNodeId(), value.dciId, mapPage);
                    } else {
                        dciValueProvider.addDci(value.getNodeId(), value.dciId, value.column, value.instance, mapPage);
                    }
                }
            }
        }
        if (element instanceof NetworkMapDCIImage) {
            NetworkMapDCIImage item = (NetworkMapDCIImage) element;
            DCIImageConfiguration config = item.getImageOptions();
            SingleDciConfig value = config.getDci();
            if (value.type == SingleDciConfig.ITEM) {
                dciValueProvider.addDci(value.getNodeId(), value.dciId, mapPage);
            } else {
                dciValueProvider.addDci(value.getNodeId(), value.dciId, value.column, value.instance, mapPage);
            }
        }
    }
}
Also used : NetworkMapDCIImage(org.netxms.client.maps.elements.NetworkMapDCIImage) NetworkMapElement(org.netxms.client.maps.elements.NetworkMapElement) DCIImageConfiguration(org.netxms.client.maps.configs.DCIImageConfiguration) NetworkMapDCIContainer(org.netxms.client.maps.elements.NetworkMapDCIContainer) NetworkMapLink(org.netxms.client.maps.NetworkMapLink) SingleDciConfig(org.netxms.client.maps.configs.SingleDciConfig)

Example 2 with DCIImageConfiguration

use of org.netxms.client.maps.configs.DCIImageConfiguration in project netxms by netxms.

the class NetworkMapWidget method addDciToRequestList.

/**
 * Goes thought all links and trys to add to request list required DCIs.
 */
protected void addDciToRequestList() {
    Collection<NetworkMapLink> linkList = mapPage.getLinks();
    for (NetworkMapLink item : linkList) {
        if (item.hasDciData()) {
            for (SingleDciConfig value : item.getDciAsList()) {
                if (value.type == SingleDciConfig.ITEM) {
                    dciValueProvider.addDci(value.getNodeId(), value.dciId, mapPage);
                } else {
                    dciValueProvider.addDci(value.getNodeId(), value.dciId, value.column, value.instance, mapPage);
                }
            }
        }
    }
    Collection<NetworkMapElement> mapElements = mapPage.getElements();
    for (NetworkMapElement element : mapElements) {
        if (element instanceof NetworkMapDCIContainer) {
            NetworkMapDCIContainer item = (NetworkMapDCIContainer) element;
            if (item.hasDciData()) {
                for (SingleDciConfig value : item.getObjectDCIArray()) {
                    if (value.type == SingleDciConfig.ITEM) {
                        dciValueProvider.addDci(value.getNodeId(), value.dciId, mapPage);
                    } else {
                        dciValueProvider.addDci(value.getNodeId(), value.dciId, value.column, value.instance, mapPage);
                    }
                }
            }
        }
        if (element instanceof NetworkMapDCIImage) {
            NetworkMapDCIImage item = (NetworkMapDCIImage) element;
            DCIImageConfiguration config = item.getImageOptions();
            SingleDciConfig value = config.getDci();
            if (value.type == SingleDciConfig.ITEM) {
                dciValueProvider.addDci(value.getNodeId(), value.dciId, mapPage);
            } else {
                dciValueProvider.addDci(value.getNodeId(), value.dciId, value.column, value.instance, mapPage);
            }
        }
    }
}
Also used : NetworkMapDCIImage(org.netxms.client.maps.elements.NetworkMapDCIImage) NetworkMapElement(org.netxms.client.maps.elements.NetworkMapElement) DCIImageConfiguration(org.netxms.client.maps.configs.DCIImageConfiguration) NetworkMapDCIContainer(org.netxms.client.maps.elements.NetworkMapDCIContainer) NetworkMapLink(org.netxms.client.maps.NetworkMapLink) SingleDciConfig(org.netxms.client.maps.configs.SingleDciConfig)

Aggregations

NetworkMapLink (org.netxms.client.maps.NetworkMapLink)2 DCIImageConfiguration (org.netxms.client.maps.configs.DCIImageConfiguration)2 SingleDciConfig (org.netxms.client.maps.configs.SingleDciConfig)2 NetworkMapDCIContainer (org.netxms.client.maps.elements.NetworkMapDCIContainer)2 NetworkMapDCIImage (org.netxms.client.maps.elements.NetworkMapDCIImage)2 NetworkMapElement (org.netxms.client.maps.elements.NetworkMapElement)2