Package org.opencastproject.security.api
Interface UserDirectoryService
- All Known Implementing Classes:
UserAndRoleDirectoryServiceImpl
public interface UserDirectoryService
A marker interface for federation of all
UserProviders.-
Method Summary
Modifier and TypeMethodDescriptionlongReturns the total number of usersReturn the found user's as an iterator.getUsers()Gets all known users.voidinvalidate(String userName) Discards any cached value for given user name.Loads a user by username, or returns null if this user is not known to the thread's current organization.loadUsers(Collection<String> userNames) Loads multiple users by a list of user names.
-
Method Details
-
getUsers
Gets all known users.- Returns:
- the users
-
loadUser
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
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
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 offsetlimit- the limit. 0 means no limit- Returns:
- an iterator of user's
- Throws:
IllegalArgumentException- if the query isnull
-
countUsers
long countUsers()Returns the total number of users- Returns:
- the count of users
-
invalidate
Discards any cached value for given user name.- Parameters:
userName- the user name
-