public interface DirectoryCache
CacheRefresher passes the updated data to this interface for caching.UsnChangedCacheRefresher| Modifier and Type | Method and Description |
|---|---|
void |
addGroupMembersForGroup(Group parentGroup,
Set<String> groups) |
void |
addGroupToGroup(String childGroup,
String parentGroup) |
void |
addOrUpdateCachedGroup(Group group) |
void |
addOrUpdateCachedGroups(Collection<? extends Group> groups,
Date syncStartDate) |
void |
addOrUpdateCachedUser(User user) |
AddUpdateSets<UserTemplateWithCredentialAndAttributes,UserTemplate> |
addOrUpdateCachedUsers(Collection<? extends User> users,
Date syncStartDate)
Synchronises a list of Users from an external directory in the local cache.
|
void |
addUserMembersForGroup(Group parentGroup,
Set<String> remoteUsers) |
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> remoteGroups,
Date syncStartDate) |
void |
deleteCachedGroupsNotInByExternalId(Collection<? extends Group> remoteGroups,
Date syncStartDate) |
void |
deleteCachedUser(String username) |
void |
deleteCachedUsersByGuid(Set<String> guids) |
void |
deleteCachedUsersNotIn(Collection<? extends User> users,
Date syncStartDate) |
void |
deleteGroupMembersForGroup(Group parentGroup,
Set<String> groups) |
void |
deleteUserMembersForGroup(Group parentGroup,
Set<String> remoteUsers) |
Map<String,String> |
findGroupsByExternalIds(Set<String> externalIds)
Searches the specified directory for group names of groups with the specified external ids
|
Map<String,String> |
findGroupsExternalIdsByNames(Set<String> groupNames)
Searches the specified directory for externalIds of groups with the specified names
|
GroupWithAttributes |
findGroupWithAttributesByName(String name) |
Map<String,String> |
findUsersByExternalIds(Set<String> externalIds)
Searches the specified directory for user names of users with the specified external ids, returns
a map from external id to username
|
UserWithAttributes |
findUserWithAttributesByName(String name) |
Set<String> |
getAllGroupGuids()
Returns a set of all group guids present in the cache excluding null values.
|
Set<String> |
getAllLocalGroupNames()
Returns a set of all local group names.
|
Set<String> |
getAllUserGuids()
Returns a set of all user guids present in the cache excluding null values.
|
long |
getExternalCachedGroupCount()
Counts external cached groups in the directory cache
|
long |
getGroupCount()
Counts groups in directory cache.
|
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> groups) |
void |
syncGroupMembershipsAndMembersForGroup(String groupName,
Set<String> parentGroupNames,
Set<String> childGroupNames) |
void |
syncGroupMembershipsForUser(String childUsername,
Set<String> parentGroupNames) |
void |
syncUserMembersForGroup(Group parentGroup,
Collection<String> remoteUsers) |
AddUpdateSets<UserTemplateWithCredentialAndAttributes,UserTemplate> addOrUpdateCachedUsers(Collection<? extends User> users, Date syncStartDate) throws com.atlassian.crowd.exception.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 ldap.cache.UsnChangedCacheRefresher does a partial synchronise.
users - A list of Users from the external directory.syncStartDate - The date that the synchronise started (can be null).com.atlassian.crowd.exception.OperationFailedException - If the Internal Directory throws a OperationFailedException - which seems unlikely.void deleteCachedUsersNotIn(Collection<? extends User> users, Date syncStartDate) throws com.atlassian.crowd.exception.OperationFailedException
void deleteCachedUsersByGuid(Set<String> guids) throws com.atlassian.crowd.exception.OperationFailedException
void addOrUpdateCachedGroups(Collection<? extends Group> groups, Date syncStartDate) throws com.atlassian.crowd.exception.OperationFailedException
void deleteCachedGroupsNotIn(GroupType groupType, List<? extends Group> remoteGroups, Date syncStartDate) throws com.atlassian.crowd.exception.OperationFailedException
void deleteCachedGroupsNotInByExternalId(Collection<? extends Group> remoteGroups, Date syncStartDate) throws com.atlassian.crowd.exception.OperationFailedException
void deleteCachedGroups(Set<String> groupnames) throws com.atlassian.crowd.exception.OperationFailedException
void deleteCachedGroupsByGuids(Set<String> guids) throws com.atlassian.crowd.exception.OperationFailedException
void syncUserMembersForGroup(Group parentGroup, Collection<String> remoteUsers) throws com.atlassian.crowd.exception.OperationFailedException
void addUserMembersForGroup(Group parentGroup, Set<String> remoteUsers) throws com.atlassian.crowd.exception.OperationFailedException
void deleteUserMembersForGroup(Group parentGroup, Set<String> remoteUsers) throws com.atlassian.crowd.exception.OperationFailedException
void syncGroupMembersForGroup(Group parentGroup, Collection<String> groups) throws com.atlassian.crowd.exception.OperationFailedException
void addGroupMembersForGroup(Group parentGroup, Set<String> groups) throws com.atlassian.crowd.exception.OperationFailedException
void deleteGroupMembersForGroup(Group parentGroup, Set<String> groups) throws com.atlassian.crowd.exception.OperationFailedException
void addOrUpdateCachedUser(User user) throws com.atlassian.crowd.exception.OperationFailedException
void deleteCachedUser(String username) throws com.atlassian.crowd.exception.OperationFailedException
void addOrUpdateCachedGroup(Group group) throws com.atlassian.crowd.exception.OperationFailedException
void deleteCachedGroup(String groupName) throws com.atlassian.crowd.exception.OperationFailedException
void addUserToGroup(String username, String groupName) throws com.atlassian.crowd.exception.OperationFailedException
void removeUserFromGroup(String username, String groupName) throws com.atlassian.crowd.exception.OperationFailedException
void addGroupToGroup(String childGroup, String parentGroup) throws com.atlassian.crowd.exception.OperationFailedException
void removeGroupFromGroup(String childGroup, String parentGroup) throws com.atlassian.crowd.exception.OperationFailedException
void syncGroupMembershipsForUser(String childUsername, Set<String> parentGroupNames) throws com.atlassian.crowd.exception.OperationFailedException
void syncGroupMembershipsAndMembersForGroup(String groupName, Set<String> parentGroupNames, Set<String> childGroupNames) throws com.atlassian.crowd.exception.OperationFailedException
Set<String> getAllUserGuids() throws com.atlassian.crowd.exception.OperationFailedException
com.atlassian.crowd.exception.OperationFailedException - if the internal directory throes a OperationFailedExceptionlong getUserCount()
throws com.atlassian.crowd.exception.OperationFailedException
com.atlassian.crowd.exception.OperationFailedExceptionUserWithAttributes findUserWithAttributesByName(String name) throws com.atlassian.crowd.exception.UserNotFoundException, com.atlassian.crowd.exception.OperationFailedException
Map<String,String> findUsersByExternalIds(Set<String> externalIds)
externalIds - the external ids of the users to search forSet<String> getAllGroupGuids() throws com.atlassian.crowd.exception.OperationFailedException
com.atlassian.crowd.exception.OperationFailedException - if the internal directory throes a OperationFailedExceptionSet<String> getAllLocalGroupNames() throws com.atlassian.crowd.exception.OperationFailedException
com.atlassian.crowd.exception.OperationFailedException - if the internal directory throes a OperationFailedExceptionlong getGroupCount()
throws com.atlassian.crowd.exception.OperationFailedException
com.atlassian.crowd.exception.OperationFailedExceptionlong getExternalCachedGroupCount()
throws com.atlassian.crowd.exception.OperationFailedException
com.atlassian.crowd.exception.OperationFailedException - if the internal directory throws a OperationFailedExceptionMap<String,String> findGroupsByExternalIds(Set<String> externalIds) throws com.atlassian.crowd.exception.OperationFailedException
externalIds - external ids of the groups to findcom.atlassian.crowd.exception.OperationFailedExceptionMap<String,String> findGroupsExternalIdsByNames(Set<String> groupNames) throws com.atlassian.crowd.exception.OperationFailedException
groupNames - names of the groups to findcom.atlassian.crowd.exception.OperationFailedExceptionGroupWithAttributes findGroupWithAttributesByName(String name) throws com.atlassian.crowd.exception.GroupNotFoundException, com.atlassian.crowd.exception.OperationFailedException
void applySyncingUserAttributes(String userName, Set<String> deletedAttributes, Map<String,Set<String>> storedAttributes) throws com.atlassian.crowd.exception.UserNotFoundException, com.atlassian.crowd.exception.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)com.atlassian.crowd.exception.UserNotFoundExceptioncom.atlassian.crowd.exception.OperationFailedExceptionvoid applySyncingGroupAttributes(String groupName, Set<String> deletedAttributes, Map<String,Set<String>> storedAttributes) throws com.atlassian.crowd.exception.GroupNotFoundException, com.atlassian.crowd.exception.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)com.atlassian.crowd.exception.GroupNotFoundExceptioncom.atlassian.crowd.exception.OperationFailedExceptionCopyright © 2023 Atlassian. All rights reserved.