Class NodeLabelChangeServlet

  • All Implemented Interfaces:
    java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

    public class NodeLabelChangeServlet
    extends javax.servlet.http.HttpServlet
    Changes the label of a node, throws an event signaling that change, and then redirects the user to a web page displaying that node's details.
    Author:
    Larry Karnowski, OpenNMS
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected EventProxy proxy  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void doPost​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      void init()
      init
      protected void sendLabelChangeEvent​(int nodeId, NodeLabel oldNodeLabel, NodeLabel newNodeLabel)
      sendLabelChangeEvent
      • Methods inherited from class javax.servlet.http.HttpServlet

        doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
      • Methods inherited from class javax.servlet.GenericServlet

        destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NodeLabelChangeServlet

        public NodeLabelChangeServlet()
    • Method Detail

      • init

        public void init()
                  throws javax.servlet.ServletException

        init

        Overrides:
        init in class javax.servlet.GenericServlet
        Throws:
        javax.servlet.ServletException - if any.
      • doPost

        public void doPost​(javax.servlet.http.HttpServletRequest request,
                           javax.servlet.http.HttpServletResponse response)
                    throws javax.servlet.ServletException,
                           java.io.IOException
        Overrides:
        doPost in class javax.servlet.http.HttpServlet
        Throws:
        javax.servlet.ServletException
        java.io.IOException
      • sendLabelChangeEvent

        protected void sendLabelChangeEvent​(int nodeId,
                                            NodeLabel oldNodeLabel,
                                            NodeLabel newNodeLabel)
                                     throws EventProxyException

        sendLabelChangeEvent

        Parameters:
        nodeId - a int.
        oldNodeLabel - a org.opennms.netmgt.utils.NodeLabelJDBCImpl object.
        newNodeLabel - a org.opennms.netmgt.utils.NodeLabelJDBCImpl object.
        Throws:
        EventProxyException - if any.