public class LocationConfigUtils
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
LocationConfigUtils.OsCredential
Convenience class for holding private/public keys and passwords, inferring from config keys.
|
Constructor and Description |
---|
LocationConfigUtils() |
Modifier and Type | Method and Description |
---|---|
static java.util.Map<ConfigKey<java.lang.String>,java.lang.String> |
finalAndOriginalSpecs(java.lang.String finalSpec,
java.lang.Object... sourcesForOriginalSpec) |
static <T> T |
getConfigCheckingDeprecatedAlternatives(ConfigBag configBag,
ConfigKey<T> preferredKey,
ConfigKey<?>... deprecatedKeys)
Deprecated.
since 0.6.0 use configBag.getWithDeprecation
|
static java.lang.String |
getKeyData(ConfigBag config,
ConfigKey<java.lang.String> dataKey,
ConfigKey<java.lang.String> fileKey)
Deprecated.
since 0.7.0, use #getOsCredential(ConfigBag)
|
static LocationConfigUtils.OsCredential |
getOsCredential(ConfigBag config)
Creates an instance of
LocationConfigUtils.OsCredential by inspecting LocationConfigKeys.PASSWORD ;
LocationConfigKeys.PRIVATE_KEY_DATA and LocationConfigKeys.PRIVATE_KEY_FILE ;
LocationConfigKeys.PRIVATE_KEY_PASSPHRASE if needed, and
LocationConfigKeys.PRIVATE_KEY_DATA and LocationConfigKeys.PRIVATE_KEY_FILE
(defaulting to the private key file + ".pub"). |
static java.lang.String |
getPrivateKeyData(ConfigBag config)
Deprecated.
since 0.7.0, use #getOsCredential(ConfigBag)
|
static java.lang.String |
getPublicKeyData(ConfigBag config)
Deprecated.
since 0.7.0, use #getOsCredential(ConfigBag)
|
static boolean |
isEnabled(ManagementContext mgmt,
java.lang.String prefix) |
public static LocationConfigUtils.OsCredential getOsCredential(ConfigBag config)
LocationConfigUtils.OsCredential
by inspecting LocationConfigKeys.PASSWORD
;
LocationConfigKeys.PRIVATE_KEY_DATA
and LocationConfigKeys.PRIVATE_KEY_FILE
;
LocationConfigKeys.PRIVATE_KEY_PASSPHRASE
if needed, and
LocationConfigKeys.PRIVATE_KEY_DATA
and LocationConfigKeys.PRIVATE_KEY_FILE
(defaulting to the private key file + ".pub").@Deprecated public static java.lang.String getPrivateKeyData(ConfigBag config)
@Deprecated public static java.lang.String getPublicKeyData(ConfigBag config)
@Deprecated public static java.lang.String getKeyData(ConfigBag config, ConfigKey<java.lang.String> dataKey, ConfigKey<java.lang.String> fileKey)
@Deprecated public static <T> T getConfigCheckingDeprecatedAlternatives(ConfigBag configBag, ConfigKey<T> preferredKey, ConfigKey<?>... deprecatedKeys)
public static java.util.Map<ConfigKey<java.lang.String>,java.lang.String> finalAndOriginalSpecs(java.lang.String finalSpec, java.lang.Object... sourcesForOriginalSpec)
public static boolean isEnabled(ManagementContext mgmt, java.lang.String prefix)