Package com.dzidzi.api
Interface AdministrationApi
public interface AdministrationApi
AdministrationApi contains all the api operations handling
Administration in the DzidziApp.
This is the admin Api.-
Method Summary
Modifier and TypeMethodDescriptionaddAdmin(AddAdministrationRequest addAdministrationRequest, String verificationCode) Adds/creates a new admin.voidchangePassword(String oldPassword, String newPassword) Changes the existing password to the provided new password.findAdminById(UUID adminId) Finds an admin by id.getAdminByCredentialId(UUID credentialId)
-
Method Details
-
findAdminById
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
Adds/creates a new admin. To be able to create a new admin, credential is needed. SeeCredentialApi.addNewUserCredentialByAdmin(String, UserRole)on how to create credential.- Parameters:
addAdministrationRequest- theAddAdministrationRequestcontaining the properties to create/add a new adminverificationCode- the admin verification code- Returns:
- the admin created/added
-
changePassword
Changes the existing password to the provided new password.- Parameters:
oldPassword- the existing passwordnewPassword- the new password to use
-
getAdminByCredentialId
-