Package com.io7m.idstore.admin_client.api

# Interface IdAClientAdminsType

All Known Subinterfaces:
  `IdAClientProtocolHandlerType`, `IdAClientType`

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

public interface IdAClientAdminsType
Commands related to admins.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `adminBanCreate(IdBan ban)`
  Create a ban on the given admin account.
  `void`
  `adminBanDelete(IdBan ban)`
  Delete the given ban.
  `Optional<IdBan>`
  `adminBanGet(UUID id)`
  Get the ban for the given admin, if one exists.
  `IdAdmin`
  `adminCreate(Optional<UUID> id, IdName idName, IdRealName realName, IdEmail email, IdPassword password, IdAdminPermissionSet permissions)`
  Create a admin.
  `void`
  `adminDelete(UUID id)`
  Delete the given admin.
  `IdAdmin`
  `adminEmailAdd(UUID id, IdEmail email)`
  Add an email to the given admin.
  `IdAdmin`
  `adminEmailRemove(UUID id, IdEmail email)`
  Remove an email from the given admin.
  `Optional<IdAdmin>`
  `adminGet(UUID id)`
  Fetch the given admin.
  `Optional<IdAdmin>`
  `adminGetByEmail(IdEmail email)`
  Fetch the given admin.
  `IdAdmin`
  `adminPermissionGrant(UUID id, IdAdminPermission permission)`
  Grant a permission to the given admin.
  `IdAdmin`
  `adminPermissionRevoke(UUID id, IdAdminPermission permission)`
  Revoke a permission from the given admin.
  `IdPage<IdAdminSummary>`
  `adminSearchBegin(IdAdminSearchParameters parameters)`
  Start searching/listing admins.
  `IdPage<IdAdminSummary>`
  `adminSearchByEmailBegin(IdAdminSearchByEmailParameters parameters)`
  Start searching/listing admins.
  `IdPage<IdAdminSummary>`
  `adminSearchByEmailNext()`
  Continue searching/listing admins.
  `IdPage<IdAdminSummary>`
  `adminSearchByEmailPrevious()`
  Continue searching/listing admins.
  `IdPage<IdAdminSummary>`
  `adminSearchNext()`
  Continue searching/listing admins.
  `IdPage<IdAdminSummary>`
  `adminSearchPrevious()`
  Continue searching/listing admins.
  `IdAdmin`
  `adminSelf()`
  Retrieve the current admin profile.
  `IdAdmin`
  `adminUpdate(UUID admin, Optional<IdName> idName, Optional<IdRealName> realName, Optional<IdPassword> password)`
  Update the given admin.

- ## Method Details

  - ### adminSelf

    IdAdmin adminSelf() throws IdAClientException, InterruptedException
    Retrieve the current admin profile.
    Returns:
      The current user
    Throws:
      `IdAClientException` - On errors
      `InterruptedException` - On interruption

  - ### adminSearchBegin

    IdPage<IdAdminSummary> adminSearchBegin(IdAdminSearchParameters parameters) throws IdAClientException, InterruptedException
    Start searching/listing admins. 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

  - ### adminSearchNext

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

  - ### adminSearchPrevious

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

  - ### adminSearchByEmailBegin

    IdPage<IdAdminSummary> adminSearchByEmailBegin(IdAdminSearchByEmailParameters parameters) throws IdAClientException, InterruptedException
    Start searching/listing admins. 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

  - ### adminSearchByEmailNext

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

  - ### adminSearchByEmailPrevious

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

  - ### adminGet

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

  - ### adminGetByEmail

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

  - ### adminUpdate

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

  - ### adminCreate

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

  - ### adminDelete

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

  - ### adminEmailAdd

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

  - ### adminEmailRemove

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

  - ### adminPermissionGrant

    IdAdmin adminPermissionGrant(UUID id, IdAdminPermission permission) throws IdAClientException, InterruptedException
    Grant a permission to the given admin.
    Parameters:
      `id` - The admin ID
      `permission` - The permission
    Returns:
      The updated admin
    Throws:
      `IdAClientException` - On errors
      `InterruptedException` - On interruption

  - ### adminPermissionRevoke

    IdAdmin adminPermissionRevoke(UUID id, IdAdminPermission permission) throws IdAClientException, InterruptedException
    Revoke a permission from the given admin.
    Parameters:
      `id` - The admin ID
      `permission` - The permission
    Returns:
      The updated admin
    Throws:
      `IdAClientException` - On errors
      `InterruptedException` - On interruption

  - ### adminBanCreate

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

  - ### adminBanGet

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

  - ### adminBanDelete

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