public class UserConfiguration extends Object
~/.bees/bees.config
For historical reasons, the code distinguishes "config properties" and "parameters." Both are string->string key/value pairs, and both captures various aspects of how we talk to CloudBees backend, but for reasons beyond me, they use different key names to represent the same thing. For example, "config properties" would have "bees.api.key" for API key, whereas "parameters" would use "key".
"config properties" are tied to the persisted ~/.bees/bees.config whereas
parameters appear to be transient within one invocation.
There's no constants defined for any of those keys.
Most likely this is unintended technical debt over time, but for the time being I'm not touching it. I recommend unifying them to consistently use "config properties" key names.
| Modifier and Type | Field and Description |
|---|---|
static int |
EMAIL_CREDENTIALS |
static int |
KEYS_CREDENTIALS |
| Constructor and Description |
|---|
UserConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
Properties |
create(int credentialType,
Map<String,String> paramaters)
Creates a new configuration file.
|
File |
getConfigFile() |
Properties |
load(int credentialType,
Map<String,String> parameters)
Loads the configuration, by creating it if necessary.
|
public static int EMAIL_CREDENTIALS
public static int KEYS_CREDENTIALS
public Properties load(int credentialType, Map<String,String> parameters)
parameters - used only if we are to create configuration.public File getConfigFile()
public Properties create(int credentialType, Map<String,String> paramaters)
Copyright © 2011-2013. All Rights Reserved.