|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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.List<java.io.File> |
getApplicationClasspath()
|
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.util.List<java.io.File> |
getBootClasspath()
|
static java.lang.ClassLoader |
getClassLoader()
Get the application class loader. |
static java.util.List<java.io.File> |
getClasspath()
|
static NumberFormat |
getDecimalFormatter()
|
static NumberFormat |
getDecimalFormatter(java.lang.String maxDigitSettings,
NumberFormat original)
returns a NumberFormat where the max. |
static NumberFormat |
getLocalNumberFormatter()
|
static ILogger |
getLogger()
Get the logger. |
static java.lang.String |
getServerId()
Get the id of the server. |
static MultiMap<java.lang.String,java.lang.String> |
getShadowedFiles()
Checks the classpath for duplicate entries. |
static java.util.List<java.io.File> |
getSystemClasspath()
|
static java.io.File |
getTempDir()
Return the temporary directory (from the configuration). |
boolean |
isRunning()
Ask the object if it has been started |
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 |
void |
reconfigure()
Reconfigure gives the service the chance to react on configuration changes. |
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. |
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(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 NumberFormat getDecimalFormatter()
public static NumberFormat getLocalNumberFormatter()
public void startup()
Lifecycle
startup
in interface Lifecycle
public void shutdown()
Lifecycle
shutdown
in interface Lifecycle
public boolean isRunning()
Service
isRunning
in interface Service
public void reconfigure()
Service
reconfigure
in interface Service
public static NumberFormat getDecimalFormatter(java.lang.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<java.lang.String,java.lang.String> getShadowedFiles()
MultiMap
containing all duplicate entries (key) and their occurances (value)public static java.util.List<java.io.File> getBootClasspath()
public static java.util.List<java.io.File> getSystemClasspath()
public static java.util.List<java.io.File> getApplicationClasspath()
public static java.util.List<java.io.File> getClasspath()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |