Interface UserDirectoryService

All Known Implementing Classes:
UserAndRoleDirectoryServiceImpl

public interface UserDirectoryService
A marker interface for federation of all UserProviders.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Returns the total number of users
    findUsers(String query, int offset, int limit)
    Return the found user's as an iterator.
    Gets all known users.
    void
    invalidate(String userName)
    Discards any cached value for given user name.
    loadUser(String userName)
    Loads a user by username, or returns null if this user is not known to the thread's current organization.
    default Iterator<User>
    Loads multiple users by a list of user names.
  • Method Details

    • getUsers

      Iterator<User> getUsers()
      Gets all known users.
      Returns:
      the users
    • loadUser

      User loadUser(String userName)
      Loads a user by username, or returns null if this user is not known to the thread's current organization.
      Parameters:
      userName - the username
      Returns:
      the user
      Throws:
      IllegalStateException - if no organization is set for the current thread
    • loadUsers

      default Iterator<User> loadUsers(Collection<String> userNames)
      Loads multiple users by a list of user names.
      Parameters:
      userNames - the user names to look for
      Returns:
      the users
      Throws:
      IllegalStateException - if no organization is set for the current thread
    • findUsers

      Iterator<User> findUsers(String query, int offset, int limit)
      Return the found user's as an iterator.
      Parameters:
      query - the query. Use the wildcards "_" to match any single character and "%" to match an arbitrary number of characters (including zero characters).
      offset - the offset
      limit - the limit. 0 means no limit
      Returns:
      an iterator of user's
      Throws:
      IllegalArgumentException - if the query is null
    • countUsers

      long countUsers()
      Returns the total number of users
      Returns:
      the count of users
    • invalidate

      void invalidate(String userName)
      Discards any cached value for given user name.
      Parameters:
      userName - the user name