|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.groiss.util.Settings
public class Settings
This class defines some settings of the server. The settings are read from the configuration file. This implies that the configuration must be loaded when this class is initialized.
| Constructor Summary | |
|---|---|
Settings()
|
|
| Method Summary | |
|---|---|
static java.util.Locale[] |
getAvailableLocales()
Return the list of locales from the configuration. |
static java.io.File |
getBaseDir()
Return the base directory (from the configuration). |
static java.lang.ClassLoader |
getClassLoader()
Get the application class loader. |
static java.text.NumberFormat |
getDecimalFormatter()
|
static ILogger |
getLogger()
Get the logger. |
static java.lang.String |
getServerId()
Get the id of the server. |
static java.io.File |
getTempDir()
Return the temporary directory (from the configuration). |
static void |
log(java.lang.String s,
int level)
Write a message to the log. |
static void |
logError(java.lang.Throwable err)
Log an error |
static void |
logError(java.lang.Throwable err,
java.lang.String errHeader)
Prints a header line and a stack trace for the given Error or Exception |
static void |
setAvailableLocales(java.util.Locale[] l)
Change the list of locales. |
static void |
setBaseDir(java.lang.String dir)
Set the base directory. |
static void |
setClassLoader(java.lang.ClassLoader cl)
Set the application class loader. |
static void |
setLogger(ILogger l)
Set the logger. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Settings()
| Method Detail |
|---|
public static void setClassLoader(java.lang.ClassLoader cl)
cl - a class loaderpublic static java.lang.ClassLoader getClassLoader()
public static void setLogger(ILogger l)
l - an ILogger object.public static ILogger getLogger()
public static void log(java.lang.String s,
int level)
s - the messagelevel - the log levelpublic static void logError(java.lang.Throwable err)
err - a throwable.
public static void logError(java.lang.Throwable err,
java.lang.String errHeader)
err - a throwable.errHeader - the text for the header linepublic static java.io.File getBaseDir()
public static java.io.File getTempDir()
public static void setBaseDir(java.lang.String dir)
dir - the directory pathpublic static java.lang.String getServerId()
public static java.util.Locale[] getAvailableLocales()
public static void setAvailableLocales(java.util.Locale[] l)
l - an array of Locale objectspublic static java.text.NumberFormat getDecimalFormatter()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||