Class StaticGroupDirectory
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.core.impl.group.directory.StaticGroupDirectory
- All Implemented Interfaces:
GroupDirectory
,LogEnabled
Static implementation of a
GroupDirectory
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns a particular group.Get the id of theGroupDirectoryModel
extension pointReturns all groups.Get groupsgetId()
Get the id of the group directory.getLabel()
Get the label of the group directory.Get the values of parameters (from group directory model)getUserGroups
(UserIdentity userIdentity) Get all groups a particular user is in.void
Initialize the group directory with given parameter values.void
Set the id of the group directory.void
setLabel
(I18nizableText label) Set the label of the group directory.Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Constructor Details
-
StaticGroupDirectory
public StaticGroupDirectory()
-
-
Method Details
-
getId
Description copied from interface:GroupDirectory
Get the id of the group directory.- Specified by:
getId
in interfaceGroupDirectory
- Returns:
- The id of the group directory
-
getLabel
Description copied from interface:GroupDirectory
Get the label of the group directory.- Specified by:
getLabel
in interfaceGroupDirectory
- Returns:
- The label of the group directory
-
setId
Description copied from interface:GroupDirectory
Set the id of the group directory.- Specified by:
setId
in interfaceGroupDirectory
- Parameters:
id
- The id
-
setLabel
Description copied from interface:GroupDirectory
Set the label of the group directory.- Specified by:
setLabel
in interfaceGroupDirectory
- Parameters:
label
- The label
-
getGroupDirectoryModelId
Description copied from interface:GroupDirectory
Get the id of theGroupDirectoryModel
extension point- Specified by:
getGroupDirectoryModelId
in interfaceGroupDirectory
- Returns:
- the id of extension point
-
getParameterValues
Description copied from interface:GroupDirectory
Get the values of parameters (from group directory model)- Specified by:
getParameterValues
in interfaceGroupDirectory
- Returns:
- the parameters' values
-
init
Description copied from interface:GroupDirectory
Initialize the group directory with given parameter values.- Specified by:
init
in interfaceGroupDirectory
- Parameters:
groupDirectoryModelId
- The id of group directory extension pointparamValues
- The parameters' values- Throws:
Exception
- If an error occured
-
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.
-
getGroups
Description copied from interface:GroupDirectory
Returns all groups.- Specified by:
getGroups
in interfaceGroupDirectory
- Returns:
- The groups as a Set of UserGroup, empty if an error occurs.
-
getUserGroups
Description copied from interface:GroupDirectory
Get all groups a particular user is in.- Specified by:
getUserGroups
in interfaceGroupDirectory
- 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
Description copied from interface:GroupDirectory
Get groups- Specified by:
getGroups
in interfaceGroupDirectory
- 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
-