@ThreadSafe public final class AccessManager extends com.helger.commons.scopes.singleton.GlobalSingleton implements IAccessManager
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_BASE_PATH |
static String |
FILENAME_ROLES_XML |
static String |
FILENAME_USERGROUPS_XML |
static String |
FILENAME_USERS_XML |
| Constructor and Description |
|---|
AccessManager()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
areUserIDAndPasswordValid(String sUserID,
String sPlainTextPassword)
Check if the passed combination of user ID and password matches.
|
boolean |
areUserLoginNameAndPasswordValid(String sLoginName,
String sPlainTextPassword)
Check if the passed combination of login name and plain text password are
valid
|
com.helger.commons.state.EChange |
assignRoleToUserGroup(String sUserGroupID,
String sRoleID)
Assign the passed role ID to the user group with the passed ID.
|
com.helger.commons.state.EChange |
assignUserToUserGroup(String sUserGroupID,
String sUserID)
Assign the passed user ID to the passed user group.
|
boolean |
containsAllRolesWithID(Collection<String> aRoleIDs)
Check if all passed role IDs are contained
|
boolean |
containsAllUserGroupsWithID(Collection<String> aUserGroupIDs)
Check if all passed user group IDs are contained
|
boolean |
containsRoleWithID(String sRoleID)
Check if the role with the specified ID is contained
|
boolean |
containsUserGroupWithID(String sUserGroupID)
Check if a user group with the specified ID is contained
|
boolean |
containsUserWithID(String sUserID)
Check if a user with the specified ID is present.
|
IRole |
createNewRole(String sName,
String sDescription,
Map<String,?> aCustomAttrs)
Create a new role.
|
IUser |
createNewUser(String sLoginName,
String sEmailAddress,
String sPlainTextPassword,
String sFirstName,
String sLastName,
String sDescription,
Locale aDesiredLocale,
Map<String,?> aCustomAttrs,
boolean bDisabled)
Create a new user.
|
IUserGroup |
createNewUserGroup(String sName,
String sDescription,
Map<String,?> aCustomAttrs)
Create a new user group.
|
IRole |
createPredefinedRole(String sID,
String sName,
String sDescription,
Map<String,?> aCustomAttrs)
Create a predefined role.
|
IUser |
createPredefinedUser(String sID,
String sLoginName,
String sEmailAddress,
String sPlainTextPassword,
String sFirstName,
String sLastName,
String sDescription,
Locale aDesiredLocale,
Map<String,?> aCustomAttrs,
boolean bDisabled)
Create a predefined user.
|
IUserGroup |
createPredefinedUserGroup(String sID,
String sName,
String sDescription,
Map<String,?> aCustomAttrs)
Create a predefined user group.
|
com.helger.commons.state.EChange |
deleteRole(String sRoleID)
Delete the role with the passed ID
|
com.helger.commons.state.EChange |
deleteUser(String sUserID)
Delete the user with the specified ID.
|
com.helger.commons.state.EChange |
deleteUserGroup(String sUserGroupID)
Delete the user group with the specified ID
|
com.helger.commons.state.EChange |
disableUser(String sUserID)
disable the user with the specified ID.
|
com.helger.commons.state.EChange |
enableUser(String sUserID)
Enable the user with the specified ID.
|
Collection<? extends IUser> |
getAllActiveUsers() |
Collection<? extends IUser> |
getAllDeletedUsers() |
Collection<? extends IUser> |
getAllDisabledUsers() |
Collection<? extends IUser> |
getAllNotDeletedUsers() |
Collection<? extends IRole> |
getAllRoles() |
Collection<String> |
getAllUserGroupIDsWithAssignedRole(String sRoleID)
Get a collection of all user group IDs to which a certain role is assigned
to.
|
Collection<String> |
getAllUserGroupIDsWithAssignedUser(String sUserID)
Get a collection of all user group IDs to which a certain user is assigned
to.
|
Collection<? extends IUserGroup> |
getAllUserGroups() |
Collection<IUserGroup> |
getAllUserGroupsWithAssignedRole(String sRoleID)
Get a collection of all user groups to which a certain role is assigned to.
|
Collection<IUserGroup> |
getAllUserGroupsWithAssignedUser(String sUserID)
Get a collection of all user groups to which a certain user is assigned to.
|
Set<String> |
getAllUserRoleIDs(String sUserID)
Get all role IDs the current user has
|
Set<IRole> |
getAllUserRoles(String sUserID)
Get all roles the current user has
|
Collection<? extends IUser> |
getAllUsers() |
static AccessManager |
getInstance() |
com.helger.commons.callback.CallbackList<IRoleModificationCallback> |
getRoleModificationCallbacks() |
IRole |
getRoleOfID(String sRoleID)
Get the role with the specified ID
|
com.helger.commons.callback.CallbackList<IUserGroupModificationCallback> |
getUserGroupModificationCallbacks() |
IUserGroup |
getUserGroupOfID(String sUserGroupID)
Get the user group with the specified ID
|
com.helger.commons.callback.CallbackList<IUserModificationCallback> |
getUserModificationCallbacks() |
IUser |
getUserOfEmailAddress(String sEmailAddress)
Get the user with the specified email address
|
IUser |
getUserOfID(String sUserID)
Get the user with the specified ID.
|
IUser |
getUserOfLoginName(String sLoginName)
Get the user with the specified login name
|
boolean |
hasUserAllRoles(String sUserID,
Collection<String> aRoleIDs) |
boolean |
hasUserRole(String sUserID,
String sRoleID)
Check if the passed user ID has the passed role by checking all user group
role assignments of the user.
|
boolean |
isUserAssignedToUserGroup(String sUserGroupID,
String sUserID)
Check if the passed user is assigned to the specified user group
|
void |
reloadRoleManager()
Reload the content of the role manager.
|
void |
reloadUserGroupManager()
Reload the content of the user group manager.
|
void |
reloadUserManager()
Reload the content of the user manager.
|
com.helger.commons.state.EChange |
renameRole(String sRoleID,
String sNewName)
Rename the role with the passed ID
|
com.helger.commons.state.EChange |
renameUserGroup(String sUserGroupID,
String sNewName)
Rename the user group with the specified ID
|
com.helger.commons.state.EChange |
setRoleData(String sRoleID,
String sNewName,
String sNewDescription,
Map<String,?> aNewCustomAttrs)
Change the modifiable data of a user group
|
com.helger.commons.state.EChange |
setUserData(String sUserID,
String sNewLoginName,
String sNewEmailAddress,
String sNewFirstName,
String sNewLastName,
String sNewDescription,
Locale aNewDesiredLocale,
Map<String,?> aCustomAttrs,
boolean bDisabled)
Change the modifiable data of a user
|
com.helger.commons.state.EChange |
setUserGroupData(String sUserGroupID,
String sNewName,
String sNewDescription,
Map<String,?> aNewCustomAttrs)
Change the modifiable data of a user group
|
com.helger.commons.state.EChange |
setUserPassword(String sUserID,
String sNewPlainTextPassword)
Change the modifiable data of a user
|
com.helger.commons.state.EChange |
unassignRoleFromAllUserGroups(String sRoleID)
Unassign the passed role ID from existing user groups.
|
com.helger.commons.state.EChange |
unassignRoleFromUserGroup(String sUserGroupID,
String sRoleID)
Unassign the passed role ID from the passed user group ID
|
com.helger.commons.state.EChange |
unassignUserFromAllUserGroups(String sUserID)
Unassign the passed user ID from all user groups.
|
com.helger.commons.state.EChange |
unassignUserFromUserGroup(String sUserGroupID,
String sUserID)
Unassign the specified user ID from the passed user group ID.
|
com.helger.commons.state.EChange |
undeleteUser(String sUserID)
Undelete the user with the specified ID.
|
getAllGlobalSingletons, getGlobalSingleton, getGlobalSingletonIfInstantiated, isGlobalSingletonInstantiatedgetAllSingletons, getSingleton, getSingletonIfInstantiated, getSingletonScopeKey, isDestroyed, isInDestruction, isInInstantiation, isInstantiated, isSingletonInstantiated, isUsableObject, onAfterInstantiation, onDestroy, onScopeDestruction, readAbstractSingletonFields, setDestroyed, setInDestruction, setInInstantiation, setInstantiated, toString, writeAbstractSingletonFieldspublic static final String DEFAULT_BASE_PATH
public static final String FILENAME_USERS_XML
public static final String FILENAME_ROLES_XML
public static final String FILENAME_USERGROUPS_XML
@Deprecated @UsedViaReflection public AccessManager() throws DAOException
DAOException@Nonnull public static AccessManager getInstance()
public void reloadUserManager()
throws DAOException
DAOException - in case reloading failspublic void reloadUserGroupManager()
throws DAOException
DAOException - in case reloading failspublic void reloadRoleManager()
throws DAOException
DAOException - in case reloading fails@Nonnull @ReturnsMutableObject(reason="design") public com.helger.commons.callback.CallbackList<IUserModificationCallback> getUserModificationCallbacks()
getUserModificationCallbacks in interface IUserManagernull.@Nullable public IUser createNewUser(@Nonnull@Nonempty String sLoginName, @Nullable String sEmailAddress, @Nonnull@Nonempty String sPlainTextPassword, @Nullable String sFirstName, @Nullable String sLastName, @Nullable String sDescription, @Nullable Locale aDesiredLocale, @Nullable Map<String,?> aCustomAttrs, boolean bDisabled)
IUserManagercreateNewUser in interface IUserManagersLoginName - Login name of the user. May neither be null nor
empty.This login name must be unique over all existing users.sEmailAddress - The email address. May be null.sPlainTextPassword - The plain text password to be used. May neither be null
nor empty.sFirstName - The users first name. May be null.sLastName - The users last name. May be null.sDescription - Optional description for the user. May be null.aDesiredLocale - The users default locale. May be null.aCustomAttrs - Custom attributes. May be null.bDisabled - true if the user is disablednull if another user with the same
email address is already present.@Nullable public IUser createPredefinedUser(@Nonnull@Nonempty String sID, @Nonnull@Nonempty String sLoginName, @Nullable String sEmailAddress, @Nonnull@Nonempty String sPlainTextPassword, @Nullable String sFirstName, @Nullable String sLastName, @Nullable String sDescription, @Nullable Locale aDesiredLocale, @Nullable Map<String,?> aCustomAttrs, boolean bDisabled)
IUserManagercreatePredefinedUser in interface IUserManagersID - The ID to usesLoginName - Login name of the user. May neither be null nor empty.
This login name must be unique over all existing users.sEmailAddress - The email address. May be null.sPlainTextPassword - The plain text password to be used. May neither be null
nor empty.sFirstName - The users first name. May be null.sLastName - The users last name. May be null.sDescription - Optional description for the user. May be null.aDesiredLocale - The users default locale. May be null.aCustomAttrs - Custom attributes. May be null.bDisabled - true if the user is disablednull if another user with the same
email address is already present.@Nonnull public com.helger.commons.state.EChange deleteUser(@Nullable String sUserID)
IUserManagerdeleteUser in interface IUserManagersUserID - The ID of the user to deleteEChange.CHANGED if the user was deleted,
EChange.UNCHANGED otherwise.@Nonnull public com.helger.commons.state.EChange undeleteUser(@Nullable String sUserID)
IUserManagerundeleteUser in interface IUserManagersUserID - The ID of the user to undeleteEChange.CHANGED if the user was undeleted,
EChange.UNCHANGED otherwise.@Nonnull public com.helger.commons.state.EChange disableUser(@Nullable String sUserID)
IUserManagerdisableUser in interface IUserManagersUserID - The ID of the user to disableEChange.CHANGED if the user was disabled,
EChange.UNCHANGED otherwise.@Nonnull public com.helger.commons.state.EChange enableUser(@Nullable String sUserID)
IUserManagerenableUser in interface IUserManagersUserID - The ID of the user to enableEChange.CHANGED if the user was enabled,
EChange.UNCHANGED otherwise.public boolean containsUserWithID(@Nullable String sUserID)
IUserManagercontainsUserWithID in interface IUserManagersUserID - The user ID to resolve. May be null.true if such user exists, false
otherwise.@Nullable public IUser getUserOfID(@Nullable String sUserID)
IUserManagergetUserOfID in interface IUserManagersUserID - The user ID to resolve. May be null.null if no such user exists@Nullable public IUser getUserOfLoginName(@Nullable String sLoginName)
IUserManagergetUserOfLoginName in interface IUserManagersLoginName - The login name to be checked. May be null.null if no such user exists@Nullable public IUser getUserOfEmailAddress(@Nullable String sEmailAddress)
IUserManagergetUserOfEmailAddress in interface IUserManagersEmailAddress - The email address to be checked. May be null.null if no such user exists@Nonnull @ReturnsMutableCopy public Collection<? extends IUser> getAllUsers()
getAllUsers in interface IUserManagernull collection of all contained users
(enabled+disabled and deleted+not-deleted)@Nonnull @ReturnsMutableCopy public Collection<? extends IUser> getAllActiveUsers()
getAllActiveUsers in interface IUserManagernull collection of all contained enabled and
not-deleted users@Nonnull @ReturnsMutableCopy public Collection<? extends IUser> getAllDisabledUsers()
getAllDisabledUsers in interface IUserManagernull collection of all contained disabled and
not-deleted users@Nonnull @ReturnsMutableCopy public Collection<? extends IUser> getAllNotDeletedUsers()
getAllNotDeletedUsers in interface IUserManagernull collection of all contained not deleted
users@Nonnull @ReturnsMutableCopy public Collection<? extends IUser> getAllDeletedUsers()
getAllDeletedUsers in interface IUserManagernull collection of all contained deleted users@Nonnull public com.helger.commons.state.EChange setUserData(@Nullable String sUserID, @Nonnull@Nonempty String sNewLoginName, @Nullable String sNewEmailAddress, @Nullable String sNewFirstName, @Nullable String sNewLastName, @Nullable String sNewDescription, @Nullable Locale aNewDesiredLocale, @Nullable Map<String,?> aCustomAttrs, boolean bDisabled)
IUserManagersetUserData in interface IUserManagersUserID - The ID of the user to be modified. May be null.sNewLoginName - The new login name. May not be null.sNewEmailAddress - The new email address. May be null.sNewFirstName - The new first name. May be null.sNewLastName - The new last name. May be null.sNewDescription - Optional new description for the user. May be null.aNewDesiredLocale - The new desired locale. May be null.aCustomAttrs - Custom attributes. May be null.bDisabled - true if the user is disabledEChange@Nonnull public com.helger.commons.state.EChange setUserPassword(@Nullable String sUserID, @Nonnull String sNewPlainTextPassword)
IUserManagersetUserPassword in interface IUserManagersUserID - The ID of the user to be modified. May be null.sNewPlainTextPassword - The new password in plain text. May not be null.EChangepublic boolean areUserIDAndPasswordValid(@Nullable String sUserID, @Nullable String sPlainTextPassword)
IUserManagerareUserIDAndPasswordValid in interface IUserManagersUserID - The ID of the usersPlainTextPassword - The plan text password to validate.true if the password hash matches the stored hash for
the specified user, false otherwise.public boolean areUserLoginNameAndPasswordValid(@Nullable String sLoginName, @Nullable String sPlainTextPassword)
sLoginName - The login name of the user to validate.sPlainTextPassword - The plain text password to validatetrue if the login name matches a user, and if the hash
of the plain text password matches the stored password hash@Nonnull @ReturnsMutableObject(reason="design") public com.helger.commons.callback.CallbackList<IUserGroupModificationCallback> getUserGroupModificationCallbacks()
getUserGroupModificationCallbacks in interface IUserGroupManagernull.@Nonnull public IUserGroup createNewUserGroup(@Nonnull@Nonempty String sName, @Nullable String sDescription, @Nullable Map<String,?> aCustomAttrs)
IUserGroupManagercreateNewUserGroup in interface IUserGroupManagersName - The name of the user group to create. May neither be
null nor empty.sDescription - The optional description of the user group. May be null
.aCustomAttrs - A set of custom attributes. May be null.@Nonnull public IUserGroup createPredefinedUserGroup(@Nonnull@Nonempty String sID, @Nonnull@Nonempty String sName, @Nullable String sDescription, @Nullable Map<String,?> aCustomAttrs)
IUserGroupManagercreatePredefinedUserGroup in interface IUserGroupManagersID - The ID to usesName - The name of the user group to create. May neither be
null nor empty.sDescription - The optional description of the user group. May be null
.aCustomAttrs - A set of custom attributes. May be null.@Nonnull public com.helger.commons.state.EChange deleteUserGroup(@Nullable String sUserGroupID)
IUserGroupManagerdeleteUserGroup in interface IUserGroupManagersUserGroupID - The ID of the user group to be deleted. May be null.EChange.CHANGED if the user group was deleted,
EChange.UNCHANGED otherwisepublic boolean containsUserGroupWithID(@Nullable String sUserGroupID)
IUserGroupManagercontainsUserGroupWithID in interface IUserGroupManagersUserGroupID - The ID of the user group to checktrue if no user group exists, false
otherwise.public boolean containsAllUserGroupsWithID(@Nullable Collection<String> aUserGroupIDs)
IUserGroupManagercontainsAllUserGroupsWithID in interface IUserGroupManageraUserGroupIDs - The user group IDs to be checked. May be null.true if the collection is empty or if all contained
user group IDs are contained@Nullable public IUserGroup getUserGroupOfID(@Nullable String sUserGroupID)
IUserGroupManagergetUserGroupOfID in interface IUserGroupManagersUserGroupID - The ID of the user group to searchnull if no such user group exists@Nonnull @ReturnsMutableCopy public Collection<? extends IUserGroup> getAllUserGroups()
getAllUserGroups in interface IUserGroupManagernull list of all user groups@Nonnull public com.helger.commons.state.EChange renameUserGroup(@Nullable String sUserGroupID, @Nonnull@Nonempty String sNewName)
IUserGroupManagerrenameUserGroup in interface IUserGroupManagersUserGroupID - The ID of the user group. May be null.sNewName - The new name of the user group. May neither be null nor
empty.EChange.CHANGED if the user group ID was valid, and the new
name was different from the old name@Nonnull public com.helger.commons.state.EChange setUserGroupData(@Nullable String sUserGroupID, @Nonnull@Nonempty String sNewName, @Nullable String sNewDescription, @Nullable Map<String,?> aNewCustomAttrs)
IUserGroupManagersetUserGroupData in interface IUserGroupManagersUserGroupID - The ID of the user group. May be null.sNewName - The new name of the user group. May neither be null nor
empty.sNewDescription - The optional new description of the user group. May be
null .aNewCustomAttrs - Custom attributes. May be null.EChange@Nonnull public com.helger.commons.state.EChange assignUserToUserGroup(@Nullable String sUserGroupID, @Nonnull@Nonempty String sUserID)
IUserGroupManagerassignUserToUserGroup in interface IUserGroupManagersUserGroupID - ID of the user group to assign tosUserID - ID of the user to be assigned.EChange.CHANGED if the user group ID was valid, and the
specified user ID was not already contained.@Nonnull public com.helger.commons.state.EChange unassignUserFromUserGroup(@Nullable String sUserGroupID, @Nullable String sUserID)
IUserGroupManagerunassignUserFromUserGroup in interface IUserGroupManagersUserGroupID - The ID of the user group to unassign the user ID fromsUserID - The user ID to be unassignedEChange.CHANGED if the user group ID was resolved, and the
passed user ID was assigned to the user group@Nonnull public com.helger.commons.state.EChange unassignUserFromAllUserGroups(@Nullable String sUserID)
IUserGroupManagerunassignUserFromAllUserGroups in interface IUserGroupManagersUserID - ID of the user to be unassigned.EChange.CHANGED if the passed user ID was at least assigned
to one user group.public boolean isUserAssignedToUserGroup(@Nullable String sUserGroupID, @Nullable String sUserID)
IUserGroupManagerisUserAssignedToUserGroup in interface IUserGroupManagersUserGroupID - ID of the user group to checksUserID - ID of the user to be checked.true if the specified user is assigned to the
specified user group.@Nonnull @ReturnsMutableCopy public Collection<IUserGroup> getAllUserGroupsWithAssignedUser(@Nullable String sUserID)
IUserGroupManagergetAllUserGroupsWithAssignedUser in interface IUserGroupManagersUserID - The user ID to searchnullbut may be empty collection with all
matching user groups.@Nonnull @ReturnsMutableCopy public Collection<String> getAllUserGroupIDsWithAssignedUser(@Nullable String sUserID)
IUserGroupManagergetAllUserGroupIDsWithAssignedUser in interface IUserGroupManagersUserID - The user ID to searchnullbut may be empty collection with all
matching user group IDs.@Nonnull public com.helger.commons.state.EChange assignRoleToUserGroup(@Nullable String sUserGroupID, @Nonnull@Nonempty String sRoleID)
IUserGroupManagerassignRoleToUserGroup in interface IUserGroupManagersUserGroupID - The ID of the user group to assign the role to.sRoleID - The ID of the role to be assignedEChange.CHANGED if the passed user group ID was resolved,
and the role ID was not already previously contained@Nonnull public com.helger.commons.state.EChange unassignRoleFromUserGroup(@Nullable String sUserGroupID, @Nullable String sRoleID)
IUserGroupManagerunassignRoleFromUserGroup in interface IUserGroupManagersUserGroupID - The ID of the user group to unassign the role ID fromsRoleID - The role ID to be unassigned.EChange.CHANGED if the user group ID was resolved and the
passed role ID was contained@Nonnull public com.helger.commons.state.EChange unassignRoleFromAllUserGroups(@Nullable String sRoleID)
IUserGroupManagerunassignRoleFromAllUserGroups in interface IUserGroupManagersRoleID - The role ID to be unassignedEChange.CHANGED if the passed role ID was contained in at
least one user group@Nonnull @ReturnsMutableCopy public Collection<IUserGroup> getAllUserGroupsWithAssignedRole(@Nullable String sRoleID)
IUserGroupManagergetAllUserGroupsWithAssignedRole in interface IUserGroupManagersRoleID - The role ID to searchnullbut may be empty collection with all
matching user groups.@Nonnull @ReturnsMutableCopy public Collection<String> getAllUserGroupIDsWithAssignedRole(@Nullable String sRoleID)
IUserGroupManagergetAllUserGroupIDsWithAssignedRole in interface IUserGroupManagersRoleID - The role ID to searchnullbut may be empty collection with all
matching user group IDs.@Nonnull @ReturnsMutableObject(reason="design") public com.helger.commons.callback.CallbackList<IRoleModificationCallback> getRoleModificationCallbacks()
getRoleModificationCallbacks in interface IRoleManagernull.@Nonnull public IRole createNewRole(@Nonnull@Nonempty String sName, @Nullable String sDescription, @Nullable Map<String,?> aCustomAttrs)
IRoleManagercreateNewRole in interface IRoleManagersName - 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 public IRole createPredefinedRole(@Nonnull@Nonempty String sID, @Nonnull@Nonempty String sName, @Nullable String sDescription, @Nullable Map<String,?> aCustomAttrs)
IRoleManagercreatePredefinedRole in interface IRoleManagersID - 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 public com.helger.commons.state.EChange deleteRole(@Nullable String sRoleID)
IRoleManagerdeleteRole in interface IRoleManagersRoleID - The role ID to be deletedEChange.CHANGED if the passed role ID was found and deletedpublic boolean containsRoleWithID(@Nullable String sRoleID)
IRoleManagercontainsRoleWithID in interface IRoleManagersRoleID - The role ID to be checktrue if such role exists, false otherwisepublic boolean containsAllRolesWithID(@Nullable Collection<String> aRoleIDs)
IRoleManagercontainsAllRolesWithID in interface IRoleManageraRoleIDs - The role IDs to be checked. May be null.true if the collection is empty or if all contained
role IDs are contained@Nullable public IRole getRoleOfID(@Nullable String sRoleID)
IRoleManagergetRoleOfID in interface IRoleManagersRoleID - The role ID to be resolvednull if no such role exists.@Nonnull @ReturnsMutableCopy public Collection<? extends IRole> getAllRoles()
getAllRoles in interface IRoleManagernull collection of all available roles@Nonnull public com.helger.commons.state.EChange renameRole(@Nullable String sRoleID, @Nonnull@Nonempty String sNewName)
IRoleManagerrenameRole in interface IRoleManagersRoleID - 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 public com.helger.commons.state.EChange setRoleData(@Nullable String sRoleID, @Nonnull@Nonempty String sNewName, @Nullable String sNewDescription, @Nullable Map<String,?> aNewCustomAttrs)
IRoleManagersetRoleData in interface IRoleManagersRoleID - 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.EChangepublic boolean hasUserRole(@Nullable String sUserID, @Nullable String sRoleID)
IAccessManagerhasUserRole in interface IAccessManagersUserID - User ID to checksRoleID - Role ID to checktrue if the user is in at least one user group that
has the assigned role, false otherwisepublic boolean hasUserAllRoles(@Nullable String sUserID, @Nullable Collection<String> aRoleIDs)
@Nonnull @ReturnsMutableCopy public Set<String> getAllUserRoleIDs(@Nullable String sUserID)
IAccessManagergetAllUserRoleIDs in interface IAccessManagersUserID - User ID to checknull.@Nonnull @ReturnsMutableCopy public Set<IRole> getAllUserRoles(@Nullable String sUserID)
IAccessManagergetAllUserRoles in interface IAccessManagersUserID - User ID to checknull.Copyright © 2014–2015 Philip Helger. All rights reserved.