public static interface

AlertsApi.Repo

com.mapsted.alerts.AlertsApi.Repo

Summary

Public Methods
abstract List<ScheduledAlert> getActiveAlerts(int propertyId, int buildingId, int entityId)
Get ongoing or active scheduled alerts for an entity.
abstract List<ScheduledAlert> getActiveAlerts(int propertyId)
Get ongoing scheduled alerts at a property.
abstract List<BaseAlert> getAlerts(List<String> alertIds, Consumer<List<BaseAlert>> callback)
Use this method to get scheduled and emergency alerts from local db if you have the alertIds.
abstract void getEmergencyAlerts(int propertyId, Consumer<List<EmergencyAlert>> callback)
Get emergency alerts for a property
abstract void getScheduledAlert(String alertId, Consumer<ScheduledAlert> callback)
Use this method to get the scheduled alert object if you have the alertId.

Public Methods

public abstract List<ScheduledAlert> getActiveAlerts (int propertyId, int buildingId, int entityId)

Get ongoing or active scheduled alerts for an entity.

Parameters
propertyId entity's propertyId
buildingId entity's buildingId
entityId entity's id
Returns
  • list of scheduled alerts

public abstract List<ScheduledAlert> getActiveAlerts (int propertyId)

Get ongoing scheduled alerts at a property.

Parameters
propertyId property id
Returns
  • list of scheduled alerts

public abstract List<BaseAlert> getAlerts (List<String> alertIds, Consumer<List<BaseAlert>> callback)

Use this method to get scheduled and emergency alerts from local db if you have the alertIds. BaseAlert can be ScheduledAlert or EmergencyAlert.

Parameters
alertIds input parameter
callback callback for result

public abstract void getEmergencyAlerts (int propertyId, Consumer<List<EmergencyAlert>> callback)

Get emergency alerts for a property

Parameters
propertyId property id
callback callback with result

public abstract void getScheduledAlert (String alertId, Consumer<ScheduledAlert> callback)

Use this method to get the scheduled alert object if you have the alertId.

Parameters
alertId alert id
callback callback for result