public interface UsersService
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.Multimap<String,String> |
addOrEditTenant(String tenant,
Set<String> groups)
Add a tenant or edit an existing tenant
If the tenant already exists, its set of associated groups will be updated
|
List<OutputUserInfo> |
addUser(InputUserInfo userInfo)
Add a new user
|
boolean |
checkPassword(String userName,
String password)
Check the user's password
|
void |
commit()
Commit pending changes to the file system
|
List<OutputUserInfo> |
deleteUser(String userName)
Delete an existing user
|
Set<String> |
getGroups(String userName)
Return the set of groups associated with a user
|
String |
getTenant(String userName)
Return the tenant associated with a user
|
OutputUserInfo |
getUser(String userName)
Returns a user info
|
com.google.common.collect.Multimap<String,String> |
listTenants()
List the tenant associations
|
List<OutputUserInfo> |
listUsers()
Returns the list of users
|
void |
refresh()
Refreshes the internal state of the service
Must be called before interacting with the service
|
com.google.common.collect.Multimap<String,String> |
removeTenant(String tenant)
Remove a tenant and all its group associations
|
List<OutputUserInfo> |
updateUser(InputUserInfo userInfo)
Update an existing user
|
boolean |
userExists(String userName)
Checks if a user exists
|
boolean |
usersChanged()
check if users state have changed
|
void refresh() throws LoginException
LoginException
boolean usersChanged()
void commit() throws LoginException
LoginException
List<OutputUserInfo> listUsers() throws LoginException
LoginException
List<OutputUserInfo> addUser(InputUserInfo userInfo) throws LoginException
userInfo
- user information inputLoginException
boolean userExists(String userName)
userName
- user login nameOutputUserInfo getUser(String userName) throws LoginException
userName
- user login nameLoginException
List<OutputUserInfo> updateUser(InputUserInfo userInfo) throws LoginException
userInfo
- user login nameLoginException
List<OutputUserInfo> deleteUser(String userName) throws LoginException
userName
- user login nameLoginException
com.google.common.collect.Multimap<String,String> listTenants()
com.google.common.collect.Multimap<String,String> addOrEditTenant(String tenant, Set<String> groups)
tenant
- tenant namegroups
- set of groups associated with this tenantcom.google.common.collect.Multimap<String,String> removeTenant(String tenant)
tenant
- tenant nameboolean checkPassword(String userName, String password) throws LoginException
userName
- user login namepassword
- clear text password to checkLoginException
Set<String> getGroups(String userName) throws LoginException
userName
- user login nameLoginException
String getTenant(String userName) throws LoginException
userName
- user login nameLoginException