Package org.sakaiproject.cheftool
Class AlertImpl
- java.lang.Object
-
- org.sakaiproject.cheftool.AlertImpl
-
- All Implemented Interfaces:
Serializable,org.sakaiproject.cheftool.api.Alert
public class AlertImpl extends Object implements org.sakaiproject.cheftool.api.Alert, Serializable
Alert is a set of messages intended for user display in the user interface.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AlertImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(String alert)Add a new alert line.voidclear()Remove any messages in the Alert.StringgetAlert()Access the alert message.booleanisEmpty()Check to see if the alert is empty, or has been populated.StringpeekAlert()Access the alert message, but unlike getAlert(), do not clear the message.
-
-
-
Field Detail
-
m_msg
protected String m_msg
The Alert text.
-
-
Method Detail
-
add
public void add(String alert)
Add a new alert line. A line separator will be appended as needed.- Specified by:
addin interfaceorg.sakaiproject.cheftool.api.Alert- Parameters:
alert- The alert message to add.
-
getAlert
public String getAlert()
Access the alert message. Once accessed, the message is cleared.- Specified by:
getAlertin interfaceorg.sakaiproject.cheftool.api.Alert- Returns:
- The alert message.
-
peekAlert
public String peekAlert()
Access the alert message, but unlike getAlert(), do not clear the message.- Specified by:
peekAlertin interfaceorg.sakaiproject.cheftool.api.Alert- Returns:
- The alert message.
-
isEmpty
public boolean isEmpty()
Check to see if the alert is empty, or has been populated.- Specified by:
isEmptyin interfaceorg.sakaiproject.cheftool.api.Alert- Returns:
- true of the alert is empty, false if there have been alerts set.
-
clear
public void clear()
Remove any messages in the Alert.- Specified by:
clearin interfaceorg.sakaiproject.cheftool.api.Alert
-
-