Class IdAClientProtocolHandler1
java.lang.Object
com.io7m.idstore.admin_client.internal.IdAClientProtocolHandlerAbstract
com.io7m.idstore.admin_client.internal.IdAClientProtocolHandler1
- All Implemented Interfaces:
IdAClientAdminsType,IdAClientAuditType,IdAClientUsersType,IdAClientProtocolHandlerType
The version 1 protocol handler.
-
Constructor Summary
ConstructorsConstructorDescriptionIdAClientProtocolHandler1(HttpClient inHttpClient, IdAStrings inStrings, URI inBase) The version 1 protocol handler. -
Method Summary
Modifier and TypeMethodDescriptionvoidadminBanCreate(IdBan ban) Create a ban on the given admin account.voidadminBanDelete(IdBan ban) Delete the given ban.adminBanGet(UUID id) Get the ban for the given admin, if one exists.adminCreate(Optional<UUID> id, IdName idName, IdRealName realName, IdEmail email, IdPassword password, IdAdminPermissionSet permissions) Create a admin.voidadminDelete(UUID id) Delete the given admin.adminEmailAdd(UUID id, IdEmail email) Add an email to the given admin.adminEmailRemove(UUID id, IdEmail email) Remove an email from the given admin.Fetch the given admin.adminGetByEmail(IdEmail email) Fetch the given admin.adminPermissionGrant(UUID id, IdAdminPermission permission) Grant a permission to the given admin.adminPermissionRevoke(UUID id, IdAdminPermission permission) Revoke a permission from the given admin.adminSearchBegin(IdAdminSearchParameters parameters) Start searching/listing admins.Start searching/listing admins.Continue searching/listing admins.Continue searching/listing admins.Continue searching/listing admins.Continue searching/listing admins.Retrieve the current admin profile.adminUpdate(UUID admin, Optional<IdName> idName, Optional<IdRealName> realName, Optional<IdPassword> password) Update the given admin.auditSearchBegin(IdTimeRange timeRange, Optional<String> owner, Optional<String> type, Optional<String> message, int pageSize) Start searching/listing audit events.Continue searching/listing events.Continue searching/listing events.Attempt to log in.voiduserBanCreate(IdBan ban) Create a ban on the given user account.voiduserBanDelete(IdBan ban) Delete the given ban.userBanGet(UUID id) Get the ban for the given user, if one exists.userCreate(Optional<UUID> id, IdName idName, IdRealName realName, IdEmail email, IdPassword password) Create a user.voiduserDelete(UUID id) Delete the given user.userEmailAdd(UUID id, IdEmail email) Add an email to the given user.userEmailRemove(UUID id, IdEmail email) Remove an email from the given user.Fetch the given user.userGetByEmail(IdEmail email) Fetch the given user.userLoginHistory(UUID id) List the login history for the given user.userSearchBegin(IdUserSearchParameters parameters) Start searching/listing users.userSearchByEmailBegin(IdUserSearchByEmailParameters parameters) Start searching/listing users.Continue searching/listing users.Continue searching/listing users.Continue searching/listing users.Continue searching/listing users.userUpdate(UUID user, Optional<IdName> idName, Optional<IdRealName> realName, Optional<IdPassword> password) Update the given user.Methods inherited from class com.io7m.idstore.admin_client.internal.IdAClientProtocolHandlerAbstract
base, httpClient, stringsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.io7m.idstore.admin_client.api.IdAClientUsersType
userCreate
-
Constructor Details
-
IdAClientProtocolHandler1
The version 1 protocol handler.- Parameters:
inHttpClient- The HTTP clientinStrings- The string resourcesinBase- The base URI
-
-
Method Details
-
login
public IdANewHandler login(String admin, String password, URI base) throws IdAClientException, InterruptedException Description copied from interface:IdAClientProtocolHandlerTypeAttempt to log in.- Parameters:
admin- The adminpassword- The passwordbase- The base URI- Returns:
- A new protocol handler
- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
adminSelf
Description copied from interface:IdAClientAdminsTypeRetrieve the current admin profile.- Returns:
- The current user
- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
userSearchBegin
public IdPage<IdUserSummary> userSearchBegin(IdUserSearchParameters parameters) throws IdAClientException, InterruptedException Description copied from interface:IdAClientUsersTypeStart 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 errorsInterruptedException- On interruption
-
userSearchNext
Description copied from interface:IdAClientUsersTypeContinue searching/listing users. This will return the next page of results.- Returns:
- The next page of results
- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
userSearchPrevious
Description copied from interface:IdAClientUsersTypeContinue searching/listing users. This will return the previous page of results.- Returns:
- The previous page of results
- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
userSearchByEmailBegin
public IdPage<IdUserSummary> userSearchByEmailBegin(IdUserSearchByEmailParameters parameters) throws IdAClientException, InterruptedException Description copied from interface:IdAClientUsersTypeStart 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 errorsInterruptedException- On interruption
-
userSearchByEmailNext
public IdPage<IdUserSummary> userSearchByEmailNext() throws IdAClientException, InterruptedExceptionDescription copied from interface:IdAClientUsersTypeContinue searching/listing users. This will return the next page of results.- Returns:
- The next page of results
- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
userSearchByEmailPrevious
public IdPage<IdUserSummary> userSearchByEmailPrevious() throws IdAClientException, InterruptedExceptionDescription copied from interface:IdAClientUsersTypeContinue searching/listing users. This will return the previous page of results.- Returns:
- The previous page of results
- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
userGet
Description copied from interface:IdAClientUsersTypeFetch the given user.- Parameters:
id- The user ID- Returns:
- The user, if one exists
- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
userGetByEmail
public Optional<IdUser> userGetByEmail(IdEmail email) throws IdAClientException, InterruptedException Description copied from interface:IdAClientUsersTypeFetch the given user.- Parameters:
email- The user email- Returns:
- The user, if one exists
- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
userUpdate
public IdUser userUpdate(UUID user, Optional<IdName> idName, Optional<IdRealName> realName, Optional<IdPassword> password) throws IdAClientException, InterruptedException Description copied from interface:IdAClientUsersTypeUpdate the given user.- Parameters:
user- The useridName- The new idnamerealName- The new realnamepassword- The new password- Returns:
- The updated user
- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
userEmailAdd
Description copied from interface:IdAClientUsersTypeAdd an email to the given user.- Parameters:
id- The user IDemail- The email address- Returns:
- The updated user
- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
userEmailRemove
public IdUser userEmailRemove(UUID id, IdEmail email) throws IdAClientException, InterruptedException Description copied from interface:IdAClientUsersTypeRemove an email from the given user.- Parameters:
id- The user IDemail- The email address- Returns:
- The updated user
- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
userCreate
public IdUser userCreate(Optional<UUID> id, IdName idName, IdRealName realName, IdEmail email, IdPassword password) throws IdAClientException, InterruptedException Description copied from interface:IdAClientUsersTypeCreate a user.- Parameters:
id- The IDidName- The ID namerealName- The real nameemail- The emailpassword- The password- Returns:
- The created user
- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
userDelete
Description copied from interface:IdAClientUsersTypeDelete the given user.- Parameters:
id- The user ID- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
auditSearchBegin
public IdPage<IdAuditEvent> auditSearchBegin(IdTimeRange timeRange, Optional<String> owner, Optional<String> type, Optional<String> message, int pageSize) throws IdAClientException, InterruptedException Description copied from interface:IdAClientAuditTypeStart searching/listing audit events. Calling this method will set the search parameters and effectively reset searching back to page 1 of any results.- Parameters:
timeRange- The time range within which events should have been createdowner- The owner search querytype- The type search querymessage- The message search querypageSize- The page size- Returns:
- The first page of results
- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
auditSearchNext
Description copied from interface:IdAClientAuditTypeContinue searching/listing events. This will return the next page of results.- Returns:
- The next page of results
- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
auditSearchPrevious
Description copied from interface:IdAClientAuditTypeContinue searching/listing events. This will return the previous page of results.- Returns:
- The previous page of results
- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
adminSearchBegin
public IdPage<IdAdminSummary> adminSearchBegin(IdAdminSearchParameters parameters) throws IdAClientException, InterruptedException Description copied from interface:IdAClientAdminsTypeStart 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 errorsInterruptedException- On interruption
-
adminSearchNext
Description copied from interface:IdAClientAdminsTypeContinue searching/listing admins. This will return the next page of results.- Returns:
- The next page of results
- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
adminSearchPrevious
Description copied from interface:IdAClientAdminsTypeContinue searching/listing admins. This will return the previous page of results.- Returns:
- The previous page of results
- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
adminSearchByEmailBegin
public IdPage<IdAdminSummary> adminSearchByEmailBegin(IdAdminSearchByEmailParameters parameters) throws IdAClientException, InterruptedException Description copied from interface:IdAClientAdminsTypeStart 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 errorsInterruptedException- On interruption
-
adminSearchByEmailNext
public IdPage<IdAdminSummary> adminSearchByEmailNext() throws IdAClientException, InterruptedExceptionDescription copied from interface:IdAClientAdminsTypeContinue searching/listing admins. This will return the next page of results.- Returns:
- The next page of results
- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
adminSearchByEmailPrevious
public IdPage<IdAdminSummary> adminSearchByEmailPrevious() throws IdAClientException, InterruptedExceptionDescription copied from interface:IdAClientAdminsTypeContinue searching/listing admins. This will return the previous page of results.- Returns:
- The previous page of results
- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
adminGet
Description copied from interface:IdAClientAdminsTypeFetch the given admin.- Parameters:
id- The admin ID- Returns:
- The admin, if one exists
- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
adminGetByEmail
public Optional<IdAdmin> adminGetByEmail(IdEmail email) throws IdAClientException, InterruptedException Description copied from interface:IdAClientAdminsTypeFetch the given admin.- Parameters:
email- The admin email- Returns:
- The admin, if one exists
- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
adminUpdate
public IdAdmin adminUpdate(UUID admin, Optional<IdName> idName, Optional<IdRealName> realName, Optional<IdPassword> password) throws IdAClientException, InterruptedException Description copied from interface:IdAClientAdminsTypeUpdate the given admin.- Parameters:
admin- The adminidName- The new idnamerealName- The new realnamepassword- The new password- Returns:
- The updated admin
- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
adminCreate
public IdAdmin adminCreate(Optional<UUID> id, IdName idName, IdRealName realName, IdEmail email, IdPassword password, IdAdminPermissionSet permissions) throws IdAClientException, InterruptedException Description copied from interface:IdAClientAdminsTypeCreate a admin.- Parameters:
id- The IDidName- The ID namerealName- The real nameemail- The emailpassword- The passwordpermissions- The permissions- Returns:
- The created admin
- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
adminDelete
Description copied from interface:IdAClientAdminsTypeDelete the given admin.- Parameters:
id- The admin ID- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
adminEmailAdd
public IdAdmin adminEmailAdd(UUID id, IdEmail email) throws IdAClientException, InterruptedException Description copied from interface:IdAClientAdminsTypeAdd an email to the given admin.- Parameters:
id- The admin IDemail- The email address- Returns:
- The updated admin
- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
adminEmailRemove
public IdAdmin adminEmailRemove(UUID id, IdEmail email) throws IdAClientException, InterruptedException Description copied from interface:IdAClientAdminsTypeRemove an email from the given admin.- Parameters:
id- The admin IDemail- The email address- Returns:
- The updated admin
- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
adminPermissionGrant
public IdAdmin adminPermissionGrant(UUID id, IdAdminPermission permission) throws IdAClientException, InterruptedException Description copied from interface:IdAClientAdminsTypeGrant a permission to the given admin.- Parameters:
id- The admin IDpermission- The permission- Returns:
- The updated admin
- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
adminPermissionRevoke
public IdAdmin adminPermissionRevoke(UUID id, IdAdminPermission permission) throws IdAClientException, InterruptedException Description copied from interface:IdAClientAdminsTypeRevoke a permission from the given admin.- Parameters:
id- The admin IDpermission- The permission- Returns:
- The updated admin
- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
adminBanCreate
Description copied from interface:IdAClientAdminsTypeCreate a ban on the given admin account.- Parameters:
ban- The ban- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
adminBanGet
Description copied from interface:IdAClientAdminsTypeGet the ban for the given admin, if one exists.- Parameters:
id- The admin ID- Returns:
- The ban, if any
- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
adminBanDelete
Description copied from interface:IdAClientAdminsTypeDelete the given ban.- Parameters:
ban- The ban- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
userBanCreate
Description copied from interface:IdAClientUsersTypeCreate a ban on the given user account.- Parameters:
ban- The ban- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
userBanGet
Description copied from interface:IdAClientUsersTypeGet the ban for the given user, if one exists.- Parameters:
id- The user ID- Returns:
- The ban, if any
- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
userBanDelete
Description copied from interface:IdAClientUsersTypeDelete the given ban.- Parameters:
ban- The ban- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-
userLoginHistory
Description copied from interface:IdAClientUsersTypeList the login history for the given user.- Parameters:
id- The user ID- Returns:
- The login history
- Throws:
IdAClientException- On errorsInterruptedException- On interruption
-