com.atlassian.crowd.directory.ldap.cache
Interface DirectoryCache

All Known Implementing Classes:
DbCachingRemoteDirectoryCache

public interface DirectoryCache

A cache of users, groups and memberships for an external Directory. The CacheRefresher passes the updated data to this interface for caching.

See Also:
UsnChangedCacheRefresher

Method Summary
 void addOrUpdateCachedGroups(java.util.List<? extends Group> groups, java.util.Date syncStartDate)
           
 void addOrUpdateCachedUsers(java.util.List<? extends User> users, java.util.Date syncStartDate)
          Synchronises a list of Users from an external directory in the local cache.
 void deleteCachedGroups(java.util.Set<java.lang.String> groupnames)
           
 void deleteCachedGroupsNotIn(GroupType groupType, java.util.List<? extends Group> ldapGroups, java.util.Date syncStartDate)
           
 void deleteCachedUsers(java.util.Set<java.lang.String> usernames)
           
 void deleteCachedUsersNotIn(java.util.List<? extends User> users, java.util.Date syncStartDate)
           
 void syncGroupMembershipsForGroup(Group ldapGroup, java.util.List<java.lang.String> groups)
           
 void syncUserMembershipsForGroup(Group ldapGroup, java.util.List<java.lang.String> remoteUsers)
           
 

Method Detail

addOrUpdateCachedUsers

void addOrUpdateCachedUsers(java.util.List<? extends User> users,
                            java.util.Date syncStartDate)
                            throws OperationFailedException
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.

Parameters:
users - 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.

deleteCachedUsersNotIn

void deleteCachedUsersNotIn(java.util.List<? extends User> users,
                            java.util.Date syncStartDate)
                            throws OperationFailedException
Throws:
OperationFailedException

deleteCachedUsers

void deleteCachedUsers(java.util.Set<java.lang.String> usernames)
                       throws OperationFailedException
Throws:
OperationFailedException

addOrUpdateCachedGroups

void addOrUpdateCachedGroups(java.util.List<? extends Group> groups,
                             java.util.Date syncStartDate)
                             throws OperationFailedException
Throws:
OperationFailedException

deleteCachedGroupsNotIn

void deleteCachedGroupsNotIn(GroupType groupType,
                             java.util.List<? extends Group> ldapGroups,
                             java.util.Date syncStartDate)
                             throws OperationFailedException
Throws:
OperationFailedException

deleteCachedGroups

void deleteCachedGroups(java.util.Set<java.lang.String> groupnames)
                        throws OperationFailedException
Throws:
OperationFailedException

syncUserMembershipsForGroup

void syncUserMembershipsForGroup(Group ldapGroup,
                                 java.util.List<java.lang.String> remoteUsers)
                                 throws OperationFailedException
Throws:
OperationFailedException

syncGroupMembershipsForGroup

void syncGroupMembershipsForGroup(Group ldapGroup,
                                  java.util.List<java.lang.String> groups)
                                  throws OperationFailedException
Throws:
OperationFailedException


Copyright © 2010 Atlassian. All Rights Reserved.