Package com.atlassian.crowd.directory
Interface DirectoryCacheChangeOperations
- All Known Implementing Classes:
DbCachingRemoteChangeOperations
public interface DirectoryCacheChangeOperations
Individual methods that should be performed in transactions. No transactional integrity is
presumed or required between methods.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
static enum
static class
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addGroupMembershipsForGroup
(Group parentGroup, Collection<String> toAdd) void
addGroups
(Set<GroupTemplate> allToAdd) void
addGroupToGroup
(String childGroup, String parentGroup) void
addOrUpdateCachedGroup
(Group group) void
addOrUpdateCachedUser
(User user) void
addUserMembershipsForGroup
(Group group, Set<String> toAdd) void
addUsers
(Set<UserTemplateWithCredentialAndAttributes> usersToAdd) 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 ignoredvoid
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 ignoredvoid
deleteCachedGroup
(String groupName) void
deleteCachedGroups
(Set<String> groupnames) void
deleteCachedGroupsByGuids
(Set<String> guids) void
deleteCachedGroupsNotIn
(GroupType groupType, List<? extends Group> ldapGroups, Date syncStartDate) void
deleteCachedGroupsNotInByExternalId
(Collection<? extends Group> remoteGroups, Date syncStartDate) void
deleteCachedUser
(String username) void
deleteCachedUsersByGuid
(Set<String> usernames) void
deleteCachedUsersNotIn
(Collection<? extends User> users, Date syncStartDate) findGroupMembershipForGroupChanges
(Group parentGroup, Collection<String> remoteGroups) findGroupsByExternalIds
(Set<String> externalIds) Searches the specified directory for group names of groups with the specified external idsfindGroupsExternalIdsByNames
(Set<String> groupNames) Searches the specified directory for externalIds of groups with the specified namesfindGroupsToUpdate
(Collection<? extends Group> remoteGroups, Date syncStartDate) findUserMembershipForGroupChanges
(Group group, Collection<String> remoteUsers) findUsersByExternalIds
(Set<String> externalIds) long
long
long
getUsersToAddAndUpdate
(Collection<? extends User> remoteUsers, Date syncStartDate) isGroupShadowed
(Group group) void
removeGroupFromGroup
(String childGroup, String parentGroup) void
removeGroupMembershipsForGroup
(Group parentGroup, Collection<String> toRemove) void
removeGroups
(Collection<String> keySet) void
removeUserFromGroup
(String username, String groupName) void
removeUserMembershipsForGroup
(Group group, Set<String> toRemove) void
syncGroupMembershipsAndMembersForGroup
(String groupName, Set<String> parentGroupNames, Set<String> childGroupNames) void
syncGroupMembershipsForUser
(String childUsername, Set<String> parentGroupNames) void
updateGroups
(Collection<GroupTemplate> groupsToUpdate) void
updateUsers
(Collection<UserTemplate> usersToUpdate)
-
Method Details
-
deleteCachedUsersNotIn
void deleteCachedUsersNotIn(Collection<? extends User> users, Date syncStartDate) throws OperationFailedException - Throws:
OperationFailedException
-
deleteCachedUsersByGuid
- Throws:
OperationFailedException
-
deleteCachedGroupsNotIn
void deleteCachedGroupsNotIn(GroupType groupType, List<? extends Group> ldapGroups, Date syncStartDate) throws OperationFailedException - Throws:
OperationFailedException
-
deleteCachedGroupsNotInByExternalId
void deleteCachedGroupsNotInByExternalId(Collection<? extends Group> remoteGroups, Date syncStartDate) throws OperationFailedException - Throws:
OperationFailedException
-
deleteCachedGroups
- Throws:
OperationFailedException
-
deleteCachedGroupsByGuids
- Throws:
OperationFailedException
-
getUsersToAddAndUpdate
AddUpdateSets<UserTemplateWithCredentialAndAttributes,UserTemplate> getUsersToAddAndUpdate(Collection<? extends User> remoteUsers, Date syncStartDate) throws OperationFailedException - Throws:
OperationFailedException
-
addUsers
void addUsers(Set<UserTemplateWithCredentialAndAttributes> usersToAdd) throws OperationFailedException - Throws:
OperationFailedException
-
updateUsers
- Throws:
OperationFailedException
-
findGroupsToUpdate
DirectoryCacheChangeOperations.GroupsToAddUpdateReplace findGroupsToUpdate(Collection<? extends Group> remoteGroups, Date syncStartDate) throws OperationFailedException - Throws:
OperationFailedException
-
removeGroups
- Throws:
OperationFailedException
-
addGroups
- Throws:
OperationFailedException
-
updateGroups
- Throws:
OperationFailedException
-
isGroupShadowed
DirectoryCacheChangeOperations.GroupShadowingType isGroupShadowed(Group group) throws OperationFailedException - Throws:
OperationFailedException
-
findUserMembershipForGroupChanges
DirectoryCacheChangeOperations.AddRemoveSets<String> findUserMembershipForGroupChanges(Group group, Collection<String> remoteUsers) throws OperationFailedException - Throws:
OperationFailedException
-
addUserMembershipsForGroup
- Throws:
OperationFailedException
-
removeUserMembershipsForGroup
void removeUserMembershipsForGroup(Group group, Set<String> toRemove) throws OperationFailedException - Throws:
OperationFailedException
-
findGroupMembershipForGroupChanges
DirectoryCacheChangeOperations.AddRemoveSets<String> findGroupMembershipForGroupChanges(Group parentGroup, Collection<String> remoteGroups) throws OperationFailedException - Throws:
OperationFailedException
-
addGroupMembershipsForGroup
void addGroupMembershipsForGroup(Group parentGroup, Collection<String> toAdd) throws OperationFailedException - Throws:
OperationFailedException
-
removeGroupMembershipsForGroup
void removeGroupMembershipsForGroup(Group parentGroup, Collection<String> toRemove) throws OperationFailedException - Throws:
OperationFailedException
-
getAllUserGuids
- Throws:
OperationFailedException
-
getUserCount
- Throws:
OperationFailedException
-
getAllGroupGuids
- Throws:
OperationFailedException
-
getGroupCount
- Throws:
OperationFailedException
-
getExternalCachedGroupCount
- Throws:
OperationFailedException
-
getAllLocalGroupNames
- Throws:
OperationFailedException
-
addOrUpdateCachedUser
- Throws:
OperationFailedException
-
deleteCachedUser
- Throws:
OperationFailedException
-
addOrUpdateCachedGroup
- Throws:
OperationFailedException
-
deleteCachedGroup
- Throws:
OperationFailedException
-
addUserToGroup
- Throws:
OperationFailedException
-
removeUserFromGroup
- Throws:
OperationFailedException
-
addGroupToGroup
- Throws:
OperationFailedException
-
removeGroupFromGroup
- Throws:
OperationFailedException
-
syncGroupMembershipsForUser
void syncGroupMembershipsForUser(String childUsername, Set<String> parentGroupNames) throws OperationFailedException - Throws:
OperationFailedException
-
syncGroupMembershipsAndMembersForGroup
void syncGroupMembershipsAndMembersForGroup(String groupName, Set<String> parentGroupNames, Set<String> childGroupNames) throws OperationFailedException - Throws:
OperationFailedException
-
findUserWithAttributesByName
UserWithAttributes findUserWithAttributesByName(String name) throws UserNotFoundException, OperationFailedException -
findGroupWithAttributesByName
GroupWithAttributes findGroupWithAttributesByName(String name) throws GroupNotFoundException, OperationFailedException -
findUsersByExternalIds
-
findGroupsByExternalIds
Searches the specified directory for group names of groups with the specified external ids- Parameters:
externalIds
- external ids of the groups to find- Returns:
- a map from external ids to group names
- Throws:
OperationFailedException
-
findGroupsExternalIdsByNames
Map<String,String> findGroupsExternalIdsByNames(Set<String> groupNames) throws OperationFailedException Searches the specified directory for externalIds of groups with the specified names- Parameters:
groupNames
- names of the groups to find- Returns:
- a map from group names to external ids
- Throws:
OperationFailedException
-
applySyncingUserAttributes
void applySyncingUserAttributes(String userName, Set<String> deletedAttributes, Map<String, Set<String>> storedAttributes) throws UserNotFoundException, OperationFailedExceptionRemoves 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- Parameters:
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)- Throws:
UserNotFoundException
OperationFailedException
-
applySyncingGroupAttributes
void applySyncingGroupAttributes(String groupName, Set<String> deletedAttributes, Map<String, Set<String>> storedAttributes) throws GroupNotFoundException, OperationFailedExceptionRemoves 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- Parameters:
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)- Throws:
GroupNotFoundException
OperationFailedException
-