org.sakaiproject.cheftool
Class Alert

java.lang.Object
  extended byorg.sakaiproject.cheftool.Alert
All Implemented Interfaces:
Serializable

public class Alert
extends Object
implements Serializable

Alert is a set of messages intended for user display in the user interface.

Version:
$Revision: 632 $
Author:
University of Michigan, CHEF Software Development Team
See Also:
Serialized Form

Field Summary
protected  String m_msg
          The Alert text.
 
Constructor Summary
Alert()
           
 
Method Summary
 void add(String alert)
          Add a new alert line.
 void clear()
          Remove any messages in the Alert.
 String getAlert()
          Access the alert message.
 boolean isEmpty()
          Check to see if the alert is empty, or has been populated.
 String peekAlert()
          Access the alert message, but unlike getAlert(), do not clear the message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_msg

protected String m_msg
The Alert text.

Constructor Detail

Alert

public Alert()
Method Detail

add

public void add(String alert)
Add a new alert line. A line separator will be appended as needed.

Parameters:
alert - The alert message to add.

getAlert

public String getAlert()
Access the alert message. Once accessed, the message is cleared.

Returns:
The alert message.

peekAlert

public String peekAlert()
Access the alert message, but unlike getAlert(), do not clear the message.

Returns:
The alert message.

isEmpty

public boolean isEmpty()
Check to see if the alert is empty, or has been populated.

Returns:
true of the alert is empty, false if there have been alerts set.

clear

public void clear()
Remove any messages in the Alert.