public interface ExtendedUserDao
extends com.atlassian.crowd.embedded.spi.UserDao
Modifier and Type | Method and Description |
---|---|
List<OfBizUser> |
findAllByNameOrNull(long directoryId,
Collection<String> userNames) |
OfBizUser |
findById(long internalUserId)
Finds a user by internal user ID.
|
OfBizUser |
findByNameOrNull(long directoryId,
String userName)
Tries to find the user by name and returns null if not found.
|
Collection<String> |
findNamesOfUsersInGroups(Collection<String> groupNames)
Returns the lower-cased names of all users in the specified groups.
|
OfBizUser |
findOfBizUser(long directoryId,
String userName) |
void |
flushCache()
Invoked by
OfBizCacheFlushingManager to ensure caches are being flushed in the right order on XMLRestoreFinishedEvent |
Collection<String> |
getAllAttributeKeys() |
long |
getUniqueUserCount(Set<Long> directoryIds) |
boolean |
isDeletedExternally(long internalUserId)
Checks if user (identified by internal user ID) has been deleted from external user directory.
|
boolean |
isDeletedExternally(long directoryId,
String userName)
Checks if user (identified by directory ID and user name) has been deleted from external user directory.
|
void |
processUsers(java.util.function.Consumer<? super com.atlassian.crowd.model.user.User> userProcessor)
Performs an operation on every user in the system.
|
com.atlassian.crowd.model.user.User |
update(com.atlassian.crowd.model.user.User user,
boolean useJiraExtensions)
Updates user, for detailed description see
UserDao.update(com.atlassian.crowd.model.user.User) . |
boolean |
useFullCache() |
boolean |
useInternedUserValues() |
add, addAll, findByExternalId, findByExternalIds, findByName, findByNameWithAttributes, findDirectoryIdsContainingUserName, getAllExternalIds, getCredential, getCredentialHistory, getUserCount, remove, removeAllUsers, removeAttribute, rename, search, setAttributeForAllInDirectory, storeAttributes, update, updateCredential
boolean useFullCache()
boolean useInternedUserValues()
long getUniqueUserCount(Set<Long> directoryIds) throws com.atlassian.crowd.exception.DirectoryNotFoundException
com.atlassian.crowd.exception.DirectoryNotFoundException
Collection<String> findNamesOfUsersInGroups(Collection<String> groupNames)
groupNames
- the names of the groups to search.OfBizUser findOfBizUser(long directoryId, String userName) throws UserNotFoundException
UserNotFoundException
List<OfBizUser> findAllByNameOrNull(long directoryId, @Nonnull Collection<String> userNames)
@Nullable OfBizUser findByNameOrNull(long directoryId, @Nonnull String userName)
directoryId
- Directory IDuserName
- the usernamenull
if the user does not existCollection<String> getAllAttributeKeys()
void processUsers(java.util.function.Consumer<? super com.atlassian.crowd.model.user.User> userProcessor)
This can be a time-consuming operation on JIRA instances that contain many users. It is recommended to use one of the search methods where possible.
This method performs a live iteration over a database result set. Care must be taken if additional database
operations are performed within the userProcessor
consumer.
userProcessor
- the operation to perform on each user.void flushCache()
OfBizCacheFlushingManager
to ensure caches are being flushed in the right order on XMLRestoreFinishedEvent
@Nullable OfBizUser findById(long internalUserId)
internalUserId
- the user ID.boolean isDeletedExternally(long internalUserId)
internalUserId
- the user ID.boolean isDeletedExternally(long directoryId, @Nonnull String userName)
directoryId
- Directory IDuserName
- the usernamecom.atlassian.crowd.model.user.User update(com.atlassian.crowd.model.user.User user, boolean useJiraExtensions) throws UserNotFoundException
UserDao.update(com.atlassian.crowd.model.user.User)
.user
- the user details, which should have the same name as the user to modifyuseJiraExtensions
- Whether jira extensions should be run.
Currently only extension is that when externally deleted user is updated (inactive and flagged)
"externally deleted" flag is cleared and user is made active.UserNotFoundException
- if there is no user with the same name (case-insensitive) and directory as the
user providedUserDao.update(com.atlassian.crowd.model.user.User)
Copyright © 2002-2022 Atlassian. All Rights Reserved.