Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.security

Class IdentityScope

java.lang.Object
|
+--java.security.Identity
   |
   +--java.security.IdentityScope


public abstract class IdentityScope

extends Identity

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 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:

Constructor Summary

IdentityScope()

Creates a new instance of IdentityScope from Serialized Data
IdentityScope(java.lang.String name)

Creates a new instance of IdentityScope with the specified name and no scope.
IdentityScope(java.lang.String name, java.security.IdentityScope scope)

Creates a new instance of IdentityScope with the specified name and IdentityScope.

Method Summary

voidaddIdentity(java.security.Identity identity)

Adds an identity to his scope.
java.security.IdentitygetIdentity(java.lang.String name)

Gets the specified Identity within this scope by specified name.
java.security.IdentitygetIdentity(java.security.Principal principal)

Gets the specified Identity within this scope by the specified Principal.
java.security.IdentitygetIdentity(java.security.PublicKey key)

Gets the specified Identity within this scope by the specified public key.
static java.security.IdentityScopegetSystemScope()

Gets the system's Scope.
java.util.Enumerationidentities()

Returns an Enumeration of identities.
voidremoveIdentity(java.security.Identity identity)

Removes an identity to his scope.
static voidsetSystemScope(java.security.IdentityScope scope)

Sets the scope of the system.
intsize()

Gets the number of entries within this IdentityScope.
java.lang.StringtoString()

Returns a string representing this IdentityScope.

Constructor Details

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:


Method Details

addIdentity

public void addIdentity(java.security.Identity identity)

Adds an identity to his scope.

Parameters:

Throws:


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.