Package org.ametys.core.group.directory
Interface ModifiableGroupDirectory
- All Superinterfaces:
GroupDirectory
- All Known Implementing Classes:
JdbcGroupDirectory
Abstraction for a modifiable directory of group.
-
Method Summary
Modifier and TypeMethodDescriptionAdd a new group of users.Returns a particular group.void
Remove a group of users.void
update
(ModifiableGroup userGroup) Modify an existing group of users.Methods inherited from interface org.ametys.core.group.directory.GroupDirectory
getGroupDirectoryModelId, getGroups, getGroups, getId, getLabel, getParameterValues, getUserGroups, init, setId, setLabel
-
Method Details
-
getGroup
Description copied from interface:GroupDirectory
Returns a particular group.- Specified by:
getGroup
in interfaceGroupDirectory
- Parameters:
groupID
- The id of the group.- Returns:
- The group or null if the group does not exist.
-
add
Add a new group of users.- Parameters:
name
- The name of the user group to create. Cannot be null;- Returns:
- The user group created
- Throws:
InvalidModificationException
- if the group id exists yet or if at least one of the parameter is invalid.
-
update
Modify an existing group of users.- Parameters:
userGroup
- Informations about the new group. Cannot be null:- Throws:
InvalidModificationException
- if the group id does not exist yet
-
remove
Remove a group of users.- Parameters:
groupID
- The id of the group. Cannot be null;- Throws:
InvalidModificationException
- if the group id does not exist.
-