Interface UserClient

All Known Implementing Classes:
NativeUserClient

public interface UserClient
  • Field Details

  • Method Details

    • getUserByAccountId

      Optional<UserBean> getUserByAccountId(String accountId, String... expand)
    • getUser

      @Deprecated Optional<UserBean> getUser(String key, String... expand)
      Deprecated.
      Retrieves a user bean with the given key from Jira's /api/2/user resource
      Parameters:
      key - the key of the user
      expand - values to expand
      Returns:
      a user bean
    • getUserEmail

      Optional<String> getUserEmail(String accountId)
      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 Optional<UserBean> getUserByName(String username, String... expand)
      Deprecated.
      Retrieves 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 user
      expand - values to expand
      Returns:
      a user bean
    • findUsers

      List<UserBean> findUsers(String query, int maxResults)
      Returns a list of matching users matching the provided query.
      Parameters:
      query - query string to search for
      maxResults - Max number of users to retrieve
      Returns:
      matching users
    • getMyself

      Optional<UserBean> getMyself()
      Returns the currently logged in user.
    • getUsersByAccountId

      List<UserBean> getUsersByAccountId(Set<String> userAccountIds, int maxResults)
      Get users in bulk using their accountIds
      Parameters:
      userAccountIds - set or user accountIds
      maxResults - Max number of users to retrieve
      Returns:
      matching users