|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UserKeyService
A simple service to map userkeys to usernames.
Method Summary | |
---|---|
String |
getKeyForUser(com.atlassian.crowd.embedded.api.User user)
This convenience method is equivalent to getKeyForUsername(user.getName()) , except that
it is null -safe. |
String |
getKeyForUsername(String username)
Returns the key that is associated with the given username. |
String |
getUsernameForKey(String key)
Returns the (lower-cased) username that is associated with the given key. |
Method Detail |
---|
String getUsernameForKey(String key)
Note that this returns the lower-case of the username (because username must act case-insensitive in our key->username map).
key
- the key to resolve to a username (may be null
)
null
if key
is null
or unmapped. Note that a non-null
result does not guarantee that
the user still exists.String getKeyForUsername(String username)
username
- the username to resolve to a key (may be null
)
null
if username
is null
or unmapped. Note that a non-null
result does not guarantee that
the user still exists.String getKeyForUser(com.atlassian.crowd.embedded.api.User user)
getKeyForUsername(user.getName())
, except that
it is null
-safe.
user
- the user to resolve to a key (may be null
)
getKeyForUsername(String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |