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.
IdentityScope represents a scope for Identity objects.- 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
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 Details
-
IdentityScope
protected IdentityScope()Deprecated.Constructs a new instance ofIdentityScope. -
IdentityScope
Deprecated.Constructs a new instance ofIdentityScopewith the specified name.- Parameters:
name- the name of thisIdentityScope.
-
IdentityScope
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 Details
-
getSystemScope
Deprecated.Returns the system's scope.- Returns:
- the system's scope.
-
setSystemScope
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
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
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
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
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
Deprecated.Removes anIdentityfrom thisIdentityScope.- Parameters:
identity- theIdentityto be removed.- Throws:
KeyManagementException- if theIdentityis not present in this scope.
-
identities
Deprecated.Returns anEnumerationover theIdentityobjects in thisIdentityScope.- Returns:
- an
Enumerationover theIdentityobjects in thisIdentityScope.
-
toString
Deprecated.Returns a string containing a concise, human-readable description of thisIdentityScope.
-
Principal,KeyStoreand thejava.security.certpackage instead.