public abstract class ElementUtil extends Object
ElementUtil class.
| Modifier and Type | Field and Description | 
|---|---|
static int | 
DEFAULT_TRUNCATE_THRESHOLD
Constant  
DEFAULT_TRUNCATE_THRESHOLD=28 | 
| Constructor and Description | 
|---|
ElementUtil()  | 
| Modifier and Type | Method and Description | 
|---|---|
static String | 
getIfStatusString(int ifStatusNum)  | 
static String | 
getIfTypeString(int ifTypeNum)
Return the human-readable name for a interface type, should never be null. 
 | 
static Interface | 
getInterfaceByParams(javax.servlet.http.HttpServletRequest request,
                    javax.servlet.ServletContext servletContext)
getInterfaceByParams 
 | 
static Interface | 
getInterfaceByParams(javax.servlet.http.HttpServletRequest request,
                    String ipInterfaceIdParam,
                    String nodeIdParam,
                    String ipAddrParam,
                    javax.servlet.ServletContext servletContext)
getInterfaceByParams 
 | 
static String | 
getInterfaceStatusString(char c)
Return the human-readable name for a interface status character, may be
 null. 
 | 
static String | 
getInterfaceStatusString(Interface intf)
Return the human-readable name for a interface's status, may be null. 
 | 
static String | 
getIpRouteProtocolString(int iprouteprotocol)  | 
static String | 
getIpRouteTypeString(int iproutetype)  | 
static OnmsNode | 
getNodeByParams(javax.servlet.http.HttpServletRequest request,
               javax.servlet.ServletContext servletContext)
getNodeByParams 
 | 
static OnmsNode | 
getNodeByParams(javax.servlet.http.HttpServletRequest request,
               String nodeLookupParam,
               javax.servlet.ServletContext servletContext)
getNodeByParams 
 | 
static String | 
getNodeStatusString(OnmsNode.NodeType c)
Return the human-readable name for a interface status character, may be
 null. 
 | 
static String | 
getNodeStatusString(OnmsNode node)
Return the human-readable name for a node's status, may be null. 
 | 
static Service | 
getServiceByParams(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.ServletContext servletContext)
getServiceByParams 
 | 
static Service | 
getServiceByParams(javax.servlet.http.HttpServletRequest request,
                  String ifServiceIdParam,
                  String nodeIdParam,
                  String ipAddrParam,
                  String serviceIdParam,
                  javax.servlet.ServletContext servletContext)
getServiceByParams 
 | 
static Service[] | 
getServicesOnInterface(int nodeId,
                      String ipAddr,
                      javax.servlet.ServletContext servletContext)  | 
static Service[] | 
getServicesOnNodeByParams(javax.servlet.http.HttpServletRequest request,
                         int serviceId,
                         javax.servlet.ServletContext servletContext)
getServicesOnNodeByParams 
 | 
static String | 
getServiceStatusString(char c)
Return the human-readable name for a service status character, may be
 null. 
 | 
static String | 
getServiceStatusString(Service svc)
Return the human-readable name for a service's status, may be null. 
 | 
static Interface | 
getSnmpInterfaceByParams(javax.servlet.http.HttpServletRequest request,
                        javax.servlet.ServletContext servletContext)
Return interface from snmpinterface table given a servlet request. 
 | 
static Interface | 
getSnmpInterfaceByParams(javax.servlet.http.HttpServletRequest request,
                        String nodeIdParam,
                        String ifIndexParam,
                        javax.servlet.ServletContext servletContext)
Return interface from snmpinterface table given a servlet request, nodeId
 param name and ifIndex param name. 
 | 
static String | 
getSnmpInterfaceStatusString(char c)
Return the human-readable name for a interface status character, may be
 null. 
 | 
static String | 
getSnmpInterfaceStatusString(Interface intf)
Return the human-readable name for an SNMP interface's status, may be null. 
 | 
static boolean | 
hasLocallyMonitoredServices(Service[] svcs)
hasLocallyMonitoredServices 
 | 
static String | 
truncateLabel(String label)
truncateLabel 
 | 
static String | 
truncateLabel(String label,
             int truncateThreshold)
truncateLabel 
 | 
public static final int DEFAULT_TRUNCATE_THRESHOLD
DEFAULT_TRUNCATE_THRESHOLD=28public static String getIpRouteProtocolString(int iprouteprotocol)
public static String getIpRouteTypeString(int iproutetype)
public static String getIfStatusString(int ifStatusNum)
public static String getIfTypeString(int ifTypeNum)
int - ifTypeNum.String object.public static String getNodeStatusString(OnmsNode node)
public static String getNodeStatusString(OnmsNode.NodeType c)
c - a char.String object.public static String getInterfaceStatusString(Interface intf)
public static String getInterfaceStatusString(char c)
c - a char.String object.public static String getSnmpInterfaceStatusString(Interface intf)
public static String getSnmpInterfaceStatusString(char c)
c - a char.String object.public static String getServiceStatusString(Service svc)
public static String getServiceStatusString(char c)
c - a char.String object.public static boolean hasLocallyMonitoredServices(Service[] svcs)
hasLocallyMonitoredServices
svcs - an array of Service objects.public static OnmsNode getNodeByParams(javax.servlet.http.HttpServletRequest request, javax.servlet.ServletContext servletContext) throws javax.servlet.ServletException, SQLException
getNodeByParams
request - a HttpServletRequest object.OnmsNode object.javax.servlet.ServletException - if any.SQLException - if any.public static OnmsNode getNodeByParams(javax.servlet.http.HttpServletRequest request, String nodeLookupParam, javax.servlet.ServletContext servletContext) throws javax.servlet.ServletException, SQLException
getNodeByParams
request - a HttpServletRequest object.nodeLookupParam - a String object.OnmsNode object.javax.servlet.ServletException - if any.SQLException - if any.public static Interface getInterfaceByParams(javax.servlet.http.HttpServletRequest request, javax.servlet.ServletContext servletContext) throws javax.servlet.ServletException, SQLException
getInterfaceByParams
request - a HttpServletRequest object.Interface object.javax.servlet.ServletException - if any.SQLException - if any.public static Interface getInterfaceByParams(javax.servlet.http.HttpServletRequest request, String ipInterfaceIdParam, String nodeIdParam, String ipAddrParam, javax.servlet.ServletContext servletContext) throws javax.servlet.ServletException, SQLException
getInterfaceByParams
public static Interface getSnmpInterfaceByParams(javax.servlet.http.HttpServletRequest request, javax.servlet.ServletContext servletContext) throws javax.servlet.ServletException, SQLException
request - a HttpServletRequest object.javax.servlet.ServletException, - SQLExceptionSQLException - if any.javax.servlet.ServletExceptionpublic static Interface getSnmpInterfaceByParams(javax.servlet.http.HttpServletRequest request, String nodeIdParam, String ifIndexParam, javax.servlet.ServletContext servletContext) throws javax.servlet.ServletException, SQLException
request - a HttpServletRequest object.nodeIdParam - a String object.ifIndexParam - a String object.javax.servlet.ServletException, - SQLExceptionSQLException - if any.javax.servlet.ServletExceptionpublic static Service getServiceByParams(javax.servlet.http.HttpServletRequest request, javax.servlet.ServletContext servletContext) throws javax.servlet.ServletException, SQLException
getServiceByParams
request - a HttpServletRequest object.Service object.javax.servlet.ServletException - if any.SQLException - if any.public static Service getServiceByParams(javax.servlet.http.HttpServletRequest request, String ifServiceIdParam, String nodeIdParam, String ipAddrParam, String serviceIdParam, javax.servlet.ServletContext servletContext) throws javax.servlet.ServletException, SQLException
getServiceByParams
public static Service[] getServicesOnNodeByParams(javax.servlet.http.HttpServletRequest request, int serviceId, javax.servlet.ServletContext servletContext) throws SQLException
getServicesOnNodeByParams
request - a HttpServletRequest object.serviceId - a int.Service objects.SQLException - if any.public static Service[] getServicesOnInterface(int nodeId, String ipAddr, javax.servlet.ServletContext servletContext) throws SQLException
SQLExceptionCopyright © 2021. All rights reserved.