use of org.opennms.web.svclayer.catstatus.model.StatusInterface in project opennms by OpenNMS.
the class CategoryBuilder method addOutageService.
/**
* <p>addOutageService</p>
*
* @param nodeId a int.
* @param interfaceIp a {@link java.lang.String} object.
* @param ipAddress a {@link java.lang.String} object.
* @param nodeLabel a {@link java.lang.String} object.
* @param service a {@link java.lang.String} object.
* @return a {@link org.opennms.web.svclayer.catstatus.support.CategoryBuilder} object.
*/
public CategoryBuilder addOutageService(int nodeId, String interfaceIp, String ipAddress, String nodeLabel, String service) {
StatusService statusService = new StatusService();
addInterface(nodeId, interfaceIp, ipAddress, nodeLabel);
StatusInterface intf = m_nodeAndInterfaceMap.get(getNodeAndInterfaceKey(nodeId, interfaceIp));
statusService.setName(service);
intf.addService(statusService);
return this;
}
use of org.opennms.web.svclayer.catstatus.model.StatusInterface in project opennms by OpenNMS.
the class CategoryBuilder method addInterface.
/**
* <p>addInterface</p>
*
* @param nodeId a int.
* @param interfaceIp a {@link java.lang.String} object.
* @param ipAddress a {@link java.lang.String} object.
* @param nodeLabel a {@link java.lang.String} object.
* @return a {@link org.opennms.web.svclayer.catstatus.support.CategoryBuilder} object.
*/
public CategoryBuilder addInterface(int nodeId, String interfaceIp, String ipAddress, String nodeLabel) {
if (!m_nodeAndInterfaceMap.containsKey(getNodeAndInterfaceKey(nodeId, interfaceIp))) {
addNode(nodeId, nodeLabel);
StatusNode statusNode = m_nodeMap.get(nodeId);
StatusInterface intf = new StatusInterface();
intf.setIpAddress(ipAddress);
statusNode.addIpInterface(intf);
m_nodeAndInterfaceMap.put(getNodeAndInterfaceKey(nodeId, interfaceIp), intf);
}
return this;
}
Aggregations