|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.irisel.util.Configuration
public class Configuration
Field Summary | |
---|---|
static java.lang.String |
DISABLE_LOGGING
The 'disable logging' property key. |
static java.lang.String |
DISABLE_LOGGING_DEFAULT
The default 'disable logging' property value. |
static java.lang.String |
KEY_APP_PASS
|
static java.lang.String |
KEY_APP_USER
|
static java.lang.String |
KEY_CONSOLE_CLASSNAME
|
static java.lang.String |
KEY_CONSOLE_DIRECTORY_CLASSNAME
|
static java.lang.String |
KEY_COUNTRY
|
static java.lang.String |
KEY_DB_AUTH_TYPE
|
static java.lang.String |
KEY_DB_DATABASE
|
static java.lang.String |
KEY_DB_INIT
|
static java.lang.String |
KEY_DB_INIT_PASS
|
static java.lang.String |
KEY_DB_PASS
|
static java.lang.String |
KEY_DB_PORT
|
static java.lang.String |
KEY_DB_SCHEMA
|
static java.lang.String |
KEY_DB_SERV
|
static java.lang.String |
KEY_DB_SYSTEM_USER
|
static java.lang.String |
KEY_DB_SYSTEM_XPASS
|
static java.lang.String |
KEY_DB_TYPE
|
static java.lang.String |
KEY_DB_USER
|
static java.lang.String |
KEY_LANG
|
static java.lang.String |
KEY_OL_DESC_FILE
|
static java.lang.String |
KEY_OL_SCH_FILE
|
static java.lang.String |
KEY_OL_SRV_DESC_FILE
|
static java.lang.String |
KEY_OL_SRV_SCH_FILE
|
static java.lang.String |
KEY_PLAF
platform look and feel |
static java.lang.String |
licpayload
|
static java.lang.String |
licsign
|
static java.lang.String |
LOGLEVEL
The 'log level' property key. |
static java.lang.String |
LOGLEVEL_DEFAULT
The default 'log level' property value. |
static java.lang.String |
LOGTARGET
The 'log target' property key. |
Constructor Summary | |
---|---|
Configuration(Configuration globalConfig)
Creates a new report configuration. |
Method Summary | |
---|---|
java.util.Iterator |
findPropertyKeys(java.lang.String prefix)
Searches all property keys that start with a given prefix. |
static javax.swing.Icon |
getClassIcon(java.lang.String name)
|
java.util.Enumeration |
getConfigProperties()
|
java.lang.String |
getConfigProperty(java.lang.String key)
Returns the configuration property with the specified key. |
java.lang.String |
getConfigProperty(java.lang.String key,
java.lang.String defaultValue)
Returns the configuration property with the specified key (or the specified default value if there is no such property). |
java.util.Properties |
getConfiguration()
Returns the collection of properties for the configuration. |
static Configuration |
getGlobalConfig()
Deprecated. |
java.lang.String |
getLogLevel()
Returns the log level. |
java.lang.String |
getLogTarget()
Returns the current log target. |
boolean |
isDisableLogging()
Returns true if logging is disabled, and false otherwise. |
boolean |
isLocallyDefined(java.lang.String key)
Checks, whether the given key is localy defined in this instance or whether the key's value is inherited. |
static java.io.InputStream |
openFile(java.lang.Class cls,
java.awt.Component comp,
java.lang.String filename)
Returns InputStreamm for given filename. |
static java.io.InputStream |
openFile(java.lang.Class class1,
java.lang.String filename)
|
void |
setConfigProperty(java.lang.String key,
java.lang.String value)
Sets a configuration property. |
static boolean |
setCurrentDirectory()
|
static boolean |
setCurrentDirectory(java.lang.String directory_name)
|
void |
setDisableLogging(boolean disableLogging)
Sets the flag that disables logging. |
void |
setLogLevel(java.lang.String level)
Sets the log level, which is read from the global report configuration at the point that the classloader loads the Log class. |
void |
setLogTarget(java.lang.String logTarget)
Sets the log target. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DISABLE_LOGGING
public static final java.lang.String DISABLE_LOGGING_DEFAULT
public static final java.lang.String LOGLEVEL
public static final java.lang.String LOGLEVEL_DEFAULT
public static final java.lang.String LOGTARGET
public static final java.lang.String KEY_LANG
public static final java.lang.String KEY_COUNTRY
public static final java.lang.String KEY_PLAF
public static final java.lang.String KEY_DB_TYPE
public static final java.lang.String KEY_DB_SERV
public static final java.lang.String KEY_DB_PORT
public static final java.lang.String KEY_DB_DATABASE
public static final java.lang.String KEY_DB_SCHEMA
public static final java.lang.String KEY_DB_INIT
public static final java.lang.String KEY_DB_INIT_PASS
public static final java.lang.String KEY_DB_USER
public static final java.lang.String KEY_DB_AUTH_TYPE
public static final java.lang.String KEY_DB_SYSTEM_USER
public static final java.lang.String KEY_DB_SYSTEM_XPASS
public static final java.lang.String KEY_DB_PASS
public static final java.lang.String KEY_APP_USER
public static final java.lang.String KEY_APP_PASS
public static final java.lang.String KEY_OL_SCH_FILE
public static final java.lang.String KEY_OL_DESC_FILE
public static final java.lang.String KEY_OL_SRV_SCH_FILE
public static final java.lang.String KEY_OL_SRV_DESC_FILE
public static final java.lang.String KEY_CONSOLE_CLASSNAME
public static final java.lang.String KEY_CONSOLE_DIRECTORY_CLASSNAME
public static java.lang.String licpayload
public static java.lang.String licsign
Constructor Detail |
---|
public Configuration(Configuration globalConfig) throws ConfigException
globalConfig
- the global configuration.
ConfigException
Method Detail |
---|
public java.lang.String getConfigProperty(java.lang.String key)
key
- the property key.
public java.lang.String getConfigProperty(java.lang.String key, java.lang.String defaultValue)
If the property is not defined in this configuration, the code will lookup the property in the parent configuration.
key
- the property key.defaultValue
- the default value.
public void setConfigProperty(java.lang.String key, java.lang.String value)
key
- the property key.value
- the property value.public java.lang.String getLogLevel()
public void setLogLevel(java.lang.String level)
Log
class.
level
- the new log level.public boolean isDisableLogging()
true
if logging is disabled, and false
otherwise.
public void setDisableLogging(boolean disableLogging)
To switch off logging globally, you can use the following code:
Configuration.getGlobalConfig().setDisableLogging(true);
disableLogging
- the flag.public java.util.Properties getConfiguration()
public static Configuration getGlobalConfig() throws ConfigException
ConfigException
public java.lang.String getLogTarget()
public void setLogTarget(java.lang.String logTarget)
logTarget
- the new log target.public java.util.Enumeration getConfigProperties()
public java.util.Iterator findPropertyKeys(java.lang.String prefix)
prefix
- the prefix that all selected property keys should share
public boolean isLocallyDefined(java.lang.String key)
key
- the key that should be checked.
public static javax.swing.Icon getClassIcon(java.lang.String name)
public static java.io.InputStream openFile(java.lang.Class cls, java.awt.Component comp, java.lang.String filename)
cls
- is Class used to get Resource in first instancecomp
- determines the Frame in which the dialog is displayed (optional)filename
- name of the desired resource or file name.
java.io.IOException
public static java.io.InputStream openFile(java.lang.Class class1, java.lang.String filename)
public static boolean setCurrentDirectory(java.lang.String directory_name)
public static boolean setCurrentDirectory()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |