org.apache.turbine.om.security
Interface Group

All Superinterfaces:
SecurityEntity, java.io.Serializable
All Known Implementing Classes:
TorqueGroup

public interface Group
extends SecurityEntity, java.io.Serializable

This class represents a Group of Users in the system that are associated with specific entity or resource. The users belonging to the Group may have various Roles. The Permissions to perform actions upon the resource depend on the Roles in the Group that they are assigned.

Version:
$Id: Group.java 534527 2007-05-02 16:10:59Z tv $
Author:
Rafal Krzewski, Henning P. Schmiedehausen

Field Summary
static java.lang.String GLOBAL_GROUP_NAME
          The name of the global group
 
Method Summary
 void grant(User user, Role role)
          Grants a Role in this Group to an User.
 void grant(User user, RoleSet roleSet)
          Grants Roles in this Group to an User.
 void remove()
          Removes a group from the system.
 void rename(java.lang.String name)
          Renames the role.
 void revoke(User user, Role role)
          Revokes a Role in this Group from an User.
 void revoke(User user, RoleSet roleSet)
          Revokes Roles in this group from an User.
 void save()
          Makes changes made to the Group attributes permanent.
 
Methods inherited from interface org.apache.turbine.om.security.SecurityEntity
getId, getIdAsObj, getName, setId, setName
 

Field Detail

GLOBAL_GROUP_NAME

public static final java.lang.String GLOBAL_GROUP_NAME
The name of the global group

See Also:
Constant Field Values
Method Detail

save

public void save()
          throws TurbineSecurityException
Makes changes made to the Group attributes permanent.

Throws:
TurbineSecurityException - if there is a problem while saving data.

remove

public void remove()
            throws TurbineSecurityException
Removes a group from the system.

Throws:
TurbineSecurityException - if the Group could not be removed.

rename

public void rename(java.lang.String name)
            throws TurbineSecurityException
Renames the role.

Parameters:
name - The new Group name.
Throws:
TurbineSecurityException - if the Group could not be renamed.

grant

public void grant(User user,
                  Role role)
           throws TurbineSecurityException
Grants a Role in this Group to an User.

Parameters:
user - An User.
role - A Role.
Throws:
TurbineSecurityException - if there is a problem while assigning the Role.

grant

public void grant(User user,
                  RoleSet roleSet)
           throws TurbineSecurityException
Grants Roles in this Group to an User.

Parameters:
user - An User.
roleSet - A RoleSet.
Throws:
TurbineSecurityException - if there is a problem while assigning the Roles.

revoke

public void revoke(User user,
                   Role role)
            throws TurbineSecurityException
Revokes a Role in this Group from an User.

Parameters:
user - An User.
role - A Role.
Throws:
TurbineSecurityException - if there is a problem while unassigning the Role.

revoke

public void revoke(User user,
                   RoleSet roleSet)
            throws TurbineSecurityException
Revokes Roles in this group from an User.

Parameters:
user - An User.
roleSet - a RoleSet.
Throws:
TurbineSecurityException - if there is a problem while unassigning the Roles.


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.