public class DbCachingRemoteChangeOperations extends Object
Modifier and Type | Class and Description |
---|---|
static class |
DirectoryCacheChangeOperations.AddRemoveSets<T> |
static class |
DirectoryCacheChangeOperations.AddUpdateSets<A,U> |
static class |
DirectoryCacheChangeOperations.GroupsToAddUpdateReplace |
Constructor and Description |
---|
DbCachingRemoteChangeOperations(DirectoryDao directoryDao,
RemoteDirectory remoteDirectory,
InternalRemoteDirectory internalDirectory,
SynchronisationStatusManager synchronisationStatusManager,
com.atlassian.event.api.EventPublisher eventPublisher) |
public DbCachingRemoteChangeOperations(DirectoryDao directoryDao, RemoteDirectory remoteDirectory, InternalRemoteDirectory internalDirectory, SynchronisationStatusManager synchronisationStatusManager, com.atlassian.event.api.EventPublisher eventPublisher)
public void addUsers(Set<UserTemplateWithCredentialAndAttributes> usersToAdd) throws OperationFailedException
OperationFailedException
public void updateUsers(Set<UserTemplate> usersToUpdate) throws OperationFailedException
OperationFailedException
public void deleteCachedUsers(Set<String> usernames) throws OperationFailedException
OperationFailedException
public void deleteCachedUsersNotIn(List<? extends User> remoteUsers, Date synchStartDate) throws OperationFailedException
OperationFailedException
public DirectoryCacheChangeOperations.GroupsToAddUpdateReplace findGroupsToUpdate(Collection<? extends Group> remoteGroups, Date syncStartDate) throws OperationFailedException
OperationFailedException
public void removeGroups(Collection<String> groupsToRemove) throws OperationFailedException
OperationFailedException
public void addGroups(Set<GroupTemplate> groupsToAdd) throws OperationFailedException
OperationFailedException
public void updateGroups(Collection<GroupTemplate> groupsToUpdate) throws OperationFailedException
OperationFailedException
public void deleteCachedGroupsNotIn(GroupType groupType, List<? extends Group> remoteGroups, Date syncStartDate) throws OperationFailedException
OperationFailedException
public void deleteCachedGroups(Set<String> groupnames) throws OperationFailedException
OperationFailedException
public DirectoryCacheChangeOperations.AddRemoveSets<String> findUserMembershipForGroupChanges(Group group, Collection<String> remoteUsers) throws OperationFailedException
OperationFailedException
public void removeUserMembershipsForGroup(Group group, Set<String> usersToRemove) throws OperationFailedException
OperationFailedException
public void addUserMembershipsForGroup(Group group, Set<String> usersToAdd) throws OperationFailedException
OperationFailedException
public DirectoryCacheChangeOperations.AddRemoveSets<String> findGroupMembershipForGroupChanges(Group parentGroup, Collection<String> remoteGroups) throws OperationFailedException
OperationFailedException
public void addGroupMembershipsForGroup(Group parentGroup, Collection<String> groupsToAdd) throws OperationFailedException
OperationFailedException
public void removeGroupMembershipsForGroup(Group parentGroup, Collection<String> groupsToRemove) throws OperationFailedException
OperationFailedException
public boolean ignoreGroupOnSynchroniseMemberships(Group remoteGroup) throws OperationFailedException
remoteGroup
- The Group to test.OperationFailedException
- If there is an error trying to find the group in the Internal Directory (should not occur).public DirectoryCacheChangeOperations.AddUpdateSets<UserTemplateWithCredentialAndAttributes,UserTemplate> getUsersToAddAndUpdate(Collection<? extends User> remoteUsers, Date syncStartDate) throws OperationFailedException
remoteUsers
- List of all remote users.syncStartDate
- Date and time of the start of the synchronisation. Used to determine which users need to be
synchronised. Can be null in which case all the users are synchronised.OperationFailedException
- if the operation failed for any reasonpublic void addOrUpdateCachedUser(User user) throws OperationFailedException
OperationFailedException
public void deleteCachedUser(String username) throws OperationFailedException
OperationFailedException
public void addOrUpdateCachedGroup(Group group) throws OperationFailedException
OperationFailedException
public void deleteCachedGroup(String groupName) throws OperationFailedException
OperationFailedException
public void addUserToGroup(String username, String groupName) throws OperationFailedException
OperationFailedException
public void addGroupToGroup(String childGroup, String parentGroup) throws OperationFailedException
OperationFailedException
public void removeUserFromGroup(String username, String groupName) throws OperationFailedException
OperationFailedException
public void removeGroupFromGroup(String childGroup, String parentGroup) throws OperationFailedException
OperationFailedException
public void syncGroupMembershipsForUser(String childUsername, Set<String> parentGroupNames) throws OperationFailedException
OperationFailedException
public void syncGroupMembershipsAndMembersForGroup(String groupName, Set<String> parentGroupNames, Set<String> childGroupNames) throws OperationFailedException
OperationFailedException
Copyright © 2013 Atlassian. All Rights Reserved.