org.apache.turbine.om.security
Interface Group

All Superinterfaces:
SecurityEntity
All Known Implementing Classes:
TurbineGroup

public interface Group
extends SecurityEntity

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$
Author:
Rafal Krzewski

Field Summary
static java.lang.String GLOBAL_GROUP_NAME
          The name of the global group
 
Method Summary
 java.lang.String getName()
          Returns the name of this object.
 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.
 void setName(java.lang.String name)
          Sets the name of this object.
 

Field Detail

GLOBAL_GROUP_NAME

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

getName

public java.lang.String getName()
Returns the name of this object.
Specified by:
getName in interface SecurityEntity
Returns:
The name of the object.

setName

public void setName(java.lang.String name)
Sets the name of this object.
Specified by:
setName in interface SecurityEntity
Parameters:
name - The name of the object.

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 © 1999-2001 Apache Software Foundation. All Rights Reserved.