|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.cloudbees.sdk.UserConfiguration
public class UserConfiguration
Injectable component that encapsulates the user configuration
and its persistence to ~/.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.
| Field Summary | |
|---|---|
static int |
EMAIL_CREDENTIALS
|
static int |
KEYS_CREDENTIALS
|
| Constructor Summary | |
|---|---|
UserConfiguration()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static int EMAIL_CREDENTIALS
public static int KEYS_CREDENTIALS
| Constructor Detail |
|---|
public UserConfiguration()
| Method Detail |
|---|
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)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||