Class OfBizDelegatingMembershipDao
java.lang.Object
com.atlassian.jira.crowd.embedded.ofbiz.OfBizDelegatingMembershipDao
- All Implemented Interfaces:
com.atlassian.crowd.embedded.spi.MembershipDao
public class OfBizDelegatingMembershipDao
extends Object
implements com.atlassian.crowd.embedded.spi.MembershipDao
This class implements the MembershipDao from the Crowd Embedded SPI, but needs to delegate most work to the
internal DAO to avoid circular dependencies with the User & Group DAOs.
-
Constructor Summary
ConstructorsConstructorDescriptionOfBizDelegatingMembershipDao(InternalMembershipDao membershipDao, ExtendedUserDao userDao, com.atlassian.crowd.embedded.spi.GroupDao groupDao) -
Method Summary
Modifier and TypeMethodDescriptioncom.atlassian.crowd.util.BatchResult<String>addAllGroupsToGroup(long directoryId, Collection<String> childGroupNames, String parentGroupName) com.atlassian.crowd.util.BatchResult<String>addAllUsersToGroup(long directoryId, Collection<String> userNames, String groupName) voidaddGroupToGroup(long directoryId, String child, String parent) voidaddUserToGroup(long directoryId, String user, String group) com.atlassian.crowd.util.BatchResult<String>addUserToGroups(long directoryId, String username, Set<String> groupNames) com.atlassian.crowd.util.BoundedCountcountDirectMembersOfGroup(long directoryId, String groupName, int potentialMaxCount) booleanisGroupDirectMember(long directoryId, String childGroup, String parentGroup) booleanisUserDirectMember(long directoryId, String userName, String groupName) voidremoveGroupFromGroup(long directoryId, String child, String parent) com.atlassian.crowd.util.BatchResult<String>removeGroupsFromGroup(long directoryId, Collection<String> childGroupNames, String parentGroupName) voidremoveUserFromGroup(long directoryId, String user, String group) com.atlassian.crowd.util.BatchResult<String>removeUsersFromGroup(long directoryId, Collection<String> userNames, String group) <T> List<T>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
-
OfBizDelegatingMembershipDao
public OfBizDelegatingMembershipDao(InternalMembershipDao membershipDao, ExtendedUserDao userDao, com.atlassian.crowd.embedded.spi.GroupDao groupDao)
-
-
Method Details
-
addAllUsersToGroup
public com.atlassian.crowd.util.BatchResult<String> addAllUsersToGroup(long directoryId, Collection<String> userNames, String groupName) throws com.atlassian.crowd.exception.GroupNotFoundException - Specified by:
addAllUsersToGroupin interfacecom.atlassian.crowd.embedded.spi.MembershipDao- Throws:
com.atlassian.crowd.exception.GroupNotFoundException
-
isUserDirectMember
- Specified by:
isUserDirectMemberin interfacecom.atlassian.crowd.embedded.spi.MembershipDao
-
isGroupDirectMember
- Specified by:
isGroupDirectMemberin interfacecom.atlassian.crowd.embedded.spi.MembershipDao
-
addUserToGroup
public void addUserToGroup(long directoryId, String user, String group) throws com.atlassian.crowd.exception.UserNotFoundException, com.atlassian.crowd.exception.GroupNotFoundException, com.atlassian.crowd.exception.MembershipAlreadyExistsException - Specified by:
addUserToGroupin interfacecom.atlassian.crowd.embedded.spi.MembershipDao- Throws:
com.atlassian.crowd.exception.UserNotFoundExceptioncom.atlassian.crowd.exception.GroupNotFoundExceptioncom.atlassian.crowd.exception.MembershipAlreadyExistsException
-
addGroupToGroup
public void addGroupToGroup(long directoryId, String child, String parent) throws com.atlassian.crowd.exception.GroupNotFoundException - Specified by:
addGroupToGroupin interfacecom.atlassian.crowd.embedded.spi.MembershipDao- Throws:
com.atlassian.crowd.exception.GroupNotFoundException
-
addAllGroupsToGroup
public com.atlassian.crowd.util.BatchResult<String> addAllGroupsToGroup(long directoryId, Collection<String> childGroupNames, String parentGroupName) throws com.atlassian.crowd.exception.GroupNotFoundException - Specified by:
addAllGroupsToGroupin interfacecom.atlassian.crowd.embedded.spi.MembershipDao- Throws:
com.atlassian.crowd.exception.GroupNotFoundException
-
removeUserFromGroup
public void removeUserFromGroup(long directoryId, String user, String group) throws com.atlassian.crowd.exception.UserNotFoundException, com.atlassian.crowd.exception.GroupNotFoundException, com.atlassian.crowd.exception.MembershipNotFoundException - Specified by:
removeUserFromGroupin interfacecom.atlassian.crowd.embedded.spi.MembershipDao- Throws:
com.atlassian.crowd.exception.UserNotFoundExceptioncom.atlassian.crowd.exception.GroupNotFoundExceptioncom.atlassian.crowd.exception.MembershipNotFoundException
-
removeUsersFromGroup
public com.atlassian.crowd.util.BatchResult<String> removeUsersFromGroup(long directoryId, Collection<String> userNames, String group) throws com.atlassian.crowd.exception.GroupNotFoundException - Specified by:
removeUsersFromGroupin interfacecom.atlassian.crowd.embedded.spi.MembershipDao- Throws:
com.atlassian.crowd.exception.GroupNotFoundException
-
removeGroupFromGroup
public void removeGroupFromGroup(long directoryId, String child, String parent) throws com.atlassian.crowd.exception.GroupNotFoundException, com.atlassian.crowd.exception.MembershipNotFoundException - Specified by:
removeGroupFromGroupin interfacecom.atlassian.crowd.embedded.spi.MembershipDao- Throws:
com.atlassian.crowd.exception.GroupNotFoundExceptioncom.atlassian.crowd.exception.MembershipNotFoundException
-
removeGroupsFromGroup
public com.atlassian.crowd.util.BatchResult<String> removeGroupsFromGroup(long directoryId, Collection<String> childGroupNames, String parentGroupName) throws com.atlassian.crowd.exception.GroupNotFoundException - Specified by:
removeGroupsFromGroupin interfacecom.atlassian.crowd.embedded.spi.MembershipDao- Throws:
com.atlassian.crowd.exception.GroupNotFoundException
-
search
public <T> List<T> search(long directoryId, com.atlassian.crowd.search.query.membership.MembershipQuery<T> query) - Specified by:
searchin interfacecom.atlassian.crowd.embedded.spi.MembershipDao
-
searchGroupedByName
public <T> Map<String,List<T>> searchGroupedByName(long directoryId, com.atlassian.crowd.search.query.membership.MembershipQuery<T> query) - Specified by:
searchGroupedByNamein interfacecom.atlassian.crowd.embedded.spi.MembershipDao
-
countDirectMembersOfGroup
public com.atlassian.crowd.util.BoundedCount countDirectMembersOfGroup(long directoryId, String groupName, int potentialMaxCount) - Specified by:
countDirectMembersOfGroupin interfacecom.atlassian.crowd.embedded.spi.MembershipDao
-
addUserToGroups
public com.atlassian.crowd.util.BatchResult<String> addUserToGroups(long directoryId, String username, Set<String> groupNames) throws com.atlassian.crowd.exception.UserNotFoundException - Specified by:
addUserToGroupsin interfacecom.atlassian.crowd.embedded.spi.MembershipDao- Throws:
com.atlassian.crowd.exception.UserNotFoundException
-