public class AlertManagerImpl extends Object implements AlertManager
Constructor and Description |
---|
AlertManagerImpl(ApplicationStateManager asm,
Request request,
AjaxResponseRenderer ajaxResponseRenderer,
PerthreadManager perThreadManager) |
Modifier and Type | Method and 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 an
Severity.ERROR alert with the default duration, Duration.SINGLE . |
void |
info(String message)
Adds an
Severity.INFO alert with the default duration, Duration.SINGLE . |
void |
success(String message)
Adds an
Severity.SUCCESS alert with the default duration, Duration.SINGLE . |
void |
warn(String message)
Adds an
Severity.WARN alert with the default duration, Duration.SINGLE . |
public AlertManagerImpl(ApplicationStateManager asm, Request request, AjaxResponseRenderer ajaxResponseRenderer, PerthreadManager perThreadManager)
public void success(String message)
AlertManager
Severity.SUCCESS
alert with the default duration, Duration.SINGLE
.success
in interface AlertManager
message
- to present to the userpublic void info(String message)
AlertManager
Severity.INFO
alert with the default duration, Duration.SINGLE
.info
in interface AlertManager
message
- to present to the userpublic void warn(String message)
AlertManager
Severity.WARN
alert with the default duration, Duration.SINGLE
.warn
in interface AlertManager
message
- to present to the userpublic void error(String message)
AlertManager
Severity.ERROR
alert with the default duration, Duration.SINGLE
.error
in interface AlertManager
message
- to present to the userpublic void alert(Duration duration, Severity severity, String message)
AlertManager
alert
in interface AlertManager
duration
- controls how long the alert is presented to the userseverity
- controls how the alert is presented to the usermessage
- to present to the userpublic void alert(Duration duration, Severity severity, String message, boolean markup)
AlertManager
alert
in interface AlertManager
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).5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.