org.opennms.web.element
Class ElementUtil

java.lang.Object
  extended by org.opennms.web.element.ElementUtil

public class ElementUtil
extends Object


Field Summary
static int DEFAULT_TRUNCATE_THRESHOLD
           
 
Method Summary
static Interface getInterfaceByParams(HttpServletRequest request)
           
static Interface getInterfaceByParams(HttpServletRequest request, String ipInterfaceIdParam, String nodeIdParam, String ipAddrParam, String ifIndexParam)
           
protected static Map<Character,String> getInterfaceStatusMap()
          Returns the interface status map, initializing a new one if necessary.
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 Node getNodeByParams(HttpServletRequest request)
           
static Node getNodeByParams(HttpServletRequest request, String nodeIdParam)
           
protected static Map<Character,String> getNodeStatusMap()
          Returns the interface status map, initializing a new one if necessary.
static String getNodeStatusString(char c)
          Return the human-readable name for a interface status character, may be null.
static String getNodeStatusString(Node node)
          Return the human-readable name for a node's status, may be null.
static Service getServiceByParams(HttpServletRequest request)
           
static Service getServiceByParams(HttpServletRequest request, String ifServiceIdParam, String nodeIdParam, String ipAddrParam, String serviceIdParam)
           
static Service[] getServicesOnNodeByParams(HttpServletRequest request, int serviceId)
           
protected static Map<Character,String> getServiceStatusMap()
          Returns the service status map, initializing a new one if necessary.
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 boolean hasLocallyMonitoredServices(Service[] svcs)
           
static boolean isRouteInfoNodeByParams(HttpServletRequest request)
           
static String truncateLabel(String label)
           
static String truncateLabel(String label, int truncateThreshold)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_TRUNCATE_THRESHOLD

public static final int DEFAULT_TRUNCATE_THRESHOLD
See Also:
Constant Field Values
Method Detail

getNodeStatusMap

protected static Map<Character,String> getNodeStatusMap()
Returns the interface status map, initializing a new one if necessary.


getNodeStatusString

public static String getNodeStatusString(Node node)
Return the human-readable name for a node's status, may be null.


getNodeStatusString

public static String getNodeStatusString(char c)
Return the human-readable name for a interface status character, may be null.


getInterfaceStatusMap

protected static Map<Character,String> getInterfaceStatusMap()
Returns the interface status map, initializing a new one if necessary.


getInterfaceStatusString

public static String getInterfaceStatusString(Interface intf)
Return the human-readable name for a interface's status, may be null.


getInterfaceStatusString

public static String getInterfaceStatusString(char c)
Return the human-readable name for a interface status character, may be null.


getServiceStatusMap

protected static Map<Character,String> getServiceStatusMap()
Returns the service status map, initializing a new one if necessary.


getServiceStatusString

public static String getServiceStatusString(Service svc)
Return the human-readable name for a service's status, may be null.


getServiceStatusString

public static String getServiceStatusString(char c)
Return the human-readable name for a service status character, may be null.


hasLocallyMonitoredServices

public static boolean hasLocallyMonitoredServices(Service[] svcs)

truncateLabel

public static String truncateLabel(String label)

truncateLabel

public static String truncateLabel(String label,
                                   int truncateThreshold)

getNodeByParams

public static Node getNodeByParams(HttpServletRequest request)
                            throws ServletException,
                                   SQLException
Throws:
ServletException
SQLException

getNodeByParams

public static Node getNodeByParams(HttpServletRequest request,
                                   String nodeIdParam)
                            throws ServletException,
                                   SQLException
Throws:
ServletException
SQLException

getInterfaceByParams

public static Interface getInterfaceByParams(HttpServletRequest request)
                                      throws ServletException,
                                             SQLException
Throws:
ServletException
SQLException

getInterfaceByParams

public static Interface getInterfaceByParams(HttpServletRequest request,
                                             String ipInterfaceIdParam,
                                             String nodeIdParam,
                                             String ipAddrParam,
                                             String ifIndexParam)
                                      throws ServletException,
                                             SQLException
Throws:
ServletException
SQLException

getServiceByParams

public static Service getServiceByParams(HttpServletRequest request)
                                  throws ServletException,
                                         SQLException
Throws:
ServletException
SQLException

getServiceByParams

public static Service getServiceByParams(HttpServletRequest request,
                                         String ifServiceIdParam,
                                         String nodeIdParam,
                                         String ipAddrParam,
                                         String serviceIdParam)
                                  throws ServletException,
                                         SQLException
Throws:
ServletException
SQLException

getServicesOnNodeByParams

public static Service[] getServicesOnNodeByParams(HttpServletRequest request,
                                                  int serviceId)
                                           throws SQLException
Throws:
SQLException

isRouteInfoNodeByParams

public static boolean isRouteInfoNodeByParams(HttpServletRequest request)
                                       throws SQLException
Throws:
SQLException


Copyright © 2009. All Rights Reserved.