|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.shineframework.common.messages.MessageImpl
public class MessageImpl
A basic implementation of a message. This type of message retrieves the localized message phrase from the Localizer.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface net.sf.shineframework.common.messages.Message |
---|
Message.Severity |
Constructor Summary | |
---|---|
MessageImpl(MessageDef def)
Creates a concrete message with the current timestamp |
Method Summary | |
---|---|
void |
addParam(java.lang.String value)
adds a param value to the message. |
void |
addParams(java.lang.Object... values)
add several (or all) params at once |
java.lang.String |
getKey()
retrieves the message key. |
java.lang.String |
getMessage()
retrieves the localized message with the default locale as defined in the localizer |
java.lang.String |
getMessage(java.util.Locale l)
retrieves the localized message from the localizer according to the locale |
java.util.Collection<java.lang.Object> |
getParams()
Returns an immutable collection of the message params |
Message.Severity |
getSeverity()
retrieves the message severity |
java.util.Date |
getTimestamp()
retrieves the message creation timestamp |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessageImpl(MessageDef def)
Method Detail |
---|
public void addParam(java.lang.String value)
addParam
in interface Message
value
- the param value to addpublic void addParams(java.lang.Object... values)
addParams
in interface Message
values
- param values to add in the order they appear in the message
phrasepublic java.lang.String getKey()
getKey
in interface Message
Localizer
public java.lang.String getMessage()
Message
getMessage
in interface Message
public java.lang.String getMessage(java.util.Locale l)
Message
getMessage
in interface Message
public java.util.Collection<java.lang.Object> getParams()
Message
getParams
in interface Message
public Message.Severity getSeverity()
getSeverity
in interface Message
public java.util.Date getTimestamp()
getTimestamp
in interface Message
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |