public interface UserAPI
OrganizationAPI
and gives access to all the Administation operations available on Users: creation, deletion, certain
specific getXXX() methods, generic search methods, etc...
It also to retrieve user ContactData.ContactData
,
SearchResult for general knowledege on Search mechanism in Bonita BPM.
Modifier and Type | Method and Description |
---|---|
User |
createUser(String userName,
String password)
Creates a user.
|
User |
createUser(String userName,
String password,
String firstName,
String lastName)
Creates a user.
|
User |
createUser(UserCreator creator)
Creates a user.
|
void |
deleteUser(long userId)
Deletes the user.
|
void |
deleteUser(String userName)
Deletes the user.
|
void |
deleteUsers(List<Long> userIds)
Deletes the users.
|
long |
getNumberOfUsers()
Returns the total number of users.
|
long |
getNumberOfUsersInGroup(long groupId)
Returns the total number of users of the group.
|
long |
getNumberOfUsersInRole(long roleId)
Returns the total number of users of the role.
|
User |
getUser(long userId)
Retrieves the user.
|
User |
getUserByUserName(String userName)
Retrieves the user.
|
ContactData |
getUserContactData(long userId,
boolean personal)
Retrieves the contact data (personal or professional) of the user.
|
List<User> |
getUsers(int startIndex,
int maxResults,
UserCriterion criterion)
Retrieves the paginated list of users.
|
Map<Long,User> |
getUsers(List<Long> userIds)
Retrieves the users.
|
Map<String,User> |
getUsersByUsernames(List<String> userNames)
Retrieves the identifiers of the named users.
|
List<User> |
getUsersInGroup(long groupId,
int startIndex,
int maxResults,
UserCriterion criterion)
Retrieves the paginated list of groups.
|
List<User> |
getUsersInRole(long roleId,
int startIndex,
int maxResults,
UserCriterion criterion)
Retrieves the paginated list of roles.
|
UserWithContactData |
getUserWithProfessionalDetails(long userId)
Retrieves the professional details of the user.
|
SearchResult<User> |
searchUsers(SearchOptions options)
Searches users according to the criteria containing in the options.
|
User |
updateUser(long userId,
UserUpdater updater)
Updates the user according to the updater values.
|
User createUser(String userName, String password) throws AlreadyExistsException, CreationException
userName
- The name of the userpassword
- The password of the userAlreadyExistsException
- If the name is already taken by an existing userCreationException
- If an exception occurs during the user creationInvalidSessionException
- If the session is invalid (expired, unknown, ...)User createUser(String userName, String password, String firstName, String lastName) throws AlreadyExistsException, CreationException
userName
- The name of the userpassword
- The password of the userfirstName
- The first name of the userlastName
- The last name of the userAlreadyExistsException
- If the name is already taken by an existing userCreationException
- If an exception occurs during the user creationInvalidSessionException
- If the session is invalid (expired, unknown, ...)User createUser(UserCreator creator) throws AlreadyExistsException, CreationException
creator
- The user to createAlreadyExistsException
- If the name is already taken by an existing userCreationException
- If an exception occurs during the user creationInvalidSessionException
- If the session is invalid (expired, unknown, ...)User updateUser(long userId, UserUpdater updater) throws UserNotFoundException, UpdateException
userId
- The identifier of the userupdater
- The user updaterUserNotFoundException
- If the user identifier does not refer to an existing userUpdateException
- If an exception occurs during the user updateInvalidSessionException
- If the session is invalid (expired, unknown, ...)void deleteUser(long userId) throws DeletionException
userId
- The identifier of the userDeletionException
- If an exception occurs during the user deletionInvalidSessionException
- If the session is invalid (expired, unknown, ...)void deleteUser(String userName) throws DeletionException
userName
- The name of the userDeletionException
- If an exception occurs during the user deletionInvalidSessionException
- If the session is invalid (expired, unknown, ...)void deleteUsers(List<Long> userIds) throws DeletionException
userIds
- The identifiers of the usersDeletionException
- If an exception occurs during the user deletionInvalidSessionException
- If the session is invalid (expired, unknown, ...)User getUser(long userId) throws UserNotFoundException
UserNotFoundException
if the user identifier equals the technical user identifier (-1).userId
- The identifier of the userUserNotFoundException
- If the user identifier does not refer to an existing userRetrieveException
- If an exception occurs during the user retrievingInvalidSessionException
- If the session is invalid (expired, unknown, ...)User getUserByUserName(String userName) throws UserNotFoundException
userName
- The name of the userUserNotFoundException
- If the user name does not refer to an existing userRetrieveException
- If an exception occurs during the role retrievingInvalidSessionException
- If the session is invalid (expired, unknown, ...)UserWithContactData getUserWithProfessionalDetails(long userId) throws UserNotFoundException
userId
- The identifier of the userUserNotFoundException
- If the user identifier does not refer to an existing user, or is -1 (the technical user identifier)RetrieveException
- If an exception occurs while retrieving the userInvalidSessionException
- If the session is invalid (expired, unknown, ...)ContactData getUserContactData(long userId, boolean personal) throws UserNotFoundException
userId
- The identifier of the userpersonal
- true if the contact data is the personal oneUserNotFoundException
- If the user name does not refer to an existing userRetrieveException
- If an exception occurs during the role retrievingInvalidSessionException
- If the session is invalid (expired, unknown, ...)long getNumberOfUsers()
RetrieveException
- If an exception occurs during the count retrievingInvalidSessionException
- If the session is invalid (expired, unknown, ...)List<User> getUsers(int startIndex, int maxResults, UserCriterion criterion)
startIndex
- The start indexmaxResults
- The max number of userscriterion
- The sorting criterionRetrieveException
- If an exception occurs during the user retrievingInvalidSessionException
- If the session is invalid (expired, unknown, ...)Map<Long,User> getUsers(List<Long> userIds)
userIds
- The identifiers of the usersRetrieveException
- If an exception occurs during the user retrievingInvalidSessionException
- If the session is invalid (expired, unknown, ...)Map<String,User> getUsersByUsernames(List<String> userNames)
userNames
- The names of the usersRetrieveException
- If an exception occurs during the user retrievingInvalidSessionException
- If the session is invalid (expired, unknown, ...)SearchResult<User> searchUsers(SearchOptions options) throws SearchException
options
- The search criteriaSearchException
- If an exception occurs during the user searchingInvalidSessionException
- If the session is invalid (expired, unknown, ...)long getNumberOfUsersInRole(long roleId)
roleId
- The identifier of the roleRetrieveException
- If an exception occurs during the count retrievingInvalidSessionException
- If the session is invalid (expired, unknown, ...)List<User> getUsersInRole(long roleId, int startIndex, int maxResults, UserCriterion criterion)
roleId
- The identifier of the rolestartIndex
- 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, ...)long getNumberOfUsersInGroup(long groupId) throws BonitaException
groupId
- The identifier of the groupBonitaException
RetrieveException
- If an exception occurs during the count retrievingInvalidSessionException
- If the session is invalid (expired, unknown, ...)List<User> getUsersInGroup(long groupId, int startIndex, int maxResults, UserCriterion criterion)
groupId
- The identifier of the groupstartIndex
- The start indexmaxResults
- The max number of groupscriterion
- The sorting criterionRetrieveException
- If an exception occurs during the group retrievingInvalidSessionException
- If the session is invalid (expired, unknown, ...)Copyright © 2014 Bonitasoft S.A.. All Rights Reserved.