Package org.apache.tapestry5.alerts
Interface AlertManager
-
- All Known Implementing Classes:
AlertManagerImpl
public interface AlertManager
ManagesAlert
s (using theAlertStorage
SSO. The behavior of the service switches during an Ajax request to directly add JavaScript to present the alerts.- Since:
- 5.3
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
alert(Duration duration, Severity severity, String message)
Adds an alert with configurable severity and duration.void
alert(Duration duration, Severity severity, String message, boolean markup)
Adds an alert with configurable severity and duration.void
error(String message)
Adds anSeverity.ERROR
alert with the default duration,Duration.SINGLE
.void
info(String message)
Adds anSeverity.INFO
alert with the default duration,Duration.SINGLE
.void
success(String message)
Adds anSeverity.SUCCESS
alert with the default duration,Duration.SINGLE
.void
warn(String message)
Adds anSeverity.WARN
alert with the default duration,Duration.SINGLE
.
-
-
-
Method Detail
-
success
void success(String message)
Adds anSeverity.SUCCESS
alert with the default duration,Duration.SINGLE
.- Parameters:
message
- to present to the user- Since:
- 5.3.6
-
info
void info(String message)
Adds anSeverity.INFO
alert with the default duration,Duration.SINGLE
.- Parameters:
message
- to present to the user
-
warn
void warn(String message)
Adds anSeverity.WARN
alert with the default duration,Duration.SINGLE
.- Parameters:
message
- to present to the user
-
error
void error(String message)
Adds anSeverity.ERROR
alert with the default duration,Duration.SINGLE
.- Parameters:
message
- to present to the user
-
alert
void alert(Duration duration, Severity severity, String message)
Adds an alert with configurable severity and duration. Message isn't treated as HTML, being HTML-escaped.- Parameters:
duration
- controls how long the alert is presented to the userseverity
- controls how the alert is presented to the usermessage
- to present to the user
-
alert
@IncompatibleChange(details="Added in 5.4 in order to support HTML in alerts", release="5.4") void alert(Duration duration, Severity severity, String message, boolean markup)
Adds an alert with configurable severity and duration.- Parameters:
duration
- controls how long the alert is presented to the userseverity
- controls how the alert is presented to the usermessage
- to present to the usermarkup
- whether to treat the message as raw HTML (true) or escape it (false).
-
-