|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@RequestScoped public interface Messages
A convenient way to add messages to be displayed to the user as Feedback, Toast, Alerts, etc.
It is the responsibility of the view-layer technology to consume and perform operations required to display any messages added in this way.
Method Summary | |
---|---|
void |
add(Message message)
Add a Message object to the pending message cache. |
void |
add(MessageBuilder builder)
Add a MessageBuilder object to the pending builder cache. |
void |
clear()
Clear all pending messages. |
BundleTemplateMessage |
error(BundleKey message)
Create a MessageBuilder with the specified Level , add it to the internal queue, and return it. |
BundleTemplateMessage |
error(BundleKey message,
Object... params)
Create a MessageBuilder with the specified Level , add it to the internal queue, and return it. |
TemplateMessage |
error(String message)
Create a MessageBuilder with the specified Level , add it to the internal queue, and return it. |
TemplateMessage |
error(String message,
Object... params)
Create a MessageBuilder with the specified Level , add it to the internal queue, and return it. |
BundleTemplateMessage |
fatal(BundleKey message)
Create a MessageBuilder with the specified Level , add it to the internal queue, and return it. |
BundleTemplateMessage |
fatal(BundleKey message,
Object... params)
Create a MessageBuilder with the specified Level , add it to the internal queue, and return it. |
TemplateMessage |
fatal(String message)
Create a MessageBuilder with the specified Level , add it to the internal queue, and return it. |
TemplateMessage |
fatal(String message,
Object... params)
Create a MessageBuilder with the specified Level , add it to the internal queue, and return it. |
Set<Message> |
getAll()
Retrieve all pending Messages in their final state - as they will be displayed to the user. |
BundleTemplateMessage |
info(BundleKey message)
Create a MessageBuilder with the specified Level , add it to the internal queue, and return it. |
BundleTemplateMessage |
info(BundleKey message,
Object... params)
Create a MessageBuilder with the specified Level , add it to the internal queue, and return it. |
TemplateMessage |
info(String message)
Create a MessageBuilder with the specified Level , add it to the internal queue, and return it. |
TemplateMessage |
info(String message,
Object... params)
Create a MessageBuilder with the specified Level , add it to the internal queue, and return it. |
boolean |
isEmpty()
Return true if there are no pending Message or MessageBuilder objects in the queue. |
BundleTemplateMessage |
warn(BundleKey message)
Create a MessageBuilder with the specified Level , add it to the internal queue, and return it. |
BundleTemplateMessage |
warn(BundleKey message,
Object... params)
Create a MessageBuilder with the specified Level , add it to the internal queue, and return it. |
TemplateMessage |
warn(String message)
Create a MessageBuilder with the specified Level , add it to the internal queue, and return it. |
TemplateMessage |
warn(String message,
Object... params)
Create a MessageBuilder with the specified Level , add it to the internal queue, and return it. |
Method Detail |
---|
void clear()
boolean isEmpty()
Message
or MessageBuilder
objects in the queue.
Set<Message> getAll()
Messages
in their final state - as they will be displayed to the user. Calling this method
will call MessageBuilder.build()
on any queued MessageBuilder
instances, adding the resulting
Message
objects to the message cache, and clearing the builders from the builder cache.
void add(Message message)
Message
object to the pending message cache. Messages remain pending until cleared by and displayed in the
View Layer, or until cleared manually by calling clear()
, or until the user's Session expires.
Note: Duplicate messages are ignored.
void add(MessageBuilder builder)
MessageBuilder
object to the pending builder cache. A subsequent call to getAll()
will
trigger, MessageBuilder.build()
to be called called on each builder added in this way.
BundleTemplateMessage info(BundleKey message)
MessageBuilder
with the specified Level
, add it to the internal queue, and return it.
BundleTemplateMessage info(BundleKey message, Object... params)
MessageBuilder
with the specified Level
, add it to the internal queue, and return it.
BundleTemplateMessage warn(BundleKey message)
MessageBuilder
with the specified Level
, add it to the internal queue, and return it.
BundleTemplateMessage warn(BundleKey message, Object... params)
MessageBuilder
with the specified Level
, add it to the internal queue, and return it.
BundleTemplateMessage error(BundleKey message)
MessageBuilder
with the specified Level
, add it to the internal queue, and return it.
BundleTemplateMessage error(BundleKey message, Object... params)
MessageBuilder
with the specified Level
, add it to the internal queue, and return it.
BundleTemplateMessage fatal(BundleKey message)
MessageBuilder
with the specified Level
, add it to the internal queue, and return it.
BundleTemplateMessage fatal(BundleKey message, Object... params)
MessageBuilder
with the specified Level
, add it to the internal queue, and return it.
TemplateMessage info(String message)
MessageBuilder
with the specified Level
, add it to the internal queue, and return it.
TemplateMessage info(String message, Object... params)
MessageBuilder
with the specified Level
, add it to the internal queue, and return it.
TemplateMessage warn(String message)
MessageBuilder
with the specified Level
, add it to the internal queue, and return it.
TemplateMessage warn(String message, Object... params)
MessageBuilder
with the specified Level
, add it to the internal queue, and return it.
TemplateMessage error(String message)
MessageBuilder
with the specified Level
, add it to the internal queue, and return it.
TemplateMessage error(String message, Object... params)
MessageBuilder
with the specified Level
, add it to the internal queue, and return it.
TemplateMessage fatal(String message)
MessageBuilder
with the specified Level
, add it to the internal queue, and return it.
TemplateMessage fatal(String message, Object... params)
MessageBuilder
with the specified Level
, add it to the internal queue, and return it.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |