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.
|
Map<String,String> |
findByExternalIds(long directoryId,
Set<String> externalIds)
Searches the specified directory for group names of groups with the specified external ids
|
InternalDirectoryGroup |
findByName(long directoryId,
String name)
Finds group by name.
|
GroupWithAttributes |
findByNameWithAttributes(long directoryId,
String name)
Finds group by name.
|
Map<String,String> |
findExternalIdsByNames(long directoryId,
Set<String> groupNames)
Searches the specified directory for externalIds of groups with the specified names
|
Set<String> |
getAllExternalIds(long directoryId)
Return all group externalId in the given directory.
|
long |
getExternalGroupCount(long directoryId)
Gets the count of external groups for a 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 com.atlassian.crowd.exception.GroupNotFoundException
directoryId - the ID of the directory to look for groupname - group namecom.atlassian.crowd.exception.GroupNotFoundException - if the group does not existGroupWithAttributes findByNameWithAttributes(long directoryId, String name) throws com.atlassian.crowd.exception.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 namecom.atlassian.crowd.exception.GroupNotFoundException - if the group does not existGroup add(Group group) throws com.atlassian.crowd.exception.DirectoryNotFoundException, com.atlassian.crowd.exception.InvalidGroupException
group - groupcom.atlassian.crowd.exception.DirectoryNotFoundException - if the directory specified in group object does not existcom.atlassian.crowd.exception.InvalidGroupException - if a group with the same directory and name (case-insensitive) already existsGroup addLocal(Group group) throws com.atlassian.crowd.exception.DirectoryNotFoundException, com.atlassian.crowd.exception.InvalidGroupException
group - groupcom.atlassian.crowd.exception.DirectoryNotFoundException - if the directory specified in group object does not existcom.atlassian.crowd.exception.InvalidGroupException - if a group with the same directory and name (case-insensitive) already existsGroup update(Group group) throws com.atlassian.crowd.exception.GroupNotFoundException
group - groupcom.atlassian.crowd.exception.GroupNotFoundException - if the group does not existGroup rename(Group group, String newName) throws com.atlassian.crowd.exception.GroupNotFoundException, com.atlassian.crowd.exception.InvalidGroupException
group - groupnewName - the new namecom.atlassian.crowd.exception.GroupNotFoundException - if the group does not existcom.atlassian.crowd.exception.InvalidGroupException - if a group with the same directory and name (case-insensitive) already existsvoid storeAttributes(Group group, Map<String,Set<String>> attributes) throws com.atlassian.crowd.exception.GroupNotFoundException
group - groupattributes - attributescom.atlassian.crowd.exception.GroupNotFoundException - if the group does not existvoid removeAttribute(Group group, String attributeName) throws com.atlassian.crowd.exception.GroupNotFoundException
group - groupattributeName - attribute to be removedcom.atlassian.crowd.exception.GroupNotFoundException - if the group does not existvoid remove(Group group) throws com.atlassian.crowd.exception.GroupNotFoundException
group - groupcom.atlassian.crowd.exception.GroupNotFoundException - 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 com.atlassian.crowd.exception.DirectoryNotFoundException
groups - to be addedcom.atlassian.crowd.exception.DirectoryNotFoundException - 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 com.atlassian.crowd.exception.DirectoryNotFoundException
null or an empty String it won't be included.directoryId - the ID of the directorycom.atlassian.crowd.exception.DirectoryNotFoundException - when directory with given id does not existlong getGroupCount(long directoryId)
throws com.atlassian.crowd.exception.DirectoryNotFoundException
directoryId - the ID of the directorycom.atlassian.crowd.exception.DirectoryNotFoundException - when directory with given id does not existSet<String> getLocalGroupNames(long directoryId) throws com.atlassian.crowd.exception.DirectoryNotFoundException
directoryId - the ID of the directorycom.atlassian.crowd.exception.DirectoryNotFoundException - when directory with given id does not existMap<String,String> findByExternalIds(long directoryId, Set<String> externalIds)
directoryId - the id of the directory to searchexternalIds - external ids of the groups to findMap<String,String> findExternalIdsByNames(long directoryId, Set<String> groupNames)
directoryId - the id of the directory to searchgroupNames - names of the groups to findlong getExternalGroupCount(long directoryId)
throws com.atlassian.crowd.exception.DirectoryNotFoundException
directoryId - the directory to count groups forcom.atlassian.crowd.exception.DirectoryNotFoundExceptionCopyright © 2024 Atlassian. All rights reserved.