public class FindUserHelper extends Object
Find all usages of this class and you will find all the places that 'transitional hackyness' is taking place.
Constructor and Description |
---|
FindUserHelper() |
Modifier and Type | Method and Description |
---|---|
static ConfluenceUser |
getUser(com.atlassian.user.User user) |
static ConfluenceUser |
getUserByUserKey(com.atlassian.sal.api.user.UserKey userKey)
Get a user by
UserKey |
static ConfluenceUser |
getUserByUsername(String username)
Get a user by username.
|
static com.google.common.cache.Cache<com.atlassian.sal.api.user.UserKey,com.atlassian.fugue.Option<ConfluenceUser>> |
getUsersByKey()
Returns a lazily populated map of user key -> user pairs.
|
static com.google.common.cache.Cache<String,com.atlassian.fugue.Option<ConfluenceUser>> |
getUsersByUsername()
Returns a lazily populated map of usename -> user pairs.
|
@Nullable public static ConfluenceUser getUserByUsername(@Nullable String username)
username
- the username of the user requiredpublic static ConfluenceUser getUserByUserKey(com.atlassian.sal.api.user.UserKey userKey)
UserKey
userKey
- IllegalArgumentException
- if no user can be found for the keypublic static ConfluenceUser getUser(@Nullable com.atlassian.user.User user)
public static com.google.common.cache.Cache<com.atlassian.sal.api.user.UserKey,com.atlassian.fugue.Option<ConfluenceUser>> getUsersByKey()
This method should only be used in backwards-compatibility code.
public static com.google.common.cache.Cache<String,com.atlassian.fugue.Option<ConfluenceUser>> getUsersByUsername()
This method should only be used in backwards-compatibility code.
Copyright © 2003–2016 Atlassian. All rights reserved.