public class GroupDirectoryContextHelper extends AbstractLogEnabled implements Component, Serviceable
GroupDirectory(ies) to contexts.| Modifier and Type | Field and Description |
|---|---|
private static String |
__GROUP_DIRECTORIES_TABLE
The name of the JDBC table for group directories by context
|
private GroupDirectoryDAO |
_groupDirectoryDAO
The DAO for
GroupDirectory(ies) |
static String |
ADMIN_CONTEXT
The "admin" context
|
static String |
ROLE
Avalon Role
|
| Constructor and Description |
|---|
GroupDirectoryContextHelper() |
| Modifier and Type | Method and Description |
|---|---|
private Set<String> |
_getDirectorieOnContextFromDatabase(String context) |
Set<String> |
getGroupDirectoriesOnContext(String context)
Gets the group directories linked to the given context
|
Set<String> |
getGroupDirectoriesOnContexts(Set<String> contexts)
Gets the group directories linked to at least one of the given contexts
|
protected Connection |
getSQLConnection()
Get the connection to the database
|
List<String> |
link(String context,
List<String> ids)
Links given group directories to a context.
|
void |
service(ServiceManager manager) |
getLogger, setLoggerpublic static final String ADMIN_CONTEXT
private static final String __GROUP_DIRECTORIES_TABLE
private GroupDirectoryDAO _groupDirectoryDAO
GroupDirectory(ies)public GroupDirectoryContextHelper()
public void service(ServiceManager manager) throws ServiceException
service in interface ServiceableServiceExceptionprotected Connection getSQLConnection()
public List<String> link(String context, List<String> ids)
context - The contextids - The ids of the group directories to linkpublic Set<String> getGroupDirectoriesOnContext(String context)
context - The contextpublic Set<String> getGroupDirectoriesOnContexts(Set<String> contexts)
contexts - The contextsprivate Set<String> _getDirectorieOnContextFromDatabase(String context)