public abstract class GenericCredentialStore extends java.lang.Object implements CredentialStorage2
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
_applicationUser |
protected java.lang.String |
_contextName |
protected static java.lang.String |
MAP_CREDENTIAL_SEPARATOR |
Constructor and Description |
---|
GenericCredentialStore() |
Modifier and Type | Method and Description |
---|---|
abstract Credential |
fetchCredential(java.lang.String credKey)
Internal: Applications should not use this method.
Retrieves the credential for the specified credential key.
|
Credential |
fetchCredential(java.lang.String mapName,
java.lang.String adfCredKey,
java.lang.String credKey)
Internal: Applications should not use this method.
Retrieves the credential for the specified credential key.
|
abstract java.io.Serializable |
fetchSerializableCredential(java.lang.String credKey)
Internal: Applications should not use this method.
Returns the serializable credential for the specified credential key.
|
java.io.Serializable |
fetchSerializableCredential(java.lang.String mapName,
java.lang.String adfCredKey,
java.lang.String credKey)
Internal: Applications should not use this method.
Returns the serializable credential for the specified credential key.
|
java.io.Serializable |
fetchSerializableCredentialForCurrentUser(java.lang.String credKey)
Internal: Applications should not use this method.
Returns the serializable credential for the specified credential key for current user.
|
java.io.Serializable |
fetchSerializableCredentialForCurrentUser(java.lang.String mapName,
java.lang.String adfCredKey,
java.lang.String credKey)
Internal: Applications should not use this method.
Returns the serializable credential for the specified credential key for current user.
|
java.lang.String |
getApplicationUserName()
Internal: Applications should not use this method.
|
protected static java.lang.String |
getCredStoreAbsoluteLocation(java.lang.String location,
java.lang.String contextName)
This api assumes that location passed is relative from adf-config.xml's
location
If the location passed doesn't start with a ., then then we remove all
relative items in the path and return the path
If the location starts with a ., it is assumed relative and a URL path
is constructed reletive to the adf-config.xml
|
protected java.security.Principal |
getDefaultUser()
This api returns the default user principal configured for the credential
store.
|
protected SecurityContext |
getSecurityContext() |
protected java.security.Principal |
getUserPrincipal()
This api returns the current user principal available in the security context.
|
abstract void |
initialize(java.util.Hashtable props)
Internal: Applications should not use this method.
Initializes the credentialstore from the properties.
|
abstract void |
removeCredential(java.lang.String credKey)
Internal: Applications should not use this method.
Removes the credential specified credential idebtifier.
|
void |
removeCredential(java.lang.String mapName,
java.lang.String adfCredKey,
java.lang.String credKey)
Internal: Applications should not use this method.
Removes the credential specified credential idebtifier.
|
abstract void |
storeCredential(Credential cred,
java.lang.String credKey)
Internal: Applications should not use this method.
Store the credential using the specify credential key.
|
void |
storeCredential(Credential cred,
java.lang.String mapName,
java.lang.String adfCredKey,
java.lang.String credKey)
Internal: Applications should not use this method.
Store the credential using the specify credential key.
|
protected java.lang.String _applicationUser
protected java.lang.String _contextName
protected static final java.lang.String MAP_CREDENTIAL_SEPARATOR
public abstract void initialize(java.util.Hashtable props)
initialize
in interface CredentialStorage
props
- the properties to initialize withpublic abstract void storeCredential(Credential cred, java.lang.String credKey)
storeCredential
in interface CredentialStorage
cred
- the crdential to be storedcredKey
- the credential keypublic void storeCredential(Credential cred, java.lang.String mapName, java.lang.String adfCredKey, java.lang.String credKey)
storeCredential
in interface CredentialStorage2
cred
- the crdential to be storedmapName
- the map nameadfCredKey
- ADF cred keycredKey
- the credential keypublic abstract Credential fetchCredential(java.lang.String credKey) throws CredentialNotFoundException
fetchCredential
in interface CredentialStorage
credKey
- the credential keynull
if not foundCredentialNotFoundException
- if the credential for the given key
cannot be foundpublic Credential fetchCredential(java.lang.String mapName, java.lang.String adfCredKey, java.lang.String credKey) throws CredentialNotFoundException
fetchCredential
in interface CredentialStorage2
mapName
- the map nameadfCredKey
- ADF cred keycredKey
- the credential keynull
if not foundCredentialNotFoundException
- if the credential for the given key
cannot be foundpublic abstract java.io.Serializable fetchSerializableCredential(java.lang.String credKey) throws CredentialNotFoundException
fetchSerializableCredential
in interface CredentialStorage
credKey
- the credential keynull
if not foundCredentialNotFoundException
- if the credential for the given key
cannot be foundpublic java.io.Serializable fetchSerializableCredential(java.lang.String mapName, java.lang.String adfCredKey, java.lang.String credKey) throws CredentialNotFoundException
fetchSerializableCredential
in interface CredentialStorage2
mapName
- the map nameadfCredKey
- ADF cred keycredKey
- the credential keynull
if not foundCredentialNotFoundException
- if the credential for the given key
cannot be foundpublic java.io.Serializable fetchSerializableCredentialForCurrentUser(java.lang.String credKey) throws CredentialNotFoundException
fetchSerializableCredentialForCurrentUser
in interface CredentialStorage
credKey
- the credential keynull
if not foundCredentialNotFoundException
- if the credential for the given key
cannot be foundpublic java.io.Serializable fetchSerializableCredentialForCurrentUser(java.lang.String mapName, java.lang.String adfCredKey, java.lang.String credKey) throws CredentialNotFoundException
fetchSerializableCredentialForCurrentUser
in interface CredentialStorage2
mapName
- the map nameadfCredKey
- ADF cred keycredKey
- the credential keynull
if not foundCredentialNotFoundException
- if the credential for the given key
cannot be foundpublic abstract void removeCredential(java.lang.String credKey) throws CredentialNotFoundException
removeCredential
in interface CredentialStorage
credKey
- the credential keyCredentialNotFoundException
- if the credential for the given key
cannot be foundpublic void removeCredential(java.lang.String mapName, java.lang.String adfCredKey, java.lang.String credKey) throws CredentialNotFoundException
removeCredential
in interface CredentialStorage2
mapName
- the map nameadfCredKey
- ADF cred keycredKey
- the credential keyCredentialNotFoundException
- if the credential for the given key
cannot be foundpublic java.lang.String getApplicationUserName()
protected SecurityContext getSecurityContext()
protected java.security.Principal getUserPrincipal()
getDefaultUser()
protected java.security.Principal getDefaultUser()
protected static java.lang.String getCredStoreAbsoluteLocation(java.lang.String location, java.lang.String contextName)