Class OfBizInternalMembershipDao
java.lang.Object
com.atlassian.jira.crowd.embedded.ofbiz.OfBizInternalMembershipDao
- All Implemented Interfaces:
InternalMembershipDao,InitializingComponent
public class OfBizInternalMembershipDao
extends Object
implements InternalMembershipDao, InitializingComponent
-
Constructor Summary
ConstructorsConstructorDescriptionOfBizInternalMembershipDao(OfBizDelegator ofBizDelegator, QueryDslAccessor queryDslAccessor, com.atlassian.cache.CacheManager cacheManager) -
Method Summary
Modifier and TypeMethodDescriptioncom.atlassian.crowd.util.BatchResult<String>addAllGroupsToGroup(long directoryId, Collection<UserOrGroupStub> childGroups, UserOrGroupStub parentGroup) com.atlassian.crowd.util.BatchResult<String>addAllUsersToGroup(long directoryId, Collection<UserOrGroupStub> users, UserOrGroupStub group) voidaddGroupToGroup(long directoryId, UserOrGroupStub child, UserOrGroupStub parent) voidaddUserToGroup(long directoryId, UserOrGroupStub user, UserOrGroupStub group) com.atlassian.crowd.util.BatchResult<String>addUserToGroups(long directoryId, UserOrGroupStub user, Collection<UserOrGroupStub> groups) voidCalled after all the beans are constructed and the ApplicationContext is fully populated.longcountDirectMembersOfGroup(long directoryId, String groupName, com.atlassian.crowd.model.membership.MembershipType type) findGroupChildrenOfGroups(long directoryId, Collection<String> groupNames) Finds direct group children of the specified groups in a directory.findUserChildrenOfGroups(long directoryId, Collection<String> groupNames) Finds direct user children of the specified groups in a directory.voidInvoked byOfBizCacheFlushingManagerto ensure caches are being flushed in the right order onXMLRestoreFinishedEventbooleanisGroupDirectMember(long directoryId, String childGroup, String parentGroup) booleanisUserDirectMember(long directoryId, String userName, String groupName) voidremoveAllGroupMemberships(com.atlassian.crowd.model.group.Group group) voidremoveAllMembersFromGroup(com.atlassian.crowd.model.group.Group group) voidremoveAllUserMemberships(long directoryId, String username) voidremoveAllUserMemberships(com.atlassian.crowd.model.user.User user) voidremoveGroupFromGroup(long directoryId, UserOrGroupStub childGroup, UserOrGroupStub parentGroup) com.atlassian.crowd.util.BatchResult<String>removeGroupsFromGroup(long directoryId, Collection<UserOrGroupStub> childGroups, UserOrGroupStub parentGroup) voidremoveUserFromGroup(long directoryId, UserOrGroupStub user, UserOrGroupStub group) com.atlassian.crowd.util.BatchResult<String>removeUsersFromGroup(long directoryId, Collection<UserOrGroupStub> users, UserOrGroupStub group) search(long directoryId, com.atlassian.crowd.search.query.membership.MembershipQuery<T> query) searchGroupedByName(long directoryId, com.atlassian.crowd.search.query.membership.MembershipQuery<T> query)
-
Constructor Details
-
OfBizInternalMembershipDao
public OfBizInternalMembershipDao(OfBizDelegator ofBizDelegator, QueryDslAccessor queryDslAccessor, com.atlassian.cache.CacheManager cacheManager)
-
-
Method Details
-
afterInstantiation
Description copied from interface:InitializingComponentCalled after all the beans are constructed and the ApplicationContext is fully populated. Order of execution is order of bean creation, driven by InitializingComponentProcessor.- Specified by:
afterInstantiationin interfaceInitializingComponent- Throws:
Exception
-
isUserDirectMember
- Specified by:
isUserDirectMemberin interfaceInternalMembershipDao
-
isGroupDirectMember
- Specified by:
isGroupDirectMemberin interfaceInternalMembershipDao
-
addUserToGroup
public void addUserToGroup(long directoryId, UserOrGroupStub user, UserOrGroupStub group) throws com.atlassian.crowd.exception.MembershipAlreadyExistsException - Specified by:
addUserToGroupin interfaceInternalMembershipDao- Throws:
com.atlassian.crowd.exception.MembershipAlreadyExistsException
-
addAllUsersToGroup
public com.atlassian.crowd.util.BatchResult<String> addAllUsersToGroup(long directoryId, Collection<UserOrGroupStub> users, UserOrGroupStub group) - Specified by:
addAllUsersToGroupin interfaceInternalMembershipDao
-
addUserToGroups
public com.atlassian.crowd.util.BatchResult<String> addUserToGroups(long directoryId, UserOrGroupStub user, Collection<UserOrGroupStub> groups) - Specified by:
addUserToGroupsin interfaceInternalMembershipDao
-
addGroupToGroup
- Specified by:
addGroupToGroupin interfaceInternalMembershipDao
-
addAllGroupsToGroup
public com.atlassian.crowd.util.BatchResult<String> addAllGroupsToGroup(long directoryId, Collection<UserOrGroupStub> childGroups, UserOrGroupStub parentGroup) - Specified by:
addAllGroupsToGroupin interfaceInternalMembershipDao
-
removeUserFromGroup
public void removeUserFromGroup(long directoryId, UserOrGroupStub user, UserOrGroupStub group) throws com.atlassian.crowd.exception.MembershipNotFoundException - Specified by:
removeUserFromGroupin interfaceInternalMembershipDao- Throws:
com.atlassian.crowd.exception.MembershipNotFoundException
-
removeUsersFromGroup
public com.atlassian.crowd.util.BatchResult<String> removeUsersFromGroup(long directoryId, Collection<UserOrGroupStub> users, UserOrGroupStub group) - Specified by:
removeUsersFromGroupin interfaceInternalMembershipDao
-
removeGroupFromGroup
public void removeGroupFromGroup(long directoryId, UserOrGroupStub childGroup, UserOrGroupStub parentGroup) throws com.atlassian.crowd.exception.MembershipNotFoundException - Specified by:
removeGroupFromGroupin interfaceInternalMembershipDao- Throws:
com.atlassian.crowd.exception.MembershipNotFoundException
-
removeGroupsFromGroup
public com.atlassian.crowd.util.BatchResult<String> removeGroupsFromGroup(long directoryId, Collection<UserOrGroupStub> childGroups, UserOrGroupStub parentGroup) - Specified by:
removeGroupsFromGroupin interfaceInternalMembershipDao
-
countDirectMembersOfGroup
public long countDirectMembersOfGroup(long directoryId, String groupName, com.atlassian.crowd.model.membership.MembershipType type) - Specified by:
countDirectMembersOfGroupin interfaceInternalMembershipDao
-
removeAllMembersFromGroup
public void removeAllMembersFromGroup(com.atlassian.crowd.model.group.Group group) - Specified by:
removeAllMembersFromGroupin interfaceInternalMembershipDao
-
removeAllGroupMemberships
public void removeAllGroupMemberships(com.atlassian.crowd.model.group.Group group) - Specified by:
removeAllGroupMembershipsin interfaceInternalMembershipDao
-
removeAllUserMemberships
public void removeAllUserMemberships(com.atlassian.crowd.model.user.User user) - Specified by:
removeAllUserMembershipsin interfaceInternalMembershipDao
-
removeAllUserMemberships
- Specified by:
removeAllUserMembershipsin interfaceInternalMembershipDao
-
findGroupChildrenOfGroups
Description copied from interface:InternalMembershipDaoFinds direct group children of the specified groups in a directory.- Specified by:
findGroupChildrenOfGroupsin interfaceInternalMembershipDao- Parameters:
directoryId- the directory.groupNames- the names of the groups whose group children are returned. If this is empty, an empty collection is returned.- Returns:
- the names of the group children.
-
findUserChildrenOfGroups
Description copied from interface:InternalMembershipDaoFinds direct user children of the specified groups in a directory.- Specified by:
findUserChildrenOfGroupsin interfaceInternalMembershipDao- Parameters:
directoryId- the directory.groupNames- the name of the groups whose user children are returned. If this is empty, an empty collection is returned.- Returns:
- the names of the users in the specified groups.
-
search
public <T> List<String> search(long directoryId, com.atlassian.crowd.search.query.membership.MembershipQuery<T> query) - Specified by:
searchin interfaceInternalMembershipDao
-
searchGroupedByName
public <T> com.google.common.collect.ListMultimap<String,String> searchGroupedByName(long directoryId, com.atlassian.crowd.search.query.membership.MembershipQuery<T> query) - Specified by:
searchGroupedByNamein interfaceInternalMembershipDao
-
flushCache
public void flushCache()Invoked byOfBizCacheFlushingManagerto ensure caches are being flushed in the right order onXMLRestoreFinishedEvent- Specified by:
flushCachein interfaceInternalMembershipDao
-