Package java.security

Class IdentityScope

java.lang.Object
java.security.Identity
java.security.IdentityScope
All Implemented Interfaces:
Serializable, Principal
Direct Known Subclasses:
SystemScope

@Deprecated
public abstract class IdentityScope
extends Identity
Deprecated.
Use Principal, KeyStore and the java.security.cert package instead.
IdentityScope represents a scope for Identity objects.
See Also:
Serialized Form
  • Constructor Details

    • IdentityScope

      protected IdentityScope()
      Deprecated.
      Constructs a new instance of IdentityScope.
    • IdentityScope

      public IdentityScope​(String name)
      Deprecated.
      Constructs a new instance of IdentityScope with the specified name.
      Parameters:
      name - the name of this IdentityScope.
    • IdentityScope

      public IdentityScope​(String name, IdentityScope scope) throws KeyManagementException
      Deprecated.
      Constructs a new instance of IdentityScope with the specified name and the specified scope.
      Parameters:
      name - the name of this IdentityScope.
      scope - the scope of this IdentityScope.
      Throws:
      KeyManagementException - if an identity with the same key already exists.
  • Method Details

    • 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 system's scope.
      Parameters:
      scope - the scope to set.
    • size

      public abstract int size()
      Deprecated.
      Returns the number of Identity objects in this scope.
      Returns:
      the number of Identity objects in this scope.
    • getIdentity

      public abstract Identity getIdentity​(String name)
      Deprecated.
      Returns the Identity with the specified name or null if no Identity with the specified name is present in this scope.
      Parameters:
      name - the name of the Identity to be returned.
      Returns:
      the Identity with the specified name or null if not present.
    • getIdentity

      public Identity getIdentity​(Principal principal)
      Deprecated.
      Returns the Identity with the name of the specified principal or null if no Identity with the name of the specified principal is present in this scope.
      Parameters:
      principal - the Principal whose name is used to lookup the Identity to be returned.
      Returns:
      the Identity with the specified name or null if not present.
    • getIdentity

      public abstract Identity getIdentity​(PublicKey key)
      Deprecated.
      Returns the Identity which is associated with the specified key or null if no Identity associated with the specified key is present in this scope.
      Parameters:
      key - the PublicKey of the Identity to be returned.
      Returns:
      the Identity associated with the specified key or null if not present.
    • addIdentity

      public abstract void addIdentity​(Identity identity) throws KeyManagementException
      Deprecated.
      Adds an Identity to this IdentityScope.
      Parameters:
      identity - the Identity to be added.
      Throws:
      KeyManagementException - if the specified Identity is invalid or an identity with the same key already exists.
    • removeIdentity

      public abstract void removeIdentity​(Identity identity) throws KeyManagementException
      Deprecated.
      Removes an Identity from this IdentityScope.
      Parameters:
      identity - the Identity to be removed.
      Throws:
      KeyManagementException - if the Identity is not present in this scope.
    • identities

      public abstract Enumeration<Identity> identities()
      Deprecated.
      Returns an Enumeration over the Identity objects in this IdentityScope.
      Returns:
      an Enumeration over the Identity objects in this IdentityScope.
    • toString

      public String toString()
      Deprecated.
      Returns a string containing a concise, human-readable description of this IdentityScope.
      Specified by:
      toString in interface Principal
      Overrides:
      toString in class Identity
      Returns:
      a printable representation for this IdentityScope.