Package com.codebarrel.jira.user
Interface UserClient
- All Known Implementing Classes:
NativeUserClient
public interface UserClient
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionReturns a list of matching users matching the provided query.Returns the currently logged in user.Deprecated.getUserByAccountId(String accountId, String... expand) getUserByName(String username, String... expand) Deprecated.usegetUserByAccountId(String, String...)insteadgetUserEmail(String accountId) Returns a user's e-mail.getUsersByAccountId(Set<String> userAccountIds, int maxResults) Get users in bulk using their accountIds
-
Field Details
-
GROUPS
- See Also:
-
-
Method Details
-
getUserByAccountId
-
getUser
Deprecated.usegetUserByAccountId(String, String...)insteadRetrieves a user bean with the given key from Jira's /api/2/user resource- Parameters:
key- the key of the userexpand- values to expand- Returns:
- a user bean
-
getUserEmail
Returns a user's e-mail. This is needed, since email addresses may be null in Cloud and there's a specific API only available to some approved apps for retrieving the user's email address.- Parameters:
accountId- the account id of the user- Returns:
- Email address for user or empty
-
getUserByName
Deprecated.usegetUserByAccountId(String, String...)insteadRetrieves a user bean with the given username from Jira's /api/2/user resource.In general this method should *not* be used. Use the
getUser(String, String...)method instead.- Parameters:
username- the username of the userexpand- values to expand- Returns:
- a user bean
-
findUsers
Returns a list of matching users matching the provided query.- Parameters:
query- query string to search formaxResults- Max number of users to retrieve- Returns:
- matching users
-
getMyself
Returns the currently logged in user. -
getUsersByAccountId
Get users in bulk using their accountIds- Parameters:
userAccountIds- set or user accountIdsmaxResults- Max number of users to retrieve- Returns:
- matching users
-
getUserByAccountId(String, String...)instead