Oracle Fusion Middleware Java API Reference for Oracle ADF Share
11g Release 1 (11.1.1.6.0)

E10686-07

oracle.adf.share.security.credentialstore.spi
Class GenericCredentialStore

java.lang.Object
  extended by oracle.adf.share.security.credentialstore.spi.GenericCredentialStore
All Implemented Interfaces:
CredentialStorage, CredentialStorage2
Direct Known Subclasses:
CSFCredentialStore

public abstract class GenericCredentialStore
extends java.lang.Object
implements CredentialStorage2

Internal: Applications should not use this class. This class provides a skeletal implementation of the CredentialStorage interface, to minimize the effort required to implement this interface.


Field Summary
protected  java.lang.String _applicationUser
           
protected  java.lang.String _contextName
           
protected static java.lang.String MAP_CREDENTIAL_SEPARATOR
           
 
Constructor Summary
GenericCredentialStore()
           
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_applicationUser

protected java.lang.String _applicationUser

_contextName

protected java.lang.String _contextName

MAP_CREDENTIAL_SEPARATOR

protected static final java.lang.String MAP_CREDENTIAL_SEPARATOR
See Also:
Constant Field Values
Constructor Detail

GenericCredentialStore

public GenericCredentialStore()
Method Detail

initialize

public abstract void initialize(java.util.Hashtable props)
Internal: Applications should not use this method. Initializes the credentialstore from the properties.

Specified by:
initialize in interface CredentialStorage
Parameters:
props - the properties to initialize with

storeCredential

public abstract void storeCredential(Credential cred,
                                     java.lang.String credKey)
Internal: Applications should not use this method. Store the credential using the specify credential key.

Specified by:
storeCredential in interface CredentialStorage
Parameters:
cred - the crdential to be stored
credKey - the credential key

storeCredential

public 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.

Specified by:
storeCredential in interface CredentialStorage2
Parameters:
cred - the crdential to be stored
mapName - the map name
adfCredKey - ADF cred key
credKey - the credential key

fetchCredential

public abstract Credential fetchCredential(java.lang.String credKey)
                                    throws CredentialNotFoundException
Internal: Applications should not use this method. Retrieves the credential for the specified credential key.

Specified by:
fetchCredential in interface CredentialStorage
Parameters:
credKey - the credential key
Returns:
the credential, or null if not found
Throws:
CredentialNotFoundException - if the credential for the given key cannot be found

fetchCredential

public Credential fetchCredential(java.lang.String mapName,
                                  java.lang.String adfCredKey,
                                  java.lang.String credKey)
                           throws CredentialNotFoundException
Internal: Applications should not use this method. Retrieves the credential for the specified credential key.

Specified by:
fetchCredential in interface CredentialStorage2
Parameters:
mapName - the map name
adfCredKey - ADF cred key
credKey - the credential key
Returns:
the credential, or null if not found
Throws:
CredentialNotFoundException - if the credential for the given key cannot be found

fetchSerializableCredential

public abstract java.io.Serializable fetchSerializableCredential(java.lang.String credKey)
                                                          throws CredentialNotFoundException
Internal: Applications should not use this method. Returns the serializable credential for the specified credential key.

Specified by:
fetchSerializableCredential in interface CredentialStorage
Parameters:
credKey - the credential key
Returns:
a valid credential, or null if not found
Throws:
CredentialNotFoundException - if the credential for the given key cannot be found

fetchSerializableCredential

public java.io.Serializable fetchSerializableCredential(java.lang.String mapName,
                                                        java.lang.String adfCredKey,
                                                        java.lang.String credKey)
                                                 throws CredentialNotFoundException
Internal: Applications should not use this method. Returns the serializable credential for the specified credential key.

Specified by:
fetchSerializableCredential in interface CredentialStorage2
Parameters:
mapName - the map name
adfCredKey - ADF cred key
credKey - the credential key
Returns:
a valid credential, or null if not found
Throws:
CredentialNotFoundException - if the credential for the given key cannot be found

fetchSerializableCredentialForCurrentUser

public java.io.Serializable fetchSerializableCredentialForCurrentUser(java.lang.String credKey)
                                                               throws CredentialNotFoundException
Internal: Applications should not use this method. Returns the serializable credential for the specified credential key for current user.

Specified by:
fetchSerializableCredentialForCurrentUser in interface CredentialStorage
Parameters:
credKey - the credential key
Returns:
a valid credential, or null if not found
Throws:
CredentialNotFoundException - if the credential for the given key cannot be found

fetchSerializableCredentialForCurrentUser

public java.io.Serializable fetchSerializableCredentialForCurrentUser(java.lang.String mapName,
                                                                      java.lang.String adfCredKey,
                                                                      java.lang.String credKey)
                                                               throws CredentialNotFoundException
Internal: Applications should not use this method. Returns the serializable credential for the specified credential key for current user.

Specified by:
fetchSerializableCredentialForCurrentUser in interface CredentialStorage2
Parameters:
mapName - the map name
adfCredKey - ADF cred key
credKey - the credential key
Returns:
a valid credential, or null if not found
Throws:
CredentialNotFoundException - if the credential for the given key cannot be found

removeCredential

public abstract void removeCredential(java.lang.String credKey)
                               throws CredentialNotFoundException
Internal: Applications should not use this method. Removes the credential specified credential idebtifier.

Specified by:
removeCredential in interface CredentialStorage
Parameters:
credKey - the credential key
Throws:
CredentialNotFoundException - if the credential for the given key cannot be found

removeCredential

public void removeCredential(java.lang.String mapName,
                             java.lang.String adfCredKey,
                             java.lang.String credKey)
                      throws CredentialNotFoundException
Internal: Applications should not use this method. Removes the credential specified credential idebtifier.

Specified by:
removeCredential in interface CredentialStorage2
Parameters:
mapName - the map name
adfCredKey - ADF cred key
credKey - the credential key
Throws:
CredentialNotFoundException - if the credential for the given key cannot be found

getApplicationUserName

public java.lang.String getApplicationUserName()
Internal: Applications should not use this method.


getSecurityContext

protected SecurityContext getSecurityContext()

getUserPrincipal

protected java.security.Principal getUserPrincipal()
This api returns the current user principal available in the security context. If the current user principal is not available, then default user principal is returned

Returns:
Current User Principal or Default User Principal configured for the credential store
See Also:
getDefaultUser()

getDefaultUser

protected java.security.Principal getDefaultUser()
This api returns the default user principal configured for the credential store. If the user configured does not exist, then anonymous user principal is returned.

Returns:
The default user principal configured for credential store

getCredStoreAbsoluteLocation

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

Returns:
The absolute credential store location determined from given relative path assumed to be relative from adf-config.xml. Incase a non-relative path is passed, then the location's path after removing relative items in the path is returned.

Oracle Fusion Middleware Java API Reference for Oracle ADF Share
11g Release 1 (11.1.1.6.0)

E10686-07

Copyright © 1997, 2011, Oracle. All rights reserved.