org.opennms.web.alarm
Class AlarmQueryServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.opennms.web.alarm.AlarmQueryServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class AlarmQueryServlet
extends HttpServlet

This servlet takes a large and specific request parameter set and maps it to the more robust "filter" parameter set of the EventFilterControllervia a redirect.

Author:
Lawrence Karnowski , OpenNMS
See Also:
Serialized Form

Field Summary
protected static String[] IGNORE_LIST
          The list of parameters that are extracted by this servlet and not passed on to the EventFilterController.
protected  String redirectUrl
          The URL for the EventFilterController.
 
Constructor Summary
AlarmQueryServlet()
           
 
Method Summary
 void doGet(HttpServletRequest request, HttpServletResponse response)
          Extracts the key parameters from the parameter set, translates them into filter-based parameters, and then passes the modified parameter set to the EventFilterController.
protected  AfterFirstEventTimeFilter getAfterFirstEventTimeFilter(HttpServletRequest request)
           
protected  AfterLastEventTimeFilter getAfterLastEventTimeFilter(HttpServletRequest request)
           
protected  BeforeFirstEventTimeFilter getBeforeFirstEventTimeFilter(HttpServletRequest request)
           
protected  BeforeLastEventTimeFilter getBeforeLastEventTimeFilter(HttpServletRequest request)
           
protected  Date getDateFromRequest(HttpServletRequest request, String prefix)
           
protected  String[] getRequiredDateFields(String prefix)
           
 void init()
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, 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
 

Field Detail

IGNORE_LIST

protected static String[] IGNORE_LIST
The list of parameters that are extracted by this servlet and not passed on to the EventFilterController.


redirectUrl

protected String redirectUrl
The URL for the EventFilterController. The default is "list." This URL is a sibling URL, so it is relative to the URL directory that was used to call this servlet (usually "event/").

Constructor Detail

AlarmQueryServlet

public AlarmQueryServlet()
Method Detail

init

public void init()
          throws ServletException
Overrides:
init in class GenericServlet
Throws:
ServletException

doGet

public void doGet(HttpServletRequest request,
                  HttpServletResponse response)
           throws ServletException,
                  IOException
Extracts the key parameters from the parameter set, translates them into filter-based parameters, and then passes the modified parameter set to the EventFilterController.

Overrides:
doGet in class HttpServlet
Throws:
ServletException
IOException

getBeforeFirstEventTimeFilter

protected BeforeFirstEventTimeFilter getBeforeFirstEventTimeFilter(HttpServletRequest request)

getAfterFirstEventTimeFilter

protected AfterFirstEventTimeFilter getAfterFirstEventTimeFilter(HttpServletRequest request)

getBeforeLastEventTimeFilter

protected BeforeLastEventTimeFilter getBeforeLastEventTimeFilter(HttpServletRequest request)

getAfterLastEventTimeFilter

protected AfterLastEventTimeFilter getAfterLastEventTimeFilter(HttpServletRequest request)

getDateFromRequest

protected Date getDateFromRequest(HttpServletRequest request,
                                  String prefix)
                           throws MissingParameterException
Throws:
MissingParameterException

getRequiredDateFields

protected String[] getRequiredDateFields(String prefix)


Copyright © 2009. All Rights Reserved.