public interface InternalRemoteDirectory extends RemoteDirectory, FastEntityCountProvider, MultiValuesQueriesSupport
RemoteDirectory
that is used by InternalDirectories.
In particular, the findUserByName(String)
and findGroupByName(String)
have been redefined to return
TimestampedUser
and InternalDirectoryGroup
. The InternalDirectoryGroup
allows clients to
determine whether the group is "local".
Modifier and Type | Method and Description |
---|---|
BatchResult<Group> |
addAllGroups(Set<GroupTemplate> groups)
Adds a collection of groups to the directory.
|
BatchResult<User> |
addAllUsers(Set<UserTemplateWithCredentialAndAttributes> users)
Adds a collection of users to the directory.
|
BatchResult<String> |
addAllUsersToGroup(Set<String> userNames,
String groupName)
Adds a collection of users to a group.
|
Group |
addLocalGroup(GroupTemplate group)
Adds a "local" group to the directory.
|
InternalDirectoryGroup |
findGroupByName(String name)
Finds the
group that matches the supplied name . |
TimestampedUser |
findUserByExternalId(String externalId)
Finds the user that matches the supplied
externalId . |
TimestampedUser |
findUserByName(String name)
Finds the
user that matches the supplied name . |
User |
forceRenameUser(User oldUser,
String newName)
Forces a rename on the given user in this directory.
|
Set<String> |
getAllUserExternalIds()
Retrieves all users externalIds found in this directory.
|
boolean |
isLocalUserStatusEnabled()
Returns
true if user active status is updated independently in the Crowd cache and the remote
directory. |
BatchResult<String> |
removeAllGroups(Set<String> groupNames)
Removes all groups from the directory.
|
BatchResult<String> |
removeAllUsers(Set<String> usernames)
Removes all users from the directory.
|
addGroup, addGroupToGroup, addUser, addUser, addUserToGroup, authenticate, countDirectMembersOfGroup, expireAllPasswords, findGroupWithAttributesByName, findUserWithAttributesByName, getAuthoritativeDirectory, getDescriptiveName, getDirectoryId, getMemberships, getUserAvatarByName, isGroupDirectGroupMember, isRolesDisabled, isUserDirectGroupMember, removeGroup, removeGroupAttributes, removeGroupFromGroup, removeUser, removeUserAttributes, removeUserFromGroup, renameGroup, renameUser, searchGroupRelationships, searchGroups, searchUsers, setAttributes, setDirectoryId, storeGroupAttributes, storeUserAttributes, supportsInactiveAccounts, supportsNestedGroups, supportsPasswordExpiration, supportsSettingEncryptedCredential, testConnection, updateGroup, updateUser, updateUserCredential, updateUserFromRemoteDirectory, userAuthenticated
getKeys, getValue, getValues, isEmpty
getGroupCount, getUserCount
searchGroupRelationships, searchGroupRelationshipsGroupedByName
TimestampedUser findUserByName(String name) throws UserNotFoundException
RemoteDirectory
user
that matches the supplied name
.findUserByName
in interface RemoteDirectory
name
- the name of the user (username).TimestampedUser
entity.UserNotFoundException
- a user with the supplied name does not exist.TimestampedUser findUserByExternalId(String externalId) throws UserNotFoundException
RemoteDirectory
externalId
.
This is an optional method that may not be implemented on all directory types.
Currently it is implemented for LDAP and Internal directories but not Crowd directories.findUserByExternalId
in interface RemoteDirectory
externalId
- the externalId of the userTimestampedUser
entity.UserNotFoundException
- a user with the supplied externalId does not exist.RemoteDirectory.findUserByName(String)
InternalDirectoryGroup findGroupByName(String name) throws GroupNotFoundException
RemoteDirectory
group
that matches the supplied name
.findGroupByName
in interface RemoteDirectory
name
- the name of the group.InternalDirectoryGroup
entity.GroupNotFoundException
- a group with the supplied name does not exist.Group addLocalGroup(GroupTemplate group) throws InvalidGroupException, OperationFailedException
This method can be used to store groups that aren't clones of "external" groups. For example, if an LDAP directory is cloned in an internal directory, it's possible to define "local" groups that exist internally but not in LDAP.
This functionality was added to meet the functionality that Confluence provided.
group
- template of the group to add.InvalidGroupException
- The supplied group is invalid.OperationFailedException
- underlying directory implementation failed to execute the operation.BatchResult<User> addAllUsers(Set<UserTemplateWithCredentialAndAttributes> users)
The bulk adding of users may be significantly faster than adding users one-by-one for large collections.
Caller must ensure that the users don't already exist.
users
- templates of users to add.IllegalArgumentException
- if any of the users' directory ID does not match the directory's ID.BatchResult<Group> addAllGroups(Set<GroupTemplate> groups)
The bulk adding of groups may be significantly faster than adding groups one-by-one for large collections.
Caller must ensure that the users don't already exist.
groups
- templates of groups to add.IllegalArgumentException
- if any of the groups' directory ID does not match the directory's ID.BatchResult<String> addAllUsersToGroup(Set<String> userNames, String groupName) throws GroupNotFoundException
Caller must ensure that the memberships don't already exist.
userNames
- names of users to add to group.groupName
- name of group to add users to.GroupNotFoundException
- group with supplied groupName
does not exist.BatchResult<String> removeAllUsers(Set<String> usernames)
If a user with the supplied username does not exist in the directory, the username will be ignored.
usernames
- usernames of users to remove.BatchResult<String> removeAllGroups(Set<String> groupNames)
If a group with the supplied group name does not exist in the directory, the group name will be ignored.
groupNames
- names of groups to remove.boolean isLocalUserStatusEnabled()
true
if user active status is updated independently in the Crowd cache and the remote
directory. Otherwise, user status is synchronised between the cache and the remote directory.true
if user status in the cache is updated independently of the remote directory.User forceRenameUser(@Nonnull User oldUser, @Nonnull String newName) throws UserNotFoundException
RemoteDirectory.renameUser(String, String)
, except it will still do the rename even if there is an
existing user under the newName. In this case, it will first rename that existing user to a name that is known
not to exist in this directory.oldUser
- the existing user.newName
- desired name of user.UserNotFoundException
- if the "oldUser" does not exist.RemoteDirectory.renameUser(String, String)
@Nonnull Set<String> getAllUserExternalIds() throws OperationFailedException
OperationFailedException
- underlying directory implementation failed to execute the operation.Copyright © 2020 Atlassian. All rights reserved.