|
|||||||||
| 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 List<File> |
getApplicationClasspath()
|
static Locale[] |
getAvailableLocales()
Return the list of locales from the configuration. |
static File |
getBaseDir()
Return the base directory (from the configuration). |
static List<File> |
getBootClasspath()
|
static ClassLoader |
getClassLoader()
Get the application class loader. |
static List<File> |
getClasspath()
|
static NumberFormat |
getDecimalFormatter()
|
static NumberFormat |
getDecimalFormatter(String maxDigitSettings,
NumberFormat original)
returns a NumberFormat where the max. fraction and integer digits
are set as defined in the passed parameter. all other settings are copied from
the passed NumberFormat |
static NumberFormat |
getLocalNumberFormatter()
|
static ILogger |
getLogger()
Get the logger. |
static String |
getServerId()
Get the id of the server. |
static MultiMap<String,String> |
getShadowedFiles()
Checks the classpath for duplicate entries. |
static List<File> |
getSystemClasspath()
|
static File |
getTempDir()
Return the temporary directory (from the configuration). |
boolean |
isRunning()
Ask the object if it has been started |
static void |
log(String s,
int level)
Write a message to the log. |
static void |
logError(Throwable err)
Log an error |
static void |
logError(Throwable err,
String errHeader)
Prints a header line and a stack trace for the given Error or Exception |
void |
reconfigure()
Reconfigure gives the service the chance to react on configuration changes. |
static void |
setAvailableLocales(Locale[] l)
Change the list of locales. |
static void |
setBaseDir(String dir)
Set the base directory. |
static void |
setClassLoader(ClassLoader cl)
Set the application class loader. |
static void |
setLogger(ILogger l)
Set the logger. |
void |
shutdown()
This method is called on shutdown. |
void |
startup()
This method is called when the object is "started". |
| 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(ClassLoader cl)
cl - a class loaderpublic static ClassLoader getClassLoader()
public static void setLogger(ILogger l)
l - an ILogger object.public static ILogger getLogger()
public static void log(String s,
int level)
s - the messagelevel - the log levelpublic static void logError(Throwable err)
err - a throwable.
public static void logError(Throwable err,
String errHeader)
err - a throwable.errHeader - the text for the header linepublic static File getBaseDir()
public static File getTempDir()
public static void setBaseDir(String dir)
dir - the directory pathpublic static String getServerId()
public static Locale[] getAvailableLocales()
public static void setAvailableLocales(Locale[] l)
l - an array of Locale objectspublic static NumberFormat getDecimalFormatter()
public static NumberFormat getLocalNumberFormatter()
public void startup()
Lifecycle
startup in interface Lifecyclepublic void shutdown()
Lifecycle
shutdown in interface Lifecyclepublic boolean isRunning()
Service
isRunning in interface Servicepublic void reconfigure()
Service
reconfigure in interface Service
public static NumberFormat getDecimalFormatter(String maxDigitSettings,
NumberFormat original)
NumberFormat where the max. fraction and integer digits
are set as defined in the passed parameter. all other settings are copied from
the passed NumberFormat
maxDigitSettings - the settings for the max. fraction and integer digits. e.g. 18,8 means 8 integer digits and 8 fraction digitsoriginal - the reference-number-format - all other settings are copied from this formatpublic static MultiMap<String,String> getShadowedFiles()
MultiMap containing all duplicate entries (key) and their occurances (value)public static List<File> getBootClasspath()
public static List<File> getSystemClasspath()
public static List<File> getApplicationClasspath()
public static List<File> getClasspath()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||