AlertService

public interface AlertService

Interface to handle alerts.

Methods

create

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

Alert get(String id)

Fetches an alert by id

Parameters:
  • id – Id of the alert
Returns:

Alert object with the given id if found

get

Alert get(Long id)

Fetches an alert by id

Parameters:
  • id – Id of the alert
Returns:

Alert object with the given id if found

update

void update(String 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

update

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