public interface GroupAPI
| Modifier and Type | Method and Description |
|---|---|
Group |
createGroup(GroupCreator creator)
Creates a group.
|
Group |
createGroup(String name,
String parentPath)
Creates a group from its name and parent path.
|
void |
deleteGroup(long groupId)
Deletes the group.
|
void |
deleteGroups(List<Long> groupIds)
Deletes the groups.
|
Group |
getGroup(long groupId)
Retrieves the group.
|
Group |
getGroupByPath(String groupPath)
Retrieves the group according to its full path.
|
List<Group> |
getGroups(int startIndex,
int maxResults,
GroupCriterion criterion)
Retrieves the paginated list of groups.
|
Map<Long,Group> |
getGroups(List<Long> groupIds)
Retrieves the groups.
|
long |
getNumberOfGroups()
Returns the total number of groups.
|
SearchResult<Group> |
searchGroups(SearchOptions options)
Searches groups according to the criteria containing in the options.
|
Group |
updateGroup(long groupId,
GroupUpdater updater)
Updates the group according to the updater values.
|
Group createGroup(String name, String parentPath) throws AlreadyExistsException, CreationException
name - the name of the groupparentPath - the parent path of the group (null means no parent)AlreadyExistsException - If the couple name/parentPath is already taken by an existing groupCreationException - If an exception occurs during the group creationInvalidSessionException - If the session is invalid (expired, unknown, ...)Group createGroup(GroupCreator creator) throws AlreadyExistsException, CreationException
creator - the group creatorAlreadyExistsException - If the couple name/parentPath is already taken by an existing groupCreationException - If an exception occurs during group creationInvalidSessionException - If the session is invalid (expired, unknown, ...)Group updateGroup(long groupId, GroupUpdater updater) throws GroupNotFoundException, UpdateException
groupId - the identifier of the groupupdater - the group updaterGroupNotFoundException - If the group identifier does not refer to an existing groupUpdateException - If an exception occurs during the group updateInvalidSessionException - If the session is invalid (expired, unknown, ...)void deleteGroup(long groupId)
throws DeletionException
groupId - the identifier of the groupDeletionException - If an exception occurs during the group deletionInvalidSessionException - If the session is invalid (expired, unknown, ...)void deleteGroups(List<Long> groupIds) throws DeletionException
groupIds - the list of group identifiersDeletionException - If an exception occurs during the group deletionInvalidSessionException - If the session is invalid (expired, unknown, ...)Group getGroup(long groupId) throws GroupNotFoundException
groupId - the group identifierGroupNotFoundException - If the group identifier does not refer to an existing groupRetrieveException - If an exception occurs during the group retrievingInvalidSessionException - If the session is invalid (expired, unknown, ...)Group getGroupByPath(String groupPath) throws GroupNotFoundException
groupPath - the full path of the group (parentPath/name)GroupNotFoundException - If the group path does not refer to an existing groupRetrieveException - If an exception occurs during the group retrievingInvalidSessionException - If the session is invalid (expired, unknown, ...)long getNumberOfGroups()
RetrieveException - If an exception occurs during the count retrievingInvalidSessionException - If the session is invalid (expired, unknown, ...)List<Group> getGroups(int startIndex, int maxResults, GroupCriterion criterion)
startIndex - 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, ...)Map<Long,Group> getGroups(List<Long> groupIds)
groupIds - the identifiers of the groupsRetrieveException - If an exception occurs during the group retrievingInvalidSessionException - If the session is invalid (expired, unknown, ...)SearchResult<Group> searchGroups(SearchOptions options) throws SearchException
options - the search criteriaSearchException - If an exception occurs during the group searchingInvalidSessionException - If the session is invalid (expired, unknown, ...)Copyright © 2013 BonitaSoft. All Rights Reserved.