All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.access.Capability

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

public abstract class Capability
extends Object
SEMPER Access Control.

Abstract class representing capability classes.

Other managers must declare capabilities and verify that an application owns a valid capability before performing critical operations

Version:
$Revision: 1.6 $ $Date: 1997/12/19 14:32:58 $
Author:
Mogens Rom Andersen ([email protected])
See Also:
EnabledCapability, TimeOutCapability, PassWordCapability

Variable Index

 o allCapabilities
the set of all capability objects.
 o description
Description of the capability.
 o name
Name of the capability.

Constructor Index

 o Capability()

Method Index

 o addToCurrentRole()
Add the capability to top role on the stack.
 o addToRole(Role)
Add the capability to a role.
 o finish()
Finish with a capability.
 o getAllCapabilities()
Get all existing capability objects.
 o getCapability(String)
Find a capability object with a specific name.
 o getDescription()
Get description of capability.
 o getInfo()
Obtain a short string describing the capability and its parameters.
 o getName()
Get name of capability.
 o removeFromRole(Role)
Remove the capability from a role.
 o verify()
Verify the capability type.

Variables

 o allCapabilities
 protected static Hashtable allCapabilities
the set of all capability objects. A hashtable indexed by the names of the capabilities. Elements are of type Capability.

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

 o name
 protected String name
Name of the capability. Used in dialogs with the user, e.g. when asked to unlock the role.

Constructors

 o Capability
 public Capability()

Methods

 o getDescription
 public String getDescription()
Get description of capability.

 o getName
 public String getName()
Get name of capability.

 o addToCurrentRole
 public void addToCurrentRole()
Add the capability to top role on the stack.

 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 getAllCapabilities
 protected static Enumeration getAllCapabilities()
Get all existing capability objects.

Returns:
an enumeration of all existing capabilities
 o getCapability
 protected static Capability getCapability(String name)
Find a capability object with a specific name.

Parameters:
name - name of the capability to return.
Returns:
the capability with that name, or null if a capability with this name does not exist.
 o finish
 protected final void finish()
Finish with a capability. Clears all internal references to a capability so that it can be garbage collected.

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

Returns:
A short string describing the capability.
 o verify
 public abstract boolean verify()
Verify the capability type.

This is second step in the capability existence/validation procedure. As each capability subtype will implement a different validation schema, the method is abstract

Returns:
True or False depending on validation result.

All Packages  Class Hierarchy  This Package  Previous  Next  Index