Package org.ametys.core.group
Class GroupDirectoryContextHelper
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.group.GroupDirectoryContextHelper
- All Implemented Interfaces:
LogEnabled
,Initializable
,Component
,Serviceable
public class GroupDirectoryContextHelper
extends AbstractLogEnabled
implements Component, Serviceable, Initializable
Helper for associating
GroupDirectory
(ies) to contexts.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the cacheGet the cache as mapgetGroupDirectoriesOnContext
(String context) Gets the group directories linked to the given contextgetGroupDirectoriesOnContexts
(Set<String> contexts) Gets the group directories linked to at least one of the given contextsprotected Connection
Get the connection to the databasevoid
Links given group directories to a context.void
service
(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
Avalon Role -
ADMIN_CONTEXT
The "admin" context- See Also:
-
-
Constructor Details
-
GroupDirectoryContextHelper
public GroupDirectoryContextHelper()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
initialize
- Specified by:
initialize
in interfaceInitializable
- Throws:
Exception
-
getSQLConnection
Get the connection to the database- Returns:
- the SQL connection
-
link
Links given group directories to a context.- Parameters:
context
- The contextids
- The ids of the group directories to link- Returns:
- The ids of the linked group directories
-
getGroupDirectoriesOnContext
Gets the group directories linked to the given context- Parameters:
context
- The context- Returns:
- The ids of group directories linked to the context
-
getGroupDirectoriesOnContexts
Gets the group directories linked to at least one of the given contexts- Parameters:
contexts
- The contexts- Returns:
- The ids of group directories linked to the contexts
-
_getCache
Get the cache- Returns:
- Non null cache
-
_getCacheAsMap
Get the cache as map- Returns:
- Non null cache
-