public class SystemScope extends IdentityScope
IdentityScope
,
Serialized FormConstructor and Description |
---|
SystemScope() |
SystemScope(String name) |
SystemScope(String name,
IdentityScope scope) |
Modifier and Type | Method and Description |
---|---|
void |
addIdentity(Identity identity)
Adds an
Identity to this IdentityScope . |
Identity |
getIdentity(PublicKey key)
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. |
Identity |
getIdentity(String name)
Returns the
Identity with the specified name or null if
no Identity with the specified name is present in this scope. |
Enumeration |
identities()
Returns an
Enumeration over the Identity objects in this
IdentityScope . |
void |
removeIdentity(Identity identity)
Removes an
Identity from this IdentityScope . |
int |
size()
Returns the number of
Identity objects in this scope. |
getIdentity, getSystemScope, setSystemScope, toString
addCertificate, certificates, equals, getInfo, getName, getPublicKey, getScope, hashCode, identityEquals, removeCertificate, setInfo, setPublicKey, toString
public SystemScope()
IdentityScope.IdentityScope()
public SystemScope(String name)
IdentityScope.IdentityScope(String)
public SystemScope(String name, IdentityScope scope) throws KeyManagementException
public int size()
IdentityScope
Identity
objects in this scope.size
in class IdentityScope
Identity
objects in this scope.IdentityScope.size()
public Identity getIdentity(String name)
IdentityScope
Identity
with the specified name or null
if
no Identity
with the specified name is present in this scope.getIdentity
in class IdentityScope
name
- the name of the Identity
to be returned.Identity
with the specified name or null
if
not present.IdentityScope.getIdentity(java.lang.String)
public Identity getIdentity(PublicKey key)
IdentityScope
Identity
which is associated with the specified key
or null
if no Identity
associated with the specified key
is present in this scope.getIdentity
in class IdentityScope
key
- the PublicKey
of the Identity
to be returned.Identity
associated with the specified key or null
if not present.IdentityScope.getIdentity(java.security.PublicKey)
public void addIdentity(Identity identity) throws KeyManagementException
IdentityScope
Identity
to this IdentityScope
.addIdentity
in class IdentityScope
identity
- the Identity
to be added.KeyManagementException
- if the specified Identity
is invalid or an identity
with the same key already exists.IdentityScope.addIdentity(java.security.Identity)
public void removeIdentity(Identity identity) throws KeyManagementException
IdentityScope
Identity
from this IdentityScope
.removeIdentity
in class IdentityScope
identity
- the Identity
to be removed.KeyManagementException
- if the Identity
is not present in this scope.IdentityScope.removeIdentity(java.security.Identity)
public Enumeration identities()
IdentityScope
Enumeration
over the Identity
objects in this
IdentityScope
.identities
in class IdentityScope
Enumeration
over the Identity
objects in this
IdentityScope
.IdentityScope.identities()