public class UsersRolesPrincipalAdapter extends Object implements PrincipalAdapter
| Constructor and Description |
|---|
UsersRolesPrincipalAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
assignRole(String user,
String role)
Method to assign a role
|
void |
createRole(String role,
boolean active)
Method to create a new role
|
void |
createUser(String user,
String password,
String email,
String name,
boolean active)
Method to create a new user
|
void |
deleteRole(String role)
Method to create a delete a role
|
void |
deleteUser(String user)
Method to create a delete a user
|
String |
getMail(String user)
Method to retrieve the mail from a user.
|
String |
getName(String user)
Method to retrieve the name from a user.
|
String |
getPassword(String user)
Method to retrieve the user password
|
List<String> |
getRoles()
Method to retrieve all roles from a authentication source.
|
List<String> |
getRolesByUser(String user)
Method to retrieve all roles from a user.
|
List<String> |
getUsers()
Method to retrieve all users from a authentication source.
|
List<String> |
getUsersByRole(String role)
Method to retrieve all users from a role.
|
void |
removeRole(String user,
String role)
Method to remove a role
|
void |
updateRole(String role,
boolean active)
Update role information
|
void |
updateUser(String user,
String password,
String email,
String name,
boolean active)
Update user information
|
public List<String> getUsers() throws PrincipalAdapterException
PrincipalAdaptergetUsers in interface PrincipalAdapterPrincipalAdapterException - If any error occurs.public List<String> getRoles() throws PrincipalAdapterException
PrincipalAdaptergetRoles in interface PrincipalAdapterPrincipalAdapterException - If any error occurs.public List<String> getUsersByRole(String role) throws PrincipalAdapterException
PrincipalAdaptergetUsersByRole in interface PrincipalAdapterPrincipalAdapterException - If any error occurs.public List<String> getRolesByUser(String user) throws PrincipalAdapterException
PrincipalAdaptergetRolesByUser in interface PrincipalAdapterPrincipalAdapterException - If any error occurs.public String getMail(String user) throws PrincipalAdapterException
PrincipalAdaptergetMail in interface PrincipalAdapteruser - A user id.PrincipalAdapterException - If any error occurs.public String getName(String user) throws PrincipalAdapterException
PrincipalAdaptergetName in interface PrincipalAdapteruser - A user id.PrincipalAdapterException - If any error occurs.public String getPassword(String user) throws PrincipalAdapterException
PrincipalAdaptergetPassword in interface PrincipalAdapteruser - A user id.PrincipalAdapterException - If any error occurs.public void createUser(String user, String password, String email, String name, boolean active) throws PrincipalAdapterException
PrincipalAdaptercreateUser in interface PrincipalAdapteruser - A user id.password - The password of the user.email - The user mail.name - The full user name.PrincipalAdapterException - If any error occurs.public void deleteUser(String user) throws PrincipalAdapterException
PrincipalAdapterdeleteUser in interface PrincipalAdapteruser - A user id.PrincipalAdapterException - If any error occurs.public void updateUser(String user, String password, String email, String name, boolean active) throws PrincipalAdapterException
PrincipalAdapterupdateUser in interface PrincipalAdapteruser - A user id.password - The password of the user.email - The user mail.name - The full user name.PrincipalAdapterException - If any error occurs.public void createRole(String role, boolean active) throws PrincipalAdapterException
PrincipalAdaptercreateRole in interface PrincipalAdapterrole - A role id.PrincipalAdapterException - If any error occurs.public void deleteRole(String role) throws PrincipalAdapterException
PrincipalAdapterdeleteRole in interface PrincipalAdapterrole - A role id.PrincipalAdapterException - If any error occurs.public void updateRole(String role, boolean active) throws PrincipalAdapterException
PrincipalAdapterupdateRole in interface PrincipalAdapterrole - A role id..PrincipalAdapterException - If any error occurs.public void assignRole(String user, String role) throws PrincipalAdapterException
PrincipalAdapterassignRole in interface PrincipalAdapteruser - A user id.role - A role id.PrincipalAdapterException - If any error occurs.public void removeRole(String user, String role) throws PrincipalAdapterException
PrincipalAdapterremoveRole in interface PrincipalAdapteruser - A user id.role - A role id.PrincipalAdapterException - If any error occurs.Copyright © 2018 Open Knowledge Management System S.L.. All rights reserved.