public class UserMap extends Object
InMemoryDaoImpl to store a list of users and their corresponding granted authorities.| Constructor and Description |
|---|
UserMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
addUser(UserDetails user)
Adds a user to the in-memory map.
|
UserDetails |
getUser(String username)
Locates the specified user by performing a case insensitive search by username.
|
int |
getUserCount()
Indicates the size of the user map.
|
void |
setUsers(Map users)
Set the users in this
UserMap. |
public void addUser(UserDetails user) throws IllegalArgumentException
user - the user to be storedIllegalArgumentException - if a null User was passedpublic UserDetails getUser(String username) throws UsernameNotFoundException
username - to findUsernameNotFoundException - if the user could not be foundpublic int getUserCount()
public void setUsers(Map users)
UserMap. Overrides previously added users.users - Map <String, UserDetails> with pairs (username, userdetails)Copyright © 2016. All rights reserved.