org.opennms.web.element
Class ElementUtil

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

public class ElementUtil
extends java.lang.Object


Field Summary
static int DEFAULT_TRUNCATE_THRESHOLD
           
 
Method Summary
static Interface getInterfaceByParams(javax.servlet.http.HttpServletRequest request)
           
static Interface getInterfaceByParams(javax.servlet.http.HttpServletRequest request, java.lang.String ipInterfaceIdParam, java.lang.String nodeIdParam, java.lang.String ipAddrParam, java.lang.String ifIndexParam)
           
protected static java.util.Map<java.lang.Character,java.lang.String> getInterfaceStatusMap()
          Returns the interface status map, initializing a new one if necessary.
static java.lang.String getInterfaceStatusString(char c)
          Return the human-readable name for a interface status character, may be null.
static java.lang.String getInterfaceStatusString(Interface intf)
          Return the human-readable name for a interface's status, may be null.
static Node getNodeByParams(javax.servlet.http.HttpServletRequest request)
           
static Node getNodeByParams(javax.servlet.http.HttpServletRequest request, java.lang.String nodeIdParam)
           
protected static java.util.Map<java.lang.Character,java.lang.String> getNodeStatusMap()
          Returns the interface status map, initializing a new one if necessary.
static java.lang.String getNodeStatusString(char c)
          Return the human-readable name for a interface status character, may be null.
static java.lang.String getNodeStatusString(Node node)
          Return the human-readable name for a node's status, may be null.
static Service getServiceByParams(javax.servlet.http.HttpServletRequest request)
           
static Service getServiceByParams(javax.servlet.http.HttpServletRequest request, java.lang.String ifServiceIdParam, java.lang.String nodeIdParam, java.lang.String ipAddrParam, java.lang.String serviceIdParam)
           
protected static java.util.Map<java.lang.Character,java.lang.String> getServiceStatusMap()
          Returns the service status map, initializing a new one if necessary.
static java.lang.String getServiceStatusString(char c)
          Return the human-readable name for a service status character, may be null.
static java.lang.String getServiceStatusString(Service svc)
          Return the human-readable name for a service's status, may be null.
static java.lang.String truncateLabel(java.lang.String label)
           
static java.lang.String truncateLabel(java.lang.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 java.util.Map<java.lang.Character,java.lang.String> getNodeStatusMap()
Returns the interface status map, initializing a new one if necessary.


getNodeStatusString

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


getNodeStatusString

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


getInterfaceStatusMap

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


getInterfaceStatusString

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


getInterfaceStatusString

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


getServiceStatusMap

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


getServiceStatusString

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


getServiceStatusString

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


truncateLabel

public static java.lang.String truncateLabel(java.lang.String label)

truncateLabel

public static java.lang.String truncateLabel(java.lang.String label,
                                             int truncateThreshold)

getNodeByParams

public static Node getNodeByParams(javax.servlet.http.HttpServletRequest request)
                            throws javax.servlet.ServletException,
                                   java.sql.SQLException
Throws:
javax.servlet.ServletException
java.sql.SQLException

getNodeByParams

public static Node getNodeByParams(javax.servlet.http.HttpServletRequest request,
                                   java.lang.String nodeIdParam)
                            throws javax.servlet.ServletException,
                                   java.sql.SQLException
Throws:
javax.servlet.ServletException
java.sql.SQLException

getInterfaceByParams

public static Interface getInterfaceByParams(javax.servlet.http.HttpServletRequest request)
                                      throws javax.servlet.ServletException,
                                             java.sql.SQLException
Throws:
javax.servlet.ServletException
java.sql.SQLException

getInterfaceByParams

public static Interface getInterfaceByParams(javax.servlet.http.HttpServletRequest request,
                                             java.lang.String ipInterfaceIdParam,
                                             java.lang.String nodeIdParam,
                                             java.lang.String ipAddrParam,
                                             java.lang.String ifIndexParam)
                                      throws javax.servlet.ServletException,
                                             java.sql.SQLException
Throws:
javax.servlet.ServletException
java.sql.SQLException

getServiceByParams

public static Service getServiceByParams(javax.servlet.http.HttpServletRequest request)
                                  throws javax.servlet.ServletException,
                                         java.sql.SQLException
Throws:
javax.servlet.ServletException
java.sql.SQLException

getServiceByParams

public static Service getServiceByParams(javax.servlet.http.HttpServletRequest request,
                                         java.lang.String ifServiceIdParam,
                                         java.lang.String nodeIdParam,
                                         java.lang.String ipAddrParam,
                                         java.lang.String serviceIdParam)
                                  throws javax.servlet.ServletException,
                                         java.sql.SQLException
Throws:
javax.servlet.ServletException
java.sql.SQLException


Copyright © 2007. All Rights Reserved.