Class UserService


  • @Service
    @Transactional
    public class UserService
    extends Object
    Service class for managing users.
    • Method Detail

      • createUser

        public User createUser​(UserDTO userDTO)
      • updateUser

        public void updateUser​(String firstName,
                               String lastName,
                               String langKey)
        Update basic information (first name, last name, language) for the current user.
      • updateUser

        public Optional<UserDTO> updateUser​(UserDTO userDTO)
        Update all information for a specific user, and return the modified user.
      • deleteUser

        public void deleteUser​(String login)
      • changePassword

        public void changePassword​(String password)
      • getAllManagedUsers

        @Transactional(readOnly=true)
        public org.springframework.data.domain.Page<UserDTO> getAllManagedUsers​(org.springframework.data.domain.Pageable pageable)
      • getUserByLogin

        @Transactional(readOnly=true)
        public Optional<User> getUserByLogin​(String login)
      • getUserWithAuthoritiesByLogin

        @Transactional(readOnly=true)
        public Optional<User> getUserWithAuthoritiesByLogin​(String login)
      • getUserWithAuthorities

        @Transactional(readOnly=true)
        public User getUserWithAuthorities​(Long id)
      • getUserWithAuthorities

        @Transactional(readOnly=true)
        public User getUserWithAuthorities()
      • removeOldPersistentTokens

        @Scheduled(cron="0 0 0 * * ?")
        public void removeOldPersistentTokens()
        Persistent Token are used for providing automatic authentication, they should be automatically deleted after 30 days.

        This is scheduled to get fired everyday, at midnight.