@ParametersAreNonnullByDefault public abstract class AbstractForwardingToInternalRemoteDirectory extends AbstractForwardingToRemoteDirectory implements InternalRemoteDirectory
InternalRemoteDirectory.
Concrete implementations can override any method requiring custom logic to the underlying directory
| Constructor and Description |
|---|
AbstractForwardingToInternalRemoteDirectory() |
| 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.
|
protected abstract InternalRemoteDirectory |
getDelegate() |
long |
getGroupCount() |
long |
getUserCount() |
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, getKeys, getMemberships, getUserAvatarByName, getValue, getValues, isEmpty, 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, updateUserFromRemoteDirectoryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddGroup, 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, userAuthenticatedgetKeys, getValue, getValues, isEmptypublic AbstractForwardingToInternalRemoteDirectory()
public Group addLocalGroup(GroupTemplate group) throws InvalidGroupException, OperationFailedException
InternalRemoteDirectoryThis 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.
addLocalGroup in interface InternalRemoteDirectorygroup - template of the group to add.InvalidGroupException - The supplied group is invalid.OperationFailedException - underlying directory implementation failed to execute the operation.public BatchResult<User> addAllUsers(Set<UserTemplateWithCredentialAndAttributes> users)
InternalRemoteDirectoryThe 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.
addAllUsers in interface InternalRemoteDirectoryusers - templates of users to add.public BatchResult<Group> addAllGroups(Set<GroupTemplate> groups)
InternalRemoteDirectoryThe 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.
addAllGroups in interface InternalRemoteDirectorygroups - templates of groups to add.public BatchResult<String> addAllUsersToGroup(Set<String> userNames, String groupName) throws GroupNotFoundException
InternalRemoteDirectoryCaller must ensure that the memberships don't already exist.
addAllUsersToGroup in interface InternalRemoteDirectoryuserNames - names of users to add to group.groupName - name of group to add users to.GroupNotFoundException - group with supplied groupName does not exist.public BatchResult<String> removeAllUsers(Set<String> usernames)
InternalRemoteDirectoryIf a user with the supplied username does not exist in the directory, the username will be ignored.
removeAllUsers in interface InternalRemoteDirectoryusernames - usernames of users to remove.public BatchResult<String> removeAllGroups(Set<String> groupNames)
InternalRemoteDirectoryIf a group with the supplied group name does not exist in the directory, the group name will be ignored.
removeAllGroups in interface InternalRemoteDirectorygroupNames - names of groups to remove.public boolean isLocalUserStatusEnabled()
InternalRemoteDirectorytrue 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.isLocalUserStatusEnabled in interface InternalRemoteDirectorytrue if user status in the cache is updated independently of the remote directory.public User forceRenameUser(@Nonnull User oldUser, @Nonnull String newName) throws UserNotFoundException
InternalRemoteDirectoryRemoteDirectory.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.forceRenameUser in interface InternalRemoteDirectoryoldUser - the existing user.newName - desired name of user.UserNotFoundException - if the "oldUser" does not exist.RemoteDirectory.renameUser(String, String)@Nonnull public Set<String> getAllUserExternalIds() throws OperationFailedException
InternalRemoteDirectorygetAllUserExternalIds in interface InternalRemoteDirectoryOperationFailedException - underlying directory implementation failed to execute the operation.public long getUserCount()
throws OperationFailedException
getUserCount in interface InternalRemoteDirectoryOperationFailedException - underlying directory implementation failed to execute the operation.public long getGroupCount()
throws OperationFailedException
getGroupCount in interface InternalRemoteDirectoryOperationFailedException - underlying directory implementation failed to execute the operation.@Nonnull public TimestampedUser findUserByExternalId(String externalId) throws UserNotFoundException
RemoteDirectoryexternalId.
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 InternalRemoteDirectoryfindUserByExternalId in interface RemoteDirectoryfindUserByExternalId in class AbstractForwardingToRemoteDirectoryexternalId - the externalId of the userexternalId.UserNotFoundException - a user with the supplied externalId does not exist.RemoteDirectory.findUserByName(String)@Nonnull public TimestampedUser findUserByName(String name) throws UserNotFoundException
RemoteDirectoryuser that matches the supplied name.findUserByName in interface InternalRemoteDirectoryfindUserByName in interface RemoteDirectoryfindUserByName in class AbstractForwardingToRemoteDirectoryname - the name of the user (username).UserNotFoundException - a user with the supplied name does not exist.@Nonnull public InternalDirectoryGroup findGroupByName(String name) throws GroupNotFoundException
RemoteDirectorygroup that matches the supplied name.findGroupByName in interface InternalRemoteDirectoryfindGroupByName in interface RemoteDirectoryfindGroupByName in class AbstractForwardingToRemoteDirectoryname - the name of the group.GroupNotFoundException - a group with the supplied name does not exist.protected abstract InternalRemoteDirectory getDelegate()
getDelegate in class AbstractForwardingToRemoteDirectoryCopyright © 2019 Atlassian. All rights reserved.