Added setUsers and setAuthorities for easier configuration

This commit is contained in:
Carlos Sanchez 2006-07-05 16:16:13 +00:00
parent 41f7bb3755
commit 0edb75d4aa
2 changed files with 20 additions and 0 deletions

View File

@ -53,6 +53,16 @@ public class UserAttribute {
return (GrantedAuthority[]) this.authorities.toArray(toReturn);
}
/**
* Set all authorities for this user.
*
* @param authorities {@link List} <{@link GrantedAuthority}>
* @since 1.1
*/
public void setAuthorities(List authorities) {
this.authorities = authorities;
}
public String getPassword() {
return password;
}

View File

@ -86,4 +86,14 @@ public class UserMap {
public int getUserCount() {
return this.userMap.size();
}
/**
* Set the users in this {@link UserMap}. Overrides previously added users.
*
* @param users {@link Map} <{@link String}, {@link UserDetails}> with pairs (username, userdetails)
* @since 1.1
*/
public void setUsers(Map users) {
this.userMap = users;
}
}