public class AlertServiceImpl extends BaseOpenmrsService implements Serializable, AlertService
AlertService
,
Serialized FormConstructor and Description |
---|
AlertServiceImpl()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
void |
createAlert(Alert alert)
Deprecated.
|
void |
createAlert(String text,
Collection<User> users)
Deprecated.
|
void |
createAlert(String text,
User user)
Deprecated.
|
Alert |
getAlert(Integer alertId)
Get alert by internal identifier
|
List<Alert> |
getAlerts()
Deprecated.
|
List<Alert> |
getAlerts(User user)
Deprecated.
|
List<Alert> |
getAlerts(User user,
boolean includeRead,
boolean includeExpired)
Finds alerts for the given user with the given status
|
List<Alert> |
getAlertsByUser(User user)
Find the alerts that are not read and have not expired for a user This will probably be the
most commonly called method If null is passed in for
user , find alerts for the
currently authenticated user. |
List<Alert> |
getAllActiveAlerts(User user)
Find all alerts for a user that have not expired
|
List<Alert> |
getAllAlerts()
Get all unexpired alerts for all users
|
List<Alert> |
getAllAlerts(boolean includeExpired)
Get alerts for all users while obeying includeExpired
|
List<Alert> |
getAllAlerts(User user)
Deprecated.
|
void |
markAlertRead(Alert alert)
Deprecated.
|
void |
purgeAlert(Alert alert)
Completely delete the given alert from the database
|
Alert |
saveAlert(Alert alert)
Save the given
alert in the database |
void |
setAlertDAO(AlertDAO dao)
Used by Spring to set the specific/chosen database access implementation
|
void |
updateAlert(Alert alert)
Deprecated.
|
onShutdown, onStartup
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onShutdown, onStartup
public void setAlertDAO(AlertDAO dao)
AlertService
setAlertDAO
in interface AlertService
dao
- The dao implementation to useAlertService.setAlertDAO(org.openmrs.notification.db.AlertDAO)
public void createAlert(Alert alert) throws APIException
createAlert
in interface AlertService
APIException
AlertService.createAlert(org.openmrs.notification.Alert)
public Alert saveAlert(Alert alert) throws APIException
AlertService
alert
in the databasesaveAlert
in interface AlertService
alert
- the Alert object to saveAPIException
AlertService.saveAlert(org.openmrs.notification.Alert)
public void createAlert(String text, User user) throws APIException
AlertService
createAlert
in interface AlertService
APIException
AlertService.createAlert(java.lang.String, org.openmrs.User)
public void createAlert(String text, Collection<User> users) throws APIException
AlertService
createAlert
in interface AlertService
APIException
AlertService.createAlert(java.lang.String,
java.util.Collection)
public Alert getAlert(Integer alertId) throws APIException
AlertService
getAlert
in interface AlertService
alertId
- internal alert identifierAPIException
AlertService.getAlert(java.lang.Integer)
public void updateAlert(Alert alert) throws APIException
updateAlert
in interface AlertService
APIException
AlertService.updateAlert(org.openmrs.notification.Alert)
public void purgeAlert(Alert alert) throws APIException
AlertService
purgeAlert
in interface AlertService
alert
- the Alert to purge/deleteAPIException
AlertService.purgeAlert(org.openmrs.notification.Alert)
public void markAlertRead(Alert alert) throws APIException
AlertService
markAlertRead
in interface AlertService
APIException
AlertService.markAlertRead(org.openmrs.notification.Alert)
public List<Alert> getAllAlerts(User user) throws APIException
getAllAlerts
in interface AlertService
APIException
AlertService.getAllAlerts(org.openmrs.User)
public List<Alert> getAllActiveAlerts(User user) throws APIException
AlertService
getAllActiveAlerts
in interface AlertService
APIException
AlertService.getAllActiveAlerts(org.openmrs.User)
public List<Alert> getAlerts(User user) throws APIException
getAlerts
in interface AlertService
APIException
AlertService.getAlerts(org.openmrs.User)
public List<Alert> getAlertsByUser(User user) throws APIException
AlertService
user
, find alerts for the
currently authenticated user. If no user is authenticated, search on "new
User()" (for "Anonymous" role alert possibilities)getAlertsByUser
in interface AlertService
user
- the user that is assigned to the returned alertsAPIException
AlertService.getAlertsByUser(org.openmrs.User)
public List<Alert> getAlerts() throws APIException
getAlerts
in interface AlertService
APIException
AlertService.getAlerts()
public List<Alert> getAlerts(User user, boolean includeRead, boolean includeExpired) throws APIException
AlertService
getAlerts
in interface AlertService
user
- to restrict toAPIException
AlertService.getAlerts(org.openmrs.User, boolean, boolean)
public List<Alert> getAllAlerts() throws APIException
AlertService
getAllAlerts
in interface AlertService
APIException
AlertService.getAllAlerts()
public List<Alert> getAllAlerts(boolean includeExpired) throws APIException
AlertService
getAllAlerts
in interface AlertService
APIException
AlertService.getAllAlerts(boolean)
Copyright © 2018 OpenMRS LLC.. All Rights Reserved.