This class represents a role played by the User associated with the
current Session. It is separated from the actual Torque peer object
to be able to replace the Peer with an user supplied Peer (and Object)
author: Frank Y. Kim author: John D. McNally author: Brett McLaughlin author: Martin Poeschl author: Henning P. Schmiedehausen version: $Id: TorqueRole.java 534527 2007-05-02 16:10:59Z tv $
TorqueRole(String name) Constructs a new Role with the specified name.
public
TorqueRole(Persistent obj) The package private Constructor is used when the RolePeerManager
has retrieved a list of Database Objects from the peer and
must 'wrap' them into TorqueRole Objects.
The package private Constructor is used when the RolePeerManager
has retrieved a list of Database Objects from the peer and
must 'wrap' them into TorqueRole Objects. You should not use it directly!
Parameters: obj - An Object from the peer
Creates a new Role in the system.
Parameters: name - The name of the new Role. An object representing the new Role. throws: TurbineSecurityException - if the Role could not be created.
Grants a Permission to this Role.
Parameters: permission - A Permission. throws: TurbineSecurityException - if there is a problem while assigningthe Permission.
Grants Permissions from a PermissionSet to this Role.
Parameters: permissionSet - A PermissionSet. throws: TurbineSecurityException - if there is a problem while assigningthe Permissions.
Revokes a Permission from this Role.
Parameters: permission - A Permission. throws: TurbineSecurityException - if there is a problem while unassigningthe Permission.
Revokes Permissions from a PermissionSet from this Role.
Parameters: permissionSet - A PermissionSet. throws: TurbineSecurityException - if there is a problem while unassigningthe Permissions.