public class CachingMembershipDao extends Object implements MembershipDao
InternalMembershipDao.| Modifier and Type | Field and Description |
|---|---|
protected MembershipCache |
membershipCache |
| Constructor and Description |
|---|
CachingMembershipDao(InternalMembershipDao delegate,
MembershipCache membershipCache) |
| Modifier and Type | Method and Description |
|---|---|
BatchResult<String> |
addAllGroupsToGroup(long directoryId,
Collection<String> childGroupNames,
String groupName) |
BatchResult<String> |
addAllUsersToGroup(long directoryId,
Collection<String> userNames,
String groupName) |
void |
addGroupToGroup(long directoryId,
String childGroup,
String parentGroup) |
void |
addUserToGroup(long directoryId,
String userName,
String groupName) |
BatchResult<String> |
addUserToGroups(long directoryId,
String username,
Set<String> groupNames) |
void |
clearCache() |
BoundedCount |
countDirectMembersOfGroup(long directoryId,
String groupName,
int potentialMaxCount) |
boolean |
isGroupDirectMember(long directoryId,
String childGroup,
String parentGroup) |
boolean |
isUserDirectMember(long directoryId,
String userName,
String groupName) |
void |
removeGroupFromGroup(long directoryId,
String childGroup,
String parentGroup) |
BatchResult<String> |
removeGroupsFromGroup(long directoryId,
Collection<String> childGroupNames,
String groupName) |
void |
removeUserFromGroup(long directoryId,
String userName,
String groupName) |
BatchResult<String> |
removeUsersFromGroup(long directoryId,
Collection<String> usernames,
String groupName) |
<T> List<T> |
search(long directoryId,
MembershipQuery<T> query) |
<T> com.google.common.collect.ListMultimap<String,T> |
searchGroupedByName(long directoryId,
MembershipQuery<T> query) |
protected <T> boolean |
shouldCache(MembershipQuery<T> query) |
protected final MembershipCache membershipCache
public CachingMembershipDao(InternalMembershipDao delegate, MembershipCache membershipCache)
public boolean isUserDirectMember(long directoryId,
String userName,
String groupName)
isUserDirectMember in interface MembershipDaopublic boolean isGroupDirectMember(long directoryId,
String childGroup,
String parentGroup)
isGroupDirectMember in interface MembershipDaopublic void addUserToGroup(long directoryId,
String userName,
String groupName)
throws UserNotFoundException,
GroupNotFoundException,
MembershipAlreadyExistsException
addUserToGroup in interface MembershipDaoUserNotFoundExceptionGroupNotFoundExceptionMembershipAlreadyExistsExceptionpublic BatchResult<String> addAllUsersToGroup(long directoryId, Collection<String> userNames, String groupName) throws GroupNotFoundException
addAllUsersToGroup in interface MembershipDaoGroupNotFoundExceptionpublic void addGroupToGroup(long directoryId,
String childGroup,
String parentGroup)
throws GroupNotFoundException,
MembershipAlreadyExistsException
addGroupToGroup in interface MembershipDaoGroupNotFoundExceptionMembershipAlreadyExistsExceptionpublic BatchResult<String> addAllGroupsToGroup(long directoryId, Collection<String> childGroupNames, String groupName) throws GroupNotFoundException
addAllGroupsToGroup in interface MembershipDaoGroupNotFoundExceptionpublic void removeUserFromGroup(long directoryId,
String userName,
String groupName)
throws UserNotFoundException,
GroupNotFoundException,
MembershipNotFoundException
removeUserFromGroup in interface MembershipDaoUserNotFoundExceptionGroupNotFoundExceptionMembershipNotFoundExceptionpublic BatchResult<String> removeUsersFromGroup(long directoryId, Collection<String> usernames, String groupName) throws GroupNotFoundException
removeUsersFromGroup in interface MembershipDaoGroupNotFoundExceptionpublic void removeGroupFromGroup(long directoryId,
String childGroup,
String parentGroup)
throws GroupNotFoundException,
MembershipNotFoundException
removeGroupFromGroup in interface MembershipDaoGroupNotFoundExceptionMembershipNotFoundExceptionpublic BatchResult<String> removeGroupsFromGroup(long directoryId, Collection<String> childGroupNames, String groupName) throws GroupNotFoundException
removeGroupsFromGroup in interface MembershipDaoGroupNotFoundExceptionpublic <T> List<T> search(long directoryId, MembershipQuery<T> query)
search in interface MembershipDaopublic <T> com.google.common.collect.ListMultimap<String,T> searchGroupedByName(long directoryId, MembershipQuery<T> query)
searchGroupedByName in interface MembershipDaopublic BoundedCount countDirectMembersOfGroup(long directoryId, String groupName, int potentialMaxCount)
countDirectMembersOfGroup in interface MembershipDaopublic BatchResult<String> addUserToGroups(long directoryId, String username, Set<String> groupNames) throws UserNotFoundException
addUserToGroups in interface MembershipDaoUserNotFoundExceptionprotected <T> boolean shouldCache(MembershipQuery<T> query)
public void clearCache()
Copyright © 2023 Atlassian. All rights reserved.