Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

oracle.security.jps.service.credstore
Class CredentialMapImpl

java.lang.Object
  extended by oracle.security.jps.service.credstore.CredentialMapImpl
All Implemented Interfaces:
Externalizable, Serializable, CredentialMap

public class CredentialMapImpl
extends java.lang.Object
implements CredentialMap


Field Summary
static java.lang.Class CLASS_INSTANCE
           
 
Constructor Summary
CredentialMapImpl()
           
 
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.
 Set keySet()
          Returns the Set instance.
 void readExternal(ObjectInput in)
           
 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.
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_INSTANCE

public static final java.lang.Class CLASS_INSTANCE
Constructor Detail

CredentialMapImpl

public CredentialMapImpl()
Method Detail

keySet

public Set keySet()
           throws CredStoreException
Returns the Set instance.

Specified by:
keySet in interface CredentialMap
Returns:
Set of all the keys for this Credential Map
Throws:
CredStoreException - If there is an error.

isEmpty

public boolean isEmpty()
                throws CredStoreException
Check if this credential map is empty.

Specified by:
isEmpty in interface CredentialMap
Returns:
true if this Credential Map is empty, false otherwise
Throws:
CredStoreException - If there is an error.

containsKey

public boolean containsKey(java.lang.String key)
                    throws CredStoreException
Returns true if this map contains a mapping for the specified key.

Specified by:
containsKey in interface CredentialMap
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 there is an error.
CredStoreRuntimeException - If invalid key (null or empty) is passed

size

public int size()
         throws CredStoreException
Returns the number of mappings in this map.

Specified by:
size in interface CredentialMap
Returns:
int the size of this Credential Map
Throws:
CredStoreException - If there is an error.

getCredential

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

Specified by:
getCredential in interface CredentialMap
Parameters:
key - The credential key. Must be non-null and length must be greater than zero.
Returns:
Credential The credential for the specified key, null otherwise.
Throws:
CredentialExpiredException - If this credential is already expired
CredStoreException - If there is an error.
CredStoreRuntimeException - If invalid key (null or empty) is passed

setCredential

public void setCredential(java.lang.String key,
                          Credential credential)
                   throws CredStoreException,
                          CredentialAlreadyExistsException,
                          CredentialInvalidException
Assigns the Credentialobject to the specified key. If this credential already exists then CredentialAlreadyExistsException exception will be thrown.

Specified by:
setCredential in interface CredentialMap
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 there is an error or null credentials are passed to be set.
CredentialAlreadyExistsException - If this credential already exists
CredentialInvalidException - If the credential value is not valid and not be stored
CredStoreRuntimeException - If invalid key (null or empty) is passed

resetCredential

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

Specified by:
resetCredential in interface CredentialMap
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 there is an error or null credentials are passed to be set.
CredentialInvalidException - If the credential value is not valid and not be stored
CredStoreRuntimeException - If invalid key (null or empty) is passed

deleteCredential

public void deleteCredential(java.lang.String key)
                      throws CredStoreException,
                             CredentialNotFoundException
Removes the Credential objects associated with the specified key.

Specified by:
deleteCredential in interface CredentialMap
Parameters:
key - - The credential key. Must be non-null and length must be greater than zero.
Throws:
CredStoreException - If there is an error.
CredentialNotFoundException - If this credential does not exist
CredStoreRuntimeException - If invalid key (null or empty) is passed

clear

public void clear()
           throws CredStoreException
Deletes all the entries from the map and store.

Specified by:
clear in interface CredentialMap
Throws:
CredStoreException - If there is an error.

toString

public java.lang.String toString()
Returns the map name as string representation of this map.

Specified by:
toString in interface CredentialMap
Overrides:
toString in class java.lang.Object

writeExternal

public void writeExternal(ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

Copyright © 2011, Oracle and/or its affiliates. All rights reserved.