Package africa.absa.inception.security
Interface ISecurityService
-
- All Known Implementing Classes:
SecurityService
public interface ISecurityServiceThe ISecurityService interface defines the functionality provided by a Security Service implementation, which manages the security related information for an application.- Author:
- Marcus Portmann
-
-
Field Summary
Fields Modifier and Type Field Description static StringADMINISTRATOR_ROLE_CODEThe code for the Administrator role.static StringADMINISTRATOR_USERNAMEThe username for the Administrator user.static UUIDADMINISTRATORS_GROUP_IDThe Universally Unique Identifier (UUID) for the Administrators group.static StringADMINISTRATORS_GROUP_NAMEThe name of the Administrators group.static UUIDDEFAULT_TENANT_IDThe Universally Unique Identifier (UUID) for the default tenant.static UUIDDEFAULT_USER_DIRECTORY_IDThe Universally Unique Identifier (UUID) for the default internal user directory.static StringINTERNAL_USER_DIRECTORY_TYPEThe code for the internal user directory type.static StringLDAP_USER_DIRECTORY_TYPEThe code for the LDAP user directory type.static StringPASSWORD_RESETTER_ROLE_CODEThe code for the Password Resetter role.static StringTENANT_ADMINISTRATOR_ROLE_CODEThe code for the Tenant Administrator role.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddMemberToGroup(UUID userDirectoryId, String groupName, GroupMemberType memberType, String memberName)Add the group member to the group.voidaddRoleToGroup(UUID userDirectoryId, String groupName, String roleCode)Add the role to the group.voidaddUserDirectoryToTenant(UUID tenantId, UUID userDirectoryId)Add the user directory to the tenant.voidaddUserToGroup(UUID userDirectoryId, String groupName, String username)Add the user to the group.voidadminChangePassword(UUID userDirectoryId, String username, String newPassword, boolean expirePassword, boolean lockUser, boolean resetPasswordHistory, PasswordChangeReason reason)Administratively change the password for the user.UUIDauthenticate(String username, String password)Authenticate the user.UUIDchangePassword(String username, String password, String newPassword)Change the password for the user.voidcreateFunction(Function function)Create the new function.voidcreateGroup(Group group)Create the new group.Optional<UserDirectory>createTenant(Tenant tenant, boolean createUserDirectory)Create the new tenant.voidcreateUser(User user, boolean expiredPassword, boolean userLocked)Create the new user.voidcreateUserDirectory(UserDirectory userDirectory)Create the new user directory.voiddeleteFunction(String functionCode)Delete the function.voiddeleteGroup(UUID userDirectoryId, String groupName)Delete the group.voiddeleteTenant(UUID tenantId)Delete the tenant.voiddeleteUser(UUID userDirectoryId, String username)Delete the user.voiddeleteUserDirectory(UUID userDirectoryId)Delete the user directory.List<User>findUsers(UUID userDirectoryId, List<UserAttribute> userAttributes)Retrieve the users matching the user attribute criteria.FunctiongetFunction(String functionCode)Retrieve the function.List<String>getFunctionCodesForUser(UUID userDirectoryId, String username)Retrieve the function codes for the user.List<Function>getFunctions()Retrieve all the functions.GroupgetGroup(UUID userDirectoryId, String groupName)Retrieve the group.List<String>getGroupNames(UUID userDirectoryId)Retrieve all the group names.List<String>getGroupNamesForUser(UUID userDirectoryId, String username)Retrieve the names of the groups the user is a member of.List<Group>getGroups(UUID userDirectoryId)Retrieve all the groups.GroupsgetGroups(UUID userDirectoryId, String filter, africa.absa.inception.core.sorting.SortDirection sortDirection, Integer pageIndex, Integer pageSize)Retrieve the groups.List<Group>getGroupsForUser(UUID userDirectoryId, String username)Retrieve the groups the user is a member of.List<GroupMember>getMembersForGroup(UUID userDirectoryId, String groupName)Retrieve the group members for the group.GroupMembersgetMembersForGroup(UUID userDirectoryId, String groupName, String filter, africa.absa.inception.core.sorting.SortDirection sortDirection, Integer pageIndex, Integer pageSize)Retrieve the group members for the group.List<String>getRoleCodesForGroup(UUID userDirectoryId, String groupName)Retrieve the codes for the roles that have been assigned to the group.List<String>getRoleCodesForUser(UUID userDirectoryId, String username)Retrieve the codes for the roles that have been assigned to the user.List<Role>getRoles()Retrieve all the roles.List<GroupRole>getRolesForGroup(UUID userDirectoryId, String groupName)Retrieve the roles that have been assigned to the group.TenantgetTenant(UUID tenantId)Retrieve the tenant.List<UUID>getTenantIdsForUserDirectory(UUID userDirectoryId)Retrieve the Universally Unique Identifiers (UUIDs) for the tenants the user directory is associated with.StringgetTenantName(UUID tenantId)Retrieve the name of the tenant.List<Tenant>getTenants()Retrieve the tenants.TenantsgetTenants(String filter, africa.absa.inception.core.sorting.SortDirection sortDirection, Integer pageIndex, Integer pageSize)Retrieve the tenants.List<Tenant>getTenantsForUserDirectory(UUID userDirectoryId)Retrieve the tenants the user directory is associated with.UsergetUser(UUID userDirectoryId, String username)Retrieve the user.List<UserDirectory>getUserDirectories()Retrieve the user directories.UserDirectoriesgetUserDirectories(String filter, africa.absa.inception.core.sorting.SortDirection sortDirection, Integer pageIndex, Integer pageSize)Retrieve the user directories.List<UserDirectory>getUserDirectoriesForTenant(UUID tenantId)Retrieve the user directories the tenant is associated with.UserDirectorygetUserDirectory(UUID userDirectoryId)Retrieve the user directory.UserDirectoryCapabilitiesgetUserDirectoryCapabilities(UUID userDirectoryId)Retrieve the capabilities the user directory supports.Optional<UUID>getUserDirectoryIdForUser(String username)Retrieve the Universally Unique Identifier (UUID) for the user directory that the user with the specified username is associated with.List<UUID>getUserDirectoryIdsForTenant(UUID tenantId)Retrieve the Universally Unique Identifiers (UUIDs) for the user directories the tenant is associated with.List<UUID>getUserDirectoryIdsForUser(String username)Retrieve the Universally Unique Identifiers (UUIDs) for the user directories the user is associated with.StringgetUserDirectoryName(UUID userDirectoryId)Retrieve the name of the user directory.UserDirectorySummariesgetUserDirectorySummaries(String filter, africa.absa.inception.core.sorting.SortDirection sortDirection, Integer pageIndex, Integer pageSize)Retrieve the summaries for the user directories.List<UserDirectorySummary>getUserDirectorySummariesForTenant(UUID tenantId)Retrieve the summaries for the user directories the tenant is associated with.UserDirectoryTypegetUserDirectoryTypeForUserDirectory(UUID userDirectoryId)Retrieve the user directory type for the user directory.List<UserDirectoryType>getUserDirectoryTypes()Retrieve the user directory types.StringgetUserName(UUID userDirectoryId, String username)Retrieve the name of the user.List<User>getUsers(UUID userDirectoryId)Retrieve all the users.UsersgetUsers(UUID userDirectoryId, String filter, UserSortBy sortBy, africa.absa.inception.core.sorting.SortDirection sortDirection, Integer pageIndex, Integer pageSize)Retrieve the users.voidinitiatePasswordReset(String username, String resetPasswordUrl, boolean sendEmail)Initiate the password reset process for the user.voidinitiatePasswordReset(String username, String resetPasswordUrl, boolean sendEmail, String securityCode)Initiate the password reset process for the user.booleanisExistingUser(UUID userDirectoryId, String username)Does the user with the specified username exist?booleanisUserInGroup(UUID userDirectoryId, String groupName, String username)Is the user in the group?voidreloadUserDirectories()Reload the user directories.voidremoveMemberFromGroup(UUID userDirectoryId, String groupName, GroupMemberType memberType, String memberName)Remove the group member from the group.voidremoveRoleFromGroup(UUID userDirectoryId, String groupName, String roleCode)Remove the role from the group.voidremoveUserDirectoryFromTenant(UUID tenantId, UUID userDirectoryId)Remove the user directory from the tenant.voidremoveUserFromGroup(UUID userDirectoryId, String groupName, String username)Remove the user from the group.voidresetPassword(String username, String newPassword, String securityCode)Reset the password for the user.voidupdateFunction(Function function)Update the function.voidupdateGroup(Group group)Update the group.voidupdateTenant(Tenant tenant)Update the tenant.voidupdateUser(User user, boolean expirePassword, boolean lockUser)Update the user.voidupdateUserDirectory(UserDirectory userDirectory)Update the user directory.
-
-
-
Field Detail
-
ADMINISTRATORS_GROUP_ID
static final UUID ADMINISTRATORS_GROUP_ID
The Universally Unique Identifier (UUID) for the Administrators group.
-
ADMINISTRATORS_GROUP_NAME
static final String ADMINISTRATORS_GROUP_NAME
The name of the Administrators group.- See Also:
- Constant Field Values
-
ADMINISTRATOR_ROLE_CODE
static final String ADMINISTRATOR_ROLE_CODE
The code for the Administrator role.- See Also:
- Constant Field Values
-
ADMINISTRATOR_USERNAME
static final String ADMINISTRATOR_USERNAME
The username for the Administrator user.- See Also:
- Constant Field Values
-
DEFAULT_TENANT_ID
static final UUID DEFAULT_TENANT_ID
The Universally Unique Identifier (UUID) for the default tenant.
-
DEFAULT_USER_DIRECTORY_ID
static final UUID DEFAULT_USER_DIRECTORY_ID
The Universally Unique Identifier (UUID) for the default internal user directory.
-
INTERNAL_USER_DIRECTORY_TYPE
static final String INTERNAL_USER_DIRECTORY_TYPE
The code for the internal user directory type.- See Also:
- Constant Field Values
-
LDAP_USER_DIRECTORY_TYPE
static final String LDAP_USER_DIRECTORY_TYPE
The code for the LDAP user directory type.- See Also:
- Constant Field Values
-
PASSWORD_RESETTER_ROLE_CODE
static final String PASSWORD_RESETTER_ROLE_CODE
The code for the Password Resetter role.- See Also:
- Constant Field Values
-
TENANT_ADMINISTRATOR_ROLE_CODE
static final String TENANT_ADMINISTRATOR_ROLE_CODE
The code for the Tenant Administrator role.- See Also:
- Constant Field Values
-
-
Method Detail
-
addMemberToGroup
void addMemberToGroup(UUID userDirectoryId, String groupName, GroupMemberType memberType, String memberName) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, GroupNotFoundException, UserNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Add the group member to the group.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directorygroupName- the name of the groupmemberType- the group member typememberName- the group member name- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundGroupNotFoundException- if the group could not be foundUserNotFoundException- if the user could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the group member could not be added to the group
-
addRoleToGroup
void addRoleToGroup(UUID userDirectoryId, String groupName, String roleCode) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, GroupNotFoundException, RoleNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Add the role to the group.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directorygroupName- the name of the grouproleCode- the code for the role- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundGroupNotFoundException- if the group could not be foundRoleNotFoundException- if the role could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the role could not be added to the group
-
addUserDirectoryToTenant
void addUserDirectoryToTenant(UUID tenantId, UUID userDirectoryId) throws africa.absa.inception.core.service.InvalidArgumentException, TenantNotFoundException, UserDirectoryNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Add the user directory to the tenant.- Parameters:
tenantId- the Universally Unique Identifier (UUID) for the tenantuserDirectoryId- the Universally Unique Identifier (UUID) for the user directory- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidTenantNotFoundException- if the tenant could not be foundUserDirectoryNotFoundException- if the user directory could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the user directory could not be added to the tenant
-
addUserToGroup
void addUserToGroup(UUID userDirectoryId, String groupName, String username) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, GroupNotFoundException, UserNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Add the user to the group.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directorygroupName- the name of the groupusername- the username for the user- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundGroupNotFoundException- if the group could not be foundUserNotFoundException- if the user could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the user could not be added to the group
-
adminChangePassword
void adminChangePassword(UUID userDirectoryId, String username, String newPassword, boolean expirePassword, boolean lockUser, boolean resetPasswordHistory, PasswordChangeReason reason) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, UserNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Administratively change the password for the user.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directoryusername- the username for the usernewPassword- the new passwordexpirePassword- expire the user's passwordlockUser- lock the userresetPasswordHistory- reset the user's password historyreason- the reason for changing the password- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundUserNotFoundException- if the user could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the password could not be administratively changed
-
authenticate
UUID authenticate(String username, String password) throws africa.absa.inception.core.service.InvalidArgumentException, AuthenticationFailedException, UserLockedException, ExpiredPasswordException, UserNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Authenticate the user.- Parameters:
username- the username for the userpassword- the password being used to authenticate- Returns:
- the Universally Unique Identifier (UUID) for the user directory
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidAuthenticationFailedException- if the authentication failedUserLockedException- if the user is lockedExpiredPasswordException- if the password for the user has expiredUserNotFoundException- if the user could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the user could not be authenticated
-
changePassword
UUID changePassword(String username, String password, String newPassword) throws africa.absa.inception.core.service.InvalidArgumentException, AuthenticationFailedException, UserLockedException, ExistingPasswordException, africa.absa.inception.core.service.ServiceUnavailableException
Change the password for the user.- Parameters:
username- the username for the userpassword- the password for the user that is used to authorise the operationnewPassword- the new password- Returns:
- the Universally Unique Identifier (UUID) for the user directory
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidAuthenticationFailedException- if the authentication failedUserLockedException- if the user is lockedExistingPasswordException- if the user has previously used the new passwordafrica.absa.inception.core.service.ServiceUnavailableException- if the password could not be changed
-
createFunction
void createFunction(Function function) throws africa.absa.inception.core.service.InvalidArgumentException, DuplicateFunctionException, africa.absa.inception.core.service.ServiceUnavailableException
Create the new function.- Parameters:
function- the function- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidDuplicateFunctionException- if the function already existsafrica.absa.inception.core.service.ServiceUnavailableException- if the function could not be created
-
createGroup
void createGroup(Group group) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, DuplicateGroupException, africa.absa.inception.core.service.ServiceUnavailableException
Create the new group.- Parameters:
group- the group- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundDuplicateGroupException- if the group already existsafrica.absa.inception.core.service.ServiceUnavailableException- if the group could not be created
-
createTenant
Optional<UserDirectory> createTenant(Tenant tenant, boolean createUserDirectory) throws africa.absa.inception.core.service.InvalidArgumentException, DuplicateTenantException, africa.absa.inception.core.service.ServiceUnavailableException
Create the new tenant.- Parameters:
tenant- the tenantcreateUserDirectory- should a new internal user directory be created for the tenant- Returns:
- an Optional containing the new internal user directory that was created for the tenant or an empty Optional if no user directory was created
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidDuplicateTenantException- if the tenant already existsafrica.absa.inception.core.service.ServiceUnavailableException- if the tenant could not be created
-
createUser
void createUser(User user, boolean expiredPassword, boolean userLocked) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, DuplicateUserException, africa.absa.inception.core.service.ServiceUnavailableException
Create the new user.- Parameters:
user- the userexpiredPassword- create the user with its password expireduserLocked- create the user locked- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundDuplicateUserException- if the user already existsafrica.absa.inception.core.service.ServiceUnavailableException- if the user could not be created
-
createUserDirectory
void createUserDirectory(UserDirectory userDirectory) throws africa.absa.inception.core.service.InvalidArgumentException, DuplicateUserDirectoryException, africa.absa.inception.core.service.ServiceUnavailableException
Create the new user directory.- Parameters:
userDirectory- the user directory- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidDuplicateUserDirectoryException- if the user directory already existsafrica.absa.inception.core.service.ServiceUnavailableException- if the user directory could not be created
-
deleteFunction
void deleteFunction(String functionCode) throws africa.absa.inception.core.service.InvalidArgumentException, FunctionNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Delete the function.- Parameters:
functionCode- the code for the function- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidFunctionNotFoundException- if the function could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the function could not be created
-
deleteGroup
void deleteGroup(UUID userDirectoryId, String groupName) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, GroupNotFoundException, ExistingGroupMembersException, africa.absa.inception.core.service.ServiceUnavailableException
Delete the group.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directorygroupName- the name of the group- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundGroupNotFoundException- if the group could not be foundExistingGroupMembersException- if the group has existing membersafrica.absa.inception.core.service.ServiceUnavailableException- if the group could not be deleted
-
deleteTenant
void deleteTenant(UUID tenantId) throws africa.absa.inception.core.service.InvalidArgumentException, TenantNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Delete the tenant.- Parameters:
tenantId- the Universally Unique Identifier (UUID) for the tenant- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidTenantNotFoundException- if the tenant could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the tenant could not be deleted
-
deleteUser
void deleteUser(UUID userDirectoryId, String username) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, UserNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Delete the user.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directoryusername- the username for the user- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundUserNotFoundException- if the user could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the user could not be deleted
-
deleteUserDirectory
void deleteUserDirectory(UUID userDirectoryId) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Delete the user directory.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directory- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the user directory could not be deleted
-
findUsers
List<User> findUsers(UUID userDirectoryId, List<UserAttribute> userAttributes) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, InvalidAttributeException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the users matching the user attribute criteria.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directoryuserAttributes- the user attribute criteria used to select the users- Returns:
- the users whose attributes match the user attribute criteria
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundInvalidAttributeException- if an attribute is invalidafrica.absa.inception.core.service.ServiceUnavailableException- if the users matching the user attribute criteria could not be found
-
getFunction
Function getFunction(String functionCode) throws africa.absa.inception.core.service.InvalidArgumentException, FunctionNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the function.- Parameters:
functionCode- the code for the function- Returns:
- the function
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidFunctionNotFoundException- if the function could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the function could not be retrieved
-
getFunctionCodesForUser
List<String> getFunctionCodesForUser(UUID userDirectoryId, String username) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, UserNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the function codes for the user.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directoryusername- the username for the user- Returns:
- the function codes for the user
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundUserNotFoundException- if the user could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the function codes could not be retrieved for the user
-
getFunctions
List<Function> getFunctions() throws africa.absa.inception.core.service.ServiceUnavailableException
Retrieve all the functions.- Returns:
- the functions
- Throws:
africa.absa.inception.core.service.ServiceUnavailableException- if the functions could not be retrieved
-
getGroup
Group getGroup(UUID userDirectoryId, String groupName) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, GroupNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the group.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directorygroupName- the name of the group- Returns:
- the group
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundGroupNotFoundException- if the group could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the group could not be retrieved
-
getGroupNames
List<String> getGroupNames(UUID userDirectoryId) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve all the group names.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directory- Returns:
- the group names
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the group names could not be retrieved
-
getGroupNamesForUser
List<String> getGroupNamesForUser(UUID userDirectoryId, String username) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, UserNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the names of the groups the user is a member of.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directoryusername- the username for the user- Returns:
- the names of the groups the user is a member of
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundUserNotFoundException- if the user could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the names of the groups the user is a member of could not be retrieved
-
getGroups
List<Group> getGroups(UUID userDirectoryId) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve all the groups.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directory- Returns:
- the groups
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the groups could not be retrieved
-
getGroups
Groups getGroups(UUID userDirectoryId, String filter, africa.absa.inception.core.sorting.SortDirection sortDirection, Integer pageIndex, Integer pageSize) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the groups.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directoryfilter- the optional filter to apply to the groupssortDirection- the optional sort direction to apply to the groupspageIndex- the optional page indexpageSize- the optional page size- Returns:
- the groups
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the groups could not be retrieved
-
getGroupsForUser
List<Group> getGroupsForUser(UUID userDirectoryId, String username) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, UserNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the groups the user is a member of.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directoryusername- the username for the user- Returns:
- the groups the user is a member of
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundUserNotFoundException- if the user could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the groups the user is a member of could not be retrieved
-
getMembersForGroup
List<GroupMember> getMembersForGroup(UUID userDirectoryId, String groupName) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, GroupNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the group members for the group.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directorygroupName- the name of the group- Returns:
- the group members for the group
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundGroupNotFoundException- if the group could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the group members could not be retrieved for the group
-
getMembersForGroup
GroupMembers getMembersForGroup(UUID userDirectoryId, String groupName, String filter, africa.absa.inception.core.sorting.SortDirection sortDirection, Integer pageIndex, Integer pageSize) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, GroupNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the group members for the group.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directorygroupName- the name of the groupfilter- the optional filter to apply to the group memberssortDirection- the optional sort direction to apply to the group memberspageIndex- the optional page indexpageSize- the optional page size- Returns:
- the group members for the group
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundGroupNotFoundException- if the group could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the group members could not be retrieved for the group
-
getRoleCodesForGroup
List<String> getRoleCodesForGroup(UUID userDirectoryId, String groupName) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, GroupNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the codes for the roles that have been assigned to the group.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directorygroupName- the name of the group- Returns:
- the codes for the roles that have been assigned to the group
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundGroupNotFoundException- if the group could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the codes for the roles assigned to the group could not be retrieved
-
getRoleCodesForUser
List<String> getRoleCodesForUser(UUID userDirectoryId, String username) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, UserNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the codes for the roles that have been assigned to the user.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directoryusername- the username for the user- Returns:
- the codes for the roles that have been assigned to the user
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundUserNotFoundException- if the user could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the codes for the roles assigned to the user could not be retrieved
-
getRoles
List<Role> getRoles() throws africa.absa.inception.core.service.ServiceUnavailableException
Retrieve all the roles.- Returns:
- the roles
- Throws:
africa.absa.inception.core.service.ServiceUnavailableException- if the roles could not be retrieved
-
getRolesForGroup
List<GroupRole> getRolesForGroup(UUID userDirectoryId, String groupName) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, GroupNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the roles that have been assigned to the group.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directorygroupName- the name of the group- Returns:
- the roles that have been assigned to the group
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundGroupNotFoundException- if the group could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the codes for the roles assigned to the group could not be retrieved
-
getTenant
Tenant getTenant(UUID tenantId) throws africa.absa.inception.core.service.InvalidArgumentException, TenantNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the tenant.- Parameters:
tenantId- the Universally Unique Identifier (UUID) for the tenant- Returns:
- the tenant
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidTenantNotFoundException- if the tenant could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the tenant could not be retrieved
-
getTenantIdsForUserDirectory
List<UUID> getTenantIdsForUserDirectory(UUID userDirectoryId) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the Universally Unique Identifiers (UUIDs) for the tenants the user directory is associated with.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directory- Returns:
- the Universally Unique Identifiers (UUIDs) for the tenants the user directory is associated with
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the tenant IDs could not be retrieved for the user directory
-
getTenantName
String getTenantName(UUID tenantId) throws africa.absa.inception.core.service.InvalidArgumentException, TenantNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the name of the tenant.- Parameters:
tenantId- the Universally Unique Identifier (UUID) for the tenant- Returns:
- the name of the tenant
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidTenantNotFoundException- if the tenant could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the name of the tenant could not be retrieved
-
getTenants
List<Tenant> getTenants() throws africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the tenants.- Returns:
- the tenants
- Throws:
africa.absa.inception.core.service.ServiceUnavailableException- if the tenants could not be retrieved
-
getTenants
Tenants getTenants(String filter, africa.absa.inception.core.sorting.SortDirection sortDirection, Integer pageIndex, Integer pageSize) throws africa.absa.inception.core.service.InvalidArgumentException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the tenants.- Parameters:
filter- the optional filter to apply to the tenantssortDirection- the optional sort direction to apply to the tenantspageIndex- the optional page indexpageSize- the optional page size- Returns:
- the tenants
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidafrica.absa.inception.core.service.ServiceUnavailableException- if the tenants could not be retrieved
-
getTenantsForUserDirectory
List<Tenant> getTenantsForUserDirectory(UUID userDirectoryId) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the tenants the user directory is associated with.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directory- Returns:
- the tenants the user directory is associated with
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the tenants could not be retrieved for the user directory
-
getUser
User getUser(UUID userDirectoryId, String username) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, UserNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the user.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directoryusername- the username for the user- Returns:
- the user
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundUserNotFoundException- if the user could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the user could not be retrieved
-
getUserDirectories
List<UserDirectory> getUserDirectories() throws africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the user directories.- Returns:
- the user directories
- Throws:
africa.absa.inception.core.service.ServiceUnavailableException- if the user directories could not be retrieved
-
getUserDirectories
UserDirectories getUserDirectories(String filter, africa.absa.inception.core.sorting.SortDirection sortDirection, Integer pageIndex, Integer pageSize) throws africa.absa.inception.core.service.InvalidArgumentException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the user directories.- Parameters:
filter- the optional filter to apply to the user directoriessortDirection- the optional sort direction to apply to the user directoriespageIndex- the optional page indexpageSize- the optional page size- Returns:
- the user directories
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidafrica.absa.inception.core.service.ServiceUnavailableException- if the user directories could not be retrieved
-
getUserDirectoriesForTenant
List<UserDirectory> getUserDirectoriesForTenant(UUID tenantId) throws africa.absa.inception.core.service.InvalidArgumentException, TenantNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the user directories the tenant is associated with.- Parameters:
tenantId- the Universally Unique Identifier (UUID) for the tenant- Returns:
- the user directories the tenant is associated with
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidTenantNotFoundException- if the tenant could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the user directories could not be retrieved for the tenant
-
getUserDirectory
UserDirectory getUserDirectory(UUID userDirectoryId) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the user directory.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directory- Returns:
- the user directory
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the user directory could not be retrieved
-
getUserDirectoryCapabilities
UserDirectoryCapabilities getUserDirectoryCapabilities(UUID userDirectoryId) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the capabilities the user directory supports.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directory- Returns:
- the capabilities the user directory supports
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the user directory capabilities could not be retrieved
-
getUserDirectoryIdForUser
Optional<UUID> getUserDirectoryIdForUser(String username) throws africa.absa.inception.core.service.InvalidArgumentException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the Universally Unique Identifier (UUID) for the user directory that the user with the specified username is associated with.- Parameters:
username- the username for the user- Returns:
- an Optional containing the Universally Unique Identifier (UUID) for the user directory that the user with the specified username is associated with or an empty Optional if the user cannot be found
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidafrica.absa.inception.core.service.ServiceUnavailableException- if the user directory ID could not be retrieved for the user
-
getUserDirectoryIdsForTenant
List<UUID> getUserDirectoryIdsForTenant(UUID tenantId) throws africa.absa.inception.core.service.InvalidArgumentException, TenantNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the Universally Unique Identifiers (UUIDs) for the user directories the tenant is associated with.- Parameters:
tenantId- the Universally Unique Identifier (UUID) for the tenant- Returns:
- the Universally Unique Identifiers (UUIDs) for the user directories the tenant is associated with
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidTenantNotFoundException- if the tenant could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the user directory IDs could not be retrieved for the tenant
-
getUserDirectoryIdsForUser
List<UUID> getUserDirectoryIdsForUser(String username) throws africa.absa.inception.core.service.InvalidArgumentException, UserNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the Universally Unique Identifiers (UUIDs) for the user directories the user is associated with. Every user is associated with a user directory, which is in turn associated with one or more tenants, which are in turn associated with one or more user directories. The user is therefore associated indirectly with all these user directories.- Parameters:
username- the username for the user- Returns:
- the Universally Unique Identifiers (UUIDs) for the user directories the user is associated with
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserNotFoundException- if the user could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the user directory IDs could not be retrieved for the user
-
getUserDirectoryName
String getUserDirectoryName(UUID userDirectoryId) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the name of the user directory.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directory- Returns:
- the name of the user directory
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the name of the user directory could not be retrieved
-
getUserDirectorySummaries
UserDirectorySummaries getUserDirectorySummaries(String filter, africa.absa.inception.core.sorting.SortDirection sortDirection, Integer pageIndex, Integer pageSize) throws africa.absa.inception.core.service.InvalidArgumentException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the summaries for the user directories.- Parameters:
filter- the optional filter to apply to the user directoriessortDirection- the optional sort direction to apply to the user directoriespageIndex- the optional page indexpageSize- the optional page size- Returns:
- the summaries for the user directories
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidafrica.absa.inception.core.service.ServiceUnavailableException- if the user directory summaries could not be retrieved
-
getUserDirectorySummariesForTenant
List<UserDirectorySummary> getUserDirectorySummariesForTenant(UUID tenantId) throws africa.absa.inception.core.service.InvalidArgumentException, TenantNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the summaries for the user directories the tenant is associated with.- Parameters:
tenantId- the Universally Unique Identifier (UUID) for the tenant- Returns:
- the summaries for the user directories the tenant is associated with
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidTenantNotFoundException- if the tenant could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the user directory summaries could not be retrieved for the tenant
-
getUserDirectoryTypeForUserDirectory
UserDirectoryType getUserDirectoryTypeForUserDirectory(UUID userDirectoryId) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, UserDirectoryTypeNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the user directory type for the user directory.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directory- Returns:
- the user directory type for the user directory
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundUserDirectoryTypeNotFoundException- if the user directory type could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the user directory type could not be retrieved for the user directory
-
getUserDirectoryTypes
List<UserDirectoryType> getUserDirectoryTypes() throws africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the user directory types.- Returns:
- the user directory types
- Throws:
africa.absa.inception.core.service.ServiceUnavailableException- if the user directory types could not be retrieved
-
getUserName
String getUserName(UUID userDirectoryId, String username) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, UserNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the name of the user.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directoryusername- the username for the user- Returns:
- the name of the user
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundUserNotFoundException- if the user could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the name of the user could not be retrieved
-
getUsers
List<User> getUsers(UUID userDirectoryId) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve all the users.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directory- Returns:
- the users
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the users could not be retrieved
-
getUsers
Users getUsers(UUID userDirectoryId, String filter, UserSortBy sortBy, africa.absa.inception.core.sorting.SortDirection sortDirection, Integer pageIndex, Integer pageSize) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Retrieve the users.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directoryfilter- the optional filter to apply to the userssortBy- the optional method used to sort the users e.g. by namesortDirection- the optional sort direction to apply to the userspageIndex- the optional page indexpageSize- the optional page size- Returns:
- the users
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the users could not be retrieved
-
initiatePasswordReset
void initiatePasswordReset(String username, String resetPasswordUrl, boolean sendEmail) throws africa.absa.inception.core.service.InvalidArgumentException, UserNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Initiate the password reset process for the user.- Parameters:
username- the username for the userresetPasswordUrl- the reset password URLsendEmail- should the password reset e-mail be sent to the user- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserNotFoundException- if the user could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the password reset could not be initiated
-
initiatePasswordReset
void initiatePasswordReset(String username, String resetPasswordUrl, boolean sendEmail, String securityCode) throws africa.absa.inception.core.service.InvalidArgumentException, UserNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Initiate the password reset process for the user.- Parameters:
username- the username for the userresetPasswordUrl- the reset password URLsendEmail- should the password reset e-mail be sent to the usersecurityCode- the pre-generated security code to use- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserNotFoundException- if the user could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the password reset could not be initiated
-
isExistingUser
boolean isExistingUser(UUID userDirectoryId, String username) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Does the user with the specified username exist?- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directoryusername- the username for the user- Returns:
- true if a user with specified username exists or false otherwise
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the check for the existing user failed
-
isUserInGroup
boolean isUserInGroup(UUID userDirectoryId, String groupName, String username) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, UserNotFoundException, GroupNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Is the user in the group?- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directorygroupName- the name of the groupusername- the username for the user- Returns:
- true if the user is a member of the group or false otherwise
- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundUserNotFoundException- if the user could not be foundGroupNotFoundException- if the group could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the check to confirm if the user is a member of the group failed
-
reloadUserDirectories
void reloadUserDirectories() throws africa.absa.inception.core.service.ServiceUnavailableExceptionReload the user directories.- Throws:
africa.absa.inception.core.service.ServiceUnavailableException- if the user directories could not be realoded
-
removeMemberFromGroup
void removeMemberFromGroup(UUID userDirectoryId, String groupName, GroupMemberType memberType, String memberName) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, GroupNotFoundException, GroupMemberNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Remove the group member from the group.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directorygroupName- the name of the groupmemberType- the group member typememberName- the group member name- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundGroupNotFoundException- if the group could not be foundGroupMemberNotFoundException- if the group member could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the group member could not be removed from the group
-
removeRoleFromGroup
void removeRoleFromGroup(UUID userDirectoryId, String groupName, String roleCode) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, GroupNotFoundException, GroupRoleNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Remove the role from the group.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directorygroupName- the name of the grouproleCode- the code for the role- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundGroupNotFoundException- if the group could not be foundGroupRoleNotFoundException- if the group role could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the role could not be removed from the group
-
removeUserDirectoryFromTenant
void removeUserDirectoryFromTenant(UUID tenantId, UUID userDirectoryId) throws africa.absa.inception.core.service.InvalidArgumentException, TenantNotFoundException, TenantUserDirectoryNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Remove the user directory from the tenant.- Parameters:
tenantId- the Universally Unique Identifier (UUID) for the tenantuserDirectoryId- the Universally Unique Identifier (UUID) for the user directory- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidTenantNotFoundException- if the tenant could not be foundTenantUserDirectoryNotFoundException- if the tenant user directory could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the user directory could not be removed from the tenant
-
removeUserFromGroup
void removeUserFromGroup(UUID userDirectoryId, String groupName, String username) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, GroupNotFoundException, UserNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Remove the user from the group.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directorygroupName- the name of the groupusername- the username for the user- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundGroupNotFoundException- if the group could not be foundUserNotFoundException- if the user could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the user could not be removed from the group
-
resetPassword
void resetPassword(String username, String newPassword, String securityCode) throws africa.absa.inception.core.service.InvalidArgumentException, InvalidSecurityCodeException, UserLockedException, ExistingPasswordException, africa.absa.inception.core.service.ServiceUnavailableException
Reset the password for the user.- Parameters:
username- the username for the usernewPassword- the new passwordsecurityCode- the security code- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidInvalidSecurityCodeException- if the security code is invalidUserLockedException- if the user is lockedExistingPasswordException- if the user has previously used the new passwordafrica.absa.inception.core.service.ServiceUnavailableException- if the password for the user could not be reset
-
updateFunction
void updateFunction(Function function) throws africa.absa.inception.core.service.InvalidArgumentException, FunctionNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Update the function.- Parameters:
function- the function- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidFunctionNotFoundException- if the function could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the function could not be updated
-
updateGroup
void updateGroup(Group group) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, GroupNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Update the group.- Parameters:
group- the group- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundGroupNotFoundException- if the group could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the group could not be updated
-
updateTenant
void updateTenant(Tenant tenant) throws africa.absa.inception.core.service.InvalidArgumentException, TenantNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Update the tenant.- Parameters:
tenant- the tenant- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidTenantNotFoundException- if the tenant could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the tenant could not be updated
-
updateUser
void updateUser(User user, boolean expirePassword, boolean lockUser) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, UserNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Update the user.- Parameters:
user- the userexpirePassword- expire the user's password as part of the updatelockUser- lock the user as part of the update- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundUserNotFoundException- if the user could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the user could not be updated
-
updateUserDirectory
void updateUserDirectory(UserDirectory userDirectory) throws africa.absa.inception.core.service.InvalidArgumentException, UserDirectoryNotFoundException, africa.absa.inception.core.service.ServiceUnavailableException
Update the user directory.- Parameters:
userDirectory- the user directory- Throws:
africa.absa.inception.core.service.InvalidArgumentException- if an argument is invalidUserDirectoryNotFoundException- if the user directory could not be foundafrica.absa.inception.core.service.ServiceUnavailableException- if the user directory could not be updated
-
-