public interface GroupDao
Modifier and Type | Method and Description |
---|---|
Group |
add(Group group)
Adds a new group.
|
BatchResult<Group> |
addAll(Set<? extends Group> groups)
Bulk add of groups.
|
Group |
addLocal(Group group)
Add a new local group.
|
InternalDirectoryGroup |
findByName(long directoryId,
String name)
Finds group by name.
|
GroupWithAttributes |
findByNameWithAttributes(long directoryId,
String name)
Finds group by name.
|
Set<String> |
getAllExternalIds(long directoryId)
Return all group externalId in the given directory.
|
long |
getGroupCount(long directoryId)
Return number of groups in given directory.
|
Set<String> |
getLocalGroupNames(long directoryId)
Return names of all local groups in given directory.
|
void |
remove(Group group)
Removes group.
|
BatchResult<String> |
removeAllGroups(long directoryId,
Set<String> groupNames)
Bulk remove all the given groups.
|
void |
removeAttribute(Group group,
String attributeName)
Remove the attribute from the group.
|
Group |
rename(Group group,
String newName)
Renames group.
|
<T> List<T> |
search(long directoryId,
EntityQuery<T> query)
Searches for group based on the given criteria.
|
void |
storeAttributes(Group group,
Map<String,Set<String>> attributes)
Stores attributes into group.
|
Group |
update(Group group)
Updates group.
|
InternalDirectoryGroup findByName(long directoryId, String name) throws GroupNotFoundException
directoryId
- the ID of the directory to look for groupname
- group nameGroupNotFoundException
- if the group does not existGroupWithAttributes findByNameWithAttributes(long directoryId, String name) throws GroupNotFoundException
findByName(long, String)
in that it also returns
the group attributes associated with the retrieved group.directoryId
- the ID of the directory to look for groupname
- group nameGroupNotFoundException
- if the group does not existGroup add(Group group) throws DirectoryNotFoundException, InvalidGroupException
group
- groupDirectoryNotFoundException
- if the directory specified in group object does not existInvalidGroupException
- if a group with the same directory and name (case-insensitive) already existsGroup addLocal(Group group) throws DirectoryNotFoundException, InvalidGroupException
group
- groupDirectoryNotFoundException
- if the directory specified in group object does not existInvalidGroupException
- if a group with the same directory and name (case-insensitive) already existsGroup update(Group group) throws GroupNotFoundException
group
- groupGroupNotFoundException
- if the group does not existGroup rename(Group group, String newName) throws GroupNotFoundException, InvalidGroupException
group
- groupnewName
- the new nameGroupNotFoundException
- if the group does not existInvalidGroupException
- if a group with the same directory and name (case-insensitive) already existsvoid storeAttributes(Group group, Map<String,Set<String>> attributes) throws GroupNotFoundException
group
- groupattributes
- attributesGroupNotFoundException
- if the group does not existvoid removeAttribute(Group group, String attributeName) throws GroupNotFoundException
group
- groupattributeName
- attribute to be removedGroupNotFoundException
- if the group does not existvoid remove(Group group) throws GroupNotFoundException
group
- groupGroupNotFoundException
- if the group does not exist<T> List<T> search(long directoryId, EntityQuery<T> query)
directoryId
- directory to perform the search operation onquery
- criteriaBatchResult<Group> addAll(Set<? extends Group> groups) throws DirectoryNotFoundException
groups
- to be addedDirectoryNotFoundException
- if the directory cannot be foundBatchResult<String> removeAllGroups(long directoryId, Set<String> groupNames)
directoryId
- directory to perform the operationgroupNames
- groups to be removedSet<String> getAllExternalIds(long directoryId) throws DirectoryNotFoundException
null
or an empty String it won't be included.directoryId
- the ID of the directoryDirectoryNotFoundException
- when directory with given id does not existlong getGroupCount(long directoryId) throws DirectoryNotFoundException
directoryId
- the ID of the directoryDirectoryNotFoundException
- when directory with given id does not existSet<String> getLocalGroupNames(long directoryId) throws DirectoryNotFoundException
directoryId
- the ID of the directoryDirectoryNotFoundException
- when directory with given id does not existCopyright © 2019 Atlassian. All rights reserved.