@ParametersAreNonnullByDefault public class CachingConfluenceUserDao extends Object implements ConfluenceUserDao
| Constructor and Description |
|---|
CachingConfluenceUserDao(ConfluenceUserDao delegate,
com.atlassian.vcache.VCacheFactory cacheFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
create(ConfluenceUser user)
Create a new ConfluenceUser.
|
ConfluenceUser |
findByKey(com.atlassian.sal.api.user.UserKey key)
Retrieve a ConfluenceUser by the user key.
|
ConfluenceUser |
findByUsername(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() |
void |
remove(ConfluenceUser user)
Remove the supplied ConfluenceUser from persistence.
|
ConfluenceUser |
rename(String oldUsername,
String newUsername,
boolean overrideExisting)
Renames a user
|
void |
update(ConfluenceUser user)
Change a property of an existing ConfluenceUser.
|
public CachingConfluenceUserDao(ConfluenceUserDao delegate, com.atlassian.vcache.VCacheFactory 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 ConfluenceUserDao@Nonnull public 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 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 ConfluenceUserDao@Nonnull public 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 ConfluenceUserDaoCopyright © 2003–2017 Atlassian. All rights reserved.