Package org.ametys.core.group.directory
Interface GroupDirectory
-
- All Known Subinterfaces:
ModifiableGroupDirectory
- All Known Implementing Classes:
JdbcGroupDirectory
,LdapGroupDirectory
,StaticGroupDirectory
public interface GroupDirectory
Abstraction for a directory of group.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Group
getGroup(String groupID)
Returns a particular group.String
getGroupDirectoryModelId()
Get the id of theGroupDirectoryModel
extension pointSet<Group>
getGroups()
Returns all groups.List<Group>
getGroups(int count, int offset, Map parameters)
Get groupsString
getId()
Get the id of the group directory.I18nizableText
getLabel()
Get the label of the group directory.Map<String,Object>
getParameterValues()
Get the values of parameters (from group directory model)Set<String>
getUserGroups(UserIdentity userIdentity)
Get all groups a particular user is in.void
init(String groupDirectoryModelId, Map<String,Object> paramValues)
Initialize the group directory with given parameter values.void
setId(String id)
Set the id of the group directory.void
setLabel(I18nizableText label)
Set the label of the group directory.
-
-
-
Method Detail
-
getLabel
I18nizableText getLabel()
Get the label of the group directory.- Returns:
- The label of the group directory
-
setLabel
void setLabel(I18nizableText label)
Set the label of the group directory.- Parameters:
label
- The label
-
getGroupDirectoryModelId
String getGroupDirectoryModelId()
Get the id of theGroupDirectoryModel
extension point- Returns:
- the id of extension point
-
getParameterValues
Map<String,Object> getParameterValues()
Get the values of parameters (from group directory model)- Returns:
- the parameters' values
-
init
void init(String groupDirectoryModelId, Map<String,Object> paramValues) throws Exception
Initialize the group directory with given parameter values.- Parameters:
groupDirectoryModelId
- The id of group directory extension pointparamValues
- The parameters' values- Throws:
Exception
- If an error occured
-
getGroup
Group getGroup(String groupID)
Returns a particular group.- Parameters:
groupID
- The id of the group.- Returns:
- The group or null if the group does not exist.
-
getGroups
Set<Group> getGroups()
Returns all groups.- Returns:
- The groups as a Set of UserGroup, empty if an error occurs.
-
getUserGroups
Set<String> getUserGroups(UserIdentity userIdentity)
Get all groups a particular user is in.- Parameters:
userIdentity
- The identity of the user- Returns:
- The groups as a Set of String (group ID), empty if the login does not match.
-
getGroups
List<Group> getGroups(int count, int offset, Map parameters)
Get groups- Parameters:
count
- The maximum number of groups to sax. (-1 to sax all)offset
- The offset to start with, first is 0.parameters
- Parameters for saxing user list differently, see implementation.- Returns:
- The matching groups
-
-