|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.stratelia.silverpeas.silvertrace.MsgTrace
public final class MsgTrace
Class declaration
Constructor Summary | |
---|---|
MsgTrace()
Constructor declaration |
Method Summary | |
---|---|
static boolean |
getBooleanProperty(Properties theProps,
String propertyName,
boolean defaultValue)
Reads a boolean property and return it's boolean value |
static boolean |
getBooleanProperty(ResourceBundle resource,
String propertyName,
boolean defaultValue)
Reads a boolean property and return it's boolean value |
String |
getMsgString(String messageID)
Return the string associated to the message ID |
String |
getMsgString(String messageID,
String language)
Return the string associated to the message ID |
List<File> |
getPropertyFiles(String pathFiles,
String suffix)
Method declaration |
void |
initFromProperties(String filePath,
String language)
Initialize all trace messages from a path containing the module's messages files |
protected boolean |
isDefaultLanguage(String language)
Method declaration |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MsgTrace()
Method Detail |
---|
public void initFromProperties(String filePath, String language)
filePath
- the path to the ancestor of the property files that contains modules' messages
fileslanguage
- name of the sub directory containing the error messages (empty = default = "en"
= english)
public String getMsgString(String messageID)
messageID
- looks like "modulename.MSG_..."
public String getMsgString(String messageID, String language)
messageID
- looks like "modulename.MSG_..."
public static boolean getBooleanProperty(Properties theProps, String propertyName, boolean defaultValue)
theProps
- the Properties objectpropertyName
- the name of the property to testdefaultValue
- the default value to set to the property if it doesn't exist
public static boolean getBooleanProperty(ResourceBundle resource, String propertyName, boolean defaultValue)
resource
- the Resource objectpropertyName
- the name of the property to testdefaultValue
- the default value to set to the property if it doesn't exist
public List<File> getPropertyFiles(String pathFiles, String suffix)
pathFiles
- suffix
-
protected boolean isDefaultLanguage(String language)
language
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |