|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.novell.java.security.Identity | +--com.novell.java.security.IdentityScope
Represents a scope for identities. It is an identity itself, and therefore has a name, can have a scope, and can optionally have a public key and associated certificates.
An IdentityScope can contain identity objects of all kinds, including signers. All types of identity objects can be retrieved, added, and removed using the same methods. Note that it is possible, and in fact expected, that different types of identity scopes will apply different policies for their various operations on the various types of identities.
There is a one-to-one mapping between keys and identities, and there can be only one copy of one key per scope. For example, suppose Acme Software, Inc is a software publisher known to a user. Suppose it is an Identity, that is, it has a public key and a set of associated certificates. It is named in the scope using the name Acme Software. No other named identity in the scope has the same public key or the same name.
Identity
,
Principal
,
Key
Constructor Summary | |
IdentityScope(java.lang.String name)
Constructs a new identity scope with the specified name. |
|
IdentityScope(java.lang.String name,
IdentityScope scope)
Constructs a new IdentityScope with the specified name and scope. |
Method Summary | |
abstract void |
addIdentity(Identity identity)
Adds an identity to this IdentityScope. |
Identity |
getIdentity(Principal principal)
Retrieves the identity whose name is the same as that of the specified Principal, or NULL if there are no identities of the same name in this scope. |
abstract Identity |
getIdentity(PublicKey key)
Retrieves the identity with the specified PublicKey. |
abstract Identity |
getIdentity(java.lang.String name)
Returns the identity of the specified name in this scope, or NULL if there are no identities named. |
static IdentityScope |
getSystemScope()
Returns the system's IdentityScope. |
abstract java.util.Enumeration |
identities()
Returns an enumeration of all identities in this IdentityScope. |
abstract void |
removeIdentity(Identity identity)
Removes an identity from this IdentityScope. |
abstract int |
size()
Returns the number of identities within this IdentityScope. |
java.lang.String |
toString()
Generates a short String representation of this IdentityScope, including its name, its scope name, and the number of identities included. |
Methods inherited from class com.novell.java.security.Identity |
addCertificate,
equals,
getCertificates,
getInfo,
getName,
getPublicKey,
getScope,
hashCode,
removeCertificate,
setInfo,
setPublicKey,
toString |
Methods inherited from class java.lang.Object |
getClass,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public IdentityScope(java.lang.String name)
The
- name of the scope.public IdentityScope(java.lang.String name, IdentityScope scope) throws KeyManagementException
name
- The name of the IdentityScope.scope
- The scope for the new IdentityScope.Method Detail |
public static IdentityScope getSystemScope()
public abstract int size()
public abstract Identity getIdentity(java.lang.String name)
name
- The name of the identity to be retrieved.public Identity getIdentity(Principal principal)
principal
- The Principal corresponding to the identity
to be retrieved.public abstract Identity getIdentity(PublicKey key)
key
- The PublicKey for the identity to be returned.public abstract void addIdentity(Identity identity) throws KeyManagementException
The
- Identity to be added to this IdentityScope.public abstract void removeIdentity(Identity identity) throws KeyManagementException
identity
- The Identity to be removed.public abstract java.util.Enumeration identities()
public java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |