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 ([email protected])
- See Also:
- Role, OrdinaryRoleInstance, SecureRoleInstance, BootstrapRoleInstance
-
locked
- Records whether the role is locked or not
-
template
- The template of which this role is an instance.
-
RoleInstance(Role, AccessControlHandle)
- Create a new role instance.
-
getCapabilities()
- Get the capability instances that belong to this role instance.
-
getDescription()
- Get description of this role instance.
-
getInfo()
- Obtain a short string describing the role instance and its parameters.
-
getName()
- Get name of this role instance.
-
islocked()
- Check if the role is locked.
-
islockedStr()
- Return a string describing the status of the lock.
-
lock()
- Lock the role.
-
unlock()
- Unlock the role.
-
writeToLog()
- Dump role instance to the log file.
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.
locked
protected boolean locked
- Records whether the role is locked or not
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.
getName
public String getName()
- Get name of this role instance.
- Returns:
- name of this role instance.
getDescription
public String getDescription()
- Get description of this role instance.
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.
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.
writeToLog
public void writeToLog()
- Dump role instance to the log file.
islocked
public boolean islocked()
- Check if the role is locked.
- Returns:
- true if the role is locked, false otherwise.
islockedStr
public final String islockedStr()
- Return a string describing the status of the lock.
- Returns:
- "locked" if locked, "unlocked" if not.
lock
public void lock()
- Lock the role.
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