public final class CredentialUtils
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CredentialUtils.ServiceCredentials
A util class to easily store service credentials.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PLAN_EXPERIMENTAL
The Constant PLAN_EXPERIMENTAL.
|
static java.lang.String |
PLAN_FREE
The Constant PLAN_FREE.
|
static java.lang.String |
PLAN_STANDARD
The Constant PLAN_STANDARD.
|
| Modifier and Type | Method and Description |
|---|---|
static CredentialUtils.ServiceCredentials |
getCredentialsFromVcap(java.lang.String serviceName)
Calls methods to parse VCAP_SERVICES and retrieve credential values.
|
static boolean |
hasBadStartOrEndChar(java.lang.String credentialValue)
Returns true if the supplied value begins or ends with curly brackets or quotation marks.
|
static void |
setContext(java.util.Hashtable<java.lang.String,java.lang.String> env)
Sets the context variable for JDNI.
|
static void |
setServices(java.lang.String services)
Sets the VCAP_SERVICES variable.
|
public static final java.lang.String PLAN_EXPERIMENTAL
public static final java.lang.String PLAN_FREE
public static final java.lang.String PLAN_STANDARD
public static boolean hasBadStartOrEndChar(java.lang.String credentialValue)
credentialValue - the credential value to checkpublic static CredentialUtils.ServiceCredentials getCredentialsFromVcap(java.lang.String serviceName)
serviceName - the service namepublic static void setServices(java.lang.String services)
services - the VCAP_SERVICESpublic static void setContext(java.util.Hashtable<java.lang.String,java.lang.String> env)
env - Configuration options for the context