|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectwicket.feedback.FeedbackMessages
public final class FeedbackMessages
Holds list of feedback messages. The list can be added to, cleared, queried and filtered.
| Constructor Summary | |
|---|---|
FeedbackMessages()
Package local constructor; clients are not allowed to create instances as this class is managed by the framework. |
|
FeedbackMessages(java.util.List messagesList)
Call this constructor if you want to replace the internal store with another implemention then the default (ArrayList). |
|
| Method Summary | |
|---|---|
void |
add(Component reporter,
java.lang.String message,
int level)
Adds a message |
void |
clear()
Clears any existing messages |
void |
clearRendered()
Removes messages that have been rendered |
void |
debug(Component reporter,
java.lang.String message)
Adds a new ui message with level DEBUG to the current messages. |
void |
error(Component reporter,
java.lang.String message)
Adds a new ui message with level ERROR to the current messages. |
void |
fatal(Component reporter,
java.lang.String message)
Adds a new ui message with level FATAL to the current messages. |
boolean |
hasErrorMessageFor(Component component)
Convenience method that looks up whether the given component registered a message with this list with the level ERROR. |
boolean |
hasMessage(IFeedbackMessageFilter filter)
|
boolean |
hasMessageFor(Component component)
Looks up whether the given component registered a message with this list. |
boolean |
hasMessageFor(Component component,
int level)
Looks up whether the given component registered a message with this list with the given level. |
void |
info(Component reporter,
java.lang.String message)
Adds a new ui message with level INFO to the current messages. |
boolean |
isEmpty()
Gets whether there are no messages. |
java.util.Iterator |
iterator()
Gets an iterator over stored messages |
FeedbackMessage |
messageForComponent(Component component)
Looks up a message for the given component. |
java.util.List |
messages(IFeedbackMessageFilter filter)
Gets a list of messages from the page using a filter. |
int |
size()
Gets the number of messages |
java.lang.String |
toString()
|
void |
trimToSize()
Frees any unnecessary internal storage |
void |
warn(Component reporter,
java.lang.String message)
Adds a new ui message with level WARNING to the current messages. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FeedbackMessages()
sessionStored - whether or not this object is stored in sessionpublic FeedbackMessages(java.util.List messagesList)
CopyOnWriteArrayList if this feedbackmessages
instance is used by multiply threads.
messagesList - | Method Detail |
|---|
public final void clear()
public final int size()
public final void clearRendered()
public final void debug(Component reporter,
java.lang.String message)
reporter - the reporting componentmessage - the actual message
public final void error(Component reporter,
java.lang.String message)
reporter - the reporting componentmessage - the actual message
public final void fatal(Component reporter,
java.lang.String message)
reporter - the reporting componentmessage - the actual messagepublic final boolean hasErrorMessageFor(Component component)
component - the component to look up whether it registered a message
public final boolean hasMessage(IFeedbackMessageFilter filter)
filter - Filter for selecting messages
public final boolean hasMessageFor(Component component)
component - the component to look up whether it registered a message
public final boolean hasMessageFor(Component component,
int level)
component - The component to look up whether it registered a messagelevel - The level of the message
public final void info(Component reporter,
java.lang.String message)
reporter - The reporting componentmessage - The actual messagepublic final boolean isEmpty()
public final FeedbackMessage messageForComponent(Component component)
component - the component to look up the message for
public final java.util.List messages(IFeedbackMessageFilter filter)
filter - Filter for selecting messages
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
public final void warn(Component reporter,
java.lang.String message)
reporter - the reporting componentmessage - the actual message
public final void add(Component reporter,
java.lang.String message,
int level)
reporter - message - level - public final java.util.Iterator iterator()
public final void trimToSize()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||