Class semper.access.Capability
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.access.Capability

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

public class Capability
extends Object
SEMPER Class of capability objects. Other managers must create and verify capabilities before performing potentially dangerous, compromising or undesirable operations.
Version:
$Revision: 1.3 $ $Date: 1996/08/21 07:40:34 $
Author:
Jaap-Henk Hoepman (jhh@cwi.nl)
See Also:
SimpleCapability, PassWordCapability

Variable Index

 o description
Description of the capability.

Constructor Index

 o Capability(String)
Create a new capability with the given description.

Method Index

 o addToRole(Role)
Add the capability to a role.
 o findUnlockedRole()
Check whether the capability belongs to any unlocked role.
 o isValid()
Check whether the capability is (still) valid.
 o removeFromRole(Role)
Remove the capability from a role.

Variables

 o description
  public String description
Description of the capability. Used in dialogs with the user, e.g. when listed as a member of a role.

Constructors

 o Capability
  public Capability(String desc)
Create a new capability with the given description.
Parameters:
desc - the description of the capability.

Methods

 o addToRole
  public void addToRole(Role r)
Add the capability to a role.
Parameters:
r - role to add the capability to.
 o removeFromRole
  public void removeFromRole(Role r)
Remove the capability from a role. If the capability is not a member, nothing happens.
Parameters:
r - role to remove the capability from.
 o findUnlockedRole
  protected boolean findUnlockedRole()
Check whether the capability belongs to any unlocked role. If the capability does not belong to an unlocked role, the user is first prompted to unlock one of the roles the capability belongs to. If the user does not unlock any of these roles, this method returns false. This is an internal function (used by AccessMan in verifyCapability()).
Returns:
true if the capability belongs to an unlocked role, false otherwise.
See Also:
verifyCapability
 o isValid
  protected abstract boolean isValid()
Check whether the capability is (still) valid. Depending on the type of capability that instantiates this method, this may always return true or involve the (re-)entering of a password (if it expired). This is an internal function (used by AcccessMan in verifyCapability()).
Returns:
true if the capability is valid, false otherwise.
See Also:
verifyCapability

All Packages  Class Hierarchy  This Package  Previous  Next  Index