|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.openmrs.BaseOpenmrsObject
org.openmrs.notification.Alert
public class Alert
Alerts are the simplest form of communication. An Administrator (or script) sets the user or role to attribute the alert to. Alerts are not intended to be sent from user to user and a user cannot send a "reply alert"
| Constructor Summary | |
|---|---|
Alert()
Default empty constructor |
|
Alert(java.lang.Integer alertId)
Initializes an alert with the given alert id |
|
Alert(java.lang.String text,
java.util.Collection<User> users)
Convenience constructor to create an alert with the given text and for the given users |
|
Alert(java.lang.String text,
User user)
Convenience constructor to create an alert with the given text and for the given users |
|
| Method Summary | |
|---|---|
void |
addRecipient(AlertRecipient r)
Convenience method to add the given AlertRecipient to the list of recipients for this alert |
void |
addRecipient(User u)
Convenience method to add the given user to this list of recipients for this alert |
boolean |
equals(java.lang.Object obj)
|
java.lang.Integer |
getAlertId()
|
java.lang.Boolean |
getAlertRead()
|
User |
getChangedBy()
|
User |
getCreator()
|
java.util.Date |
getDateChanged()
|
java.util.Date |
getDateCreated()
|
java.util.Date |
getDateToExpire()
|
java.lang.Integer |
getId()
|
AlertRecipient |
getRecipient(User recipient)
Convenience method to find the AlertRecipient object within this alert that corresponds to the given recipient |
java.util.Set<AlertRecipient> |
getRecipients()
|
java.lang.Boolean |
getSatisfiedByAny()
|
java.lang.String |
getText()
|
int |
hashCode()
|
java.lang.Boolean |
isAlertRead()
|
java.lang.Boolean |
isSatisfiedByAny()
|
Alert |
markAlertRead()
Convenience method to mark this alert as read. |
void |
removeRecipient(AlertRecipient r)
Convenience method to remove the given AlertRecipient from this Alert's list of recipients |
void |
setAlertId(java.lang.Integer alertId)
|
void |
setAlertRead(java.lang.Boolean alertRead)
|
void |
setChangedBy(User changedBy)
|
void |
setCreator(User creator)
|
void |
setDateChanged(java.util.Date dateChanged)
|
void |
setDateCreated(java.util.Date dateCreated)
|
void |
setDateToExpire(java.util.Date dateToExpire)
|
void |
setId(java.lang.Integer id)
|
void |
setRecipients(java.util.Set<AlertRecipient> recipients)
|
void |
setSatisfiedByAny(java.lang.Boolean satisfiedByAny)
|
void |
setText(java.lang.String text)
|
java.lang.String |
toString()
|
| Methods inherited from class org.openmrs.BaseOpenmrsObject |
|---|
getUuid, setUuid |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.openmrs.OpenmrsObject |
|---|
getUuid, setUuid |
| Constructor Detail |
|---|
public Alert()
public Alert(java.lang.Integer alertId)
public Alert(java.lang.String text,
java.util.Collection<User> users)
text - String to display for the alertusers - Recipients of this alert
public Alert(java.lang.String text,
User user)
text - String to display for the alertuser - Recipient of the alert| Method Detail |
|---|
public boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public java.lang.Integer getAlertId()
public void setAlertId(java.lang.Integer alertId)
alertId - The alertId to set.public User getCreator()
getCreator in interface Auditablepublic void setCreator(User creator)
setCreator in interface Auditablecreator - The creator to set.public java.util.Date getDateCreated()
getDateCreated in interface Auditablepublic void setDateCreated(java.util.Date dateCreated)
setDateCreated in interface AuditabledateCreated - The dateCreated to set.public java.util.Date getDateToExpire()
public void setDateToExpire(java.util.Date dateToExpire)
dateToExpire - The date To Expire this alertpublic java.lang.String getText()
public void setText(java.lang.String text)
text - The text to set.public java.lang.Boolean getSatisfiedByAny()
isSatisfiedByAny()public java.lang.Boolean isSatisfiedByAny()
public void setSatisfiedByAny(java.lang.Boolean satisfiedByAny)
satisfiedByAny - The satisfiedByAny to set.public java.lang.Boolean getAlertRead()
isAlertRead()public java.lang.Boolean isAlertRead()
public void setAlertRead(java.lang.Boolean alertRead)
alertRead - The alertRead to set.public User getChangedBy()
getChangedBy in interface Auditablepublic void setChangedBy(User changedBy)
setChangedBy in interface AuditablechangedBy - The user that changed this alertpublic java.util.Date getDateChanged()
getDateChanged in interface Auditablepublic void setDateChanged(java.util.Date dateChanged)
setDateChanged in interface AuditabledateChanged - The date this alert was changedpublic java.util.Set<AlertRecipient> getRecipients()
public void setRecipients(java.util.Set<AlertRecipient> recipients)
recipients - The recipients of this alertpublic void addRecipient(AlertRecipient r)
r - AlertRecipient to addpublic void addRecipient(User u)
u - User to add to list of recipientspublic void removeRecipient(AlertRecipient r)
r - user to remove from list of recipientspublic AlertRecipient getRecipient(User recipient)
recipient
recipient -
public Alert markAlertRead()
AlertService.saveAlert(Alert)public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public java.lang.Integer getId()
getId in interface OpenmrsObjectOpenmrsObject.getId()public void setId(java.lang.Integer id)
setId in interface OpenmrsObjectid - - The unique Identifier for the objectOpenmrsObject.setId(java.lang.Integer)
|
OpenMRS-1.7.x | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||