public class CachingConfluenceUserDao extends Object implements ConfluenceUserDao
| Modifier and Type | Method and Description |
|---|---|
int |
countUnsyncedUsers()
Get a count of all unsynced users in Confluence.
|
void |
create(ConfluenceUser user)
Create a new ConfluenceUser.
|
static CachingConfluenceUserDao |
create(ConfluenceUserDao delegate,
com.atlassian.cache.CacheFactory cacheFactory) |
ConfluenceUser |
findByKey(@Nullable com.atlassian.sal.api.user.UserKey key)
Retrieve a ConfluenceUser by the user key.
|
Map<com.atlassian.sal.api.user.UserKey,Optional<ConfluenceUser>> |
findByKeys(Set<com.atlassian.sal.api.user.UserKey> userkeys)
Performs a bulk lookup of multiple
ConfluenceUsers. |
ConfluenceUser |
findByUsername(@Nullable String username)
Find the ConfluenceUser with the given user name.
|
Map<com.atlassian.sal.api.user.UserKey,String> |
findLowerNamesByKeys(Iterable<com.atlassian.sal.api.user.UserKey> keys)
Bulk operation to find lowercase name corresponding to user key.
|
Map<String,com.atlassian.sal.api.user.UserKey> |
findUserKeysByLowerNames(Iterable<String> names)
Bulk operation to find user key corresponding to lowercase name.
|
Set<ConfluenceUser> |
getAll() |
List<com.atlassian.sal.api.user.UserKey> |
getAllUserKeys()
Currently for testing purpose only
|
boolean |
isDeletedUser(ConfluenceUser user)
Check whether or not a user has been deleted completely from the application.
|
boolean |
isUnsyncedUser(ConfluenceUser user)
Check whether or not a user exists in the application as unsynced.
|
void |
remove(ConfluenceUser user)
Remove the supplied ConfluenceUser from persistence.
|
ConfluenceUser |
rename(ConfluenceUser userToRename,
String newUsername,
boolean overrideExisting)
Renames a user
|
ConfluenceUser |
rename(String oldUsername,
String newUsername,
boolean overrideExisting)
Renames a user
|
List<ConfluenceUser> |
searchUnsyncedUsers(String searchParam)
Search all unsynced users, whose account has been disconnected from an external directory, i.e.
|
void |
update(ConfluenceUser user)
Change a property of an existing ConfluenceUser.
|
public static CachingConfluenceUserDao create(ConfluenceUserDao delegate, com.atlassian.cache.CacheFactory cacheFactory)
public void create(ConfluenceUser user)
ConfluenceUserDaocreate in interface ConfluenceUserDaopublic void update(ConfluenceUser user)
ConfluenceUserDaoupdate in interface ConfluenceUserDaopublic void remove(ConfluenceUser user)
ConfluenceUserDaoremove in interface ConfluenceUserDaopublic ConfluenceUser rename(String oldUsername, String newUsername, boolean overrideExisting)
ConfluenceUserDaorename in interface ConfluenceUserDaooldUsername - old username for the usernewUsername - new username for the useroverrideExisting - True if possible existing mapping should make way for the renamed one. False for opposite
behaviour.public ConfluenceUser rename(ConfluenceUser userToRename, String newUsername, boolean overrideExisting)
ConfluenceUserDaorename in interface ConfluenceUserDaouserToRename - ConfluenceUser object representing user to renamenewUsername - new username for the useroverrideExisting - True if possible existing mapping should make way for the renamed one. False for opposite
behaviour.public ConfluenceUser findByKey(@Nullable com.atlassian.sal.api.user.UserKey key)
ConfluenceUserDaofindByKey in interface ConfluenceUserDaopublic ConfluenceUser findByUsername(@Nullable String username)
ConfluenceUserDaoNote that username lookups are case-insensitive, so the user you get back may not have exactly the same name as the name passed to this method.
findByUsername in interface ConfluenceUserDaopublic Set<ConfluenceUser> getAll()
getAll in interface ConfluenceUserDaopublic Map<String,com.atlassian.sal.api.user.UserKey> findUserKeysByLowerNames(Iterable<String> names)
ConfluenceUserDaofindUserKeysByLowerNames in interface ConfluenceUserDaopublic Map<com.atlassian.sal.api.user.UserKey,String> findLowerNamesByKeys(Iterable<com.atlassian.sal.api.user.UserKey> keys)
ConfluenceUserDaofindLowerNamesByKeys in interface ConfluenceUserDaopublic boolean isDeletedUser(ConfluenceUser user)
ConfluenceUserDaoisDeletedUser in interface ConfluenceUserDaopublic boolean isUnsyncedUser(ConfluenceUser user)
ConfluenceUserDaoConfluenceUserDao.isDeletedUser(ConfluenceUser)). This may
include users who have technically been removed through Confluence prior to 6.13.0.isUnsyncedUser in interface ConfluenceUserDaopublic List<ConfluenceUser> searchUnsyncedUsers(String searchParam)
ConfluenceUserDaosearchUnsyncedUsers in interface ConfluenceUserDaosearchParam - the username parameter to search bypublic int countUnsyncedUsers()
ConfluenceUserDaocountUnsyncedUsers in interface ConfluenceUserDaopublic Map<com.atlassian.sal.api.user.UserKey,Optional<ConfluenceUser>> findByKeys(Set<com.atlassian.sal.api.user.UserKey> userkeys)
ConfluenceUserDaoConfluenceUsers.findByKeys in interface ConfluenceUserDaouserkeys - The set of UserKeysMap of UserKeys to Optional ConfluenceUsers. Every UserKey
present in the userkeys parameter will have an entry in this map.public List<com.atlassian.sal.api.user.UserKey> getAllUserKeys()
ConfluenceUserDaogetAllUserKeys in interface ConfluenceUserDaoCopyright © 2003–2021 Atlassian. All rights reserved.