public interface DirectoryCache
CacheRefresher passes the updated data to this interface for caching.UsnChangedCacheRefresher| Modifier and Type | Method and Description |
|---|---|
void |
addGroupToGroup(String childGroup,
String parentGroup) |
void |
addOrUpdateCachedGroup(Group group) |
void |
addOrUpdateCachedGroups(List<? extends Group> groups,
Date syncStartDate) |
void |
addOrUpdateCachedUser(User user) |
void |
addOrUpdateCachedUsers(List<? extends User> users,
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 |
deleteCachedGroupsByGuids(Set<String> guids) |
void |
deleteCachedGroupsNotIn(GroupType groupType,
List<? extends Group> ldapGroups,
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 ldapGroup,
Collection<String> groups) |
void |
syncGroupMembershipsAndMembersForGroup(String groupName,
Set<String> parentGroupNames,
Set<String> childGroupNames) |
void |
syncGroupMembershipsForUser(String childUsername,
Set<String> parentGroupNames) |
void |
syncUserMembersForGroup(Group ldapGroup,
Collection<String> remoteUsers) |
void addOrUpdateCachedUsers(List<? extends User> users, Date syncStartDate) throws OperationFailedException
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.
users - 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.void deleteCachedUsersNotIn(List<? extends User> users, Date syncStartDate) throws OperationFailedException
OperationFailedExceptionvoid deleteCachedUsersByGuid(Set<String> guids) throws OperationFailedException
OperationFailedExceptionvoid addOrUpdateCachedGroups(List<? extends Group> groups, Date syncStartDate) throws OperationFailedException
OperationFailedExceptionvoid deleteCachedGroupsNotIn(GroupType groupType, List<? extends Group> ldapGroups, Date syncStartDate) throws OperationFailedException
OperationFailedExceptionvoid deleteCachedGroups(Set<String> groupnames) throws OperationFailedException
OperationFailedExceptionvoid deleteCachedGroupsByGuids(Set<String> guids) throws OperationFailedException
OperationFailedExceptionvoid syncUserMembersForGroup(Group ldapGroup, Collection<String> remoteUsers) throws OperationFailedException
OperationFailedExceptionvoid syncGroupMembersForGroup(Group ldapGroup, Collection<String> groups) throws OperationFailedException
OperationFailedExceptionvoid addOrUpdateCachedUser(User user) throws OperationFailedException
OperationFailedExceptionvoid deleteCachedUser(String username) throws OperationFailedException
OperationFailedExceptionvoid addOrUpdateCachedGroup(Group group) throws OperationFailedException
OperationFailedExceptionvoid deleteCachedGroup(String groupName) throws OperationFailedException
OperationFailedExceptionvoid addUserToGroup(String username, String groupName) throws OperationFailedException
OperationFailedExceptionvoid removeUserFromGroup(String username, String groupName) throws OperationFailedException
OperationFailedExceptionvoid addGroupToGroup(String childGroup, String parentGroup) throws OperationFailedException
OperationFailedExceptionvoid removeGroupFromGroup(String childGroup, String parentGroup) throws OperationFailedException
OperationFailedExceptionvoid syncGroupMembershipsForUser(String childUsername, Set<String> parentGroupNames) throws OperationFailedException
OperationFailedExceptionvoid syncGroupMembershipsAndMembersForGroup(String groupName, Set<String> parentGroupNames, Set<String> childGroupNames) throws OperationFailedException
OperationFailedExceptionSet<String> getAllUserGuids() throws OperationFailedException
OperationFailedException - if the internal directory throes a OperationFailedExceptionlong getUserCount()
throws OperationFailedException
OperationFailedExceptionUserWithAttributes findUserWithAttributesByName(String name) throws UserNotFoundException, OperationFailedException
GroupWithAttributes findGroupWithAttributesByName(String name) throws GroupNotFoundException, OperationFailedException
void applySyncingUserAttributes(String userName, Set<String> deletedAttributes, Map<String,Set<String>> storedAttributes) throws UserNotFoundException, OperationFailedException
userName - 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)UserNotFoundExceptionOperationFailedExceptionvoid applySyncingGroupAttributes(String groupName, Set<String> deletedAttributes, Map<String,Set<String>> storedAttributes) throws GroupNotFoundException, OperationFailedException
groupName - 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.