AlertEventHandler

public class AlertEventHandler

This events handler acts as an entry point for task actions for the alert module. It also allows creating, closing or marking alerts as read using MOTECH events.

Methods

create

public void create(MotechEvent event)

Creates a new alert from the received event.

Parameters:
  • event – the event to build the alert from

setAlertService

public void setAlertService(AlertService alertService)

updateStatus

public void updateStatus(MotechEvent event)

Closes or marks the alert as read based on the received event.

Parameters:
  • event – the event - id of the alert to update is the only expected parameter