Package org.ametys.core.group.directory
Interface ModifiableGroupDirectory
-
- All Superinterfaces:
GroupDirectory
- All Known Implementing Classes:
JdbcGroupDirectory
public interface ModifiableGroupDirectory extends GroupDirectory
Abstraction for a modifiable directory of group.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ModifiableGroup
add(String name)
Add a new group of users.ModifiableGroup
getGroup(String groupID)
Returns a particular group.void
remove(String groupID)
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 Detail
-
getGroup
ModifiableGroup getGroup(String groupID)
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
ModifiableGroup add(String name) throws InvalidModificationException
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
void update(ModifiableGroup userGroup) throws InvalidModificationException
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
void remove(String groupID) throws InvalidModificationException
Remove a group of users.- Parameters:
groupID
- The id of the group. Cannot be null;- Throws:
InvalidModificationException
- if the group id does not exist.
-
-