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
IdentityScoperepresents a scope forIdentityobjects.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedIdentityScope()Deprecated.Constructs a new instance ofIdentityScope.IdentityScope(String name)Deprecated.Constructs a new instance ofIdentityScopewith the specified name.IdentityScope(String name, IdentityScope scope)Deprecated.Constructs a new instance ofIdentityScopewith the specified name and the specified scope.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description abstract voidaddIdentity(Identity identity)Deprecated.Adds anIdentityto thisIdentityScope.abstract IdentitygetIdentity(String name)Deprecated.Returns theIdentitywith the specified name ornullif noIdentitywith the specified name is present in this scope.IdentitygetIdentity(Principal principal)Deprecated.Returns theIdentitywith the name of the specified principal ornullif noIdentitywith the name of the specified principal is present in this scope.abstract IdentitygetIdentity(PublicKey key)Deprecated.Returns theIdentitywhich is associated with the specified key ornullif noIdentityassociated with the specified key is present in this scope.static IdentityScopegetSystemScope()Deprecated.Returns the system's scope.abstract Enumeration<Identity>identities()Deprecated.Returns anEnumerationover theIdentityobjects in thisIdentityScope.abstract voidremoveIdentity(Identity identity)Deprecated.Removes anIdentityfrom thisIdentityScope.protected static voidsetSystemScope(IdentityScope scope)Deprecated.Sets the system's scope.abstract intsize()Deprecated.Returns the number ofIdentityobjects in this scope.StringtoString()Deprecated.Returns a string containing a concise, human-readable description of thisIdentityScope.-
Methods inherited from class java.security.Identity
addCertificate, certificates, equals, getInfo, getName, getPublicKey, getScope, hashCode, identityEquals, removeCertificate, setInfo, setPublicKey, toString
-
-
-
-
Constructor Detail
-
IdentityScope
protected IdentityScope()
Deprecated.Constructs a new instance ofIdentityScope.
-
IdentityScope
public IdentityScope(String name)
Deprecated.Constructs a new instance ofIdentityScopewith the specified name.- Parameters:
name- the name of thisIdentityScope.
-
IdentityScope
public IdentityScope(String name, IdentityScope scope) throws KeyManagementException
Deprecated.Constructs a new instance ofIdentityScopewith the specified name and the specified scope.- Parameters:
name- the name of thisIdentityScope.scope- the scope of thisIdentityScope.- Throws:
KeyManagementException- if an identity with the same key already exists.
-
-
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 system's scope.- Parameters:
scope- the scope to set.
-
size
public abstract int size()
Deprecated.Returns the number ofIdentityobjects in this scope.- Returns:
- the number of
Identityobjects in this scope.
-
getIdentity
public abstract Identity getIdentity(String name)
Deprecated.Returns theIdentitywith the specified name ornullif noIdentitywith the specified name is present in this scope.- Parameters:
name- the name of theIdentityto be returned.- Returns:
- the
Identitywith the specified name ornullif not present.
-
getIdentity
public Identity getIdentity(Principal principal)
Deprecated.Returns theIdentitywith the name of the specified principal ornullif noIdentitywith the name of the specified principal is present in this scope.- Parameters:
principal- thePrincipalwhose name is used to lookup theIdentityto be returned.- Returns:
- the
Identitywith the specified name ornullif not present.
-
getIdentity
public abstract Identity getIdentity(PublicKey key)
Deprecated.Returns theIdentitywhich is associated with the specified key ornullif noIdentityassociated with the specified key is present in this scope.- Parameters:
key- thePublicKeyof theIdentityto be returned.- Returns:
- the
Identityassociated with the specified key ornullif not present.
-
addIdentity
public abstract void addIdentity(Identity identity) throws KeyManagementException
Deprecated.Adds anIdentityto thisIdentityScope.- Parameters:
identity- theIdentityto be added.- Throws:
KeyManagementException- if the specifiedIdentityis invalid or an identity with the same key already exists.
-
removeIdentity
public abstract void removeIdentity(Identity identity) throws KeyManagementException
Deprecated.Removes anIdentityfrom thisIdentityScope.- Parameters:
identity- theIdentityto be removed.- Throws:
KeyManagementException- if theIdentityis not present in this scope.
-
identities
public abstract Enumeration<Identity> identities()
Deprecated.Returns anEnumerationover theIdentityobjects in thisIdentityScope.- Returns:
- an
Enumerationover theIdentityobjects in thisIdentityScope.
-
-