public class AlertServiceImpl extends BaseOpenmrsService implements java.io.Serializable, AlertService
AlertService, 
Serialized Form| Constructor and Description | 
|---|
AlertServiceImpl()
Default constructor 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
createAlert(Alert alert)
Deprecated.   
 | 
void | 
createAlert(java.lang.String text,
           java.util.Collection<User> users)
Deprecated.   
 | 
void | 
createAlert(java.lang.String text,
           User user)
Deprecated.   
 | 
Alert | 
getAlert(java.lang.Integer alertId)
Get alert by internal identifier 
 | 
java.util.List<Alert> | 
getAlerts()
Deprecated.   
 | 
java.util.List<Alert> | 
getAlerts(User user)
Deprecated.   
 | 
java.util.List<Alert> | 
getAlerts(User user,
         boolean includeRead,
         boolean includeExpired)
Finds alerts for the given user with the given status 
 | 
java.util.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. | 
java.util.List<Alert> | 
getAllActiveAlerts(User user)
Find all alerts for a user that have not expired 
 | 
java.util.List<Alert> | 
getAllAlerts()
Get all unexpired alerts for all users 
 | 
java.util.List<Alert> | 
getAllAlerts(boolean includeExpired)
Get alerts for all users while obeying includeExpired 
 | 
java.util.List<Alert> | 
getAllAlerts(User user)
Deprecated.   
 | 
void | 
markAlertRead(Alert alert)
Deprecated.   
 | 
void | 
notifySuperUsers(java.lang.String messageCode,
                java.lang.Exception cause,
                java.lang.Object... messageArguments)
Sends an alert to all superusers 
 | 
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, onStartupclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonShutdown, onStartuppublic void setAlertDAO(AlertDAO dao)
AlertServicesetAlertDAO in interface AlertServicedao - The dao implementation to useAlertService.setAlertDAO(org.openmrs.notification.db.AlertDAO)@Deprecated public void createAlert(Alert alert) throws APIException
createAlert in interface AlertServiceAPIExceptionAlertService.createAlert(org.openmrs.notification.Alert)public Alert saveAlert(Alert alert) throws APIException
AlertServicealert in the databasesaveAlert in interface AlertServicealert - the Alert object to saveAPIExceptionAlertService.saveAlert(org.openmrs.notification.Alert)@Deprecated
public void createAlert(java.lang.String text,
                                    User user)
                             throws APIException
AlertServicecreateAlert in interface AlertServiceAPIExceptionAlertService.createAlert(java.lang.String, org.openmrs.User)@Deprecated
public void createAlert(java.lang.String text,
                                    java.util.Collection<User> users)
                             throws APIException
AlertServicecreateAlert in interface AlertServiceAPIExceptionAlertService.createAlert(java.lang.String,
      java.util.Collection)public Alert getAlert(java.lang.Integer alertId) throws APIException
AlertServicegetAlert in interface AlertServicealertId - internal alert identifierAPIExceptionAlertService.getAlert(java.lang.Integer)@Deprecated public void updateAlert(Alert alert) throws APIException
updateAlert in interface AlertServiceAPIExceptionAlertService.updateAlert(org.openmrs.notification.Alert)public void purgeAlert(Alert alert) throws APIException
AlertServicepurgeAlert in interface AlertServicealert - the Alert to purge/deleteAPIExceptionAlertService.purgeAlert(org.openmrs.notification.Alert)@Deprecated public void markAlertRead(Alert alert) throws APIException
AlertServicemarkAlertRead in interface AlertServiceAPIExceptionAlertService.markAlertRead(org.openmrs.notification.Alert)@Deprecated public java.util.List<Alert> getAllAlerts(User user) throws APIException
getAllAlerts in interface AlertServiceAPIExceptionAlertService.getAllAlerts(org.openmrs.User)public java.util.List<Alert> getAllActiveAlerts(User user) throws APIException
AlertServicegetAllActiveAlerts in interface AlertServiceAPIExceptionAlertService.getAllActiveAlerts(org.openmrs.User)@Deprecated public java.util.List<Alert> getAlerts(User user) throws APIException
getAlerts in interface AlertServiceAPIExceptionAlertService.getAlerts(org.openmrs.User)public java.util.List<Alert> getAlertsByUser(User user) throws APIException
AlertServiceuser, find alerts for the
 currently authenticated user. If no user is authenticated, search on "new
 User()" (for "Anonymous" role alert possibilities)getAlertsByUser in interface AlertServiceuser - the user that is assigned to the returned alertsAPIExceptionAlertService.getAlertsByUser(org.openmrs.User)@Deprecated public java.util.List<Alert> getAlerts() throws APIException
getAlerts in interface AlertServiceAPIExceptionAlertService.getAlerts()public java.util.List<Alert> getAlerts(User user, boolean includeRead, boolean includeExpired) throws APIException
AlertServicegetAlerts in interface AlertServiceuser - to restrict toAPIExceptionAlertService.getAlerts(org.openmrs.User, boolean, boolean)public java.util.List<Alert> getAllAlerts() throws APIException
AlertServicegetAllAlerts in interface AlertServiceAPIExceptionAlertService.getAllAlerts()public java.util.List<Alert> getAllAlerts(boolean includeExpired) throws APIException
AlertServicegetAllAlerts in interface AlertServiceAPIExceptionAlertService.getAllAlerts(boolean)public void notifySuperUsers(java.lang.String messageCode,
                             java.lang.Exception cause,
                             java.lang.Object... messageArguments)
AlertServicenotifySuperUsers in interface AlertServicemessageCode - The alert message code from messages.propertiescause - The exception that was thrown, method will work if cause is nullmessageArguments - The arguments for the coded messageorg.openmrs.notification.AlertService#notifySuperUsers(java.lang.String,java.lang.Exception,java.lang.String[])Copyright © 2018 OpenMRS Inc.. All Rights Reserved.