Class NtsUserService


  • @Service
    @ConditionalOnMissingBean(name="userService")
    public class NtsUserService
    extends Object
    Service class for managing users.
    • Method Detail

      • updateUser

        @Transactional
        public reactor.core.publisher.Mono<Void> updateUser​(String firstName,
                                                            String lastName,
                                                            String email,
                                                            String langKey,
                                                            String imageUrl)
        Update basic information (first name, last name, email, language) for the current user.
        Parameters:
        firstName - first name of user.
        lastName - last name of user.
        email - email id of user.
        langKey - language key.
        imageUrl - image URL of user.
        Returns:
        a completed Mono.
      • saveUser

        @Transactional
        public reactor.core.publisher.Mono<NtsUserEntity> saveUser​(NtsUserEntity user,
                                                                   boolean forceCreate)
      • getAllManagedUsers

        @Transactional(readOnly=true)
        public reactor.core.publisher.Flux<NtsAdminUserDTO> getAllManagedUsers​(org.springframework.data.domain.Pageable pageable)
      • getAllPublicUsers

        @Transactional(readOnly=true)
        public reactor.core.publisher.Flux<NtsUserDTO> getAllPublicUsers​(org.springframework.data.domain.Pageable pageable)
      • countManagedUsers

        @Transactional(readOnly=true)
        public reactor.core.publisher.Mono<Long> countManagedUsers()
      • getUserWithAuthoritiesByLogin

        @Transactional(readOnly=true)
        public reactor.core.publisher.Mono<NtsUserEntity> getUserWithAuthoritiesByLogin​(String login)
      • getAuthorities

        @Transactional(readOnly=true)
        public reactor.core.publisher.Flux<String> getAuthorities()
        Gets a list of all the authorities.
        Returns:
        a list of all the authorities.
      • getUserFromAuthentication

        @Transactional
        public reactor.core.publisher.Mono<NtsAdminUserDTO> getUserFromAuthentication​(org.springframework.security.authentication.AbstractAuthenticationToken authToken)
        Returns the user from an OAuth 2.0 login or resource server with JWT. Synchronizes the user in the local repository.
        Parameters:
        authToken - the authentication token.
        Returns:
        the user from the authentication.