public class InternalDirectory extends AbstractInternalDirectory
CachingDirectory that does local caching of remote objects.ATTRIBUTE_PASSWORD_COMPLEXITY_MESSAGE, ATTRIBUTE_PASSWORD_EXPIRATION_NOTIFICATION_PERIODS, ATTRIBUTE_PASSWORD_HISTORY_COUNT, ATTRIBUTE_PASSWORD_MAX_ATTEMPTS, ATTRIBUTE_PASSWORD_MAX_CHANGE_TIME, ATTRIBUTE_PASSWORD_MINIMUM_LENGTH, ATTRIBUTE_PASSWORD_MINIMUM_SCORE, ATTRIBUTE_PASSWORD_REGEX, ATTRIBUTE_USER_ENCRYPTION_METHOD, attributes, DESCRIPTIVE_NAME, directoryDao, directoryId, groupDao, internalDirectoryUtils, membershipDao, passwordEncoderFactory, tombstoneDao, userDao| Constructor and Description |
|---|
InternalDirectory(InternalDirectoryUtils internalDirectoryUtils,
PasswordEncoderFactory passwordEncoderFactory,
DirectoryDao directoryDao,
UserDao userDao,
GroupDao groupDao,
MembershipDao membershipDao,
TombstoneDao tombstoneDao,
PasswordConstraintsLoader passwordConstraints) |
| 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.
|
User |
addUser(UserTemplate user,
PasswordCredential credential)
Adds a
user to the directory store. |
UserWithAttributes |
addUser(UserTemplateWithAttributes user,
PasswordCredential credential)
Adds a user and the following custom attributes:
- RemotePrincipalConstants.PASSWORD_LASTCHANGED set to the current time.
|
boolean |
isLocalUserStatusEnabled()
Internal directories never support local user statuses.
|
protected boolean |
isUserExternalIdReadOnly()
When an InternalDirectory is used as an internal directory, it must manage the values of the external_id
column.
|
User |
updateUser(UserTemplate user)
Updates the
user. |
addGroup, addGroupToGroup, addUserToGroup, addUserToGroups, authenticate, calculatePostPasswordUpdateAttributes, countDirectMembersOfGroup, currentPrincipalInvalidPasswordAttempts, encryptedCredential, expireAllPasswords, findGroupByName, findGroupWithAttributesByName, findUserByExternalId, findUserByName, findUserWithAttributesByName, forceRenameUser, getAllUserExternalIds, getAuthoritativeDirectory, getDescriptiveName, getDirectoryId, getEncoder, getGroupCount, getKeys, getMemberships, getPasswordConstraints, getUserAvatarByName, getUserCount, getValue, getValues, isEmpty, isGroupDirectGroupMember, isRolesDisabled, isUserDirectGroupMember, removeAllGroups, removeAllUsers, removeGroup, removeGroupAttributes, removeGroupFromGroup, removeUser, removeUserAttributes, removeUserFromGroup, renameGroup, renameUser, requiresPasswordChange, searchGroupRelationships, searchGroupRelationshipsGroupedByName, searchGroups, searchUsers, setAttributes, setDirectoryId, storeGroupAttributes, storeUserAttributes, supportsInactiveAccounts, supportsNestedGroups, supportsPasswordExpiration, supportsSettingEncryptedCredential, testConnection, updateGroup, updateUserCredential, userAuthenticatedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLocallyFilteredGroupNames, updateUserFromRemoteDirectorypublic InternalDirectory(InternalDirectoryUtils internalDirectoryUtils, PasswordEncoderFactory passwordEncoderFactory, DirectoryDao directoryDao, UserDao userDao, GroupDao groupDao, MembershipDao membershipDao, TombstoneDao tombstoneDao, PasswordConstraintsLoader passwordConstraints)
public User addUser(UserTemplate user, PasswordCredential credential) throws InvalidCredentialException, InvalidUserException, UserAlreadyExistsException, OperationFailedException
RemoteDirectoryuser to the directory store.user - template of the user to add.credential - a password, or PasswordCredential.NONE for an account that cannot login with any passwordInvalidCredentialException - The supplied credential is invalid.InvalidUserException - The supplied user is invalid.UserAlreadyExistsException - The user already existsOperationFailedException - underlying directory implementation failed to execute the operation.RemoteDirectory.supportsSettingEncryptedCredential()public UserWithAttributes addUser(UserTemplateWithAttributes user, PasswordCredential credential) throws InvalidCredentialException, InvalidUserException, UserAlreadyExistsException, OperationFailedException
addUser in interface RemoteDirectoryaddUser in class AbstractInternalDirectoryuser - template of the user to add.credential - password. May be null, since JIRA creates a user in two stepsInvalidCredentialException - the password does not match the regular expression standard defined by the directory.InvalidUserException - The supplied user is invalid.UserAlreadyExistsException - The user already existsOperationFailedException - underlying directory implementation failed to execute the operation.RemoteDirectory.supportsSettingEncryptedCredential()public Group addLocalGroup(GroupTemplate group) throws 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 InternalRemoteDirectoryaddLocalGroup in class AbstractInternalDirectorygroup - template of the group to add.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.
users - 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.
groups - 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.
userNames - names of users to add to group.groupName - name of group to add users to.GroupNotFoundException - group with supplied groupName does not exist.public User updateUser(UserTemplate user) throws InvalidUserException, UserNotFoundException
RemoteDirectoryuser.user - The user to update.InvalidUserException - the supplied user is invalid.UserNotFoundException - the user does not exist in the directory store.public boolean isLocalUserStatusEnabled()
protected boolean isUserExternalIdReadOnly()
true in this class because it manages the external_id values and does not allow
mutability.Copyright © 2023 Atlassian. All rights reserved.