java.security
Class IdentityScope
java.lang.Object
|
+--java.security.Identity
|
+--java.security.IdentityScope
public abstract class
IdentityScopeextends
IdentityIdentityScope represents a scope of an identity. IdentityScope
is also an Identity and can have a name and scope along with
the other qualitites identities posses.
An IdentityScope contains other Identity objects. All Identity
objects are manipulated in the scope the same way. The scope
is suppose to apply different scope to different type of
Identities.
No identity within the same scope can have the same public key.
Since:Author:IdentityScope
protected IdentityScope()
Creates a new instance of IdentityScope from Serialized Data
IdentityScope
public IdentityScope(java.lang.String name)
Creates a new instance of IdentityScope with the specified name
and no scope.
Parameters:
IdentityScope
public IdentityScope(java.lang.String name, java.security.IdentityScope scope)
Creates a new instance of IdentityScope with the specified name
and IdentityScope.
Parameters:
Throws:
addIdentity
public void addIdentity(java.security.Identity identity)
Adds an identity to his scope.
Parameters:
Throws:
KeyManagementException
- if it is an invalid identity,
an identity with the same key exists, or another error
occurs.
getIdentity
public Identity getIdentity(java.lang.String name)
Gets the specified Identity within this scope
by specified name.
Parameters:
getIdentity
public Identity getIdentity(java.security.Principal principal)
Gets the specified Identity within this scope
by the specified Principal.
Parameters:
getIdentity
public Identity getIdentity(java.security.PublicKey key)
Gets the specified Identity within this scope
by the specified public key.
Parameters:
getSystemScope
public static IdentityScope getSystemScope()
Gets the system's Scope.
identities
public Enumeration identities()
Returns an Enumeration of identities.
removeIdentity
public void removeIdentity(java.security.Identity identity)
Removes an identity to his scope.
Parameters:
Throws:
setSystemScope
protected static void setSystemScope(java.security.IdentityScope scope)
Sets the scope of the system.
This class checks the security manager with the call
checkSecurityAccess with "setSystemScope".
Parameters:
Throws:
size
public int size()
Gets the number of entries within this IdentityScope.
toString
public String toString()
Returns a string representing this IdentityScope.
It includes the name, the scope name, and number of identities.