|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cc.framework.message.MessageResource
Class MessageResource
Field Summary | |
private int |
code
Unique message code |
static java.lang.String |
DEF_LANGUAGE
Field DEF_LANGUAGE |
private java.lang.String |
name
Symbolic name for the message |
private Severity |
severity
Severity assigned to the message |
private java.util.Hashtable |
text
Message |
Constructor Summary | |
MessageResource()
Constructor for MessageResource |
|
MessageResource(int code,
java.lang.String name,
Severity severity)
Constructor for MessageResource |
Method Summary | |
void |
addText(java.lang.String language,
java.lang.String text)
Adds a message text for the specified language |
java.lang.String |
expand(java.lang.String language,
java.lang.Object param1)
Replaces the placeholders in the Message with the specified Parameter |
java.lang.String |
expand(java.lang.String language,
java.lang.Object[] params)
Replaces the placeholders in the Message with the specified Parameters |
java.lang.String |
expand(java.lang.String language,
java.lang.Object param1,
java.lang.Object param2)
Replaces the placeholders in the Message with the specified Parameters |
java.lang.String |
expand(java.lang.String language,
java.lang.Object param1,
java.lang.Object param2,
java.lang.Object param3)
Replaces the placeholders in the Message with the specified Parameters |
int |
getCode()
Returns the Code |
java.lang.String |
getName()
Returns the Name |
Severity |
getSeverity()
Returns the severity |
java.lang.String |
getText()
Returns the message text for the default language |
java.lang.String |
getText(java.lang.String language)
Returns the message text for the specified language |
java.lang.String |
toString()
Creates a String representation for the message |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String DEF_LANGUAGE
private int code
private java.lang.String name
private java.util.Hashtable text
private Severity severity
Constructor Detail |
public MessageResource()
public MessageResource(int code, java.lang.String name, Severity severity)
code
- the message codename
- the symbolic name of the messageseverity
- the severity assigned for the messageMethod Detail |
public void addText(java.lang.String language, java.lang.String text)
language
- the language of the message texttext
- the message textpublic java.lang.String expand(java.lang.String language, java.lang.Object[] params)
language
- the languageparams
- the parameters to replace in the message text
public java.lang.String expand(java.lang.String language, java.lang.Object param1)
language
- the language of the messageparam1
- the parameter to replace in the message text
public java.lang.String expand(java.lang.String language, java.lang.Object param1, java.lang.Object param2)
language
- the language of the messageparam1
- the parameter to replace in the message textparam2
- the parameter to replace in the message text
public java.lang.String expand(java.lang.String language, java.lang.Object param1, java.lang.Object param2, java.lang.Object param3)
language
- the language of the messageparam1
- the parameter to replace in the message textparam2
- the parameter to replace in the message textparam3
- the parameter to replace in the message text
public int getCode()
public java.lang.String toString()
public java.lang.String getName()
public Severity getSeverity()
public java.lang.String getText(java.lang.String language)
language
- the language
public java.lang.String getText()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |