Class SecurityService

  • All Implemented Interfaces:
    ISecurityService, org.springframework.beans.factory.InitializingBean

    @Service
    public class SecurityService
    extends Object
    implements ISecurityService, org.springframework.beans.factory.InitializingBean
    The SecurityService class provides the Security Service implementation.
    Author:
    Marcus Portmann
    • Constructor Detail

      • SecurityService

        public SecurityService​(org.springframework.context.ApplicationContext applicationContext,
                               javax.validation.Validator validator,
                               IMailService mailService,
                               FunctionRepository functionRepository,
                               GroupRepository groupRepository,
                               TenantRepository tenantRepository,
                               PasswordResetRepository passwordResetRepository,
                               RoleRepository roleRepository,
                               UserDirectoryRepository userDirectoryRepository,
                               UserDirectorySummaryRepository userDirectorySummaryRepository,
                               UserDirectoryTypeRepository userDirectoryTypeRepository,
                               UserRepository userRepository)
        Constructs a new SecurityService.
        Parameters:
        applicationContext - the Spring application context
        validator - the JSR-303 validator
        mailService - the Mail Service
        functionRepository - the Function Repository
        groupRepository - the Group Repository
        tenantRepository - the Tenant Repository
        passwordResetRepository - the Password Reset Repository
        roleRepository - the Role Repository
        userDirectoryRepository - the User Directory Repository
        userDirectorySummaryRepository - the User Directory Summary Repository
        userDirectoryTypeRepository - the User Directory Type Repository
        userRepository - the User Repository
    • Method Detail

      • addUserDirectoryToTenant

        @Transactional
        public void addUserDirectoryToTenant​(UUID tenantId,
                                             UUID userDirectoryId)
                                      throws africa.absa.inception.core.service.InvalidArgumentException,
                                             TenantNotFoundException,
                                             UserDirectoryNotFoundException,
                                             africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Add the user directory to the tenant.
        Specified by:
        addUserDirectoryToTenant in interface ISecurityService
        Parameters:
        tenantId - the Universally Unique Identifier (UUID) for the tenant
        userDirectoryId - the Universally Unique Identifier (UUID) for the user directory
        Throws:
        africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
        TenantNotFoundException - if the tenant could not be found
        UserDirectoryNotFoundException - if the user directory could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the user directory could not be added to the tenant
      • adminChangePassword

        @Transactional
        public 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
        Description copied from interface: ISecurityService
        Administratively change the password for the user.
        Specified by:
        adminChangePassword in interface ISecurityService
        Parameters:
        userDirectoryId - the Universally Unique Identifier (UUID) for the user directory
        username - the username for the user
        newPassword - the new password
        expirePassword - expire the user's password
        lockUser - lock the user
        resetPasswordHistory - reset the user's password history
        reason - the reason for changing the password
        Throws:
        africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
        UserDirectoryNotFoundException - if the user directory could not be found
        UserNotFoundException - if the user could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the password could not be administratively changed
      • afterPropertiesSet

        public void afterPropertiesSet()
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      • changePassword

        @Transactional
        public UUID changePassword​(String username,
                                   String password,
                                   String newPassword)
                            throws africa.absa.inception.core.service.InvalidArgumentException,
                                   AuthenticationFailedException,
                                   UserLockedException,
                                   ExistingPasswordException,
                                   africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Change the password for the user.
        Specified by:
        changePassword in interface ISecurityService
        Parameters:
        username - the username for the user
        password - the password for the user that is used to authorise the operation
        newPassword - the new password
        Returns:
        the Universally Unique Identifier (UUID) for the user directory
        Throws:
        africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
        AuthenticationFailedException - if the authentication failed
        UserLockedException - if the user is locked
        ExistingPasswordException - if the user has previously used the new password
        africa.absa.inception.core.service.ServiceUnavailableException - if the password could not be changed
      • createFunction

        @Transactional
        public void createFunction​(Function function)
                            throws africa.absa.inception.core.service.InvalidArgumentException,
                                   DuplicateFunctionException,
                                   africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Create the new function.
        Specified by:
        createFunction in interface ISecurityService
        Parameters:
        function - the function
        Throws:
        africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
        DuplicateFunctionException - if the function already exists
        africa.absa.inception.core.service.ServiceUnavailableException - if the function could not be created
      • createTenant

        @Transactional
        public Optional<UserDirectory> createTenant​(Tenant tenant,
                                                    boolean createUserDirectory)
                                             throws africa.absa.inception.core.service.InvalidArgumentException,
                                                    DuplicateTenantException,
                                                    africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Create the new tenant.
        Specified by:
        createTenant in interface ISecurityService
        Parameters:
        tenant - the tenant
        createUserDirectory - 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 invalid
        DuplicateTenantException - if the tenant already exists
        africa.absa.inception.core.service.ServiceUnavailableException - if the tenant could not be created
      • createUser

        @Transactional
        public void createUser​(User user,
                               boolean expiredPassword,
                               boolean userLocked)
                        throws africa.absa.inception.core.service.InvalidArgumentException,
                               UserDirectoryNotFoundException,
                               DuplicateUserException,
                               africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Create the new user.
        Specified by:
        createUser in interface ISecurityService
        Parameters:
        user - the user
        expiredPassword - create the user with its password expired
        userLocked - create the user locked
        Throws:
        africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
        UserDirectoryNotFoundException - if the user directory could not be found
        DuplicateUserException - if the user already exists
        africa.absa.inception.core.service.ServiceUnavailableException - if the user could not be created
      • createUserDirectory

        @Transactional
        public void createUserDirectory​(UserDirectory userDirectory)
                                 throws africa.absa.inception.core.service.InvalidArgumentException,
                                        DuplicateUserDirectoryException,
                                        africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Create the new user directory.
        Specified by:
        createUserDirectory in interface ISecurityService
        Parameters:
        userDirectory - the user directory
        Throws:
        africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
        DuplicateUserDirectoryException - if the user directory already exists
        africa.absa.inception.core.service.ServiceUnavailableException - if the user directory could not be created
      • deleteFunction

        @Transactional
        public void deleteFunction​(String functionCode)
                            throws africa.absa.inception.core.service.InvalidArgumentException,
                                   FunctionNotFoundException,
                                   africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Delete the function.
        Specified by:
        deleteFunction in interface ISecurityService
        Parameters:
        functionCode - the code for the function
        Throws:
        africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
        FunctionNotFoundException - if the function could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the function could not be created
      • deleteTenant

        @Transactional
        public void deleteTenant​(UUID tenantId)
                          throws africa.absa.inception.core.service.InvalidArgumentException,
                                 TenantNotFoundException,
                                 africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Delete the tenant.
        Specified by:
        deleteTenant in interface ISecurityService
        Parameters:
        tenantId - the Universally Unique Identifier (UUID) for the tenant
        Throws:
        africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
        TenantNotFoundException - if the tenant could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the tenant could not be deleted
      • deleteUser

        @Transactional
        public void deleteUser​(UUID userDirectoryId,
                               String username)
                        throws africa.absa.inception.core.service.InvalidArgumentException,
                               UserDirectoryNotFoundException,
                               UserNotFoundException,
                               africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Delete the user.
        Specified by:
        deleteUser in interface ISecurityService
        Parameters:
        userDirectoryId - the Universally Unique Identifier (UUID) for the user directory
        username - the username for the user
        Throws:
        africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
        UserDirectoryNotFoundException - if the user directory could not be found
        UserNotFoundException - if the user could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the user could not be deleted
      • deleteUserDirectory

        @Transactional
        public void deleteUserDirectory​(UUID userDirectoryId)
                                 throws africa.absa.inception.core.service.InvalidArgumentException,
                                        UserDirectoryNotFoundException,
                                        africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Delete the user directory.
        Specified by:
        deleteUserDirectory in interface ISecurityService
        Parameters:
        userDirectoryId - the Universally Unique Identifier (UUID) for the user directory
        Throws:
        africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
        UserDirectoryNotFoundException - if the user directory could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the user directory could not be deleted
      • findUsers

        public List<User> findUsers​(UUID userDirectoryId,
                                    List<UserAttribute> userAttributes)
                             throws africa.absa.inception.core.service.InvalidArgumentException,
                                    UserDirectoryNotFoundException,
                                    InvalidAttributeException,
                                    africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Retrieve the users matching the user attribute criteria.
        Specified by:
        findUsers in interface ISecurityService
        Parameters:
        userDirectoryId - the Universally Unique Identifier (UUID) for the user directory
        userAttributes - 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 invalid
        UserDirectoryNotFoundException - if the user directory could not be found
        InvalidAttributeException - if an attribute is invalid
        africa.absa.inception.core.service.ServiceUnavailableException - if the users matching the user attribute criteria could not be found
      • getFunction

        public Function getFunction​(String functionCode)
                             throws africa.absa.inception.core.service.InvalidArgumentException,
                                    FunctionNotFoundException,
                                    africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Retrieve the function.
        Specified by:
        getFunction in interface ISecurityService
        Parameters:
        functionCode - the code for the function
        Returns:
        the function
        Throws:
        africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
        FunctionNotFoundException - if the function could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the function could not be retrieved
      • getFunctionCodesForUser

        public List<String> getFunctionCodesForUser​(UUID userDirectoryId,
                                                    String username)
                                             throws africa.absa.inception.core.service.InvalidArgumentException,
                                                    UserDirectoryNotFoundException,
                                                    UserNotFoundException,
                                                    africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Retrieve the function codes for the user.
        Specified by:
        getFunctionCodesForUser in interface ISecurityService
        Parameters:
        userDirectoryId - the Universally Unique Identifier (UUID) for the user directory
        username - the username for the user
        Returns:
        the function codes for the user
        Throws:
        africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
        UserDirectoryNotFoundException - if the user directory could not be found
        UserNotFoundException - if the user could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the function codes could not be retrieved for the user
      • getFunctions

        public List<Function> getFunctions()
                                    throws africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Retrieve all the functions.
        Specified by:
        getFunctions in interface ISecurityService
        Returns:
        the functions
        Throws:
        africa.absa.inception.core.service.ServiceUnavailableException - if the functions could not be retrieved
      • getGroup

        public Group getGroup​(UUID userDirectoryId,
                              String groupName)
                       throws africa.absa.inception.core.service.InvalidArgumentException,
                              UserDirectoryNotFoundException,
                              GroupNotFoundException,
                              africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Retrieve the group.
        Specified by:
        getGroup in interface ISecurityService
        Parameters:
        userDirectoryId - the Universally Unique Identifier (UUID) for the user directory
        groupName - the name of the group
        Returns:
        the group
        Throws:
        africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
        UserDirectoryNotFoundException - if the user directory could not be found
        GroupNotFoundException - if the group could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the group could not be retrieved
      • getGroupNames

        public List<String> getGroupNames​(UUID userDirectoryId)
                                   throws africa.absa.inception.core.service.InvalidArgumentException,
                                          UserDirectoryNotFoundException,
                                          africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Retrieve all the group names.
        Specified by:
        getGroupNames in interface ISecurityService
        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 invalid
        UserDirectoryNotFoundException - if the user directory could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the group names could not be retrieved
      • getGroupNamesForUser

        public List<String> getGroupNamesForUser​(UUID userDirectoryId,
                                                 String username)
                                          throws africa.absa.inception.core.service.InvalidArgumentException,
                                                 UserDirectoryNotFoundException,
                                                 UserNotFoundException,
                                                 africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Retrieve the names of the groups the user is a member of.
        Specified by:
        getGroupNamesForUser in interface ISecurityService
        Parameters:
        userDirectoryId - the Universally Unique Identifier (UUID) for the user directory
        username - 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 invalid
        UserDirectoryNotFoundException - if the user directory could not be found
        UserNotFoundException - if the user could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the names of the groups the user is a member of could not be retrieved
      • getGroups

        public List<Group> getGroups​(UUID userDirectoryId)
                              throws africa.absa.inception.core.service.InvalidArgumentException,
                                     UserDirectoryNotFoundException,
                                     africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Retrieve all the groups.
        Specified by:
        getGroups in interface ISecurityService
        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 invalid
        UserDirectoryNotFoundException - if the user directory could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the groups could not be retrieved
      • getGroups

        public 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
        Description copied from interface: ISecurityService
        Retrieve the groups.
        Specified by:
        getGroups in interface ISecurityService
        Parameters:
        userDirectoryId - the Universally Unique Identifier (UUID) for the user directory
        filter - the optional filter to apply to the groups
        sortDirection - the optional sort direction to apply to the groups
        pageIndex - the optional page index
        pageSize - the optional page size
        Returns:
        the groups
        Throws:
        africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
        UserDirectoryNotFoundException - if the user directory could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the groups could not be retrieved
      • getGroupsForUser

        public List<Group> getGroupsForUser​(UUID userDirectoryId,
                                            String username)
                                     throws africa.absa.inception.core.service.InvalidArgumentException,
                                            UserDirectoryNotFoundException,
                                            UserNotFoundException,
                                            africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Retrieve the groups the user is a member of.
        Specified by:
        getGroupsForUser in interface ISecurityService
        Parameters:
        userDirectoryId - the Universally Unique Identifier (UUID) for the user directory
        username - 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 invalid
        UserDirectoryNotFoundException - if the user directory could not be found
        UserNotFoundException - if the user could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the groups the user is a member of could not be retrieved
      • getMembersForGroup

        public List<GroupMember> getMembersForGroup​(UUID userDirectoryId,
                                                    String groupName)
                                             throws africa.absa.inception.core.service.InvalidArgumentException,
                                                    UserDirectoryNotFoundException,
                                                    GroupNotFoundException,
                                                    africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Retrieve the group members for the group.
        Specified by:
        getMembersForGroup in interface ISecurityService
        Parameters:
        userDirectoryId - the Universally Unique Identifier (UUID) for the user directory
        groupName - the name of the group
        Returns:
        the group members for the group
        Throws:
        africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
        UserDirectoryNotFoundException - if the user directory could not be found
        GroupNotFoundException - if the group could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the group members could not be retrieved for the group
      • getMembersForGroup

        @Transactional
        public 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
        Description copied from interface: ISecurityService
        Retrieve the group members for the group.
        Specified by:
        getMembersForGroup in interface ISecurityService
        Parameters:
        userDirectoryId - the Universally Unique Identifier (UUID) for the user directory
        groupName - the name of the group
        filter - the optional filter to apply to the group members
        sortDirection - the optional sort direction to apply to the group members
        pageIndex - the optional page index
        pageSize - the optional page size
        Returns:
        the group members for the group
        Throws:
        africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
        UserDirectoryNotFoundException - if the user directory could not be found
        GroupNotFoundException - if the group could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the group members could not be retrieved for the group
      • getRoleCodesForGroup

        public List<String> getRoleCodesForGroup​(UUID userDirectoryId,
                                                 String groupName)
                                          throws africa.absa.inception.core.service.InvalidArgumentException,
                                                 UserDirectoryNotFoundException,
                                                 GroupNotFoundException,
                                                 africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Retrieve the codes for the roles that have been assigned to the group.
        Specified by:
        getRoleCodesForGroup in interface ISecurityService
        Parameters:
        userDirectoryId - the Universally Unique Identifier (UUID) for the user directory
        groupName - 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 invalid
        UserDirectoryNotFoundException - if the user directory could not be found
        GroupNotFoundException - if the group could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the codes for the roles assigned to the group could not be retrieved
      • getRoleCodesForUser

        public List<String> getRoleCodesForUser​(UUID userDirectoryId,
                                                String username)
                                         throws africa.absa.inception.core.service.InvalidArgumentException,
                                                UserDirectoryNotFoundException,
                                                UserNotFoundException,
                                                africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Retrieve the codes for the roles that have been assigned to the user.
        Specified by:
        getRoleCodesForUser in interface ISecurityService
        Parameters:
        userDirectoryId - the Universally Unique Identifier (UUID) for the user directory
        username - 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 invalid
        UserDirectoryNotFoundException - if the user directory could not be found
        UserNotFoundException - if the user could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the codes for the roles assigned to the user could not be retrieved
      • getRoles

        public List<Role> getRoles()
                            throws africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Retrieve all the roles.
        Specified by:
        getRoles in interface ISecurityService
        Returns:
        the roles
        Throws:
        africa.absa.inception.core.service.ServiceUnavailableException - if the roles could not be retrieved
      • getRolesForGroup

        public List<GroupRole> getRolesForGroup​(UUID userDirectoryId,
                                                String groupName)
                                         throws africa.absa.inception.core.service.InvalidArgumentException,
                                                UserDirectoryNotFoundException,
                                                GroupNotFoundException,
                                                africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Retrieve the roles that have been assigned to the group.
        Specified by:
        getRolesForGroup in interface ISecurityService
        Parameters:
        userDirectoryId - the Universally Unique Identifier (UUID) for the user directory
        groupName - 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 invalid
        UserDirectoryNotFoundException - if the user directory could not be found
        GroupNotFoundException - if the group could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the codes for the roles assigned to the group could not be retrieved
      • getTenant

        public Tenant getTenant​(UUID tenantId)
                         throws africa.absa.inception.core.service.InvalidArgumentException,
                                TenantNotFoundException,
                                africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Retrieve the tenant.
        Specified by:
        getTenant in interface ISecurityService
        Parameters:
        tenantId - the Universally Unique Identifier (UUID) for the tenant
        Returns:
        the tenant
        Throws:
        africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
        TenantNotFoundException - if the tenant could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the tenant could not be retrieved
      • getTenantIdsForUserDirectory

        public List<UUID> getTenantIdsForUserDirectory​(UUID userDirectoryId)
                                                throws africa.absa.inception.core.service.InvalidArgumentException,
                                                       UserDirectoryNotFoundException,
                                                       africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Retrieve the Universally Unique Identifiers (UUIDs) for the tenants the user directory is associated with.
        Specified by:
        getTenantIdsForUserDirectory in interface ISecurityService
        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 invalid
        UserDirectoryNotFoundException - if the user directory could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the tenant IDs could not be retrieved for the user directory
      • getTenantName

        public String getTenantName​(UUID tenantId)
                             throws africa.absa.inception.core.service.InvalidArgumentException,
                                    TenantNotFoundException,
                                    africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Retrieve the name of the tenant.
        Specified by:
        getTenantName in interface ISecurityService
        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 invalid
        TenantNotFoundException - if the tenant could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the name of the tenant could not be retrieved
      • getTenants

        public List<Tenant> getTenants()
                                throws africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Retrieve the tenants.
        Specified by:
        getTenants in interface ISecurityService
        Returns:
        the tenants
        Throws:
        africa.absa.inception.core.service.ServiceUnavailableException - if the tenants could not be retrieved
      • getTenants

        public 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
        Description copied from interface: ISecurityService
        Retrieve the tenants.
        Specified by:
        getTenants in interface ISecurityService
        Parameters:
        filter - the optional filter to apply to the tenants
        sortDirection - the optional sort direction to apply to the tenants
        pageIndex - the optional page index
        pageSize - the optional page size
        Returns:
        the tenants
        Throws:
        africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
        africa.absa.inception.core.service.ServiceUnavailableException - if the tenants could not be retrieved
      • getTenantsForUserDirectory

        public List<Tenant> getTenantsForUserDirectory​(UUID userDirectoryId)
                                                throws africa.absa.inception.core.service.InvalidArgumentException,
                                                       UserDirectoryNotFoundException,
                                                       africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Retrieve the tenants the user directory is associated with.
        Specified by:
        getTenantsForUserDirectory in interface ISecurityService
        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 invalid
        UserDirectoryNotFoundException - if the user directory could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the tenants could not be retrieved for the user directory
      • getUser

        public User getUser​(UUID userDirectoryId,
                            String username)
                     throws africa.absa.inception.core.service.InvalidArgumentException,
                            UserDirectoryNotFoundException,
                            UserNotFoundException,
                            africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Retrieve the user.
        Specified by:
        getUser in interface ISecurityService
        Parameters:
        userDirectoryId - the Universally Unique Identifier (UUID) for the user directory
        username - the username for the user
        Returns:
        the user
        Throws:
        africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
        UserDirectoryNotFoundException - if the user directory could not be found
        UserNotFoundException - if the user could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the user could not be retrieved
      • getUserDirectories

        public List<UserDirectory> getUserDirectories()
                                               throws africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Retrieve the user directories.
        Specified by:
        getUserDirectories in interface ISecurityService
        Returns:
        the user directories
        Throws:
        africa.absa.inception.core.service.ServiceUnavailableException - if the user directories could not be retrieved
      • getUserDirectories

        public 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
        Description copied from interface: ISecurityService
        Retrieve the user directories.
        Specified by:
        getUserDirectories in interface ISecurityService
        Parameters:
        filter - the optional filter to apply to the user directories
        sortDirection - the optional sort direction to apply to the user directories
        pageIndex - the optional page index
        pageSize - the optional page size
        Returns:
        the user directories
        Throws:
        africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
        africa.absa.inception.core.service.ServiceUnavailableException - if the user directories could not be retrieved
      • getUserDirectoriesForTenant

        public List<UserDirectory> getUserDirectoriesForTenant​(UUID tenantId)
                                                        throws africa.absa.inception.core.service.InvalidArgumentException,
                                                               TenantNotFoundException,
                                                               africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Retrieve the user directories the tenant is associated with.
        Specified by:
        getUserDirectoriesForTenant in interface ISecurityService
        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 invalid
        TenantNotFoundException - if the tenant could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the user directories could not be retrieved for the tenant
      • getUserDirectory

        public UserDirectory getUserDirectory​(UUID userDirectoryId)
                                       throws africa.absa.inception.core.service.InvalidArgumentException,
                                              UserDirectoryNotFoundException,
                                              africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Retrieve the user directory.
        Specified by:
        getUserDirectory in interface ISecurityService
        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 invalid
        UserDirectoryNotFoundException - if the user directory could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the user directory could not be retrieved
      • getUserDirectoryCapabilities

        public UserDirectoryCapabilities getUserDirectoryCapabilities​(UUID userDirectoryId)
                                                               throws africa.absa.inception.core.service.InvalidArgumentException,
                                                                      UserDirectoryNotFoundException,
                                                                      africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Retrieve the capabilities the user directory supports.
        Specified by:
        getUserDirectoryCapabilities in interface ISecurityService
        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 invalid
        UserDirectoryNotFoundException - if the user directory could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the user directory capabilities could not be retrieved
      • getUserDirectoryIdForUser

        public Optional<UUID> getUserDirectoryIdForUser​(String username)
                                                 throws africa.absa.inception.core.service.InvalidArgumentException,
                                                        africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Retrieve the Universally Unique Identifier (UUID) for the user directory that the user with the specified username is associated with.
        Specified by:
        getUserDirectoryIdForUser in interface ISecurityService
        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 invalid
        africa.absa.inception.core.service.ServiceUnavailableException - if the user directory ID could not be retrieved for the user
      • getUserDirectoryIdsForTenant

        public List<UUID> getUserDirectoryIdsForTenant​(UUID tenantId)
                                                throws africa.absa.inception.core.service.InvalidArgumentException,
                                                       TenantNotFoundException,
                                                       africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Retrieve the Universally Unique Identifiers (UUIDs) for the user directories the tenant is associated with.
        Specified by:
        getUserDirectoryIdsForTenant in interface ISecurityService
        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 invalid
        TenantNotFoundException - if the tenant could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the user directory IDs could not be retrieved for the tenant
      • getUserDirectoryIdsForUser

        public List<UUID> getUserDirectoryIdsForUser​(String username)
                                              throws africa.absa.inception.core.service.InvalidArgumentException,
                                                     UserNotFoundException,
                                                     africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        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.
        Specified by:
        getUserDirectoryIdsForUser in interface ISecurityService
        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 invalid
        UserNotFoundException - if the user could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the user directory IDs could not be retrieved for the user
      • getUserDirectoryName

        public String getUserDirectoryName​(UUID userDirectoryId)
                                    throws africa.absa.inception.core.service.InvalidArgumentException,
                                           UserDirectoryNotFoundException,
                                           africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Retrieve the name of the user directory.
        Specified by:
        getUserDirectoryName in interface ISecurityService
        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 invalid
        UserDirectoryNotFoundException - if the user directory could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the name of the user directory could not be retrieved
      • getUserDirectorySummaries

        public 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
        Description copied from interface: ISecurityService
        Retrieve the summaries for the user directories.
        Specified by:
        getUserDirectorySummaries in interface ISecurityService
        Parameters:
        filter - the optional filter to apply to the user directories
        sortDirection - the optional sort direction to apply to the user directories
        pageIndex - the optional page index
        pageSize - the optional page size
        Returns:
        the summaries for the user directories
        Throws:
        africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
        africa.absa.inception.core.service.ServiceUnavailableException - if the user directory summaries could not be retrieved
      • getUserDirectorySummariesForTenant

        public List<UserDirectorySummary> getUserDirectorySummariesForTenant​(UUID tenantId)
                                                                      throws africa.absa.inception.core.service.InvalidArgumentException,
                                                                             TenantNotFoundException,
                                                                             africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Retrieve the summaries for the user directories the tenant is associated with.
        Specified by:
        getUserDirectorySummariesForTenant in interface ISecurityService
        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 invalid
        TenantNotFoundException - if the tenant could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the user directory summaries could not be retrieved for the tenant
      • getUserDirectoryTypes

        public List<UserDirectoryType> getUserDirectoryTypes()
                                                      throws africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Retrieve the user directory types.
        Specified by:
        getUserDirectoryTypes in interface ISecurityService
        Returns:
        the user directory types
        Throws:
        africa.absa.inception.core.service.ServiceUnavailableException - if the user directory types could not be retrieved
      • getUserName

        public String getUserName​(UUID userDirectoryId,
                                  String username)
                           throws africa.absa.inception.core.service.InvalidArgumentException,
                                  UserDirectoryNotFoundException,
                                  UserNotFoundException,
                                  africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Retrieve the name of the user.
        Specified by:
        getUserName in interface ISecurityService
        Parameters:
        userDirectoryId - the Universally Unique Identifier (UUID) for the user directory
        username - the username for the user
        Returns:
        the name of the user
        Throws:
        africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
        UserDirectoryNotFoundException - if the user directory could not be found
        UserNotFoundException - if the user could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the name of the user could not be retrieved
      • getUsers

        public List<User> getUsers​(UUID userDirectoryId)
                            throws africa.absa.inception.core.service.InvalidArgumentException,
                                   UserDirectoryNotFoundException,
                                   africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Retrieve all the users.
        Specified by:
        getUsers in interface ISecurityService
        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 invalid
        UserDirectoryNotFoundException - if the user directory could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the users could not be retrieved
      • getUsers

        public 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
        Description copied from interface: ISecurityService
        Retrieve the users.
        Specified by:
        getUsers in interface ISecurityService
        Parameters:
        userDirectoryId - the Universally Unique Identifier (UUID) for the user directory
        filter - the optional filter to apply to the users
        sortBy - the optional method used to sort the users e.g. by name
        sortDirection - the optional sort direction to apply to the users
        pageIndex - the optional page index
        pageSize - the optional page size
        Returns:
        the users
        Throws:
        africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
        UserDirectoryNotFoundException - if the user directory could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the users could not be retrieved
      • initiatePasswordReset

        @Transactional
        public void initiatePasswordReset​(String username,
                                          String resetPasswordUrl,
                                          boolean sendEmail)
                                   throws africa.absa.inception.core.service.InvalidArgumentException,
                                          UserNotFoundException,
                                          africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Initiate the password reset process for the user.
        Specified by:
        initiatePasswordReset in interface ISecurityService
        Parameters:
        username - the username for the user
        resetPasswordUrl - the reset password URL
        sendEmail - should the password reset e-mail be sent to the user
        Throws:
        africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
        UserNotFoundException - if the user could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the password reset could not be initiated
      • initiatePasswordReset

        @Transactional
        public void initiatePasswordReset​(String username,
                                          String resetPasswordUrl,
                                          boolean sendEmail,
                                          String securityCode)
                                   throws africa.absa.inception.core.service.InvalidArgumentException,
                                          UserNotFoundException,
                                          africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Initiate the password reset process for the user.
        Specified by:
        initiatePasswordReset in interface ISecurityService
        Parameters:
        username - the username for the user
        resetPasswordUrl - the reset password URL
        sendEmail - should the password reset e-mail be sent to the user
        securityCode - the pre-generated security code to use
        Throws:
        africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
        UserNotFoundException - if the user could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the password reset could not be initiated
      • isExistingUser

        public boolean isExistingUser​(UUID userDirectoryId,
                                      String username)
                               throws africa.absa.inception.core.service.InvalidArgumentException,
                                      UserDirectoryNotFoundException,
                                      africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Does the user with the specified username exist?
        Specified by:
        isExistingUser in interface ISecurityService
        Parameters:
        userDirectoryId - the Universally Unique Identifier (UUID) for the user directory
        username - 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 invalid
        UserDirectoryNotFoundException - if the user directory could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the check for the existing user failed
      • isUserInGroup

        public boolean isUserInGroup​(UUID userDirectoryId,
                                     String groupName,
                                     String username)
                              throws africa.absa.inception.core.service.InvalidArgumentException,
                                     UserDirectoryNotFoundException,
                                     UserNotFoundException,
                                     GroupNotFoundException,
                                     africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Is the user in the group?
        Specified by:
        isUserInGroup in interface ISecurityService
        Parameters:
        userDirectoryId - the Universally Unique Identifier (UUID) for the user directory
        groupName - the name of the group
        username - 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 invalid
        UserDirectoryNotFoundException - if the user directory could not be found
        UserNotFoundException - if the user could not be found
        GroupNotFoundException - if the group could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the check to confirm if the user is a member of the group failed
      • reloadUserDirectories

        public void reloadUserDirectories()
                                   throws africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Reload the user directories.
        Specified by:
        reloadUserDirectories in interface ISecurityService
        Throws:
        africa.absa.inception.core.service.ServiceUnavailableException - if the user directories could not be realoded
      • removeUserDirectoryFromTenant

        @Transactional
        public void removeUserDirectoryFromTenant​(UUID tenantId,
                                                  UUID userDirectoryId)
                                           throws africa.absa.inception.core.service.InvalidArgumentException,
                                                  TenantNotFoundException,
                                                  TenantUserDirectoryNotFoundException,
                                                  africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Remove the user directory from the tenant.
        Specified by:
        removeUserDirectoryFromTenant in interface ISecurityService
        Parameters:
        tenantId - the Universally Unique Identifier (UUID) for the tenant
        userDirectoryId - the Universally Unique Identifier (UUID) for the user directory
        Throws:
        africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
        TenantNotFoundException - if the tenant could not be found
        TenantUserDirectoryNotFoundException - if the tenant user directory could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the user directory could not be removed from the tenant
      • updateFunction

        @Transactional
        public void updateFunction​(Function function)
                            throws africa.absa.inception.core.service.InvalidArgumentException,
                                   FunctionNotFoundException,
                                   africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Update the function.
        Specified by:
        updateFunction in interface ISecurityService
        Parameters:
        function - the function
        Throws:
        africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
        FunctionNotFoundException - if the function could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the function could not be updated
      • updateTenant

        @Transactional
        public void updateTenant​(Tenant tenant)
                          throws africa.absa.inception.core.service.InvalidArgumentException,
                                 TenantNotFoundException,
                                 africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Update the tenant.
        Specified by:
        updateTenant in interface ISecurityService
        Parameters:
        tenant - the tenant
        Throws:
        africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
        TenantNotFoundException - if the tenant could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the tenant could not be updated
      • updateUser

        @Transactional
        public void updateUser​(User user,
                               boolean expirePassword,
                               boolean lockUser)
                        throws africa.absa.inception.core.service.InvalidArgumentException,
                               UserDirectoryNotFoundException,
                               UserNotFoundException,
                               africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Update the user.
        Specified by:
        updateUser in interface ISecurityService
        Parameters:
        user - the user
        expirePassword - expire the user's password as part of the update
        lockUser - lock the user as part of the update
        Throws:
        africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
        UserDirectoryNotFoundException - if the user directory could not be found
        UserNotFoundException - if the user could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the user could not be updated
      • updateUserDirectory

        @Transactional
        public void updateUserDirectory​(UserDirectory userDirectory)
                                 throws africa.absa.inception.core.service.InvalidArgumentException,
                                        UserDirectoryNotFoundException,
                                        africa.absa.inception.core.service.ServiceUnavailableException
        Description copied from interface: ISecurityService
        Update the user directory.
        Specified by:
        updateUserDirectory in interface ISecurityService
        Parameters:
        userDirectory - the user directory
        Throws:
        africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
        UserDirectoryNotFoundException - if the user directory could not be found
        africa.absa.inception.core.service.ServiceUnavailableException - if the user directory could not be updated