public class OfBizInternalMembershipDao extends Object implements InternalMembershipDao
Constructor and Description |
---|
OfBizInternalMembershipDao(OfBizDelegator ofBizDelegator,
QueryDslAccessor queryDslAccessor,
com.atlassian.cache.CacheManager cacheManager) |
Modifier and Type | Method and Description |
---|---|
com.atlassian.crowd.util.BatchResult<String> |
addAllUsersToGroup(long directoryId,
Collection<UserOrGroupStub> users,
UserOrGroupStub group) |
void |
addGroupToGroup(long directoryId,
UserOrGroupStub child,
UserOrGroupStub parent) |
void |
addUserToGroup(long directoryId,
UserOrGroupStub user,
UserOrGroupStub group) |
long |
countDirectMembersOfGroup(long directoryId,
String groupName,
com.atlassian.crowd.model.membership.MembershipType type) |
List<String> |
findGroupChildrenOfGroups(long directoryId,
Collection<String> groupNames)
Finds direct group children of the specified groups in a directory.
|
List<String> |
findUserChildrenOfGroups(long directoryId,
Collection<String> groupNames)
Finds direct user children of the specified groups in a directory.
|
void |
flushCache()
Invoked by
OfBizCacheFlushingManager to ensure caches are being flushed in the right order on
XMLRestoreFinishedEvent |
boolean |
isGroupDirectMember(long directoryId,
String childGroup,
String parentGroup) |
boolean |
isUserDirectMember(long directoryId,
String userName,
String groupName) |
void |
removeAllGroupMemberships(com.atlassian.crowd.model.group.Group group) |
void |
removeAllMembersFromGroup(com.atlassian.crowd.model.group.Group group) |
void |
removeAllUserMemberships(long directoryId,
String username) |
void |
removeAllUserMemberships(com.atlassian.crowd.model.user.User user) |
void |
removeGroupFromGroup(long directoryId,
UserOrGroupStub childGroup,
UserOrGroupStub parentGroup) |
void |
removeUserFromGroup(long directoryId,
UserOrGroupStub user,
UserOrGroupStub group) |
<T> List<String> |
search(long directoryId,
com.atlassian.crowd.search.query.membership.MembershipQuery<T> query) |
public OfBizInternalMembershipDao(OfBizDelegator ofBizDelegator, QueryDslAccessor queryDslAccessor, com.atlassian.cache.CacheManager cacheManager)
public boolean isUserDirectMember(long directoryId, String userName, String groupName)
isUserDirectMember
in interface InternalMembershipDao
public boolean isGroupDirectMember(long directoryId, String childGroup, String parentGroup)
isGroupDirectMember
in interface InternalMembershipDao
public void addUserToGroup(long directoryId, UserOrGroupStub user, UserOrGroupStub group) throws com.atlassian.crowd.exception.MembershipAlreadyExistsException
addUserToGroup
in interface InternalMembershipDao
com.atlassian.crowd.exception.MembershipAlreadyExistsException
public com.atlassian.crowd.util.BatchResult<String> addAllUsersToGroup(long directoryId, Collection<UserOrGroupStub> users, UserOrGroupStub group)
addAllUsersToGroup
in interface InternalMembershipDao
public void addGroupToGroup(long directoryId, UserOrGroupStub child, UserOrGroupStub parent)
addGroupToGroup
in interface InternalMembershipDao
public void removeUserFromGroup(long directoryId, UserOrGroupStub user, UserOrGroupStub group) throws com.atlassian.crowd.exception.MembershipNotFoundException
removeUserFromGroup
in interface InternalMembershipDao
com.atlassian.crowd.exception.MembershipNotFoundException
public void removeGroupFromGroup(long directoryId, UserOrGroupStub childGroup, UserOrGroupStub parentGroup) throws com.atlassian.crowd.exception.MembershipNotFoundException
removeGroupFromGroup
in interface InternalMembershipDao
com.atlassian.crowd.exception.MembershipNotFoundException
public long countDirectMembersOfGroup(long directoryId, String groupName, com.atlassian.crowd.model.membership.MembershipType type)
countDirectMembersOfGroup
in interface InternalMembershipDao
public void removeAllMembersFromGroup(com.atlassian.crowd.model.group.Group group)
removeAllMembersFromGroup
in interface InternalMembershipDao
public void removeAllGroupMemberships(com.atlassian.crowd.model.group.Group group)
removeAllGroupMemberships
in interface InternalMembershipDao
public void removeAllUserMemberships(com.atlassian.crowd.model.user.User user)
removeAllUserMemberships
in interface InternalMembershipDao
public void removeAllUserMemberships(long directoryId, String username)
removeAllUserMemberships
in interface InternalMembershipDao
public List<String> findGroupChildrenOfGroups(long directoryId, Collection<String> groupNames)
InternalMembershipDao
findGroupChildrenOfGroups
in interface InternalMembershipDao
directoryId
- the directory.groupNames
- the names of the groups whose group children are returned. If this is empty, an empty collection is returned.public List<String> findUserChildrenOfGroups(long directoryId, Collection<String> groupNames)
InternalMembershipDao
findUserChildrenOfGroups
in interface InternalMembershipDao
directoryId
- the directory.groupNames
- the name of the groups whose user children are returned. If this is empty, an empty collection is returned.public <T> List<String> search(long directoryId, com.atlassian.crowd.search.query.membership.MembershipQuery<T> query)
search
in interface InternalMembershipDao
public void flushCache()
OfBizCacheFlushingManager
to ensure caches are being flushed in the right order on
XMLRestoreFinishedEvent
flushCache
in interface InternalMembershipDao
Copyright © 2002-2018 Atlassian. All Rights Reserved.