Modifier and Type | Field and Description |
---|---|
static String |
SYSTEM_PROPERTY_CONFIG_DIR
System property controlling the location of the central configuration directory.
|
static String |
SYSTEM_PROPERTY_LOG_DIR
System property controlling the location of the log directory.
|
Modifier and Type | Method and Description |
---|---|
File |
getFile()
Gets the central configuration directory as absolute
File . |
static ConfigDir |
getInstance()
Gets the singleton instance of
ConfigDir . |
File |
getLogDir()
Gets the log directory (the directory where the log files are written to).
|
String |
getValue()
Gets the central configuration directory as
String . |
public static final String SYSTEM_PROPERTY_CONFIG_DIR
If this system property is not set, it defaults to: /home/tomcat/.cloudstore
Note that this property is always set during runtime. If it is not set by the caller (via a -D
JVM argument)
from the outside, then it is set by the code inside the running application. Therefore, this property
can be referenced in all configuration files where system properties are resolved (e.g. in the logback configuration).
getValue()
,
getFile()
,
Constant Field Valuespublic static final String SYSTEM_PROPERTY_LOG_DIR
If this system property is not set, it defaults to:
/home/tomcat/.cloudstore/log
Note that this property is always set during runtime. If it is not set by the caller (via a -D
JVM argument)
from the outside, then it is set by the code inside the running application. Therefore, this property
can be referenced in all configuration files where system properties are resolved (e.g. in the logback configuration).
getLogDir()
,
Constant Field Valuespublic static ConfigDir getInstance()
ConfigDir
.ConfigDir
. Never null
.public String getValue()
String
.
This is the non-resolved (as is) value of the system property SYSTEM_PROPERTY_CONFIG_DIR
.
Even if this property was not set (from the outside), it is initialised by default to:
/home/tomcat/.cloudstore
String
. Never null
.SYSTEM_PROPERTY_CONFIG_DIR
,
getFile()
public File getFile()
File
.
In contrast to getValue()
, this file's path is resolved; i.e. all system properties
occurring in it (e.g. "/home/tomcat") were replaced by their actual values.
File
. Never null
.SYSTEM_PROPERTY_CONFIG_DIR
,
getValue()
public File getLogDir()
This directory can be configured or referenced (e.g. in a logback configuation file) via
SYSTEM_PROPERTY_LOG_DIR
.
null
.SYSTEM_PROPERTY_LOG_DIR
Copyright © 2013-2014. All Rights Reserved.