@Transactional public class DirectoryManagerGeneric extends Object implements DirectoryManager
| Constructor and Description |
|---|
DirectoryManagerGeneric(com.atlassian.crowd.embedded.spi.DirectoryDao directoryDao,
ApplicationDAO applicationDAO,
MultiEventPublisher eventPublisher,
PermissionManager permissionManager,
DirectoryInstanceLoader directoryInstanceLoader,
DirectorySynchroniser directorySynchroniser,
DirectoryPollerManager directoryPollerManager,
com.atlassian.beehive.ClusterLockService lockService,
SynchronisationStatusManager synchronisationStatusManager,
BeforeGroupRemoval beforeGroupRemoval,
Optional<NestedGroupsCacheProvider> nestedGroupsCacheProvider) |
| Modifier and Type | Method and Description |
|---|---|
BulkAddResult<Group> |
addAllGroups(long directoryId,
Collection<GroupTemplate> groups,
boolean overwrite) |
BulkAddResult<User> |
addAllUsers(long directoryId,
Collection<UserTemplateWithCredentialAndAttributes> users,
boolean overwrite) |
BulkAddResult<String> |
addAllUsersToGroup(long directoryId,
Collection<String> userNames,
String groupName) |
Directory |
addDirectory(Directory directory) |
Group |
addGroup(long directoryId,
GroupTemplate group) |
void |
addGroupToGroup(long directoryId,
String childGroup,
String parentGroup) |
User |
addUser(long directoryId,
UserTemplate user,
PasswordCredential credential) |
UserWithAttributes |
addUser(long directoryId,
UserTemplateWithAttributes user,
PasswordCredential credential) |
void |
addUserToGroup(long directoryId,
String username,
String groupName) |
User |
authenticateUser(long directoryId,
String username,
PasswordCredential passwordCredential) |
BoundedCount |
countDirectMembersOfGroup(long directoryId,
String groupName,
int querySizeHint) |
void |
expireAllPasswords(long directoryId) |
Set<String> |
filterNestedUserMembersOfGroups(long directoryId,
Set<String> userNames,
Set<String> groupNames) |
List<Directory> |
findAllDirectories() |
List<Application> |
findAuthorisedApplications(long directoryId,
List<String> groupNames) |
Directory |
findDirectoryById(long directoryId) |
Directory |
findDirectoryByName(String name) |
Group |
findGroupByName(long directoryId,
String groupName) |
GroupWithAttributes |
findGroupWithAttributesByName(long directoryId,
String groupName) |
User |
findRemoteUserByName(Long directoryId,
String username) |
User |
findUserByExternalId(long directoryId,
String externalId) |
User |
findUserByName(long directoryId,
String username) |
UserWithAttributes |
findUserWithAttributesByExternalId(long directoryId,
String externalId) |
UserWithAttributes |
findUserWithAttributesByName(long directoryId,
String username) |
DirectorySynchronisationInformation |
getDirectorySynchronisationInformation(long directoryId) |
SynchronisationMode |
getSynchronisationMode(long directoryId) |
AvatarReference |
getUserAvatarByName(long directoryId,
String username,
int sizeHint) |
boolean |
isGroupDirectGroupMember(long directoryId,
String childGroup,
String parentGroup) |
boolean |
isGroupNestedGroupMember(long directoryId,
String childGroupName,
String parentGroupName) |
boolean |
isSynchronisable(long directoryId) |
boolean |
isSynchronising(long directoryId) |
boolean |
isUserDirectGroupMember(long directoryId,
String username,
String groupName) |
boolean |
isUserNestedGroupMember(long directoryId,
String username,
Set<String> groupNames) |
boolean |
isUserNestedGroupMember(long directoryId,
String username,
String groupName) |
void |
removeDirectory(Directory directory) |
void |
removeGroup(long directoryId,
String groupName) |
void |
removeGroupAttributes(long directoryId,
String groupName,
String attributeName) |
void |
removeGroupFromGroup(long directoryId,
String childGroup,
String parentGroup) |
void |
removeUser(long directoryId,
String username) |
void |
removeUserAttributes(long directoryId,
String username,
String attributeName) |
void |
removeUserFromGroup(long directoryId,
String username,
String groupName) |
Group |
renameGroup(long directoryId,
String oldGroupname,
String newGroupname) |
User |
renameUser(long directoryId,
String oldUsername,
String newUsername) |
<T> List<T> |
searchDirectGroupRelationships(long directoryId,
MembershipQuery<T> query) |
<T> com.google.common.collect.ListMultimap<String,T> |
searchDirectGroupRelationshipsGroupedByName(long directoryId,
MembershipQuery<T> query) |
List<Directory> |
searchDirectories(EntityQuery<Directory> query) |
<T> List<T> |
searchGroups(long directoryId,
EntityQuery<T> query) |
<T> List<T> |
searchNestedGroupRelationships(long directoryId,
MembershipQuery<T> query) |
<T> List<T> |
searchUsers(long directoryId,
EntityQuery<T> query) |
void |
storeGroupAttributes(long directoryId,
String groupName,
Map<String,Set<String>> attributes) |
void |
storeUserAttributes(long directoryId,
String username,
Map<String,Set<String>> attributes) |
boolean |
supportsExpireAllPasswords(long directoryId) |
boolean |
supportsNestedGroups(long directoryId) |
void |
synchroniseCache(long directoryId,
SynchronisationMode mode) |
void |
synchroniseCache(long directoryId,
SynchronisationMode mode,
boolean runInBackground) |
Directory |
updateDirectory(Directory directory) |
Group |
updateGroup(long directoryId,
GroupTemplate group) |
User |
updateUser(long directoryId,
UserTemplate user) |
void |
updateUserCredential(long directoryId,
String username,
PasswordCredential credential) |
User |
updateUserFromRemoteDirectory(User remoteUser) |
User |
userAuthenticated(long directoryId,
String username) |
public DirectoryManagerGeneric(com.atlassian.crowd.embedded.spi.DirectoryDao directoryDao, ApplicationDAO applicationDAO, MultiEventPublisher eventPublisher, PermissionManager permissionManager, DirectoryInstanceLoader directoryInstanceLoader, DirectorySynchroniser directorySynchroniser, DirectoryPollerManager directoryPollerManager, com.atlassian.beehive.ClusterLockService lockService, SynchronisationStatusManager synchronisationStatusManager, BeforeGroupRemoval beforeGroupRemoval, Optional<NestedGroupsCacheProvider> nestedGroupsCacheProvider)
public Directory addDirectory(Directory directory) throws DirectoryInstantiationException
addDirectory in interface DirectoryManagerDirectoryInstantiationExceptionpublic Directory findDirectoryById(long directoryId) throws DirectoryNotFoundException
findDirectoryById in interface DirectoryManagerDirectoryNotFoundExceptionpublic List<Directory> findAllDirectories()
findAllDirectories in interface DirectoryManagerpublic List<Directory> searchDirectories(EntityQuery<Directory> query)
searchDirectories in interface DirectoryManagerpublic Directory findDirectoryByName(String name) throws DirectoryNotFoundException
findDirectoryByName in interface DirectoryManagerDirectoryNotFoundExceptionpublic Directory updateDirectory(Directory directory) throws DirectoryNotFoundException
updateDirectory in interface DirectoryManagerDirectoryNotFoundExceptionpublic void removeDirectory(Directory directory) throws DirectoryNotFoundException, DirectoryCurrentlySynchronisingException
removeDirectory in interface DirectoryManagerDirectoryNotFoundExceptionDirectoryCurrentlySynchronisingExceptionpublic boolean supportsNestedGroups(long directoryId)
throws DirectoryInstantiationException,
DirectoryNotFoundException
supportsNestedGroups in interface DirectoryManagerDirectoryInstantiationExceptionDirectoryNotFoundExceptionpublic boolean isSynchronisable(long directoryId)
throws DirectoryInstantiationException,
DirectoryNotFoundException
isSynchronisable in interface DirectoryManagerDirectoryInstantiationExceptionDirectoryNotFoundExceptionpublic SynchronisationMode getSynchronisationMode(long directoryId) throws DirectoryInstantiationException, DirectoryNotFoundException
getSynchronisationMode in interface DirectoryManagerDirectoryInstantiationExceptionDirectoryNotFoundExceptionpublic void synchroniseCache(long directoryId,
SynchronisationMode mode)
throws OperationFailedException,
DirectoryNotFoundException
synchroniseCache in interface DirectoryManagerOperationFailedExceptionDirectoryNotFoundExceptionpublic void synchroniseCache(long directoryId,
SynchronisationMode mode,
boolean runInBackground)
throws OperationFailedException,
DirectoryNotFoundException
synchroniseCache in interface DirectoryManagerOperationFailedExceptionDirectoryNotFoundExceptionpublic boolean isSynchronising(long directoryId)
throws DirectoryInstantiationException,
DirectoryNotFoundException
isSynchronising in interface DirectoryManagerDirectoryInstantiationExceptionDirectoryNotFoundExceptionpublic DirectorySynchronisationInformation getDirectorySynchronisationInformation(long directoryId) throws DirectoryInstantiationException, DirectoryNotFoundException
getDirectorySynchronisationInformation in interface DirectoryManagerDirectoryInstantiationExceptionDirectoryNotFoundExceptionpublic User authenticateUser(long directoryId, String username, PasswordCredential passwordCredential) throws OperationFailedException, InactiveAccountException, InvalidAuthenticationException, ExpiredCredentialException, DirectoryNotFoundException, UserNotFoundException
public User userAuthenticated(long directoryId, String username) throws OperationFailedException, DirectoryNotFoundException, UserNotFoundException, InactiveAccountException
userAuthenticated in interface DirectoryManagerOperationFailedExceptionDirectoryNotFoundExceptionUserNotFoundExceptionInactiveAccountExceptionpublic User findUserByName(long directoryId, String username) throws OperationFailedException, DirectoryNotFoundException, UserNotFoundException
findUserByName in interface DirectoryManagerOperationFailedExceptionDirectoryNotFoundExceptionUserNotFoundExceptionpublic UserWithAttributes findUserWithAttributesByName(long directoryId, String username) throws OperationFailedException, DirectoryNotFoundException, UserNotFoundException
findUserWithAttributesByName in interface DirectoryManagerOperationFailedExceptionDirectoryNotFoundExceptionUserNotFoundExceptionpublic <T> List<T> searchUsers(long directoryId, EntityQuery<T> query) throws OperationFailedException, DirectoryNotFoundException
searchUsers in interface DirectoryManagerOperationFailedExceptionDirectoryNotFoundExceptionpublic User addUser(long directoryId, UserTemplate user, PasswordCredential credential) throws InvalidCredentialException, InvalidUserException, OperationFailedException, DirectoryPermissionException, DirectoryNotFoundException, UserAlreadyExistsException
public UserWithAttributes addUser(long directoryId, UserTemplateWithAttributes user, PasswordCredential credential) throws InvalidCredentialException, InvalidUserException, OperationFailedException, DirectoryPermissionException, DirectoryNotFoundException, UserAlreadyExistsException
public User updateUser(long directoryId, UserTemplate user) throws OperationFailedException, DirectoryPermissionException, InvalidUserException, DirectoryNotFoundException, UserNotFoundException
updateUser in interface DirectoryManagerOperationFailedExceptionDirectoryPermissionExceptionInvalidUserExceptionDirectoryNotFoundExceptionUserNotFoundExceptionpublic User renameUser(long directoryId, String oldUsername, String newUsername) throws OperationFailedException, DirectoryPermissionException, InvalidUserException, DirectoryNotFoundException, UserNotFoundException, UserAlreadyExistsException
public void storeUserAttributes(long directoryId,
String username,
Map<String,Set<String>> attributes)
throws OperationFailedException,
DirectoryPermissionException,
DirectoryNotFoundException,
UserNotFoundException
storeUserAttributes in interface DirectoryManagerOperationFailedExceptionDirectoryPermissionExceptionDirectoryNotFoundExceptionUserNotFoundExceptionpublic void removeUserAttributes(long directoryId,
String username,
String attributeName)
throws OperationFailedException,
DirectoryPermissionException,
DirectoryNotFoundException,
UserNotFoundException
removeUserAttributes in interface DirectoryManagerOperationFailedExceptionDirectoryPermissionExceptionDirectoryNotFoundExceptionUserNotFoundExceptionpublic void updateUserCredential(long directoryId,
String username,
PasswordCredential credential)
throws OperationFailedException,
DirectoryPermissionException,
InvalidCredentialException,
DirectoryNotFoundException,
UserNotFoundException
updateUserCredential in interface DirectoryManagerOperationFailedExceptionDirectoryPermissionExceptionInvalidCredentialExceptionDirectoryNotFoundExceptionUserNotFoundExceptionpublic void removeUser(long directoryId,
String username)
throws DirectoryPermissionException,
OperationFailedException,
DirectoryNotFoundException,
UserNotFoundException
removeUser in interface DirectoryManagerDirectoryPermissionExceptionOperationFailedExceptionDirectoryNotFoundExceptionUserNotFoundExceptionpublic Group findGroupByName(long directoryId, String groupName) throws OperationFailedException, GroupNotFoundException, DirectoryNotFoundException
findGroupByName in interface DirectoryManagerOperationFailedExceptionGroupNotFoundExceptionDirectoryNotFoundExceptionpublic GroupWithAttributes findGroupWithAttributesByName(long directoryId, String groupName) throws OperationFailedException, GroupNotFoundException, DirectoryNotFoundException
findGroupWithAttributesByName in interface DirectoryManagerOperationFailedExceptionGroupNotFoundExceptionDirectoryNotFoundExceptionpublic <T> List<T> searchGroups(long directoryId, EntityQuery<T> query) throws OperationFailedException, DirectoryNotFoundException
searchGroups in interface DirectoryManagerOperationFailedExceptionDirectoryNotFoundExceptionpublic Group addGroup(long directoryId, GroupTemplate group) throws InvalidGroupException, OperationFailedException, DirectoryPermissionException, DirectoryNotFoundException
addGroup in interface DirectoryManagerInvalidGroupExceptionOperationFailedExceptionDirectoryPermissionExceptionDirectoryNotFoundExceptionpublic Group updateGroup(long directoryId, GroupTemplate group) throws OperationFailedException, DirectoryPermissionException, InvalidGroupException, DirectoryNotFoundException, GroupNotFoundException, ReadOnlyGroupException
public Group renameGroup(long directoryId, String oldGroupname, String newGroupname) throws OperationFailedException, DirectoryPermissionException, InvalidGroupException, DirectoryNotFoundException, GroupNotFoundException
renameGroup in interface DirectoryManagerOperationFailedExceptionDirectoryPermissionExceptionInvalidGroupExceptionDirectoryNotFoundExceptionGroupNotFoundExceptionpublic void storeGroupAttributes(long directoryId,
String groupName,
Map<String,Set<String>> attributes)
throws OperationFailedException,
DirectoryPermissionException,
DirectoryNotFoundException,
GroupNotFoundException
storeGroupAttributes in interface DirectoryManagerOperationFailedExceptionDirectoryPermissionExceptionDirectoryNotFoundExceptionGroupNotFoundExceptionpublic void removeGroupAttributes(long directoryId,
String groupName,
String attributeName)
throws OperationFailedException,
DirectoryPermissionException,
DirectoryNotFoundException,
GroupNotFoundException
removeGroupAttributes in interface DirectoryManagerOperationFailedExceptionDirectoryPermissionExceptionDirectoryNotFoundExceptionGroupNotFoundExceptionpublic void removeGroup(long directoryId,
String groupName)
throws DirectoryPermissionException,
OperationFailedException,
DirectoryNotFoundException,
GroupNotFoundException,
ReadOnlyGroupException
removeGroup in interface DirectoryManagerDirectoryPermissionExceptionOperationFailedExceptionDirectoryNotFoundExceptionGroupNotFoundExceptionReadOnlyGroupExceptionpublic boolean isUserDirectGroupMember(long directoryId,
String username,
String groupName)
throws OperationFailedException,
DirectoryNotFoundException
isUserDirectGroupMember in interface DirectoryManagerOperationFailedExceptionDirectoryNotFoundExceptionpublic boolean isGroupDirectGroupMember(long directoryId,
String childGroup,
String parentGroup)
throws OperationFailedException,
DirectoryNotFoundException
isGroupDirectGroupMember in interface DirectoryManagerOperationFailedExceptionDirectoryNotFoundExceptionpublic void addUserToGroup(long directoryId,
String username,
String groupName)
throws DirectoryPermissionException,
OperationFailedException,
DirectoryNotFoundException,
GroupNotFoundException,
UserNotFoundException,
ReadOnlyGroupException,
MembershipAlreadyExistsException
public void addGroupToGroup(long directoryId,
String childGroup,
String parentGroup)
throws DirectoryPermissionException,
OperationFailedException,
InvalidMembershipException,
NestedGroupsNotSupportedException,
DirectoryNotFoundException,
GroupNotFoundException,
ReadOnlyGroupException,
MembershipAlreadyExistsException
public void removeUserFromGroup(long directoryId,
String username,
String groupName)
throws DirectoryPermissionException,
OperationFailedException,
MembershipNotFoundException,
DirectoryNotFoundException,
GroupNotFoundException,
UserNotFoundException,
ReadOnlyGroupException
public void removeGroupFromGroup(long directoryId,
String childGroup,
String parentGroup)
throws DirectoryPermissionException,
OperationFailedException,
InvalidMembershipException,
MembershipNotFoundException,
DirectoryNotFoundException,
GroupNotFoundException,
ReadOnlyGroupException
public <T> List<T> searchDirectGroupRelationships(long directoryId, MembershipQuery<T> query) throws OperationFailedException, DirectoryNotFoundException
searchDirectGroupRelationships in interface DirectoryManagerOperationFailedExceptionDirectoryNotFoundExceptionpublic <T> com.google.common.collect.ListMultimap<String,T> searchDirectGroupRelationshipsGroupedByName(long directoryId, MembershipQuery<T> query) throws OperationFailedException, DirectoryNotFoundException
searchDirectGroupRelationshipsGroupedByName in interface DirectoryManagerOperationFailedExceptionDirectoryNotFoundExceptionpublic BoundedCount countDirectMembersOfGroup(long directoryId, String groupName, int querySizeHint) throws OperationFailedException, DirectoryNotFoundException
countDirectMembersOfGroup in interface DirectoryManagerOperationFailedExceptionDirectoryNotFoundException@Transactional(readOnly=true)
public boolean isUserNestedGroupMember(long directoryId,
String username,
String groupName)
throws OperationFailedException,
DirectoryNotFoundException
isUserNestedGroupMember in interface DirectoryManagerOperationFailedExceptionDirectoryNotFoundException@Transactional(readOnly=true)
public boolean isUserNestedGroupMember(long directoryId,
String username,
Set<String> groupNames)
throws OperationFailedException,
DirectoryNotFoundException
isUserNestedGroupMember in interface DirectoryManagerOperationFailedExceptionDirectoryNotFoundException@Transactional(readOnly=true) public Set<String> filterNestedUserMembersOfGroups(long directoryId, Set<String> userNames, Set<String> groupNames) throws OperationFailedException, DirectoryNotFoundException
filterNestedUserMembersOfGroups in interface DirectoryManagerOperationFailedExceptionDirectoryNotFoundException@Transactional(readOnly=true)
public boolean isGroupNestedGroupMember(long directoryId,
String childGroupName,
String parentGroupName)
throws OperationFailedException,
DirectoryNotFoundException
isGroupNestedGroupMember in interface DirectoryManagerOperationFailedExceptionDirectoryNotFoundException@Transactional(readOnly=true) public <T> List<T> searchNestedGroupRelationships(long directoryId, MembershipQuery<T> query) throws OperationFailedException, DirectoryNotFoundException
searchNestedGroupRelationships in interface DirectoryManagerOperationFailedExceptionDirectoryNotFoundExceptionpublic BulkAddResult<User> addAllUsers(long directoryId, Collection<UserTemplateWithCredentialAndAttributes> users, boolean overwrite) throws DirectoryPermissionException, OperationFailedException, DirectoryNotFoundException
addAllUsers in interface DirectoryManagerDirectoryPermissionExceptionOperationFailedExceptionDirectoryNotFoundExceptionpublic BulkAddResult<Group> addAllGroups(long directoryId, Collection<GroupTemplate> groups, boolean overwrite) throws DirectoryPermissionException, OperationFailedException, DirectoryNotFoundException
addAllGroups in interface DirectoryManagerDirectoryPermissionExceptionOperationFailedExceptionDirectoryNotFoundExceptionpublic BulkAddResult<String> addAllUsersToGroup(long directoryId, Collection<String> userNames, String groupName) throws DirectoryPermissionException, OperationFailedException, DirectoryNotFoundException, GroupNotFoundException
addAllUsersToGroup in interface DirectoryManagerDirectoryPermissionExceptionOperationFailedExceptionDirectoryNotFoundExceptionGroupNotFoundExceptionpublic User findUserByExternalId(long directoryId, String externalId) throws DirectoryNotFoundException, UserNotFoundException, OperationFailedException
findUserByExternalId in interface DirectoryManagerDirectoryNotFoundExceptionUserNotFoundExceptionOperationFailedExceptionpublic UserWithAttributes findUserWithAttributesByExternalId(long directoryId, String externalId) throws DirectoryNotFoundException, UserNotFoundException, OperationFailedException
findUserWithAttributesByExternalId in interface DirectoryManagerDirectoryNotFoundExceptionUserNotFoundExceptionOperationFailedExceptionpublic void expireAllPasswords(long directoryId)
throws OperationFailedException,
DirectoryNotFoundException
expireAllPasswords in interface DirectoryManagerOperationFailedExceptionDirectoryNotFoundExceptionpublic boolean supportsExpireAllPasswords(long directoryId)
throws DirectoryInstantiationException,
DirectoryNotFoundException
supportsExpireAllPasswords in interface DirectoryManagerDirectoryInstantiationExceptionDirectoryNotFoundExceptionpublic AvatarReference getUserAvatarByName(long directoryId, String username, int sizeHint) throws UserNotFoundException, OperationFailedException, DirectoryNotFoundException
getUserAvatarByName in interface DirectoryManagerUserNotFoundExceptionOperationFailedExceptionDirectoryNotFoundException@Nonnull public User findRemoteUserByName(Long directoryId, String username) throws OperationFailedException, DirectoryNotFoundException, UserNotFoundException
findRemoteUserByName in interface DirectoryManagerOperationFailedExceptionDirectoryNotFoundExceptionUserNotFoundExceptionpublic User updateUserFromRemoteDirectory(User remoteUser) throws OperationFailedException, DirectoryNotFoundException, UserNotFoundException
updateUserFromRemoteDirectory in interface DirectoryManagerOperationFailedExceptionDirectoryNotFoundExceptionUserNotFoundExceptionpublic List<Application> findAuthorisedApplications(long directoryId, List<String> groupNames)
findAuthorisedApplications in interface DirectoryManagerCopyright © 2023 Atlassian. All rights reserved.