Interface AdministrationApi


public interface AdministrationApi
AdministrationApi contains all the api operations handling Administration in the DzidziApp. This is the admin Api.
  • Method Details

    • findAdminById

      Administration findAdminById(UUID adminId)
      Finds an admin by id.
      Parameters:
      adminId - the admin id
      Returns:
      the user found
      Throws:
      com.dzidzi.exception.EntityNotFoundException - when the admin is not found
    • addAdmin

      Administration addAdmin(AddAdministrationRequest addAdministrationRequest, String verificationCode)
      Adds/creates a new admin. To be able to create a new admin, credential is needed. See CredentialApi.addNewUserCredentialByAdmin(String, UserRole) on how to create credential.
      Parameters:
      addAdministrationRequest - the AddAdministrationRequest containing the properties to create/add a new admin
      verificationCode - the admin verification code
      Returns:
      the admin created/added
    • changePassword

      void changePassword(String oldPassword, String newPassword)
      Changes the existing password to the provided new password.
      Parameters:
      oldPassword - the existing password
      newPassword - the new password to use
    • getAdminByCredentialId

      Administration getAdminByCredentialId(UUID credentialId)