public class FeedbackMessage extends Object implements IDetachable
Modifier and Type | Field and Description |
---|---|
static int |
DEBUG
Constant for debug level.
|
static String |
DEBUG_CSS_CLASS_KEY |
static int |
ERROR
Constant for error level.
|
static String |
ERROR_CSS_CLASS_KEY |
static int |
FATAL
Constant for fatal level.
|
static String |
FATAL_CSS_CLASS_KEY |
static int |
INFO
Constant for info level.
|
static String |
INFO_CSS_CLASS_KEY |
static int |
SUCCESS
Constant for success level (it indicates the outcome of an operation)
|
static String |
SUCCESS_CSS_CLASS_KEY |
static int |
UNDEFINED
Constant for an undefined level; note that components might decide not to render anything
when this level is used.
|
static String |
UNDEFINED_CSS_CLASS_KEY |
static int |
WARNING
Constant for warning level.
|
static String |
WARNING_CSS_CLASS_KEY |
Constructor and Description |
---|
FeedbackMessage(Component reporter,
Serializable message,
int level)
Construct using fields.
|
Modifier and Type | Method and Description |
---|---|
void |
detach()
Detaches model after use.
|
int |
getLevel()
Gets the message level; can be used by rendering components.
|
String |
getLevelAsString()
Gets the current level as a String
|
Serializable |
getMessage()
Gets the actual message.
|
Component |
getReporter()
Gets the reporting component.
|
boolean |
isDebug()
Gets whether the current level is DEBUG or up.
|
boolean |
isError()
Gets whether the current level is ERROR or up.
|
boolean |
isFatal()
Gets whether the current level is FATAL or up.
|
boolean |
isInfo()
Gets whether the current level is INFO or up.
|
boolean |
isLevel(int level)
Returns whether this level is greater than or equal to the given level.
|
boolean |
isRendered()
Gets whether or not this message has been rendered
|
boolean |
isSuccess()
Gets whether the current level is SUCCESS or up.
|
boolean |
isUndefined()
Gets whether the current level is UNDEFINED.
|
boolean |
isWarning()
Gets whether the current level is WARNING or up.
|
void |
markRendered()
Marks this message as rendered.
|
String |
toString() |
public static final String UNDEFINED_CSS_CLASS_KEY
public static final String DEBUG_CSS_CLASS_KEY
public static final String INFO_CSS_CLASS_KEY
public static final String SUCCESS_CSS_CLASS_KEY
public static final String WARNING_CSS_CLASS_KEY
public static final String ERROR_CSS_CLASS_KEY
public static final String FATAL_CSS_CLASS_KEY
public static final int UNDEFINED
public static final int DEBUG
public static final int INFO
public static final int SUCCESS
public static final int WARNING
public static final int ERROR
public static final int FATAL
public FeedbackMessage(Component reporter, Serializable message, int level)
reporter
- The message reportermessage
- The actual message. Must not be null
.level
- The level of the messagepublic final boolean isRendered()
public final void markRendered()
public final int getLevel()
public String getLevelAsString()
public final Serializable getMessage()
public final Component getReporter()
public final boolean isDebug()
public final boolean isInfo()
public final boolean isSuccess()
public final boolean isWarning()
public final boolean isError()
public final boolean isFatal()
public final boolean isLevel(int level)
level
- the levelpublic final boolean isUndefined()
public void detach()
IDetachable
detach
in interface IDetachable
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.