01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/velocity/tags/sakai_2-4-1/tool-api/src/java/org/sakaiproject/cheftool/api/Alert.java $
03: * $Id: Alert.java 6782 2006-03-18 02:48:14Z ggolden@umich.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 2006 The Sakai Foundation.
07: *
08: * Licensed under the Educational Community License, Version 1.0 (the "License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.opensource.org/licenses/ecl1.php
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: *
20: **********************************************************************************/package org.sakaiproject.cheftool.api;
21:
22: /**
23: * <p>
24: * Alert is a interface for a set of messages intended for user display in the user interface.
25: * </p>
26: */
27: public interface Alert {
28: /**
29: * Add a new alert line. A line separator will be appended as needed.
30: *
31: * @param alert
32: * The alert message to add.
33: */
34: void add(String alert);
35:
36: /**
37: * Access the alert message. Once accessed, the message is cleared.
38: *
39: * @return The alert message.
40: */
41: String getAlert();
42:
43: /**
44: * Access the alert message, but unlike getAlert(), do not clear the message.
45: *
46: * @return The alert message.
47: */
48: String peekAlert();
49:
50: /**
51: * Check to see if the alert is empty, or has been populated.
52: *
53: * @return true of the alert is empty, false if there have been alerts set.
54: */
55: boolean isEmpty();
56:
57: /**
58: * Remove any messages in the Alert.
59: */
60: void clear();
61: }
|