org.rhq.enterprise.server.rest
Class AlertHandlerBean

java.lang.Object
  extended by org.rhq.enterprise.server.rest.AbstractRestBean
      extended by org.rhq.enterprise.server.rest.AlertHandlerBean
All Implemented Interfaces:
AlertHandlerLocal

public class AlertHandlerBean
extends AbstractRestBean
implements AlertHandlerLocal

Deal with alert related stuff

Author:
Heiko W. Rupp

Field Summary
 
Fields inherited from class org.rhq.enterprise.server.rest.AbstractRestBean
caller
 
Constructor Summary
AlertHandlerBean()
           
 
Method Summary
 AlertRest ackAlert(int id, javax.ws.rs.core.UriInfo uriInfo)
           
 AlertRest alertToDomain(org.rhq.core.domain.alert.Alert al, javax.ws.rs.core.UriInfo uriInfo, boolean slim)
           
 int countAlerts(Long since)
           
 javax.ws.rs.core.Response getAlert(int id, boolean slim, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.Request request, javax.ws.rs.core.HttpHeaders headers)
           
 javax.ws.rs.core.Response getAlertDefinition(int definitionId, javax.ws.rs.core.Request request)
           
 javax.ws.rs.core.Response getConditionLogs(int id, javax.ws.rs.core.Request request, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders headers)
           
 AlertDefinitionRest getDefinitionForAlert(int alertId)
           
 javax.ws.rs.core.Response getNotificationLogs(int id, javax.ws.rs.core.Request request, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders headers)
           
 List<AlertDefinitionRest> listAlertDefinitions(int page, String status)
           
 javax.ws.rs.core.Response listAlerts(int page, String prio, boolean slim, Long since, Integer resourceId, javax.ws.rs.core.Request request, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders headers)
           
 void purgeAlert(int id)
           
 javax.ws.rs.core.Response updateDefinition(int definitionId, AlertDefinitionRest definitionRest, javax.ws.rs.core.Request request)
           
 
Methods inherited from class org.rhq.enterprise.server.rest.AbstractRestBean
fetchGroup, fetchResource, fillRWT, getFqn, getFromCache, getFromCache, getResourceFromCache, getResourcesFromCacheByParentId, putResourceToCache, putToCache, putToCache, removeFromCache, renderTemplate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlertHandlerBean

public AlertHandlerBean()
Method Detail

listAlerts

public javax.ws.rs.core.Response listAlerts(int page,
                                            String prio,
                                            boolean slim,
                                            Long since,
                                            Integer resourceId,
                                            javax.ws.rs.core.Request request,
                                            javax.ws.rs.core.UriInfo uriInfo,
                                            javax.ws.rs.core.HttpHeaders headers)
Specified by:
listAlerts in interface AlertHandlerLocal

countAlerts

public int countAlerts(Long since)
Specified by:
countAlerts in interface AlertHandlerLocal

getAlert

public javax.ws.rs.core.Response getAlert(int id,
                                          boolean slim,
                                          javax.ws.rs.core.UriInfo uriInfo,
                                          javax.ws.rs.core.Request request,
                                          javax.ws.rs.core.HttpHeaders headers)
Specified by:
getAlert in interface AlertHandlerLocal

getConditionLogs

public javax.ws.rs.core.Response getConditionLogs(int id,
                                                  javax.ws.rs.core.Request request,
                                                  javax.ws.rs.core.UriInfo uriInfo,
                                                  javax.ws.rs.core.HttpHeaders headers)
Specified by:
getConditionLogs in interface AlertHandlerLocal

getNotificationLogs

public javax.ws.rs.core.Response getNotificationLogs(int id,
                                                     javax.ws.rs.core.Request request,
                                                     javax.ws.rs.core.UriInfo uriInfo,
                                                     javax.ws.rs.core.HttpHeaders headers)
Specified by:
getNotificationLogs in interface AlertHandlerLocal

ackAlert

public AlertRest ackAlert(int id,
                          javax.ws.rs.core.UriInfo uriInfo)
Specified by:
ackAlert in interface AlertHandlerLocal

purgeAlert

public void purgeAlert(int id)
Specified by:
purgeAlert in interface AlertHandlerLocal

getDefinitionForAlert

public AlertDefinitionRest getDefinitionForAlert(int alertId)
Specified by:
getDefinitionForAlert in interface AlertHandlerLocal

listAlertDefinitions

public List<AlertDefinitionRest> listAlertDefinitions(int page,
                                                      String status)
Specified by:
listAlertDefinitions in interface AlertHandlerLocal

getAlertDefinition

public javax.ws.rs.core.Response getAlertDefinition(int definitionId,
                                                    javax.ws.rs.core.Request request)
Specified by:
getAlertDefinition in interface AlertHandlerLocal

updateDefinition

public javax.ws.rs.core.Response updateDefinition(int definitionId,
                                                  AlertDefinitionRest definitionRest,
                                                  javax.ws.rs.core.Request request)
Specified by:
updateDefinition in interface AlertHandlerLocal

alertToDomain

public AlertRest alertToDomain(org.rhq.core.domain.alert.Alert al,
                               javax.ws.rs.core.UriInfo uriInfo,
                               boolean slim)


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.