public class DromblerClientConfiguration extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CONFIG_DIRECTORY_NAME
Name of the configuration directory.
|
static String |
CONFIG_PROPERTIES_FILE_NAME
The default name used for the configuration properties file.
|
static String |
CONFIG_PROPERTIES_PROP
The property name used to specify an URL to the configuration property file to be used for the created the framework instance.
|
static String |
SYSTEM_PROPERTIES_FILE_NAME
The default name used for the system properties file.
|
static String |
SYSTEM_PROPERTIES_PROP
The property name used to specify an URL to the system property file.
|
static String |
USER_DIR_PROPERTY
The property name of the user dir property in the config.properties file expected at
<install-dir>/conf . |
Constructor and Description |
---|
DromblerClientConfiguration(CommandLineArgs commandLineArgs)
Creates a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
protected void |
copySystemProperties(Properties configProps)
Copies and sets some additional system properties.
|
protected Path |
determineInstallDirPath(Path mainJarPath)
Determines the installation directory path of this application.
|
ApplicationConfiguration |
getApplicationConfig()
Gets the application configuration packaged with the application.
|
CommandLineArgs |
getCommandLineArgs()
Gets the command line args.
|
Path |
getInstallConfigDirPath()
Gets the path to the configuration directory in the installation directory of this application.
|
Path |
getInstallDirPath()
Gets the installation directory path of this application.
|
Path |
getUserConfigDirPath()
Gets the path to the configuration directory in the user directory of the current user for this application.
|
Properties |
getUserConfigProps()
Gets the user configuration properties.
|
Path |
getUserDirPath()
Gets the user directory path.
|
protected Properties |
loadDefaultConfigProps()
Loads the default configuration properties.
|
protected void |
loadSystemProperties(Path rootDirPath)
Loads and sets the system properties.
|
protected void |
resolveProperties(Properties configProps)
Resolves properties with variables.
|
public static final String SYSTEM_PROPERTIES_PROP
public static final String SYSTEM_PROPERTIES_FILE_NAME
public static final String CONFIG_DIRECTORY_NAME
public static final String CONFIG_PROPERTIES_PROP
public static final String CONFIG_PROPERTIES_FILE_NAME
public static final String USER_DIR_PROPERTY
<install-dir>/conf
.public DromblerClientConfiguration(CommandLineArgs commandLineArgs) throws URISyntaxException, IOException, MissingPropertyException
commandLineArgs
- the command line argsURISyntaxException
IOException
MissingPropertyException
protected Path determineInstallDirPath(Path mainJarPath)
<install-dir>/lib/<jar>
mainJarPath
- the path to the JAR file containing the main starterprotected void loadSystemProperties(Path rootDirPath) throws MalformedURLException, IOException
rootDirPath
- the root dir pathMalformedURLException
IOException
protected Properties loadDefaultConfigProps() throws IOException
IOException
protected void copySystemProperties(Properties configProps)
configProps
- the source properties to copy toprotected void resolveProperties(Properties configProps)
configProps
- the properties to resolvepublic final Path getInstallDirPath()
public final Path getInstallConfigDirPath()
public final Path getUserDirPath()
public final Path getUserConfigDirPath()
public Properties getUserConfigProps()
public CommandLineArgs getCommandLineArgs()
public ApplicationConfiguration getApplicationConfig()
Copyright © 2012–2019 Drombler. All rights reserved.