public interface RoleAPI
| Modifier and Type | Method and Description |
|---|---|
Role |
createRole(RoleCreator creator)
Create the role.
|
Role |
createRole(String roleName)
Creates a role.
|
void |
deleteRole(long roleId)
Deletes the role.
|
void |
deleteRoles(List<Long> roleIds)
Deletes the roles.
|
long |
getNumberOfRoles()
Returns the total number of roles.
|
Role |
getRole(long roleId)
Retrieves the role.
|
Role |
getRoleByName(String roleName)
Retrieves the role.
|
List<Role> |
getRoles(int startIndex,
int maxResults,
RoleCriterion criterion)
Retrieves the paginated list of roles.
|
Map<Long,Role> |
getRoles(List<Long> roleIds)
Retrieves the roles.
|
SearchResult<Role> |
searchRoles(SearchOptions options)
Searches roles according to the criteria containing in the options.
|
Role |
updateRole(long roleId,
RoleUpdater updater)
Updates the group according to the updater values.
|
Role createRole(String roleName) throws AlreadyExistsException, CreationException
roleName - the name of the roleAlreadyExistsException - If the name is already taken by an existing roleCreationException - If an exception occurs during the role creationInvalidSessionException - If the session is invalid (expired, unknown, ...)Role createRole(RoleCreator creator) throws AlreadyExistsException, CreationException
creator - the role creatorAlreadyExistsException - If the name is already taken by an existing roleCreationException - If an exception occurs during the role creationInvalidSessionException - If the session is invalid (expired, unknown, ...)Role updateRole(long roleId, RoleUpdater updater) throws RoleNotFoundException, UpdateException
roleId - the identifier of the roleupdater - the role updaterRoleNotFoundException - If the role identifier does not refer to an existing roleUpdateException - If an exception occurs during the role updateInvalidSessionException - If the session is invalid (expired, unknown, ...)void deleteRole(long roleId)
throws DeletionException
roleId - the role identifierDeletionException - If an exception occurs during the role deletionInvalidSessionException - If the session is invalid (expired, unknown, ...)void deleteRoles(List<Long> roleIds) throws DeletionException
roleIds - the list of role identifiersDeletionException - If an exception occurs during the role deletionInvalidSessionException - If the session is invalid (expired, unknown, ...)Role getRole(long roleId) throws RoleNotFoundException
roleId - the identifier of the roleRoleNotFoundException - If the role identifier does not refer to an existing roleRetrieveException - If an exception occurs during the role retrievingInvalidSessionException - If the session is invalid (expired, unknown, ...)Role getRoleByName(String roleName) throws RoleNotFoundException
roleName - the name of the role.RoleNotFoundException - If the role name does not refer to an existing roleRetrieveException - If an exception occurs during the role retrievingInvalidSessionException - If the session is invalid (expired, unknown, ...)long getNumberOfRoles()
RetrieveException - If an exception occurs during the count retrievingInvalidSessionException - If the session is invalid (expired, unknown, ...)List<Role> getRoles(int startIndex, int maxResults, RoleCriterion criterion)
startIndex - the start indexmaxResults - the max number of rolescriterion - the sorting criterionRetrieveException - If an exception occurs during the role retrievingInvalidSessionException - If the session is invalid (expired, unknown, ...)Map<Long,Role> getRoles(List<Long> roleIds)
roleIds - the identifiers of the rolesRetrieveException - If an exception occurs during the role retrievingInvalidSessionException - If the session is invalid (expired, unknown, ...)SearchResult<Role> searchRoles(SearchOptions options) throws SearchException
options - the search criteriaSearchException - If an exception occurs during the role searchingInvalidSessionException - If the session is invalid (expired, unknown, ...)Copyright © 2013 BonitaSoft. All Rights Reserved.