Package org.labkey.remoteapi.test
Class ClientConfig
java.lang.Object
org.labkey.remoteapi.test.ClientConfig
Utility class to parse a .properties file and produce reasonable exceptions if required properties aren't present.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionClientConfig
(String[] args) Defaults to looking in the working directory for a config.properties file. -
Method Summary
Modifier and TypeMethodDescriptionCreates a connection object based on the baseServerURL, username, and password config properties.getProperty
(String name) Gets a property of the given name.getProperty
(String name, String defaultValue)
-
Field Details
-
CONFIG_ARG_PREFIX
- See Also:
-
-
Constructor Details
-
ClientConfig
Defaults to looking in the working directory for a config.properties file. Can be pointed to another file if one of the arguments is -config=<PATH TO CONFIG FILE>Looks for a "debug" property - if set to true, enables verbose debug logging for the HTTP connection
- Parameters:
args
- command-line arguments to the program- Throws:
IOException
- if there is an IO problem reading the config.properties file
-
-
Method Details
-
getProperty
-
getProperty
Gets a property of the given name.- Parameters:
name
- the name of the property- Returns:
- the property value, or null if the property is not found
-
createConnection
Creates a connection object based on the baseServerURL, username, and password config properties. All are required.- Returns:
- a connection object
-