Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Platform Security Services
11g Release 1 (11.1.1)

E14650-03


oracle.security.jps.service.credstore
Interface CredentialMap

All Superinterfaces:
java.io.Serializable

public interface CredentialMap
extends java.io.Serializable

A CredentialMap manages a secure mapping of keys to credentials. <p/> The design of this class is modelled after the design of java.util.Map. The CredentialMap class differs from java.util.Map in the following manner:

  1. it constrains what types of objects it manages.
  2. its operations are secured by CredentialAccessPermission if the instance of this map is obtained from the store by using the search API. The operations are not secured if the map instance is created using the CredentialFactory.newCredentialMap() since this is the new copy and caller owns it.
See Also:
Map

Method Summary
 void clear()
          Deletes all the entries from the map and store.
 boolean containsKey(java.lang.String key)
          Returns true if this map contains a mapping for the specified key.
 void deleteCredential(java.lang.String key)
          Removes the Credential objects associated with the specified key.
 Credential getCredential(java.lang.String key)
          Returns the Credential object associated with the specified key.
 boolean isEmpty()
          Check if this credential map is empty.
 java.util.Set keySet()
          Returns the Set instance.
 void resetCredential(java.lang.String key, Credential credential)
          Override the Credential object to the specified key.
 void setCredential(java.lang.String key, Credential credential)
          Assigns the Credentialobject to the specified key.
 int size()
          Returns the number of mappings in this map.
 java.lang.String toString()
          Returns the map name as string representation of this map.

 

Method Detail

keySet

java.util.Set keySet()
                     throws CredStoreException
Returns the Set instance. You need read CredentialAccessPermission permission to execute this API.
Returns:
Set of all the keys for this Credential Map
Throws:
CredStoreException - - If you do not have permission for this operation or there is an error.
Since:
CSF 11

isEmpty

boolean isEmpty()
                throws CredStoreException
Check if this credential map is empty. You need read permission to execute this API.
Returns:
true if this Credential Map is empty, false otherwise
Throws:
CredStoreException - - If you do not have permission for this operation or there is an error.

containsKey

boolean containsKey(java.lang.String key)
                    throws CredStoreException
Returns true if this map contains a mapping for the specified key. You need read CredentialAccessPermission permission to execute this API.
Parameters:
key - The credential key. Must be non-null and length must be greater than zero.
Returns:
true if this Credential Map contains the specified key, false otherwise.
Throws:
CredStoreException - - If you do not have permission for this operation or there is an error.
Since:
CSF 11

size

int size()
         throws CredStoreException
Returns the number of mappings in this map. You need read CredentialAccessPermission permission to execute this API.
Returns:
The size of this Credential Map
Throws:
CredStoreException - - If you do not have permission for this operation or there is an error.
Since:
CSF 11

getCredential

Credential getCredential(java.lang.String key)
                         throws CredentialExpiredException,
                                CredStoreException
Returns the Credential object associated with the specified key. It returns null if there is no such credential. You need read CredentialAccessPermission permission to execute this API.
Parameters:
key - The credential key. Must be non-null and length must be greater than zero.
Returns:
The credential for the specified key, null otherwise.
Throws:
CredentialExpiredException - If this credential is already expired
CredStoreException - - If you do not have permission for this operation or there is an error.
Since:
CSF 11

setCredential

void setCredential(java.lang.String key,
                   Credential credential)
                   throws CredentialAlreadyExistsException,
                          CredentialInvalidException,
                          CredStoreException
Assigns the Credentialobject to the specified key. If this credential already exists then CredentialAlreadyExistsException exception will be thrown. You need write CredentialAccessPermission permission to execute this API.
Parameters:
key - The credential key. Must be non-null and length must be greater than zero.
credential - The credential must be non-null
Throws:
CredStoreException - - If you do not have permission for this operation or there is an error.
CredentialAlreadyExistsException - - If this credential alrady exists
CredentialInvalidException - - If the credential value is not valid and not be stored.
Since:
CSF 11

resetCredential

void resetCredential(java.lang.String key,
                     Credential credential)
                     throws CredStoreException,
                            CredentialInvalidException
Override the Credential object to the specified key. If this credential already exists then it will be over-written. You need update CredentialAccessPermission permission to execute this API.
Parameters:
key - The credential key. Must be non-null and length must be greater than zero.
credential - The credential must be non-null
Throws:
CredStoreException - - If you do not have permission for this operation or there is an error.
CredentialInvalidException - If the credential value is not valid and not be stored.
Since:
CSF 11

deleteCredential

void deleteCredential(java.lang.String key)
                      throws CredentialNotFoundException,
                             CredStoreException
Removes the Credential objects associated with the specified key. You need delete CredentialAccessPermission permission to execute this API.
Parameters:
key - The credential key. Must be non-null and length must be greater than zero.
Throws:
CredStoreException - - If you do not have permission for this operation or there is an error.
CredentialNotFoundException - - If this credential does not exist.
Since:
CSF 11

clear

void clear()
           throws CredStoreException
Deletes all the entries from the map and store. You need delete CredentialAccessPermission permission to execute this API.
Throws:
CredStoreException - - If you do not have permission for this operation or there is an error.
Since:
CSF 11

toString

java.lang.String toString()
Returns the map name as string representation of this map. You need read CredentialAccessPermission permission to execute this API.
Overrides:
toString in class java.lang.Object
Returns:
The map name as string representation of this map
Since:
CSF 11

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Platform Security Services
11g Release 1 (11.1.1)

E14650-03


Copyright © 2010, Oracle. All rights reserved.