Retrieves the value associated with a given key from the configuration file.
Retrieves the value associated with a given key from the configuration file.
The optional 'suffix' argument is used for differentiating different key/value pairs, used for different purposes but with similar keys. For example, we (Genome Bridge) will create configuration files with one key 'accessKey' which contains the AWS access key for accessing almost all our AWS resources -- however, we use a different access (and secret) key for accessing S3, and that's put into the same configuration file with a key name 'accessKey_s3'. (Similarly for 'secretKey' and 'secretKey_s3').
The base key used to retrieve a value
If suffix is None, then the base key is used to retrieve the corresponding value. If suffix is specified, then '[base key]_[suffix]' is used instead. If '[base key]_[suffix]' doesn't exist in the file, then the properties falls back to retrieving the value just associated with the base key itself.
The (string) value associated with the given key, or null if no such key exists.
CredentialsProperties is a wrapper class which extracts Amazon S3 keys (although it could be modified to extract other key / secret-key pairs) from a key-value-formatted file (see below), if available, or from the System environment otherwise.
(This is to make testing and running on a local environment easier.)
The 'location' parameter names a file which should have the format of key=value one per line. Whitespace around both 'key' and 'value' are stripped.