Class CompositeUserRepository

java.lang.Object
io.jmix.core.security.CompositeUserRepository
All Implemented Interfaces:
UserRepository, org.springframework.security.core.userdetails.UserDetailsService

public class CompositeUserRepository extends Object implements UserRepository
An implementation of UserRepository that compose all UserRepositorys registered in an application and delegates operations to them.

For methods that return a single result, it returns the result of the first successful method execution by the delegates (the first one that hasn't ended up with an exception). Method returning a collection includes the results obtained from all the delegates.

  • Field Details

  • Constructor Details

    • CompositeUserRepository

      public CompositeUserRepository()
  • Method Details

    • getSystemUser

      public org.springframework.security.core.userdetails.UserDetails getSystemUser()
      Description copied from interface: UserRepository
      Returns the built-in 'system' user.
      Specified by:
      getSystemUser in interface UserRepository
    • getAnonymousUser

      public org.springframework.security.core.userdetails.UserDetails getAnonymousUser()
      Description copied from interface: UserRepository
      Returns the built-in 'anonymous' user.
      Specified by:
      getAnonymousUser in interface UserRepository
    • getByUsernameLike

      public List<? extends org.springframework.security.core.userdetails.UserDetails> getByUsernameLike(String substring)
      Description copied from interface: UserRepository
      Returns the list of users whose username contains the given substring.
      Specified by:
      getByUsernameLike in interface UserRepository
    • loadUserByUsername

      public org.springframework.security.core.userdetails.UserDetails loadUserByUsername(String username) throws org.springframework.security.core.userdetails.UsernameNotFoundException
      Specified by:
      loadUserByUsername in interface org.springframework.security.core.userdetails.UserDetailsService
      Throws:
      org.springframework.security.core.userdetails.UsernameNotFoundException