Package com.io7m.idstore.admin_client.api

# Interface IdAClientUsersType

All Known Subinterfaces:
  `IdAClientProtocolHandlerType`, `IdAClientType`

All Known Implementing Classes:
  `IdAClient`, `IdAClientProtocolHandler1`, `IdAClientProtocolHandlerAbstract`, `IdAClientProtocolHandlerDisconnected`

public interface IdAClientUsersType
Commands related to users.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `userBanCreate(IdBan ban)`
  Create a ban on the given user account.
  `void`
  `userBanDelete(IdBan ban)`
  Delete the given ban.
  `Optional<IdBan>`
  `userBanGet(UUID id)`
  Get the ban for the given user, if one exists.
  `default IdUser`
  `userCreate(IdUserCreate create)`
  Create a user.
  `IdUser`
  `userCreate(Optional<UUID> id, IdName idName, IdRealName realName, IdEmail email, IdPassword password)`
  Create a user.
  `void`
  `userDelete(UUID id)`
  Delete the given user.
  `IdUser`
  `userEmailAdd(UUID id, IdEmail email)`
  Add an email to the given user.
  `IdUser`
  `userEmailRemove(UUID id, IdEmail email)`
  Remove an email from the given user.
  `Optional<IdUser>`
  `userGet(UUID id)`
  Fetch the given user.
  `Optional<IdUser>`
  `userGetByEmail(IdEmail email)`
  Fetch the given user.
  `List<IdLogin>`
  `userLoginHistory(UUID id)`
  List the login history for the given user.
  `IdPage<IdUserSummary>`
  `userSearchBegin(IdUserSearchParameters parameters)`
  Start searching/listing users.
  `IdPage<IdUserSummary>`
  `userSearchByEmailBegin(IdUserSearchByEmailParameters parameters)`
  Start searching/listing users.
  `IdPage<IdUserSummary>`
  `userSearchByEmailNext()`
  Continue searching/listing users.
  `IdPage<IdUserSummary>`
  `userSearchByEmailPrevious()`
  Continue searching/listing users.
  `IdPage<IdUserSummary>`
  `userSearchNext()`
  Continue searching/listing users.
  `IdPage<IdUserSummary>`
  `userSearchPrevious()`
  Continue searching/listing users.
  `IdUser`
  `userUpdate(UUID user, Optional<IdName> idName, Optional<IdRealName> realName, Optional<IdPassword> password)`
  Update the given user.

- ## Method Details

  - ### userSearchBegin

    IdPage<IdUserSummary> userSearchBegin(IdUserSearchParameters parameters) throws IdAClientException, InterruptedException
    Start searching/listing users. Calling this method will set the search parameters and effectively reset searching back to page 1 of any results.
    Parameters:
      `parameters` - The search parameters
    Returns:
      The first page of results
    Throws:
      `IdAClientException` - On errors
      `InterruptedException` - On interruption

  - ### userSearchNext

    IdPage<IdUserSummary> userSearchNext() throws IdAClientException, InterruptedException
    Continue searching/listing users. This will return the next page of results.
    Returns:
      The next page of results
    Throws:
      `IdAClientException` - On errors
      `InterruptedException` - On interruption

  - ### userSearchPrevious

    IdPage<IdUserSummary> userSearchPrevious() throws IdAClientException, InterruptedException
    Continue searching/listing users. This will return the previous page of results.
    Returns:
      The previous page of results
    Throws:
      `IdAClientException` - On errors
      `InterruptedException` - On interruption

  - ### userSearchByEmailBegin

    IdPage<IdUserSummary> userSearchByEmailBegin(IdUserSearchByEmailParameters parameters) throws IdAClientException, InterruptedException
    Start searching/listing users. Calling this method will set the search parameters and effectively reset searching back to page 1 of any results.
    Parameters:
      `parameters` - The search parameters
    Returns:
      The first page of results
    Throws:
      `IdAClientException` - On errors
      `InterruptedException` - On interruption

  - ### userSearchByEmailNext

    IdPage<IdUserSummary> userSearchByEmailNext() throws IdAClientException, InterruptedException
    Continue searching/listing users. This will return the next page of results.
    Returns:
      The next page of results
    Throws:
      `IdAClientException` - On errors
      `InterruptedException` - On interruption

  - ### userSearchByEmailPrevious

    IdPage<IdUserSummary> userSearchByEmailPrevious() throws IdAClientException, InterruptedException
    Continue searching/listing users. This will return the previous page of results.
    Returns:
      The previous page of results
    Throws:
      `IdAClientException` - On errors
      `InterruptedException` - On interruption

  - ### userGet

    Optional<IdUser> userGet(UUID id) throws IdAClientException, InterruptedException
    Fetch the given user.
    Parameters:
      `id` - The user ID
    Returns:
      The user, if one exists
    Throws:
      `IdAClientException` - On errors
      `InterruptedException` - On interruption

  - ### userGetByEmail

    Optional<IdUser> userGetByEmail(IdEmail email) throws IdAClientException, InterruptedException
    Fetch the given user.
    Parameters:
      `email` - The user email
    Returns:
      The user, if one exists
    Throws:
      `IdAClientException` - On errors
      `InterruptedException` - On interruption

  - ### userUpdate

    IdUser userUpdate(UUID user, Optional<IdName> idName, Optional<IdRealName> realName, Optional<IdPassword> password) throws IdAClientException, InterruptedException
    Update the given user.
    Parameters:
      `user` - The user
      `idName` - The new idname
      `realName` - The new realname
      `password` - The new password
    Returns:
      The updated user
    Throws:
      `IdAClientException` - On errors
      `InterruptedException` - On interruption

  - ### userEmailAdd

    IdUser userEmailAdd(UUID id, IdEmail email) throws IdAClientException, InterruptedException
    Add an email to the given user.
    Parameters:
      `id` - The user ID
      `email` - The email address
    Returns:
      The updated user
    Throws:
      `IdAClientException` - On errors
      `InterruptedException` - On interruption

  - ### userEmailRemove

    IdUser userEmailRemove(UUID id, IdEmail email) throws IdAClientException, InterruptedException
    Remove an email from the given user.
    Parameters:
      `id` - The user ID
      `email` - The email address
    Returns:
      The updated user
    Throws:
      `IdAClientException` - On errors
      `InterruptedException` - On interruption

  - ### userCreate

    IdUser userCreate(Optional<UUID> id, IdName idName, IdRealName realName, IdEmail email, IdPassword password) throws IdAClientException, InterruptedException
    Create a user.
    Parameters:
      `id` - The ID
      `password` - The password
      `realName` - The real name
      `email` - The email
      `idName` - The ID name
    Returns:
      The created user
    Throws:
      `IdAClientException` - On errors
      `InterruptedException` - On interruption

  - ### userCreate

    default IdUser userCreate(IdUserCreate create) throws IdAClientException, InterruptedException
    Create a user.
    Parameters:
      `create` - The creation info
    Returns:
      The created user
    Throws:
      `IdAClientException` - On errors
      `InterruptedException` - On interruption

  - ### userDelete

    void userDelete(UUID id) throws IdAClientException, InterruptedException
    Delete the given user.
    Parameters:
      `id` - The user ID
    Throws:
      `IdAClientException` - On errors
      `InterruptedException` - On interruption

  - ### userBanCreate

    void userBanCreate(IdBan ban) throws IdAClientException, InterruptedException
    Create a ban on the given user account.
    Parameters:
      `ban` - The ban
    Throws:
      `IdAClientException` - On errors
      `InterruptedException` - On interruption

  - ### userBanGet

    Optional<IdBan> userBanGet(UUID id) throws IdAClientException, InterruptedException
    Get the ban for the given user, if one exists.
    Parameters:
      `id` - The user ID
    Returns:
      The ban, if any
    Throws:
      `IdAClientException` - On errors
      `InterruptedException` - On interruption

  - ### userBanDelete

    void userBanDelete(IdBan ban) throws IdAClientException, InterruptedException
    Delete the given ban.
    Parameters:
      `ban` - The ban
    Throws:
      `IdAClientException` - On errors
      `InterruptedException` - On interruption

  - ### userLoginHistory

    List<IdLogin> userLoginHistory(UUID id) throws IdAClientException, InterruptedException
    List the login history for the given user.
    Parameters:
      `id` - The user ID
    Returns:
      The login history
    Throws:
      `IdAClientException` - On errors
      `InterruptedException` - On interruption