|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.user.persistence.dao.compatibility.FindUserHelper
public class FindUserHelper
A utility class that centralises the 'hackyness' involved during the period we support both username related APIs and the change to user keys.
Find all usages of this class and you will find all the places that 'transitional hackyness' is taking place.
Constructor Summary | |
---|---|
FindUserHelper()
|
Method Summary | |
---|---|
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(java.lang.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<java.lang.String,com.atlassian.fugue.Option<ConfluenceUser>> |
getUsersByUsername()
Returns a lazily populated map of usename -> user pairs. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FindUserHelper()
Method Detail |
---|
public static ConfluenceUser getUserByUsername(java.lang.String username)
username
- the username of the user required
public static ConfluenceUser getUserByUserKey(com.atlassian.sal.api.user.UserKey userKey)
UserKey
userKey
-
java.lang.IllegalArgumentException
- if no user can be found for the keypublic static ConfluenceUser getUser(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<java.lang.String,com.atlassian.fugue.Option<ConfluenceUser>> getUsersByUsername()
This method should only be used in backwards-compatibility code.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |