public class DirectoryCacheImplUsingChangeOperations extends Object implements DirectoryCache
Constructor and Description |
---|
DirectoryCacheImplUsingChangeOperations(com.atlassian.crowd.directory.DirectoryCacheChangeOperations dc) |
Modifier and Type | Method and Description |
---|---|
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) |
public DirectoryCacheImplUsingChangeOperations(com.atlassian.crowd.directory.DirectoryCacheChangeOperations dc)
public void addOrUpdateCachedUsers(List<? extends User> remoteUsers, Date syncStartDate) throws OperationFailedException
DirectoryCache
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.
addOrUpdateCachedUsers
in interface DirectoryCache
remoteUsers
- A list of Users from the external directory.syncStartDate
- The date that the synchronise started (can be null).OperationFailedException
- If the Internal Directory throws a OperationFailedException - which seems unlikely.public void deleteCachedUsers(Set<String> usernames) throws OperationFailedException
deleteCachedUsers
in interface DirectoryCache
OperationFailedException
public void addOrUpdateCachedGroups(List<? extends Group> remoteGroups, Date syncStartDate) throws OperationFailedException
addOrUpdateCachedGroups
in interface DirectoryCache
OperationFailedException
public void deleteCachedGroupsNotIn(GroupType groupType, List<? extends Group> remoteGroups, Date syncStartDate) throws OperationFailedException
deleteCachedGroupsNotIn
in interface DirectoryCache
OperationFailedException
public void syncUserMembersForGroup(Group group, Collection<String> remoteUsers) throws OperationFailedException
syncUserMembersForGroup
in interface DirectoryCache
OperationFailedException
public void syncGroupMembersForGroup(Group parentGroup, Collection<String> remoteGroups) throws OperationFailedException
syncGroupMembersForGroup
in interface DirectoryCache
OperationFailedException
public void deleteCachedGroups(Set<String> groupnames) throws OperationFailedException
deleteCachedGroups
in interface DirectoryCache
OperationFailedException
public void deleteCachedUsersNotIn(List<? extends User> users, Date syncStartDate) throws OperationFailedException
deleteCachedUsersNotIn
in interface DirectoryCache
OperationFailedException
public void addOrUpdateCachedUser(User user) throws OperationFailedException
addOrUpdateCachedUser
in interface DirectoryCache
OperationFailedException
public void deleteCachedUser(String username) throws OperationFailedException
deleteCachedUser
in interface DirectoryCache
OperationFailedException
public void addOrUpdateCachedGroup(Group group) throws OperationFailedException
addOrUpdateCachedGroup
in interface DirectoryCache
OperationFailedException
public void deleteCachedGroup(String groupName) throws OperationFailedException
deleteCachedGroup
in interface DirectoryCache
OperationFailedException
public void addUserToGroup(String username, String groupName) throws OperationFailedException
addUserToGroup
in interface DirectoryCache
OperationFailedException
public void removeUserFromGroup(String username, String groupName) throws OperationFailedException
removeUserFromGroup
in interface DirectoryCache
OperationFailedException
public void addGroupToGroup(String childGroup, String parentGroup) throws OperationFailedException
addGroupToGroup
in interface DirectoryCache
OperationFailedException
public void removeGroupFromGroup(String childGroup, String parentGroup) throws OperationFailedException
removeGroupFromGroup
in interface DirectoryCache
OperationFailedException
public void syncGroupMembershipsForUser(String childUsername, Set<String> parentGroupNames) throws OperationFailedException
syncGroupMembershipsForUser
in interface DirectoryCache
OperationFailedException
public void syncGroupMembershipsAndMembersForGroup(String groupName, Set<String> parentGroupNames, Set<String> childGroupNames) throws OperationFailedException
syncGroupMembershipsAndMembersForGroup
in interface DirectoryCache
OperationFailedException
Copyright © 2013 Atlassian. All Rights Reserved.