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 |
applySyncingGroupAttributes(String groupName,
Set<String> deletedAttributes,
Map<String,Set<String>> storedAttributes)
Removes any syncing group attributes listed in deletedAttributes, and store any that are listed in storedAttributes
If any non-syncing attributes are included, they will be ignored
|
void |
applySyncingUserAttributes(String userName,
Set<String> deletedAttributes,
Map<String,Set<String>> storedAttributes)
Removes any syncing user attributes listed in deletedAttributes, and store any that are listed in storedAttributes
If any non-syncing attributes are included, they will be ignored
|
void |
deleteCachedGroup(String groupName) |
void |
deleteCachedGroups(Set<String> groupnames) |
void |
deleteCachedGroupsNotIn(GroupType groupType,
List<? extends Group> remoteGroups,
Date syncStartDate) |
void |
deleteCachedUser(String username) |
void |
deleteCachedUsersByGuid(Set<String> guids) |
void |
deleteCachedUsersNotIn(List<? extends User> users,
Date syncStartDate) |
GroupWithAttributes |
findGroupWithAttributesByName(String name) |
UserWithAttributes |
findUserWithAttributesByName(String name) |
Set<String> |
getAllUserGuids()
Returns a set of all user guids present in the cache excluding null values.
|
long |
getUserCount()
Counts users in directory cache.
|
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 DirectoryCacheremoteUsers - 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 deleteCachedUsersByGuid(Set<String> guids) throws OperationFailedException
deleteCachedUsersByGuid in interface DirectoryCacheOperationFailedExceptionpublic void addOrUpdateCachedGroups(List<? extends Group> remoteGroups, Date syncStartDate) throws OperationFailedException
addOrUpdateCachedGroups in interface DirectoryCacheOperationFailedExceptionpublic void deleteCachedGroupsNotIn(GroupType groupType, List<? extends Group> remoteGroups, Date syncStartDate) throws OperationFailedException
deleteCachedGroupsNotIn in interface DirectoryCacheOperationFailedExceptionpublic void syncUserMembersForGroup(Group group, Collection<String> remoteUsers) throws OperationFailedException
syncUserMembersForGroup in interface DirectoryCacheOperationFailedExceptionpublic void syncGroupMembersForGroup(Group parentGroup, Collection<String> remoteGroups) throws OperationFailedException
syncGroupMembersForGroup in interface DirectoryCacheOperationFailedExceptionpublic void deleteCachedGroups(Set<String> groupnames) throws OperationFailedException
deleteCachedGroups in interface DirectoryCacheOperationFailedExceptionpublic void deleteCachedUsersNotIn(List<? extends User> users, Date syncStartDate) throws OperationFailedException
deleteCachedUsersNotIn in interface DirectoryCacheOperationFailedExceptionpublic void addOrUpdateCachedUser(User user) throws OperationFailedException
addOrUpdateCachedUser in interface DirectoryCacheOperationFailedExceptionpublic void deleteCachedUser(String username) throws OperationFailedException
deleteCachedUser in interface DirectoryCacheOperationFailedExceptionpublic void addOrUpdateCachedGroup(Group group) throws OperationFailedException
addOrUpdateCachedGroup in interface DirectoryCacheOperationFailedExceptionpublic void deleteCachedGroup(String groupName) throws OperationFailedException
deleteCachedGroup in interface DirectoryCacheOperationFailedExceptionpublic void addUserToGroup(String username, String groupName) throws OperationFailedException
addUserToGroup in interface DirectoryCacheOperationFailedExceptionpublic void removeUserFromGroup(String username, String groupName) throws OperationFailedException
removeUserFromGroup in interface DirectoryCacheOperationFailedExceptionpublic void addGroupToGroup(String childGroup, String parentGroup) throws OperationFailedException
addGroupToGroup in interface DirectoryCacheOperationFailedExceptionpublic void removeGroupFromGroup(String childGroup, String parentGroup) throws OperationFailedException
removeGroupFromGroup in interface DirectoryCacheOperationFailedExceptionpublic void syncGroupMembershipsForUser(String childUsername, Set<String> parentGroupNames) throws OperationFailedException
syncGroupMembershipsForUser in interface DirectoryCacheOperationFailedExceptionpublic void syncGroupMembershipsAndMembersForGroup(String groupName, Set<String> parentGroupNames, Set<String> childGroupNames) throws OperationFailedException
syncGroupMembershipsAndMembersForGroup in interface DirectoryCacheOperationFailedExceptionpublic Set<String> getAllUserGuids() throws OperationFailedException
DirectoryCachegetAllUserGuids in interface DirectoryCacheOperationFailedException - if the internal directory throes a OperationFailedExceptionpublic long getUserCount()
throws OperationFailedException
DirectoryCachegetUserCount in interface DirectoryCacheOperationFailedExceptionpublic UserWithAttributes findUserWithAttributesByName(String name) throws UserNotFoundException, OperationFailedException
findUserWithAttributesByName in interface DirectoryCacheUserNotFoundExceptionOperationFailedExceptionpublic GroupWithAttributes findGroupWithAttributesByName(String name) throws GroupNotFoundException, OperationFailedException
findGroupWithAttributesByName in interface DirectoryCacheGroupNotFoundExceptionOperationFailedExceptionpublic void applySyncingUserAttributes(String userName, Set<String> deletedAttributes, Map<String,Set<String>> storedAttributes) throws UserNotFoundException, OperationFailedException
DirectoryCacheapplySyncingUserAttributes in interface DirectoryCacheuserName - user to apply attributes todeletedAttributes - attribute keys that need to be deletedstoredAttributes - attributes and values that need to be saved (will overwrite any existing attributes with the same keys)UserNotFoundExceptionOperationFailedExceptionpublic void applySyncingGroupAttributes(String groupName, Set<String> deletedAttributes, Map<String,Set<String>> storedAttributes) throws GroupNotFoundException, OperationFailedException
DirectoryCacheapplySyncingGroupAttributes in interface DirectoryCachegroupName - group to apply attributes todeletedAttributes - attribute keys that need to be deletedstoredAttributes - attributes and values that need to be saved (will overwrite any existing attributes with the same keys)GroupNotFoundExceptionOperationFailedExceptionCopyright © 2017 Atlassian. All rights reserved.