java.lang.Object
org.apache.wicket.feedback.FeedbackMessage
- All Implemented Interfaces:
Serializable
,IDetachable
,IClusterable
Represents a generic message meant for the end-user/ pages.
- Author:
- Eelco Hillenius, Jonathan Locke
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Constant for debug level.static final String
static final int
Constant for error level.static final String
static final int
Constant for fatal level.static final String
static final int
Constant for info level.static final String
static final int
Constant for success level (it indicates the outcome of an operation)static final String
static final int
Constant for an undefined level; note that components might decide not to render anything when this level is used.static final String
static final int
Constant for warning level.static final String
-
Constructor Summary
ConstructorDescriptionFeedbackMessage
(Component reporter, Serializable message, int level) Construct using fields. -
Method Summary
Modifier and TypeMethodDescriptionvoid
detach()
Detaches model after use.final int
getLevel()
Gets the message level; can be used by rendering components.Gets the current level as a Stringfinal Serializable
Gets the actual message.final Component
Gets the reporting component.final boolean
isDebug()
Gets whether the current level is DEBUG or up.final boolean
isError()
Gets whether the current level is ERROR or up.final boolean
isFatal()
Gets whether the current level is FATAL or up.final boolean
isInfo()
Gets whether the current level is INFO or up.final boolean
isLevel
(int level) Returns whether this level is greater than or equal to the given level.final boolean
Gets whether or not this message has been renderedfinal boolean
Gets whether the current level is SUCCESS or up.final boolean
Gets whether the current level is UNDEFINED.final boolean
Gets whether the current level is WARNING or up.final void
Marks this message as rendered.toString()
-
Field Details
-
UNDEFINED_CSS_CLASS_KEY
-
DEBUG_CSS_CLASS_KEY
-
INFO_CSS_CLASS_KEY
-
SUCCESS_CSS_CLASS_KEY
-
WARNING_CSS_CLASS_KEY
-
ERROR_CSS_CLASS_KEY
-
FATAL_CSS_CLASS_KEY
-
UNDEFINED
Constant for an undefined level; note that components might decide not to render anything when this level is used.- See Also:
-
DEBUG
Constant for debug level.- See Also:
-
INFO
Constant for info level.- See Also:
-
SUCCESS
Constant for success level (it indicates the outcome of an operation)- See Also:
-
WARNING
Constant for warning level.- See Also:
-
ERROR
Constant for error level.- See Also:
-
FATAL
Constant for fatal level.- See Also:
-
-
Constructor Details
-
FeedbackMessage
Construct using fields.- Parameters:
reporter
- The message reportermessage
- The actual message. Must not benull
.level
- The level of the message
-
-
Method Details
-
isRendered
Gets whether or not this message has been rendered- Returns:
- true if this message has been rendered, false otherwise
-
markRendered
Marks this message as rendered. -
getLevel
Gets the message level; can be used by rendering components. Note that what actually happens with the level indication is totally up to the components that render feedback messages.- Returns:
- The message level indicator.
-
getLevelAsString
Gets the current level as a String- Returns:
- The current level as a String
-
getMessage
Gets the actual message.- Returns:
- the message.
-
getReporter
Gets the reporting component.- Returns:
- the reporting component.
-
isDebug
Gets whether the current level is DEBUG or up.- Returns:
- whether the current level is DEBUG or up.
-
isInfo
Gets whether the current level is INFO or up.- Returns:
- whether the current level is INFO or up.
-
isSuccess
Gets whether the current level is SUCCESS or up.- Returns:
- whether the current level is SUCCESS or up.
-
isWarning
Gets whether the current level is WARNING or up.- Returns:
- whether the current level is WARNING or up.
-
isError
Gets whether the current level is ERROR or up.- Returns:
- whether the current level is ERROR or up.
-
isFatal
Gets whether the current level is FATAL or up.- Returns:
- whether the current level is FATAL or up.
-
isLevel
Returns whether this level is greater than or equal to the given level.- Parameters:
level
- the level- Returns:
- whether this level is greater than or equal to the given level
-
isUndefined
Gets whether the current level is UNDEFINED.- Returns:
- whether the current level is UNDEFINED.
-
toString
-
detach
Description copied from interface:IDetachable
Detaches model after use. This is generally used to null out transient references that can be re-attached later.- Specified by:
detach
in interfaceIDetachable
-