|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.user.UserUtils
public class UserUtils
A static helper class for User operations. Normally you should use dependency injection to get hold of a UserManager or a UserUtil instance.
| Constructor Summary | |
|---|---|
UserUtils()
|
|
| Method Summary | |
|---|---|
static Collection<com.atlassian.crowd.embedded.api.User> |
getAllUsers()
Returns all users. |
static com.atlassian.crowd.embedded.api.User |
getUser(String username)
Retrieves and returns the user by given username. |
static com.atlassian.crowd.embedded.api.User |
getUserByEmail(String emailAddress)
Return the first user found that matches the given email address (or null if not found). |
static com.atlassian.crowd.embedded.api.User |
getUserEvenWhenUnknown(String username)
Returns a User based on user name. |
static UserManager |
getUserManager()
|
static boolean |
userExists(String username)
Checks if a user with given username exists. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UserUtils()
| Method Detail |
|---|
public static boolean userExists(String username)
username - username to look up
public static com.atlassian.crowd.embedded.api.User getUser(String username)
username - the username to get
public static com.atlassian.crowd.embedded.api.User getUserEvenWhenUnknown(String username)
User based on user name.
If a null username is passed, then a null User object is returned, but it is guaranteed to return a non-null User in all other cases.
If the username is not null, but the User is not found then a proxy unknown immutable User object is returned.
username - the user name of the user
public static com.atlassian.crowd.embedded.api.User getUserByEmail(String emailAddress)
The email address is matched case insensitive.
emailAddress - user email address
public static Collection<com.atlassian.crowd.embedded.api.User> getAllUsers()
WARNING: this could be very high in some JIRA installations, and may therefore pose a performance issue.
public static UserManager getUserManager()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||