|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.security.Identity
java.security.IdentityScope
public abstract class IdentityScope
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.
Identity
,
Signer
,
Principal
,
Key
,
Serialized FormConstructor 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 |
---|
protected IdentityScope()
public IdentityScope(String name)
IdentityScope
with the
specified name and no scope.
name
- the name to use.public IdentityScope(String name, IdentityScope scope) throws KeyManagementException
IdentityScope
with the
specified name and IdentityScope
.
name
- the name to use.scope
- the scope to use.
KeyManagementException
- if the identity scope is already present.Method Detail |
---|
public static IdentityScope getSystemScope()
protected static void setSystemScope(IdentityScope scope)
scope
- the new system scope.
SecurityException
- if a SecurityManager
is installed which disallows this
operation.public abstract int size()
IdentityScope
.
IdentityScope
.public abstract Identity getIdentity(String name)
Identity
, by name, within this scope.
name
- name of Identity
to get.
Identity
representing the name or null
if
it cannot be found.public Identity getIdentity(Principal principal)
Identity
, by Principal
, within this
scope.
principal
- the Principal
to use.
Principal
or null
if it cannot be found.public abstract Identity getIdentity(PublicKey key)
Identity
, by public key, within this scope.
key
- the PublicKey
to use.
null
if
it cannot be found.public abstract void addIdentity(Identity identity) throws KeyManagementException
identity
- the Identity
to add.
KeyManagementException
- if it is an invalid identity, an identity with the same key
exists, or if another error occurs.public abstract void removeIdentity(Identity identity) throws KeyManagementException
identity
- the Identity
to remove.
KeyManagementException
- if it is a missing identity, or if another error occurs.public abstract Enumeration<Identity> identities()
Enumeration
of identities in this scope.
Enumeration
of the identities in this scope.public String toString()
toString
in interface Principal
toString
in class Identity
Object.getClass()
,
Object.hashCode()
,
Class.getName()
,
Integer.toHexString(int)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |