Package org.opennms.web.controller.event
Class EventController
- java.lang.Object
-
- org.springframework.context.support.ApplicationObjectSupport
-
- org.springframework.web.context.support.WebApplicationObjectSupport
-
- org.springframework.web.servlet.support.WebContentGenerator
-
- org.springframework.web.servlet.mvc.AbstractController
-
- org.springframework.web.servlet.mvc.multiaction.MultiActionController
-
- org.opennms.web.controller.event.EventController
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.ApplicationContextAware
,org.springframework.web.context.ServletContextAware
,org.springframework.web.servlet.mvc.Controller
,org.springframework.web.servlet.mvc.LastModified
public class EventController extends org.springframework.web.servlet.mvc.multiaction.MultiActionController implements org.springframework.beans.factory.InitializingBean
A controller that handles all event actions (e.g. querying the event table by using filters to create an event list and and then forwards that event list to a JSP for display).- Since:
- 1.8.1
- Version:
- $Id: $
- Author:
- Lawrence Karnowski, OpenNMS, Lawrence Karnowski, OpenNMS
-
-
Field Summary
-
Fields inherited from class org.springframework.web.servlet.mvc.multiaction.MultiActionController
DEFAULT_COMMAND_NAME, LAST_MODIFIED_METHOD_SUFFIX, PAGE_NOT_FOUND_LOG_CATEGORY, pageNotFoundLogger
-
-
Constructor Summary
Constructors Constructor Description EventController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.web.servlet.ModelAndView
acknowledge(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Acknowledge the events specified in the POST and then redirect the client to an appropriate URL for display.org.springframework.web.servlet.ModelAndView
acknowledgeByFilter(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Acknowledge the events specified in the POST and then redirect the client to an appropriate URL for display.void
afterPropertiesSet()
org.springframework.web.servlet.ModelAndView
createFavorite(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
org.springframework.web.servlet.ModelAndView
deleteFavorite(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
org.springframework.web.servlet.ModelAndView
detail(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
org.springframework.web.servlet.ModelAndView
handleRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
org.springframework.web.servlet.ModelAndView
index(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
org.springframework.web.servlet.ModelAndView
list(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Parses the query string to determine what types of event filters to use (for example, what to filter on or sort by), then does the database query and then forwards the results to a JSP for display.void
setFavoriteService(FilterFavoriteService favoriteService)
void
setWebEventRepository(WebEventRepository webEventRepository)
-
Methods inherited from class org.springframework.web.servlet.mvc.multiaction.MultiActionController
bind, createBinder, getCommandName, getExceptionHandler, getLastModified, getMethodNameResolver, getValidators, getWebBindingInitializer, handleNoSuchRequestHandlingMethod, handleRequestInternal, initBinder, invokeNamedMethod, newCommandObject, setDelegate, setMethodNameResolver, setValidators, setWebBindingInitializer
-
Methods inherited from class org.springframework.web.servlet.mvc.AbstractController
isSynchronizeOnSession, setSynchronizeOnSession
-
Methods inherited from class org.springframework.web.servlet.support.WebContentGenerator
applyCacheControl, applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, checkRequest, getCacheControl, getCacheSeconds, getSupportedMethods, isAlwaysMustRevalidate, isRequireSession, isUseCacheControlHeader, isUseCacheControlNoStore, isUseExpiresHeader, prepareResponse, preventCaching, setAlwaysMustRevalidate, setCacheControl, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseCacheControlNoStore, setUseExpiresHeader
-
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
-
-
-
-
Method Detail
-
handleRequest
@Transactional public org.springframework.web.servlet.ModelAndView handleRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
- Specified by:
handleRequest
in interfaceorg.springframework.web.servlet.mvc.Controller
- Overrides:
handleRequest
in classorg.springframework.web.servlet.mvc.AbstractController
- Throws:
Exception
-
list
public org.springframework.web.servlet.ModelAndView list(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
Parses the query string to determine what types of event filters to use (for example, what to filter on or sort by), then does the database query and then forwards the results to a JSP for display.Sets the events and parms request attributes for the forwardee JSP (or whatever gets called).
- Throws:
Exception
-
detail
public org.springframework.web.servlet.ModelAndView detail(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
- Throws:
Exception
-
index
public org.springframework.web.servlet.ModelAndView index(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
- Throws:
Exception
-
createFavorite
public org.springframework.web.servlet.ModelAndView createFavorite(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
- Throws:
Exception
-
deleteFavorite
public org.springframework.web.servlet.ModelAndView deleteFavorite(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
- Throws:
Exception
-
acknowledge
public org.springframework.web.servlet.ModelAndView acknowledge(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
Acknowledge the events specified in the POST and then redirect the client to an appropriate URL for display.- Throws:
Exception
-
acknowledgeByFilter
public org.springframework.web.servlet.ModelAndView acknowledgeByFilter(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
Acknowledge the events specified in the POST and then redirect the client to an appropriate URL for display.- Throws:
Exception
-
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
setWebEventRepository
public void setWebEventRepository(WebEventRepository webEventRepository)
-
setFavoriteService
public void setFavoriteService(FilterFavoriteService favoriteService)
-
-