All Packages Class Hierarchy This Package Previous Next Index
Class sun.server.realm.IdentityMap
java.lang.Object
|
+----java.security.Identity
|
+----java.security.IdentityScope
|
+----sun.server.realm.IdentityMap
- public class IdentityMap
- extends IdentityScope
An implementation of IdentityScope as a set of Identity files, which
store the Identity name, a hashtable of key=value properties, and
the Certificate associated with the Identity.
- See Also:
- Identity, Certificate
-
IdentityMap(String)
- Construct a new IdentityMap.
-
IdentityMap(String, Certificate, Hashtable, String)
- Construct a new IdentityMap.
-
addIdentity(Identity)
- Store this Identity to a corresponding file, labeled by name.
-
getCertificate()
- Get the certificate for this Identity.
-
getHashtable()
- Get the hashtable for this Identity.
-
getIdentity(PublicKey)
- Get an Identity by public key.
-
getIdentity(String)
- Retrieve an Identity by name.
-
getIdentity(String, String)
- Get an Identity by name and directory.
-
identities()
- Return the list of Identities.
-
removeIdentity(Identity)
- Remove an Identity.
-
size()
- Return the number of identities stored.
IdentityMap
protected IdentityMap(String name)
- Construct a new IdentityMap.
- Parameters:
- name - The name of the Identity.
IdentityMap
public IdentityMap(String name,
Certificate cert,
Hashtable hasht,
String fullpath) throws IOException, KeyManagementException
- Construct a new IdentityMap.
- Parameters:
- name - The name of the identity.
- hasht - The hashtable with additional information.
- path - The full path to the identity file storage directory.
- Throws: IOException
- Thrown if the path given is not a directory.
- Throws: KeyManagementException
- Thrown if the Identity can't
be created.
identities
public Enumeration identities()
- Return the list of Identities.
- Returns:
- An Enumeration of Identity name strings.
- Overrides:
- identities in class IdentityScope
size
public int size()
- Return the number of identities stored.
- Returns:
- The number of stored identities.
- Overrides:
- size in class IdentityScope
getCertificate
public Certificate getCertificate()
- Get the certificate for this Identity.
- Returns:
- The certificate for this Identity, or null if none exists.
getHashtable
public Hashtable getHashtable()
- Get the hashtable for this Identity.
- Returns:
- The hashtable for this Identity.
addIdentity
public void addIdentity(Identity id) throws KeyManagementException
- Store this Identity to a corresponding file, labeled by name.
- Throws: KeyManagementException
- Thrown if the Identity already
exists, or if there are storage problems.
- Overrides:
- addIdentity in class IdentityScope
getIdentity
public Identity getIdentity(String name)
- Retrieve an Identity by name.
- Parameters:
- name - The name of the identity you want to get.
- Returns:
- The Identity associated with the name given, or null if no
such Identity is found.
- Overrides:
- getIdentity in class IdentityScope
getIdentity
public static Identity getIdentity(String name,
String fullpath) throws IOException
- Get an Identity by name and directory.
- Parameters:
- name - The name of the Identity.
- fullpath - The full path to the Identity.
- Returns:
- The Identity associated with the name given, or null if no
such Identity is found.
- Throws: IOException
- Thrown if the path given is not a directory.
getIdentity
public Identity getIdentity(PublicKey key)
- Get an Identity by public key.
- Parameters:
- key - The key to find.
- Returns:
- null
- Overrides:
- getIdentity in class IdentityScope
removeIdentity
public void removeIdentity(Identity id)
- Remove an Identity.
- Parameters:
- id - The Identity to be removed
- Overrides:
- removeIdentity in class IdentityScope
All Packages Class Hierarchy This Package Previous Next Index