com.atlassian.jira.crowd.embedded.ofbiz
Class OfBizInternalMembershipDao

java.lang.Object
  extended by com.atlassian.jira.crowd.embedded.ofbiz.OfBizInternalMembershipDao
All Implemented Interfaces:
InternalMembershipDao

public class OfBizInternalMembershipDao
extends Object
implements InternalMembershipDao


Constructor Summary
OfBizInternalMembershipDao(OfBizDelegator ofBizDelegator, com.atlassian.cache.CacheManager cacheManager)
           
 
Method Summary
 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)
           
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OfBizInternalMembershipDao

public OfBizInternalMembershipDao(OfBizDelegator ofBizDelegator,
                                  com.atlassian.cache.CacheManager cacheManager)
Method Detail

isUserDirectMember

public boolean isUserDirectMember(long directoryId,
                                  String userName,
                                  String groupName)
Specified by:
isUserDirectMember in interface InternalMembershipDao

isGroupDirectMember

public boolean isGroupDirectMember(long directoryId,
                                   String childGroup,
                                   String parentGroup)
Specified by:
isGroupDirectMember in interface InternalMembershipDao

addUserToGroup

public void addUserToGroup(long directoryId,
                           UserOrGroupStub user,
                           UserOrGroupStub group)
                    throws com.atlassian.crowd.exception.MembershipAlreadyExistsException
Specified by:
addUserToGroup in interface InternalMembershipDao
Throws:
com.atlassian.crowd.exception.MembershipAlreadyExistsException

addAllUsersToGroup

public com.atlassian.crowd.util.BatchResult<String> addAllUsersToGroup(long directoryId,
                                                                       Collection<UserOrGroupStub> users,
                                                                       UserOrGroupStub group)
Specified by:
addAllUsersToGroup in interface InternalMembershipDao

addGroupToGroup

public void addGroupToGroup(long directoryId,
                            UserOrGroupStub child,
                            UserOrGroupStub parent)
Specified by:
addGroupToGroup in interface InternalMembershipDao

removeUserFromGroup

public void removeUserFromGroup(long directoryId,
                                UserOrGroupStub user,
                                UserOrGroupStub group)
                         throws com.atlassian.crowd.exception.MembershipNotFoundException
Specified by:
removeUserFromGroup in interface InternalMembershipDao
Throws:
com.atlassian.crowd.exception.MembershipNotFoundException

removeGroupFromGroup

public void removeGroupFromGroup(long directoryId,
                                 UserOrGroupStub childGroup,
                                 UserOrGroupStub parentGroup)
                          throws com.atlassian.crowd.exception.MembershipNotFoundException
Specified by:
removeGroupFromGroup in interface InternalMembershipDao
Throws:
com.atlassian.crowd.exception.MembershipNotFoundException

removeAllMembersFromGroup

public void removeAllMembersFromGroup(com.atlassian.crowd.model.group.Group group)
Specified by:
removeAllMembersFromGroup in interface InternalMembershipDao

removeAllGroupMemberships

public void removeAllGroupMemberships(com.atlassian.crowd.model.group.Group group)
Specified by:
removeAllGroupMemberships in interface InternalMembershipDao

removeAllUserMemberships

public void removeAllUserMemberships(com.atlassian.crowd.model.user.User user)
Specified by:
removeAllUserMemberships in interface InternalMembershipDao

removeAllUserMemberships

public void removeAllUserMemberships(long directoryId,
                                     String username)
Specified by:
removeAllUserMemberships in interface InternalMembershipDao

search

public <T> List<String> search(long directoryId,
                               com.atlassian.crowd.search.query.membership.MembershipQuery<T> query)
Specified by:
search in interface InternalMembershipDao

flushCache

public void flushCache()
Invoked by OfBizCacheFlushingManager to ensure caches are being flushed in the right order on XMLRestoreFinishedEvent

Specified by:
flushCache in interface InternalMembershipDao


Copyright © 2002-2014 Atlassian. All Rights Reserved.