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 ([email protected])
- See Also:
- SimpleCapability, PassWordCapability
-
description
- Description of the capability.
-
Capability(String)
- Create a new capability with the given description.
-
addToRole(Role)
- Add the capability to a role.
-
findUnlockedRole()
- Check whether the capability belongs to any unlocked role.
-
isValid()
- Check whether the capability is (still) valid.
-
removeFromRole(Role)
- Remove the capability from a role.
description
public String description
- Description of the capability. Used in dialogs with the user, e.g. when
listed as a member of a role.
Capability
public Capability(String desc)
- Create a new capability with the given description.
- Parameters:
- desc - the description of the capability.
addToRole
public void addToRole(Role r)
- Add the capability to a role.
- Parameters:
- r - role to add the capability to.
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.
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
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