public interface IUserGroupManager
| Modifier and Type | Method and Description |
|---|---|
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 |
containsAllUserGroupsWithID(Collection<String> aUserGroupIDs)
Check if all passed user group IDs are contained
|
boolean |
containsUserGroupWithID(String sUserGroupID)
Check if a user group with the specified ID is contained
|
IUserGroup |
createNewUserGroup(String sName,
String sDescription,
Map<String,?> aCustomAttrs)
Create a new user group.
|
IUserGroup |
createPredefinedUserGroup(String sID,
String sName,
String sDescription,
Map<String,?> aCustomAttrs)
Create a predefined user group.
|
com.helger.commons.state.EChange |
deleteUserGroup(String sUserGroupID)
Delete the user group with the specified ID
|
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.
|
com.helger.commons.callback.CallbackList<IUserGroupModificationCallback> |
getUserGroupModificationCallbacks() |
IUserGroup |
getUserGroupOfID(String sUserGroupID)
Get the user group with the specified ID
|
boolean |
isUserAssignedToUserGroup(String sUserGroupID,
String sUserID)
Check if the passed user is assigned to the specified user group
|
com.helger.commons.state.EChange |
renameUserGroup(String sUserGroupID,
String sNewName)
Rename the user group with the specified ID
|
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 |
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.
|
@Nonnull @ReturnsMutableObject(reason="design") com.helger.commons.callback.CallbackList<IUserGroupModificationCallback> getUserGroupModificationCallbacks()
null.@Nonnull IUserGroup createNewUserGroup(@Nonnull@Nonempty String sName, @Nullable String sDescription, @Nullable Map<String,?> aCustomAttrs)
sName - 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 IUserGroup createPredefinedUserGroup(@Nonnull@Nonempty String sID, @Nonnull@Nonempty String sName, @Nullable String sDescription, @Nullable Map<String,?> aCustomAttrs)
sID - 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 com.helger.commons.state.EChange deleteUserGroup(@Nullable String sUserGroupID)
sUserGroupID - The ID of the user group to be deleted. May be null.EChange.CHANGED if the user group was deleted,
EChange.UNCHANGED otherwiseboolean containsUserGroupWithID(@Nullable String sUserGroupID)
sUserGroupID - The ID of the user group to checktrue if no user group exists, false
otherwise.boolean containsAllUserGroupsWithID(@Nullable Collection<String> aUserGroupIDs)
aUserGroupIDs - 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 IUserGroup getUserGroupOfID(@Nullable String sUserGroupID)
sUserGroupID - The ID of the user group to searchnull if no such user group exists@Nonnull @ReturnsMutableCopy Collection<? extends IUserGroup> getAllUserGroups()
null list of all user groups@Nonnull com.helger.commons.state.EChange renameUserGroup(@Nullable String sUserGroupID, @Nonnull@Nonempty String sNewName)
sUserGroupID - 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 com.helger.commons.state.EChange setUserGroupData(@Nullable String sUserGroupID, @Nonnull@Nonempty String sNewName, @Nullable String sNewDescription, @Nullable Map<String,?> aNewCustomAttrs)
sUserGroupID - 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 com.helger.commons.state.EChange assignUserToUserGroup(@Nullable String sUserGroupID, @Nonnull@Nonempty String sUserID)
sUserGroupID - 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 com.helger.commons.state.EChange unassignUserFromUserGroup(@Nullable String sUserGroupID, @Nullable String sUserID)
sUserGroupID - 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 com.helger.commons.state.EChange unassignUserFromAllUserGroups(@Nullable String sUserID)
sUserID - ID of the user to be unassigned.EChange.CHANGED if the passed user ID was at least assigned
to one user group.boolean isUserAssignedToUserGroup(@Nullable String sUserGroupID, @Nullable String sUserID)
sUserGroupID - 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 Collection<IUserGroup> getAllUserGroupsWithAssignedUser(@Nullable String sUserID)
sUserID - The user ID to searchnullbut may be empty collection with all
matching user groups.@Nonnull @ReturnsMutableCopy Collection<String> getAllUserGroupIDsWithAssignedUser(@Nullable String sUserID)
sUserID - The user ID to searchnullbut may be empty collection with all
matching user group IDs.@Nonnull com.helger.commons.state.EChange assignRoleToUserGroup(@Nullable String sUserGroupID, @Nonnull@Nonempty String sRoleID)
sUserGroupID - 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 com.helger.commons.state.EChange unassignRoleFromUserGroup(@Nullable String sUserGroupID, @Nullable String sRoleID)
sUserGroupID - 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 com.helger.commons.state.EChange unassignRoleFromAllUserGroups(@Nullable String sRoleID)
sRoleID - The role ID to be unassignedEChange.CHANGED if the passed role ID was contained in at
least one user group@Nonnull @ReturnsMutableCopy Collection<IUserGroup> getAllUserGroupsWithAssignedRole(@Nullable String sRoleID)
sRoleID - The role ID to searchnullbut may be empty collection with all
matching user groups.@Nonnull @ReturnsMutableCopy Collection<String> getAllUserGroupIDsWithAssignedRole(@Nullable String sRoleID)
sRoleID - The role ID to searchnullbut may be empty collection with all
matching user group IDs.Copyright © 2014–2015 Philip Helger. All rights reserved.