public interface IRoleManager
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsAllRolesWithID(Collection<String> aRoleIDs)
Check if all passed role IDs are contained
|
boolean |
containsRoleWithID(String sRoleID)
Check if the role with the specified ID is contained
|
IRole |
createNewRole(String sName,
String sDescription,
Map<String,?> aCustomAttrs)
Create a new role.
|
IRole |
createPredefinedRole(String sID,
String sName,
String sDescription,
Map<String,?> aCustomAttrs)
Create a predefined role.
|
com.helger.commons.state.EChange |
deleteRole(String sRoleID)
Delete the role with the passed ID
|
Collection<? extends IRole> |
getAllRoles() |
com.helger.commons.callback.CallbackList<IRoleModificationCallback> |
getRoleModificationCallbacks() |
IRole |
getRoleOfID(String sRoleID)
Get the role with the specified ID
|
com.helger.commons.state.EChange |
renameRole(String sRoleID,
String sNewName)
Rename the role with the passed ID
|
com.helger.commons.state.EChange |
setRoleData(String sRoleID,
String sNewName,
String sNewDescription,
Map<String,?> aNewCustomAttrs)
Change the modifiable data of a user group
|
@Nonnull @ReturnsMutableObject(reason="design") com.helger.commons.callback.CallbackList<IRoleModificationCallback> getRoleModificationCallbacks()
null.@Nonnull IRole createNewRole(@Nonnull@Nonempty String sName, @Nullable String sDescription, @Nullable Map<String,?> aCustomAttrs)
sName - The name of the new role. May neither be null nor
empty.sDescription - Optional description text. May be null.aCustomAttrs - A set of custom attributes. May be null.null.@Nonnull IRole createPredefinedRole(@Nonnull@Nonempty String sID, @Nonnull@Nonempty String sName, @Nullable String sDescription, @Nullable Map<String,?> aCustomAttrs)
sID - The ID of the new rolesName - The name of the new rolesDescription - Optional description text. May be null.aCustomAttrs - A set of custom attributes. May be null.null.@Nonnull com.helger.commons.state.EChange deleteRole(@Nullable String sRoleID)
sRoleID - The role ID to be deletedEChange.CHANGED if the passed role ID was found and deletedboolean containsRoleWithID(@Nullable String sRoleID)
sRoleID - The role ID to be checktrue if such role exists, false otherwiseboolean containsAllRolesWithID(@Nullable Collection<String> aRoleIDs)
aRoleIDs - The role IDs to be checked. May be null.true if the collection is empty or if all contained
role IDs are contained@Nullable IRole getRoleOfID(@Nullable String sRoleID)
sRoleID - The role ID to be resolvednull if no such role exists.@Nonnull @ReturnsMutableCopy Collection<? extends IRole> getAllRoles()
null collection of all available roles@Nonnull com.helger.commons.state.EChange renameRole(@Nullable String sRoleID, @Nonnull@Nonempty String sNewName)
sRoleID - The ID of the role to be renamed. May be null.sNewName - The new name of the role. May neither be null nor
empty.EChange.CHANGED if the passed role ID was found, and the
new name is different from the old name of he role@Nonnull com.helger.commons.state.EChange setRoleData(@Nullable String sRoleID, @Nonnull@Nonempty String sNewName, @Nullable String sNewDescription, @Nullable Map<String,?> aNewCustomAttrs)
sRoleID - The ID of the role to be renamed. May be null.sNewName - The new name of the role. May neither be null nor
empty.sNewDescription - The new description text. May be null.aNewCustomAttrs - Custom attributes. May be null.EChangeCopyright © 2014–2015 Philip Helger. All rights reserved.