Class ClientConfig

java.lang.Object
org.labkey.remoteapi.test.ClientConfig

public class ClientConfig extends Object
Utility class to parse a .properties file and produce reasonable exceptions if required properties aren't present.
  • Field Details

  • Constructor Details

    • ClientConfig

      public ClientConfig(String[] args) throws IOException
      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

      public String getProperty(String name, String defaultValue)
    • getProperty

      public String getProperty(String name)
      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

      public Connection createConnection()
      Creates a connection object based on the baseServerURL, username, and password config properties. All are required.
      Returns:
      a connection object