public final class ConfigurationUtil extends Object
Modifier and Type | Field and Description |
---|---|
protected static String |
BASE_PATH
The internal base path to the configuration files.
|
Modifier and Type | Method and Description |
---|---|
static void |
checkConfigFiles(List<ConfigFileDescriptor> configs)
Checks if all required configurations files are existing.
|
static String |
getAbsolutePath(ConfigFileDescriptor configFile)
Returns the absolute path of the given configuration file.
|
static String |
getAbsolutePath(ConfigurationFileHolder holder)
Returns the absolute path of the given configuration file holder.
|
static String |
getPath(ConfigFileDescriptor config)
Returns the path of the given config file.
|
static String |
getPath(ConfigurationFileHolder holder)
Returns the path of the given config file holder.
|
static Properties |
getProperties(ConfigFileDescriptor config)
Returns Properties object by the given config file.
|
static Properties |
getProperties(ConfigurationFileHolder holder)
Returns Properties object by the given config file holder.
|
static Properties |
getProperties(String config)
Returns Properties object by the given path.
|
static void |
setBasePath(String basepath)
Sets the base path of all configurations files handled by this util.
|
protected static String BASE_PATH
public static void setBasePath(String basepath)
basepath
- the base path of all configuration files.public static void checkConfigFiles(List<ConfigFileDescriptor> configs) throws Exception
configs
- The required configurations.Exception
- one of the required files is missing.public static String getPath(ConfigFileDescriptor config)
config
- The config file to get the path of.public static String getPath(ConfigurationFileHolder holder)
holder
- The config file holder to get the path of.public static Properties getProperties(ConfigFileDescriptor config)
config
- The config file to build the Properties of.public static Properties getProperties(ConfigurationFileHolder holder)
holder
- The config file holder to build the Properties of.public static Properties getProperties(String config)
config
- The config path to the config file to build the Properties of.public static String getAbsolutePath(ConfigFileDescriptor configFile)
configFile
- The configuration file in question.public static String getAbsolutePath(ConfigurationFileHolder holder)
holder
- The configuration file in question.Copyright © 2016 SAPERION AG. All rights reserved.