All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.access.RoleInstance

java.lang.Object
   |
   +----semper.access.RoleInstance

public abstract class RoleInstance
extends Object
SEMPER Access Control.

Abstract class representing role instance objects. Role instances contain zero or more capability instances. Role instances can be locked and unlocked by the user. If a role is unlocked, all its member capability instances are (potentially) valid. Roles differ in how they are unlocked

Version:
$Revision: 1.2 $ $Date: 1997/08/07 12:46:55 $
Author:
Jaap-Henk Hoepman (jhh@cwi.nl)
See Also:
Role, OrdinaryRoleInstance, SecureRoleInstance, BootstrapRoleInstance

Variable Index

 o locked
Records whether the role is locked or not
 o template
The template of which this role is an instance.

Constructor Index

 o RoleInstance(Role, AccessControlHandle)
Create a new role instance.

Method Index

 o getCapabilities()
Get the capability instances that belong to this role instance.
 o getDescription()
Get description of this role instance.
 o getInfo()
Obtain a short string describing the role instance and its parameters.
 o getName()
Get name of this role instance.
 o islocked()
Check if the role is locked.
 o islockedStr()
Return a string describing the status of the lock.
 o lock()
Lock the role.
 o unlock()
Unlock the role.
 o writeToLog()
Dump role instance to the log file.

Variables

 o template
 public Role template
The template of which this role is an instance. The name and description of this instance are obtainable through this link.

 o locked
 protected boolean locked
Records whether the role is locked or not

Constructors

 o RoleInstance
 public RoleInstance(Role template,
                     AccessControlHandle owner)
Create a new role instance.

Use Role.createInstance to create an instance for a role

Parameters:
template - the template for this instance
owner - AccessControlHandle of the owner of the instance.

Methods

 o getName
 public String getName()
Get name of this role instance.

Returns:
name of this role instance.
 o getDescription
 public String getDescription()
Get description of this role instance.

 o getInfo
 public abstract String getInfo()
Obtain a short string describing the role instance and its parameters.

Useful for logging.

Returns:
A short string describing the role instance.
 o getCapabilities
 public Enumeration getCapabilities()
Get the capability instances that belong to this role instance. TODO: current implementation is very inefficient...

Returns:
an Enumeration of all capability instances.
 o writeToLog
 public void writeToLog()
Dump role instance to the log file.

 o islocked
 public boolean islocked()
Check if the role is locked.

Returns:
true if the role is locked, false otherwise.
 o islockedStr
 public final String islockedStr()
Return a string describing the status of the lock.

Returns:
"locked" if locked, "unlocked" if not.
 o lock
 public void lock()
Lock the role.

 o unlock
 public abstract boolean unlock()
Unlock the role. Depending on the type of role that instantiates this method, a different dialog (possibly requiring passphrases) is setup with the user to let her unlock the role.

Returns:
true if the user succesfully unlocked the role, false otherwise.
See Also:
UnlockedRole, SecureRole, BootstrapRole

All Packages  Class Hierarchy  This Package  Previous  Next  Index