Interface UserManager
-
- All Superinterfaces:
AbstractEntityManager<org.jboss.errai.security.shared.api.identity.User,UserManagerSettings>
- All Known Subinterfaces:
UserManagerService
public interface UserManager extends AbstractEntityManager<org.jboss.errai.security.shared.api.identity.User,UserManagerSettings>
The Users Manager.
The user manager provide additional methods to implement from the entity manager ones.
- Since:
- 0.8.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceUserManager.UserAttributeDescription of a user attribute that is supported by the specific manager implementation.-
Nested classes/interfaces inherited from interface org.uberfire.ext.security.management.api.AbstractEntityManager
AbstractEntityManager.SearchRequest, AbstractEntityManager.SearchResponse<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidassignGroups(String username, Collection<String> groups)Assign a collection of groups to a user.voidassignRoles(String username, Collection<String> roles)Assign a collection of roles to a user.voidchangePassword(String username, String newPassword)Changes the user's password.-
Methods inherited from interface org.uberfire.ext.security.management.api.AbstractEntityManager
create, delete, get, getAll, getSettings, search, update
-
-
-
-
Method Detail
-
assignGroups
void assignGroups(String username, Collection<String> groups) throws SecurityManagementException
Assign a collection of groups to a user.
.All the groups given will be assigned to the user, the current existing assigned ones will be removed.
It's important to note that the inherited
createandupdatemethods should not assign groups, this operations must be done in this method, as it's easier for mapping with the capabilities approach.- Parameters:
username- The user identifier.groups- The collection of groups identifiers to assign.- Throws:
SecurityManagementException
-
assignRoles
void assignRoles(String username, Collection<String> roles) throws SecurityManagementException
Assign a collection of roles to a user.
.All the roles given will be assigned to the user, the current existing assigned ones will be removed.
It's important to note that the inherited
createandupdatemethods should not assign roles, this operations must be done in this method, as it's easier for mapping with the capabilities approach.- Parameters:
username- The user identifier.roles- The collection of roles identifiers to assign.- Throws:
SecurityManagementException
-
changePassword
void changePassword(String username, String newPassword) throws SecurityManagementException
Changes the user's password.
- Parameters:
username- The user identifier.newPassword- The new password.- Throws:
SecurityManagementException
-
-