java.security
Class IdentityScope

java.lang.Object
  extended by java.security.Identity
      extended by java.security.IdentityScope
All Implemented Interfaces:
Serializable, Principal

Deprecated. Use java.security.KeyStore, the java.security.cert package, and java.security.Principal.

public abstract class IdentityScope
extends Identity

IdentityScope represents a scope of an identity. IdentityScope is also an Identity and can have a name and scope along with the other qualitites identities possess.

An IdentityScope contains other Identity objects. All Identity objects are manipulated in the scope the same way. The scope is supposed to apply different scope to different type of Identities.

No identity within the same scope can have the same public key.

See Also:
Identity, Signer, Principal, Key, Serialized Form

Constructor Summary
protected IdentityScope()
          Deprecated. Constructor for serialization purposes.
  IdentityScope(String name)
          Deprecated. Constructs a new instance of IdentityScope with the specified name and no scope.
  IdentityScope(String name, IdentityScope scope)
          Deprecated. Constructs a new instance of IdentityScope with the specified name and IdentityScope.
 
Method Summary
abstract  void addIdentity(Identity identity)
          Deprecated. Adds an identity to his scope.
 Identity getIdentity(Principal principal)
          Deprecated. Returns the specified Identity, by Principal, within this scope.
abstract  Identity getIdentity(PublicKey key)
          Deprecated. Returns the specified Identity, by public key, within this scope.
abstract  Identity getIdentity(String name)
          Deprecated. Returns the specified Identity, by name, within this scope.
static IdentityScope getSystemScope()
          Deprecated. Returns the system's Scope.
abstract  Enumeration<Identity> identities()
          Deprecated. Returns an Enumeration of identities in this scope.
abstract  void removeIdentity(Identity identity)
          Deprecated. Removes an identity in this scope.
protected static void setSystemScope(IdentityScope scope)
          Deprecated. Sets the scope of the system.
abstract  int size()
          Deprecated. Returns the number of entries within this IdentityScope.
 String toString()
          Deprecated. Returns a string representing this instance.
 
Methods inherited from class java.security.Identity
addCertificate, certificates, equals, getInfo, getName, getPublicKey, getScope, hashCode, identityEquals, removeCertificate, setInfo, setPublicKey, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IdentityScope

protected IdentityScope()
Deprecated. 
Constructor for serialization purposes.


IdentityScope

public IdentityScope(String name)
Deprecated. 
Constructs a new instance of IdentityScope with the specified name and no scope.

Parameters:
name - the name to use.

IdentityScope

public IdentityScope(String name,
                     IdentityScope scope)
              throws KeyManagementException
Deprecated. 
Constructs a new instance of IdentityScope with the specified name and IdentityScope.

Parameters:
name - the name to use.
scope - the scope to use.
Throws:
KeyManagementException - if the identity scope is already present.
Method Detail

getSystemScope

public static IdentityScope getSystemScope()
Deprecated. 
Returns the system's Scope.

Returns:
the system's Scope.

setSystemScope

protected static void setSystemScope(IdentityScope scope)
Deprecated. 
Sets the scope of the system.

Parameters:
scope - the new system scope.
Throws:
SecurityException - if a SecurityManager is installed which disallows this operation.

size

public abstract int size()
Deprecated. 
Returns the number of entries within this IdentityScope.

Returns:
the number of entries within this IdentityScope.

getIdentity

public abstract Identity getIdentity(String name)
Deprecated. 
Returns the specified Identity, by name, within this scope.

Parameters:
name - name of Identity to get.
Returns:
an Identity representing the name or null if it cannot be found.

getIdentity

public Identity getIdentity(Principal principal)
Deprecated. 
Returns the specified Identity, by Principal, within this scope.

Parameters:
principal - the Principal to use.
Returns:
an identity representing the Principal or null if it cannot be found.

getIdentity

public abstract Identity getIdentity(PublicKey key)
Deprecated. 
Returns the specified Identity, by public key, within this scope.

Parameters:
key - the PublicKey to use.
Returns:
an identity representing the public key or null if it cannot be found.

addIdentity

public abstract void addIdentity(Identity identity)
                          throws KeyManagementException
Deprecated. 
Adds an identity to his scope.

Parameters:
identity - the Identity to add.
Throws:
KeyManagementException - if it is an invalid identity, an identity with the same key exists, or if another error occurs.

removeIdentity

public abstract void removeIdentity(Identity identity)
                             throws KeyManagementException
Deprecated. 
Removes an identity in this scope.

Parameters:
identity - the Identity to remove.
Throws:
KeyManagementException - if it is a missing identity, or if another error occurs.

identities

public abstract Enumeration<Identity> identities()
Deprecated. 
Returns an Enumeration of identities in this scope.

Returns:
an Enumeration of the identities in this scope.

toString

public String toString()
Deprecated. 
Returns a string representing this instance. It includes the name, the scope name, and number of identities.

Specified by:
toString in interface Principal
Overrides:
toString in class Identity
Returns:
a string representation of this instance.
See Also:
Object.getClass(), Object.hashCode(), Class.getName(), Integer.toHexString(int)