com.atlassian.crowd.directory
Class DirectoryCacheImplUsingChangeOperations

java.lang.Object
  extended by com.atlassian.crowd.directory.DirectoryCacheImplUsingChangeOperations
All Implemented Interfaces:
DirectoryCache

public class DirectoryCacheImplUsingChangeOperations
extends Object
implements DirectoryCache


Constructor Summary
DirectoryCacheImplUsingChangeOperations(com.atlassian.crowd.directory.DirectoryCacheChangeOperations dc)
           
 
Method Summary
 void addGroupToGroup(String childGroup, String parentGroup)
           
 void addOrUpdateCachedGroup(Group group)
           
 void addOrUpdateCachedGroups(List<? extends Group> remoteGroups, Date syncStartDate)
           
 void addOrUpdateCachedUser(User user)
           
 void addOrUpdateCachedUsers(List<? extends User> remoteUsers, Date syncStartDate)
          Synchronises a list of Users from an external directory in the local cache.
 void addUserToGroup(String username, String groupName)
           
 void deleteCachedGroup(String groupName)
           
 void deleteCachedGroups(Set<String> groupnames)
           
 void deleteCachedGroupsNotIn(GroupType groupType, List<? extends Group> remoteGroups, Date syncStartDate)
           
 void deleteCachedUser(String username)
           
 void deleteCachedUsers(Set<String> usernames)
           
 void deleteCachedUsersNotIn(List<? extends User> users, Date syncStartDate)
           
 void removeGroupFromGroup(String childGroup, String parentGroup)
           
 void removeUserFromGroup(String username, String groupName)
           
 void syncGroupMembersForGroup(Group parentGroup, Collection<String> remoteGroups)
           
 void syncGroupMembershipsAndMembersForGroup(String groupName, Set<String> parentGroupNames, Set<String> childGroupNames)
           
 void syncGroupMembershipsForUser(String childUsername, Set<String> parentGroupNames)
           
 void syncUserMembersForGroup(Group group, Collection<String> remoteUsers)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryCacheImplUsingChangeOperations

public DirectoryCacheImplUsingChangeOperations(com.atlassian.crowd.directory.DirectoryCacheChangeOperations dc)
Method Detail

addOrUpdateCachedUsers

public void addOrUpdateCachedUsers(List<? extends User> remoteUsers,
                                   Date syncStartDate)
                            throws OperationFailedException
Description copied from interface: DirectoryCache
Synchronises a list of Users from an external directory in the local cache.

If the syncStartDate is not null, then it is used to ensure we don't re-introduce stale data if a User is updated locally after we did our search. Some callers may intentionally choose to pass null - eg when UsnChangedCacheRefresher does a partial synchronise.

Specified by:
addOrUpdateCachedUsers in interface DirectoryCache
Parameters:
remoteUsers - A list of Users from the external directory.
syncStartDate - The date that the synchronise started (can be null).
Throws:
OperationFailedException - If the Internal Directory throws a OperationFailedException - which seems unlikely.

deleteCachedUsers

public void deleteCachedUsers(Set<String> usernames)
                       throws OperationFailedException
Specified by:
deleteCachedUsers in interface DirectoryCache
Throws:
OperationFailedException

addOrUpdateCachedGroups

public void addOrUpdateCachedGroups(List<? extends Group> remoteGroups,
                                    Date syncStartDate)
                             throws OperationFailedException
Specified by:
addOrUpdateCachedGroups in interface DirectoryCache
Throws:
OperationFailedException

deleteCachedGroupsNotIn

public void deleteCachedGroupsNotIn(GroupType groupType,
                                    List<? extends Group> remoteGroups,
                                    Date syncStartDate)
                             throws OperationFailedException
Specified by:
deleteCachedGroupsNotIn in interface DirectoryCache
Throws:
OperationFailedException

syncUserMembersForGroup

public void syncUserMembersForGroup(Group group,
                                    Collection<String> remoteUsers)
                             throws OperationFailedException
Specified by:
syncUserMembersForGroup in interface DirectoryCache
Throws:
OperationFailedException

syncGroupMembersForGroup

public void syncGroupMembersForGroup(Group parentGroup,
                                     Collection<String> remoteGroups)
                              throws OperationFailedException
Specified by:
syncGroupMembersForGroup in interface DirectoryCache
Throws:
OperationFailedException

deleteCachedGroups

public void deleteCachedGroups(Set<String> groupnames)
                        throws OperationFailedException
Specified by:
deleteCachedGroups in interface DirectoryCache
Throws:
OperationFailedException

deleteCachedUsersNotIn

public void deleteCachedUsersNotIn(List<? extends User> users,
                                   Date syncStartDate)
                            throws OperationFailedException
Specified by:
deleteCachedUsersNotIn in interface DirectoryCache
Throws:
OperationFailedException

addOrUpdateCachedUser

public void addOrUpdateCachedUser(User user)
                           throws OperationFailedException
Specified by:
addOrUpdateCachedUser in interface DirectoryCache
Throws:
OperationFailedException

deleteCachedUser

public void deleteCachedUser(String username)
                      throws OperationFailedException
Specified by:
deleteCachedUser in interface DirectoryCache
Throws:
OperationFailedException

addOrUpdateCachedGroup

public void addOrUpdateCachedGroup(Group group)
                            throws OperationFailedException
Specified by:
addOrUpdateCachedGroup in interface DirectoryCache
Throws:
OperationFailedException

deleteCachedGroup

public void deleteCachedGroup(String groupName)
                       throws OperationFailedException
Specified by:
deleteCachedGroup in interface DirectoryCache
Throws:
OperationFailedException

addUserToGroup

public void addUserToGroup(String username,
                           String groupName)
                    throws OperationFailedException
Specified by:
addUserToGroup in interface DirectoryCache
Throws:
OperationFailedException

removeUserFromGroup

public void removeUserFromGroup(String username,
                                String groupName)
                         throws OperationFailedException
Specified by:
removeUserFromGroup in interface DirectoryCache
Throws:
OperationFailedException

addGroupToGroup

public void addGroupToGroup(String childGroup,
                            String parentGroup)
                     throws OperationFailedException
Specified by:
addGroupToGroup in interface DirectoryCache
Throws:
OperationFailedException

removeGroupFromGroup

public void removeGroupFromGroup(String childGroup,
                                 String parentGroup)
                          throws OperationFailedException
Specified by:
removeGroupFromGroup in interface DirectoryCache
Throws:
OperationFailedException

syncGroupMembershipsForUser

public void syncGroupMembershipsForUser(String childUsername,
                                        Set<String> parentGroupNames)
                                 throws OperationFailedException
Specified by:
syncGroupMembershipsForUser in interface DirectoryCache
Throws:
OperationFailedException

syncGroupMembershipsAndMembersForGroup

public void syncGroupMembershipsAndMembersForGroup(String groupName,
                                                   Set<String> parentGroupNames,
                                                   Set<String> childGroupNames)
                                            throws OperationFailedException
Specified by:
syncGroupMembershipsAndMembersForGroup in interface DirectoryCache
Throws:
OperationFailedException


Copyright © 2013 Atlassian. All Rights Reserved.