public class CachingDirectory extends AbstractInternalDirectory
InternalDirectory
ATTRIBUTE_PASSWORD_COMPLEXITY_MESSAGE, ATTRIBUTE_PASSWORD_HISTORY_COUNT, ATTRIBUTE_PASSWORD_MAX_ATTEMPTS, ATTRIBUTE_PASSWORD_MAX_CHANGE_TIME, ATTRIBUTE_PASSWORD_REGEX, ATTRIBUTE_USER_ENCRYPTION_METHOD, attributes, DESCRIPTIVE_NAME, directoryDao, directoryId, groupDao, internalDirectoryUtils, membershipDao, passwordEncoderFactory, userDao
Constructor and Description |
---|
CachingDirectory(InternalDirectoryUtils internalDirectoryUtils,
PasswordEncoderFactory passwordEncoderFactory,
DirectoryDao directoryDao,
UserDao userDao,
GroupDao groupDao,
MembershipDao membershipDao) |
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 with no special added logic.
|
User |
updateUser(UserTemplate user)
Updates the
user . |
addGroup, addGroupToGroup, addUserToGroup, authenticate, currentPrincipalInvalidPasswordAttempts, encryptCredential, findGroupByName, findGroupWithAttributesByName, findUserByName, findUserWithAttributesByName, getAuthoritativeDirectory, getDescriptiveName, getDirectoryId, getEncoder, getKeys, getMemberships, getValue, getValues, isEmpty, isGroupDirectGroupMember, isRolesDisabled, isUserDirectGroupMember, removeAllGroups, removeAllUsers, removeGroup, removeGroupAttributes, removeGroupFromGroup, removeUser, removeUserAttributes, removeUserFromGroup, renameGroup, renameUser, requiresPasswordChange, searchGroupRelationships, searchGroups, searchUsers, setAttributes, setDirectoryId, storeGroupAttributes, storeUserAttributes, supportsInactiveAccounts, supportsNestedGroups, testConnection, updateGroup, updateUserCredential
public CachingDirectory(InternalDirectoryUtils internalDirectoryUtils, PasswordEncoderFactory passwordEncoderFactory, DirectoryDao directoryDao, UserDao userDao, GroupDao groupDao, MembershipDao membershipDao)
public User addUser(UserTemplate user, PasswordCredential credential) throws InvalidCredentialException, InvalidUserException, UserAlreadyExistsException, OperationFailedException
addUser
in interface RemoteDirectory
addUser
in class AbstractInternalDirectory
user
- 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.public Group addLocalGroup(GroupTemplate group) throws InvalidGroupException, OperationFailedException
InternalRemoteDirectory
addLocalGroup
in interface InternalRemoteDirectory
addLocalGroup
in class AbstractInternalDirectory
group
- 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)
InternalRemoteDirectory
users
- templates of users to add.public BatchResult<Group> addAllGroups(Set<GroupTemplate> groups)
InternalRemoteDirectory
groups
- templates of groups to add.public BatchResult<String> addAllUsersToGroup(Set<String> userNames, String groupName) throws GroupNotFoundException
InternalRemoteDirectory
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
RemoteDirectory
user
.updateUser
in interface RemoteDirectory
updateUser
in class AbstractInternalDirectory
user
- The user to update.InvalidUserException
- the supplied user is invalid.UserNotFoundException
- the user does not exist in the directory store.Copyright © 2013 Atlassian. All Rights Reserved.