GigaSpaces XAP 9.0 API

com.gigaspaces.security.directory
Interface RoleManager


public interface RoleManager

The main interface for managing role details.

Since:
7.0.1
Author:
Moran Avigdor
See Also:
DirectoryManager

Method Summary
 void createRole(RoleDetails roleDetails)
          Create a new role with the specified roleDetails.
 void deleteRole(String role)
          Delete an existing role represented by the specified role.
 RoleDetails getRole(String role)
          Retrieve the role details by role.
 boolean isReadOnly()
          Indicates that this manager is for read-only purposes, and that any invocation of a destructive operation will throw an AccessDeniedException.
 Map<String,RoleDetails> mapRoles()
          Returns a map containing mapping between role and role-details.
 boolean roleExists(String role)
          Queries for presence of a role by role.
 void updateRole(RoleDetails roleDetails)
          Updates the role details, excluding the role which must remain the same.
 

Method Detail

isReadOnly

boolean isReadOnly()
Indicates that this manager is for read-only purposes, and that any invocation of a destructive operation will throw an AccessDeniedException.

Returns:
true if read-only access is allowed.

createRole

void createRole(RoleDetails roleDetails)
                throws RoleAlreadyExistsException,
                       RoleDataAccessException,
                       AccessDeniedException
Create a new role with the specified roleDetails.

Parameters:
roleDetails - new role details to store.
Throws:
RoleAlreadyExistsException - if the role details represent a non-unique role
RoleDataAccessException - if could not store the specified role details.
AccessDeniedException - if read-only access is allowed.

deleteRole

void deleteRole(String role)
                throws RoleNotFoundException,
                       RoleDataAccessException,
                       AccessDeniedException
Delete an existing role represented by the specified role.

Parameters:
role - an existing role name.
Throws:
RoleNotFoundException - if the role was not found.
RoleDataAccessException - if could not delete the specified role details.
AccessDeniedException - if read-only access is allowed.

getRole

RoleDetails getRole(String role)
                    throws RoleNotFoundException,
                           RoleDataAccessException
Retrieve the role details by role.

Parameters:
role - an existing role to retrieve.
Returns:
the role details of the specified role.
Throws:
RoleNotFoundException - if the role was not found.
RoleDataAccessException - if could not retrieve the specified role details.

mapRoles

Map<String,RoleDetails> mapRoles()
                                 throws RoleDataAccessException
Returns a map containing mapping between role and role-details.

Returns:
a mapping between role name and role-details.
Throws:
RoleDataAccessException - if could not retrieve role-details to map.

updateRole

void updateRole(RoleDetails roleDetails)
                throws RoleNotFoundException,
                       RoleDataAccessException,
                       AccessDeniedException
Updates the role details, excluding the role which must remain the same. In order to update a role, a role must be removed and re-created.

Parameters:
roleDetails - the role details to update.
Throws:
RoleNotFoundException - if the role was not found.
RoleDataAccessException - if could not update the role details.
AccessDeniedException - if read-only access is allowed.

roleExists

boolean roleExists(String role)
                   throws RoleDataAccessException
Queries for presence of a role by role.

Parameters:
role - the role to check existence for.
Returns:
true if the role exists; false otherwise.
Throws:
RoleDataAccessException - if could not query for the specified role.

GigaSpaces XAP 9.0 API

Copyright © GigaSpaces.