com.atlassian.crowd.integration.directory
Interface BatchingRemoteDirectory

All Superinterfaces:
AttributeAware, RemoteDirectory
All Known Implementing Classes:
DelegatedAuthenticationDirectory, InternalDirectory

public interface BatchingRemoteDirectory
extends RemoteDirectory

Batch access to bulk add/update, find and remove directory entities.

This interface does not manage overwriting or checking before adding. For example, it is expected that the caller ensure that a user does not exist in the directory prior to attempting to add the user.

Each batch mutation method will attempt to process all entities and returns a collection of entities that FAILED the mutation operation.


Method Summary
 java.util.Collection<Group> addAllGroups(java.util.Set<GroupTemplate> groups)
          Adds a collection of groups to the directory store.
 java.util.Collection<User> addAllUsers(java.util.Set<UserTemplateWithCredentialAndAttributes> users)
          Adds a collection of users to the directory store.
 java.util.Collection<java.lang.String> addAllUsersToGroup(java.util.Set<java.lang.String> userNames, java.lang.String groupName)
          Adds a collection of group memberships to the directory store.
 java.util.Collection<Group> findGroupsByNames(java.util.Collection<java.lang.String> names)
          Finds a collection of groups matching a collection of names.
 java.util.Collection<User> findUsersByNames(java.util.Collection<java.lang.String> names)
          Finds a collection of users matching a collection of names.
 
Methods inherited from interface com.atlassian.crowd.integration.directory.RemoteDirectory
addGroup, addGroupToGroup, addUser, addUserToGroup, authenticate, findGroupByName, findGroupWithAttributesByName, findUserByName, findUserWithAttributesByName, getDescriptiveName, getDirectoryId, isGroupDirectGroupMember, isUserDirectGroupMember, removeGroup, removeGroupAttributes, removeGroupFromGroup, removeUser, removeUserAttributes, removeUserFromGroup, renameGroup, renameUser, searchGroupRelationships, searchGroups, searchUsers, setAttributes, setDirectoryId, storeGroupAttributes, storeUserAttributes, supportsNestedGroups, testConnection, updateGroup, updateUser, updateUserCredential
 
Methods inherited from interface com.atlassian.crowd.integration.model.AttributeAware
getAttribute, getAttributeNames, getAttributes, hasAttribute
 

Method Detail

addAllUsers

java.util.Collection<User> addAllUsers(java.util.Set<UserTemplateWithCredentialAndAttributes> users)
                                       throws ObjectNotFoundException
Adds a collection of users to the directory store.

Parameters:
users - set of users to add.
Returns:
remote users that failed to be added.
Throws:
ObjectNotFoundException - directory has been deleted and cannot be found.

addAllGroups

java.util.Collection<Group> addAllGroups(java.util.Set<GroupTemplate> groups)
                                         throws ObjectNotFoundException
Adds a collection of groups to the directory store.

Parameters:
groups - set of groups to add.
Returns:
remote group that failed to be added.
Throws:
ObjectNotFoundException

addAllUsersToGroup

java.util.Collection<java.lang.String> addAllUsersToGroup(java.util.Set<java.lang.String> userNames,
                                                          java.lang.String groupName)
                                                          throws ObjectNotFoundException
Adds a collection of group memberships to the directory store.

Parameters:
userNames - names of users to add.
groupName - name of group to add users to.
Returns:
user names that failed to be added to the group.
Throws:
ObjectNotFoundException - if the group does not exist.

findUsersByNames

java.util.Collection<User> findUsersByNames(java.util.Collection<java.lang.String> names)
Finds a collection of users matching a collection of names.

If a user with a requested name does not exist, then it is not included in the returning collection.

Parameters:
names - names of users to find.
Returns:
collection of found users.

findGroupsByNames

java.util.Collection<Group> findGroupsByNames(java.util.Collection<java.lang.String> names)
Finds a collection of groups matching a collection of names.

If a group with a requested name does not exist, then it is not included in the returning collection.

Parameters:
names - names of groups to find.
Returns:
collection of found groups.


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.