Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.turbine.om.security
Interface Role

All Superinterfaces:
  SecurityEntity, Serializable

All Known Implementing Classes:
  TorqueRole, TurbineRole

    public interface Role

extends SecurityEntity, Serializable

This class represents a role played by the User associated with the current Session.

Version:
  $Id: Role.java 957284 2010-06-23 17:53:31Z tv $
Author:
  Frank Y. Kim, John D. McNally, Brett McLaughlin, Henning P. Schmiedehausen

Method Summary
`Role` | `create(String name)` Creates a new Role in the system.
`PermissionSet` | `getPermissions()` Returns the set of Permissions associated with this Role.
`void` | `grant(Permission permission)` Grants a Permission to this Role.
`void` | `grant(PermissionSet permissionSet)` Grants Permissions from a PermissionSet to this Role.
`void` | `remove()` Removes a role from the system.
`void` | `rename(String name)` Renames the role.
`void` | `revoke(Permission permission)` Revokes a Permission from this Role.
`void` | `revoke(PermissionSet permissionSet)` Revokes Permissions from a PermissionSet from this Role.
`void` | `save()` Makes changes made to the Role attributes permanent.
`void` | `setPermissions(PermissionSet permissionSet)` Sets the Permissions associated with this Role.

Methods inherited from interface org.apache.turbine.om.security.SecurityEntity
`getId, getIdAsObj, getName, setId, setName`

Method Detail

### getPermissions

    PermissionSet getPermissions()
                                 throws Exception

  Returns the set of Permissions associated with this Role.

  Returns:
    A PermissionSet.
  Throws:
    `Exception` - A generic exception.

### setPermissions

    void setPermissions(PermissionSet permissionSet)

  Sets the Permissions associated with this Role.

  Parameters:
    `permissionSet` - A PermissionSet.

### create

    Role create(String name)
                throws TurbineSecurityException

  Creates a new Role in the system.

  Parameters:
    `name` - The name of the new Role.
  Returns:
    An object representing the new Role.
  Throws:
    `TurbineSecurityException` - if the Role could not be created.

### save

    void save()
              throws TurbineSecurityException

  Makes changes made to the Role attributes permanent.

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

### remove

    void remove()
                throws TurbineSecurityException

  Removes a role from the system.

  Throws:
    `TurbineSecurityException` - if the Role could not be removed.

### rename

    void rename(String name)
                throws TurbineSecurityException

  Renames the role.

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

### grant

    void grant(Permission permission)
               throws TurbineSecurityException

  Grants a Permission to this Role.

  Parameters:
    `permission` - A Permission.
  Throws:
    `TurbineSecurityException` - if there is a problem while assigning the Permission.

### grant

    void grant(PermissionSet permissionSet)
               throws TurbineSecurityException

  Grants Permissions from a PermissionSet to this Role.

  Parameters:
    `permissionSet` - A PermissionSet.
  Throws:
    `TurbineSecurityException` - if there is a problem while assigning the Permissions.

### revoke

    void revoke(Permission permission)
                throws TurbineSecurityException

  Revokes a Permission from this Role.

  Parameters:
    `permission` - A Permission.
  Throws:
    `TurbineSecurityException` - if there is a problem while unassigning the Permission.

### revoke

    void revoke(PermissionSet permissionSet)
                throws TurbineSecurityException

  Revokes Permissions from a PermissionSet from this Role.

  Parameters:
    `permissionSet` - A PermissionSet.
  Throws:
    `TurbineSecurityException` - if there is a problem while unassigning the Permissions.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2011 The Apache Software Foundation. All Rights Reserved.