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.services.security
Class TurbineSecurity

    java.lang.Object
      org.apache.turbine.services.security.TurbineSecurity

    public abstract class TurbineSecurity

extends Object

This is a Facade class for SecurityService. This class provides static methods that call related methods of the implementation of SecurityService used by the System, according to the settings in TurbineResources.

Certain Roles that the Users may have in the system may are not related to any specific resource nor entity. They are assigned within a special group named 'global' that can be referenced in the code as `Group.GLOBAL_GROUP_NAME`.

Version:
  $Id: TurbineSecurity.java 1096130 2011-04-23 10:37:19Z ludwig $
Author:
  Rafal Krzewski, Henning P. Schmiedehausen

Constructor Summary
`TurbineSecurity()`

Method Summary
`static boolean` | `accountExists(String userName)` Check whether a specified user's account exists.
`static boolean` | `accountExists(User user)` Check whether a specified user's account exists.
`static void` | `addGroup(Group group)` Creates a new group with specified attributes.
`static void` | `addPermission(Permission permission)` Creates a new permission with specified attributes.
`static void` | `addRole(Role role)` Creates a new role with specified attributes.
`static void` | `addUser(User user, String password)` Creates new user account with specified attributes.
`static void` | `changePassword(User user, String oldPassword, String newPassword)` Change the password for an User.
`static boolean` | `checkPassword(String checkpw, String encpw)` Checks if a supplied password matches the encrypted password
`static Group` | `createGroup(String name)` Creates a new Group in the system.
`static Permission` | `createPermission(String name)` Creates a new Permission in the system.
`static Role` | `createRole(String name)` Creates a new Role in the system.
`static String` | `encryptPassword(String password)` This method provides client-side encryption of passwords.
`static String` | `encryptPassword(String password, String salt)` This method provides client-side encryption of passwords.
`static void` | `forcePassword(User user, String password)` Forcibly sets new password for an User.
`static AccessControlList` | `getACL(User user)` Constructs an AccessControlList for a specific user.
`static GroupSet` | `getAllGroups()` Retrieves all groups defined in the system.
`static PermissionSet` | `getAllPermissions()` Retrieves all permissions defined in the system.
`static RoleSet` | `getAllRoles()` Retrieves all roles defined in the system.
`static User` | `getAnonymousUser()` Constructs an User object to represent an anonymous user of the application.
`static User` | `getAuthenticatedUser(String username, String password)` Authenticates an user, and constructs an User object to represent him/her.
`static Group` | `getGlobalGroup()` Provides a reference to the Group object that represents the global group.
`static Group` | `getGroupById(int groupId)` Retrieve a Group object with specified Id.
`static Group` | `getGroupByName(String groupName)` Retrieve a Group object with specified name.
`static Class` | `getGroupClass()` Returns the Class object for the implementation of Group interface used by the system.
`static Group` | `getGroupInstance(String groupName)` Construct a blank Group object.
`static GroupSet` | `getGroups(Object criteria)` Retrieve a set of Groups that meet the specified Criteria.
`static Permission` | `getPermissionById(int permissionId)` Retrieve a Permission object with specified Id.
`static Permission` | `getPermissionByName(String permissionName)` Retrieve a Permission object with specified name.
`static Class` | `getPermissionClass()` Returns the Class object for the implementation of Permission interface used by the system.
`static Permission` | `getPermissionInstance(String permName)` Construct a blank Permission object.
`static PermissionSet` | `getPermissions(Object criteria)` Retrieve a set of Permissions that meet the specified Criteria.
`static PermissionSet` | `getPermissions(Role role)` Retrieves all permissions associated with a role.
`static Role` | `getRoleById(int roleId)` Retrieve a Role object with specified Id.
`static Role` | `getRoleByName(String roleName)` Retrieve a Role object with specified name.
`static Class` | `getRoleClass()` Returns the Class object for the implementation of Role interface used by the system.
`static Role` | `getRoleInstance(String roleName)` Construct a blank Role object.
`static RoleSet` | `getRoles(Object criteria)` Retrieve a set of Roles that meet the specified Criteria.
`static SecurityService` | `getService()` Retrieves an implementation of SecurityService, base on the settings in TurbineResources.
`static User` | `getUser(String username)` Constructs an User object to represent a registered user of the application.
`static Class` | `getUserClass()` Returns the Class object for the implementation of User interface used by the system.
`static User` | `getUserInstance()` Construct a blank User object.
`static UserManager` | `getUserManager()` Returns the configured UserManager.
`static void` | `grant(Role role, Permission permission)` Grants a Role a Permission
`static void` | `grant(User user, Group group, Role role)` Grant an User a Role in a Group.
`static boolean` | `isAnonymousUser(User user)` Checks whether a passed user object matches the anonymous user pattern according to the configured service
`static void` | `removeGroup(Group group)` Removes a Group from the system.
`static void` | `removePermission(Permission permission)` Removes a Permission from the system.
`static void` | `removeRole(Role role)` Removes a Role from the system.
`static void` | `removeUser(User user)` Removes an user account from the system.
`static void` | `renameGroup(Group group, String name)` Renames an existing Group.
`static void` | `renamePermission(Permission permission, String name)` Renames an existing Permission.
`static void` | `renameRole(Role role, String name)` Renames an existing Role.
`static void` | `revoke(Role role, Permission permission)` Revokes a Permission from a Role.
`static void` | `revoke(User user, Group group, Role role)` Revoke a Role in a Group from an User.
`static void` | `revokeAll(Role role)` Revokes all permissions from a Role.
`static void` | `revokeAll(User user)` Revokes all roles from an User.
`static void` | `saveGroup(Group group)` Stores Group's attributes.
`static void` | `saveOnSessionUnbind(User user)` Saves User data when the session is unbound.
`static void` | `savePermission(Permission permission)` Stores Permission's attributes.
`static void` | `saveRole(Role role)` Stores Role's attributes.
`static void` | `saveUser(User user)` Saves User's data in the permanent storage.
`void` | `setUserManager(UserManager userManager)` Configure a new user Manager.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TurbineSecurity

    public TurbineSecurity()

Method Detail

### getService

    public static SecurityService getService()

  Retrieves an implementation of SecurityService, base on the settings in TurbineResources.

  Returns:
    an implementation of SecurityService.

### encryptPassword

    public static String encryptPassword(String password)

  This method provides client-side encryption of passwords. This is an utility method that is used by other classes to maintain a consistent approach to encrypting password. The behavior of the method can be configured in service's properties.

  Parameters:
    `password` - the password to process
  Returns:
    processed password

### encryptPassword

    public static String encryptPassword(String password,
                                         String salt)

  This method provides client-side encryption of passwords. This is an utility method that is used by other classes to maintain a consistent approach to encrypting password. The behavior of the method can be configured in service's properties.

  Parameters:
    `password` - the password to process
    `salt` - the supplied salt to encrypt the password
  Returns:
    processed password

### checkPassword

    public static boolean checkPassword(String checkpw,
                                        String encpw)

  Checks if a supplied password matches the encrypted password

  Parameters:
    `checkpw` - The clear text password supplied by the user
    `encpw` - The current, encrypted password
  Returns:
    true if the password matches, else false

### getUserClass

    public static Class getUserClass()
                              throws UnknownEntityException

  Returns the Class object for the implementation of User interface used by the system.

  Returns:
    the implementation of User interface used by the system.
  Throws:
    `UnknownEntityException` - if the system's implementation of User interface could not be determined.

### getGroupClass

    public static Class getGroupClass()
                               throws UnknownEntityException

  Returns the Class object for the implementation of Group interface used by the system.

  Returns:
    the implementation of Group interface used by the system.
  Throws:
    `UnknownEntityException` - if the system's implementation of Group interface could not be determined.

### getPermissionClass

    public static Class getPermissionClass()
                                    throws UnknownEntityException

  Returns the Class object for the implementation of Permission interface used by the system.

  Returns:
    the implementation of Permission interface used by the system.
  Throws:
    `UnknownEntityException` - if the system's implementation of Permission interface could not be determined.

### getRoleClass

    public static Class getRoleClass()
                              throws UnknownEntityException

  Returns the Class object for the implementation of Role interface used by the system.

  Returns:
    the implementation of Role interface used by the system.
  Throws:
    `UnknownEntityException` - if the system's implementation of Role interface could not be determined.

### getUserInstance

    public static User getUserInstance()
                                throws UnknownEntityException

  Construct a blank User object. This method calls getUserClass, and then creates a new object using the default constructor.

  Returns:
    an object implementing User interface.
  Throws:
    `UnknownEntityException` - if the object could not be instantiated.

### getUserManager

    public static UserManager getUserManager()

  Returns the configured UserManager.

  Returns:
    An UserManager object

### setUserManager

    public void setUserManager(UserManager userManager)

  Configure a new user Manager.

  Parameters:
    `userManager` - An UserManager object

### accountExists

    public static boolean accountExists(User user)
                                 throws DataBackendException

  Check whether a specified user's account exists. The login name is used for looking up the account.

  Parameters:
    `user` - The user to be checked.
  Returns:
    true if the specified account exists
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.

### accountExists

    public static boolean accountExists(String userName)
                                 throws DataBackendException

  Check whether a specified user's account exists. The login name is used for looking up the account.

  Parameters:
    `userName` - The name of the user to be checked.
  Returns:
    true if the specified account exists
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.

### getAuthenticatedUser

    public static User getAuthenticatedUser(String username,
                                            String password)
                                     throws DataBackendException,
                                            UnknownEntityException,
                                            PasswordMismatchException

  Authenticates an user, and constructs an User object to represent him/her.

  Parameters:
    `username` - The user name.
    `password` - The user password.
  Returns:
    An authenticated Turbine User.
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.
    `UnknownEntityException` - if user account is not present.
    `PasswordMismatchException` - if the supplied password was incorrect.

### getUser

    public static User getUser(String username)
                        throws DataBackendException,
                               UnknownEntityException

  Constructs an User object to represent a registered user of the application.

  Parameters:
    `username` - The user name.
  Returns:
    A Turbine User.
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.
    `UnknownEntityException` - if user account is not present.

### getAnonymousUser

    public static User getAnonymousUser()
                                 throws UnknownEntityException

  Constructs an User object to represent an anonymous user of the application.

  Returns:
    An anonymous Turbine User.
  Throws:
    `UnknownEntityException` - if the anonymous User object couldn't be constructed.

### isAnonymousUser

    public static boolean isAnonymousUser(User user)

  Checks whether a passed user object matches the anonymous user pattern according to the configured service

  Parameters:
    `user` - A user object
  Returns:
    True if this is an anonymous user

### saveUser

    public static void saveUser(User user)
                         throws UnknownEntityException,
                                DataBackendException

  Saves User's data in the permanent storage. The user account is required to exist in the storage.

  Parameters:
    `user` - The User object to save.
  Throws:
    `UnknownEntityException` - if the user's account does not exist in the database.
    `DataBackendException` - if there is a problem accessing the storage.

### saveOnSessionUnbind

    public static void saveOnSessionUnbind(User user)
                                    throws UnknownEntityException,
                                           DataBackendException

  Saves User data when the session is unbound. The user account is required to exist in the storage. LastLogin, AccessCounter, persistent pull tools, and any data stored in the permData hashtable that is not mapped to a column will be saved.

  Throws:
    `UnknownEntityException` - if the user's account does not exist in the database.
    `DataBackendException` - if there is a problem accessing the storage.

### changePassword

    public static void changePassword(User user,
                                      String oldPassword,
                                      String newPassword)
                               throws PasswordMismatchException,
                                      UnknownEntityException,
                                      DataBackendException

  Change the password for an User.

  Parameters:
    `user` - an User to change password for.
    `oldPassword` - the current password supplied by the user.
    `newPassword` - the current password requested by the user.
  Throws:
    `PasswordMismatchException` - if the supplied password was incorrect.
    `UnknownEntityException` - if the user's record does not exist in the database.
    `DataBackendException` - if there is a problem accessing the storage.

### forcePassword

    public static void forcePassword(User user,
                                     String password)
                              throws UnknownEntityException,
                                     DataBackendException

  Forcibly sets new password for an User. This is supposed by the administrator to change the forgotten or compromised passwords. Certain implementatations of this feature would require administrative level access to the authenticating server / program.

  Parameters:
    `user` - an User to change password for.
    `password` - the new password.
  Throws:
    `UnknownEntityException` - if the user's record does not exist in the database.
    `DataBackendException` - if there is a problem accessing the storage.

### getACL

    public static AccessControlList getACL(User user)
                                    throws DataBackendException,
                                           UnknownEntityException

  Constructs an AccessControlList for a specific user.

  Parameters:
    `user` - the user for whom the AccessControlList are to be retrieved
  Returns:
    The AccessControList object constructed from the user object.
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.
    `UnknownEntityException` - if user account is not present.

### grant

    public static void grant(User user,
                             Group group,
                             Role role)
                      throws DataBackendException,
                             UnknownEntityException

  Grant an User a Role in a Group.

  Parameters:
    `user` - the user.
    `group` - the group.
    `role` - the role.
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.
    `UnknownEntityException` - if user account, group or role is not present.

### revoke

    public static void revoke(User user,
                              Group group,
                              Role role)
                       throws DataBackendException,
                              UnknownEntityException

  Revoke a Role in a Group from an User.

  Parameters:
    `user` - the user.
    `group` - the group.
    `role` - the role.
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.
    `UnknownEntityException` - if user account, group or role is not present.

### revokeAll

    public static void revokeAll(User user)
                          throws DataBackendException,
                                 UnknownEntityException

  Revokes all roles from an User. This method is used when deleting an account.

  Parameters:
    `user` - the User.
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.
    `UnknownEntityException` - if the account is not present.

### grant

    public static void grant(Role role,
                             Permission permission)
                      throws DataBackendException,
                             UnknownEntityException

  Grants a Role a Permission

  Parameters:
    `role` - the Role.
    `permission` - the Permission.
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.
    `UnknownEntityException` - if role or permission is not present.

### revoke

    public static void revoke(Role role,
                              Permission permission)
                       throws DataBackendException,
                              UnknownEntityException

  Revokes a Permission from a Role.

  Parameters:
    `role` - the Role.
    `permission` - the Permission.
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.
    `UnknownEntityException` - if role or permission is not present.

### revokeAll

    public static void revokeAll(Role role)
                          throws DataBackendException,
                                 UnknownEntityException

  Revokes all permissions from a Role. This method is user when deleting a Role.

  Parameters:
    `role` - the Role
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.
    `UnknownEntityException` - if the Role is not present.

### addUser

    public static void addUser(User user,
                               String password)
                        throws DataBackendException,
                               EntityExistsException

  Creates new user account with specified attributes. TODO throw more specific exception

  Parameters:
    `user` - the object describing account to be created.
    `password` - password for the new user
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.
    `EntityExistsException` - if the user account already exists.

### removeUser

    public static void removeUser(User user)
                           throws DataBackendException,
                                  UnknownEntityException

  Removes an user account from the system. TODO throw more specific exception

  Parameters:
    `user` - the object describing the account to be removed.
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.
    `UnknownEntityException` - if the user account is not present.

### getGlobalGroup

    public static Group getGlobalGroup()

  Provides a reference to the Group object that represents the global group.

  Returns:
    a Group object that represents the global group.

### createGroup

    public static Group createGroup(String name)
                             throws TurbineSecurityException

  Creates a new Group in the system. This is a convenience method.

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

### createPermission

    public static Permission createPermission(String name)
                                       throws TurbineSecurityException

  Creates a new Permission in the system. This is a convenience method.

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

### createRole

    public static Role createRole(String name)
                           throws TurbineSecurityException

  Creates a new Role in the system. This is a convenience method.

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

### getGroupByName

    public static Group getGroupByName(String groupName)
                                throws DataBackendException,
                                       UnknownEntityException

  Retrieve a Group object with specified name.

  Parameters:
    `groupName` - The name of the Group to be retrieved.
  Returns:
    an object representing the Group with specified name.
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.
    `UnknownEntityException` - if the Group is not present.

### getGroupById

    public static Group getGroupById(int groupId)
                              throws DataBackendException,
                                     UnknownEntityException

  Retrieve a Group object with specified Id.

  Parameters:
    `name` - the name of the Group.
  Returns:
    an object representing the Group with specified name.
  Throws:
    `UnknownEntityException` - if the permission does not exist in the database.
    `DataBackendException` - if there is a problem accessing the storage.

### getGroupInstance

    public static Group getGroupInstance(String groupName)
                                  throws UnknownEntityException

  Construct a blank Group object. This method calls getGroupClass, and then creates a new object using the default constructor.

  Parameters:
    `groupName` - The name of the Group
  Returns:
    an object implementing Group interface.
  Throws:
    `UnknownEntityException` - if the object could not be instantiated.

### getRoleInstance

    public static Role getRoleInstance(String roleName)
                                throws UnknownEntityException

  Construct a blank Role object. This method calls getRoleClass, and then creates a new object using the default constructor.

  Parameters:
    `roleName` - The name of the role.
  Returns:
    an object implementing Role interface.
  Throws:
    `UnknownEntityException` - if the object could not be instantiated.

### getPermissionInstance

    public static Permission getPermissionInstance(String permName)
                                            throws UnknownEntityException

  Construct a blank Permission object. This method calls getPermissionClass, and then creates a new object using the default constructor.

  Parameters:
    `permName` - The name of the permission.
  Returns:
    an object implementing Permission interface.
  Throws:
    `UnknownEntityException` - if the object could not be instantiated.

### getRoleByName

    public static Role getRoleByName(String roleName)
                              throws DataBackendException,
                                     UnknownEntityException

  Retrieve a Role object with specified name.

  Parameters:
    `roleName` - The name of the Role to be retrieved.
  Returns:
    an object representing the Role with specified name.
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.
    `UnknownEntityException` - if the Role is not present.

### getRoleById

    public static Role getRoleById(int roleId)
                            throws DataBackendException,
                                   UnknownEntityException

  Retrieve a Role object with specified Id.

  Parameters:
    `name` - the name of the Role.
  Returns:
    an object representing the Role with specified name.
  Throws:
    `UnknownEntityException` - if the permission does not exist in the database.
    `DataBackendException` - if there is a problem accessing the storage.

### getPermissionByName

    public static Permission getPermissionByName(String permissionName)
                                          throws DataBackendException,
                                                 UnknownEntityException

  Retrieve a Permission object with specified name.

  Parameters:
    `permissionName` - The name of the Permission to be retrieved.
  Returns:
    an object representing the Permission with specified name.
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.
    `UnknownEntityException` - if the Permission is not present.

### getPermissionById

    public static Permission getPermissionById(int permissionId)
                                        throws DataBackendException,
                                               UnknownEntityException

  Retrieve a Permission object with specified Id.

  Parameters:
    `name` - the name of the Permission.
  Returns:
    an object representing the Permission with specified name.
  Throws:
    `UnknownEntityException` - if the permission does not exist in the database.
    `DataBackendException` - if there is a problem accessing the storage.

### getGroups

    public static GroupSet getGroups(Object criteria)
                              throws DataBackendException

  Retrieve a set of Groups that meet the specified Criteria.

  Parameters:
    `criteria` - A Criteria of Group selection.
  Returns:
    a set of Groups that meet the specified Criteria.
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.

### getRoles

    public static RoleSet getRoles(Object criteria)
                            throws DataBackendException

  Retrieve a set of Roles that meet the specified Criteria.

  Parameters:
    `criteria` - a Criteria of Roles selection.
  Returns:
    a set of Roles that meet the specified Criteria.
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.

### getPermissions

    public static PermissionSet getPermissions(Object criteria)
                                        throws DataBackendException

  Retrieve a set of Permissions that meet the specified Criteria.

  Parameters:
    `criteria` - a Criteria of Permissions selection.
  Returns:
    a set of Permissions that meet the specified Criteria.
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.

### getAllGroups

    public static GroupSet getAllGroups()
                                 throws DataBackendException

  Retrieves all groups defined in the system.

  Returns:
    the names of all groups defined in the system.
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.

### getAllRoles

    public static RoleSet getAllRoles()
                               throws DataBackendException

  Retrieves all roles defined in the system.

  Returns:
    the names of all roles defined in the system.
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.

### getAllPermissions

    public static PermissionSet getAllPermissions()
                                           throws DataBackendException

  Retrieves all permissions defined in the system.

  Returns:
    the names of all roles defined in the system.
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.

### getPermissions

    public static PermissionSet getPermissions(Role role)
                                        throws DataBackendException,
                                               UnknownEntityException

  Retrieves all permissions associated with a role.

  Parameters:
    `role` - the role name, for which the permissions are to be retrieved.
  Returns:
    the Permissions for the specified role
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.
    `UnknownEntityException` - if the role is not present.

### saveGroup

    public static void saveGroup(Group group)
                          throws DataBackendException,
                                 UnknownEntityException

  Stores Group's attributes. The Groups is required to exist in the system.

  Parameters:
    `group` - The Group to be stored.
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.
    `UnknownEntityException` - if the group does not exist.

### saveRole

    public static void saveRole(Role role)
                         throws DataBackendException,
                                UnknownEntityException

  Stores Role's attributes. The Roles is required to exist in the system.

  Parameters:
    `role` - The Role to be stored.
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.
    `UnknownEntityException` - if the role does not exist.

### savePermission

    public static void savePermission(Permission permission)
                               throws DataBackendException,
                                      UnknownEntityException

  Stores Permission's attributes. The Permissions is required to exist in the system.

  Parameters:
    `permission` - The Permission to be stored.
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.
    `UnknownEntityException` - if the permission does not exist.

### addGroup

    public static void addGroup(Group group)
                         throws DataBackendException,
                                EntityExistsException

  Creates a new group with specified attributes.

  Parameters:
    `group` - the object describing the group to be created.
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.
    `EntityExistsException` - if the group already exists.

### addRole

    public static void addRole(Role role)
                        throws DataBackendException,
                               EntityExistsException

  Creates a new role with specified attributes.

  Parameters:
    `role` - the objects describing the role to be created.
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.
    `EntityExistsException` - if the role already exists.

### addPermission

    public static void addPermission(Permission permission)
                              throws DataBackendException,
                                     EntityExistsException

  Creates a new permission with specified attributes.

  Parameters:
    `permission` - the objects describing the permission to be created.
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.
    `EntityExistsException` - if the permission already exists.

### removeGroup

    public static void removeGroup(Group group)
                            throws DataBackendException,
                                   UnknownEntityException

  Removes a Group from the system.

  Parameters:
    `group` - the object describing group to be removed.
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.
    `UnknownEntityException` - if the group does not exist.

### removeRole

    public static void removeRole(Role role)
                           throws DataBackendException,
                                  UnknownEntityException

  Removes a Role from the system.

  Parameters:
    `role` - The object describing the role to be removed.
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.
    `UnknownEntityException` - if the role does not exist.

### removePermission

    public static void removePermission(Permission permission)
                                 throws DataBackendException,
                                        UnknownEntityException

  Removes a Permission from the system.

  Parameters:
    `permission` - The object describing the permission to be removed.
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.
    `UnknownEntityException` - if the permission does not exist.

### renameGroup

    public static void renameGroup(Group group,
                                   String name)
                            throws DataBackendException,
                                   UnknownEntityException

  Renames an existing Group.

  Parameters:
    `group` - The object describing the group to be renamed.
    `name` - the new name for the group.
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.
    `UnknownEntityException` - if the group does not exist.

### renameRole

    public static void renameRole(Role role,
                                  String name)
                           throws DataBackendException,
                                  UnknownEntityException

  Renames an existing Role.

  Parameters:
    `role` - The object describing the role to be renamed.
    `name` - the new name for the role.
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.
    `UnknownEntityException` - if the role does not exist.

### renamePermission

    public static void renamePermission(Permission permission,
                                        String name)
                                 throws DataBackendException,
                                        UnknownEntityException

  Renames an existing Permission.

  Parameters:
    `permission` - The object describing the permission to be renamed.
    `name` - the new name for the permission.
  Throws:
    `DataBackendException` - if there was an error accessing the data backend.
    `UnknownEntityException` - if the permission does not exist.

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.