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 classstatic enumstatic class -
Method Summary
Modifier and TypeMethodDescriptionvoidaddGroupMembershipsForGroup(Group parentGroup, Collection<String> toAdd) voidaddGroups(Set<GroupTemplate> allToAdd) voidaddGroupToGroup(String childGroup, String parentGroup) voidaddOrUpdateCachedGroup(Group group) voidaddOrUpdateCachedUser(User user) voidaddUserMembershipsForGroup(Group group, Set<String> toAdd) voidaddUsers(Set<UserTemplateWithCredentialAndAttributes> usersToAdd) voidaddUserToGroup(String username, String groupName) voidapplySyncingGroupAttributes(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 ignoredvoidapplySyncingUserAttributes(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 ignoredvoiddeleteCachedGroup(String groupName) voiddeleteCachedGroups(Set<String> groupnames) voiddeleteCachedGroupsByGuids(Set<String> guids) voiddeleteCachedGroupsNotIn(GroupType groupType, List<? extends Group> ldapGroups, Date syncStartDate) voiddeleteCachedGroupsNotInByExternalId(Collection<? extends Group> remoteGroups, Date syncStartDate) voiddeleteCachedUser(String username) voiddeleteCachedUsersByGuid(Set<String> usernames) voiddeleteCachedUsersNotIn(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) longlonglonggetUsersToAddAndUpdate(Collection<? extends User> remoteUsers, Date syncStartDate) isGroupShadowed(Group group) voidremoveGroupFromGroup(String childGroup, String parentGroup) voidremoveGroupMembershipsForGroup(Group parentGroup, Collection<String> toRemove) voidremoveGroups(Collection<String> keySet) voidremoveUserFromGroup(String username, String groupName) voidremoveUserMembershipsForGroup(Group group, Set<String> toRemove) voidsyncGroupMembershipsAndMembersForGroup(String groupName, Set<String> parentGroupNames, Set<String> childGroupNames) voidsyncGroupMembershipsForUser(String childUsername, Set<String> parentGroupNames) voidupdateGroups(Collection<GroupTemplate> groupsToUpdate) voidupdateUsers(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:
UserNotFoundExceptionOperationFailedException
-
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:
GroupNotFoundExceptionOperationFailedException
-