AlertServiceImpl

public class AlertServiceImpl implements AlertService

Creates and maintains alerts.

Methods

create

public void create(String entityId, String name, String description, AlertType type, AlertStatus status, int priority, Map<String, String> data)

Creates an alert

Parameters:
  • entityId – External id for alert
  • name – Name of the alert
  • description – Description of alert
  • type – Alert type like critical, high, medium and low
  • status – Status of the alert like new, read and closed
  • priority – priority of the alert specified by integer values
  • data – Extra information of the alert stored as property => value pairs

get

public Alert get(String id)

get

public Alert get(Long id)

Fetches an alert by id

Parameters:
  • id – Id of the alert
Returns:

Alert object with the given id if found

setAlertFilter

public void setAlertFilter(AlertFilter alertFilter)

setAlertsDataService

public void setAlertsDataService(AlertsDataService alertsDataService)

update

public void update(String alertId, UpdateCriteria updateCriteria)

update

public void update(Long alertId, UpdateCriteria updateCriteria)

Updates an alert by alert id

Parameters:
  • alertId – Id of the alert to be updated
  • updateCriteria – criteria which specifies the fields to be updated and their new values (Cannot be null)