Package org.ametys.core.datasource
Class LDAPDataSourceManager
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.datasource.AbstractDataSourceManager
org.ametys.core.datasource.LDAPDataSourceManager
- All Implemented Interfaces:
LogEnabled
,Disposable
,Initializable
,Component
,Serviceable
This component handles SQL data sources.
It is associated with the configuration file $AMETYS_HOME/config/datasources-ldap.xml
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ametys.core.datasource.AbstractDataSourceManager
AbstractDataSourceManager.DataSourceDefinition
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The id of the internal DataSourcestatic final String
LDAP parameter's name for administrator DNstatic final String
LDAP parameter's name for administration passwordstatic final String
LDAP parameter's name for alias dereferencingstatic final String
LDAP parameter's name for authentication methodstatic final String
LDAP parameter's name for base DNstatic final String
LDAP parameter's name for base URLstatic final String
LDAP parameter's name for follow referrals propertystatic final String
LDAP parameter's name for enabling server side sortingstatic final String
LDAP parameter's name for use SSLstatic final String
Avalon RoleFields inherited from class org.ametys.core.datasource.AbstractDataSourceManager
_currentUserProvider, _dataSourcesDef, _observationManager, DEFAULT_DATASOURCE_SUFFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
checkParameters
(Map<String, Object> parameters) Checks the parameters of a data sourceprotected void
Creates a data source from its configurationprotected void
Deletes a data sourcedoReadConfiguration
(File file) Actually read configuration.protected void
Edit a data source from its configurationprotected String
Get the prefix for data source identifierGet the file configuration of data sourcesprotected void
Set a default data source internallystatic void
setFilename
(String filename) Set the config filename.Methods inherited from class org.ametys.core.datasource.AbstractDataSourceManager
add, checkDataSources, delete, dispose, edit, getDataSourceDefinition, getDataSourceDefinitions, getDefaultDataSourceDefinition, getDefaultDataSourceId, initialize, readConfiguration, saveConfiguration, saxDataSource, service, setDefaultDataSource
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
Avalon Role -
PARAM_BASE_URL
LDAP parameter's name for base URL- See Also:
-
PARAM_BASE_DN
LDAP parameter's name for base DN- See Also:
-
PARAM_USE_SSL
LDAP parameter's name for use SSL- See Also:
-
PARAM_ALIAS_DEREFERENCING
LDAP parameter's name for alias dereferencing- See Also:
-
PARAM_FOLLOW_REFERRALS
LDAP parameter's name for follow referrals property- See Also:
-
PARAM_AUTHENTICATION_METHOD
LDAP parameter's name for authentication method- See Also:
-
PARAM_ADMIN_DN
LDAP parameter's name for administrator DN- See Also:
-
PARAM_ADMIN_PASSWORD
LDAP parameter's name for administration password- See Also:
-
PARAM_SERVER_SIDE_SORTING
LDAP parameter's name for enabling server side sorting- See Also:
-
LDAP_DATASOURCE_PREFIX
The id of the internal DataSource- See Also:
-
-
Constructor Details
-
LDAPDataSourceManager
public LDAPDataSourceManager()
-
-
Method Details
-
setFilename
Set the config filename. Only use for tests.- Parameters:
filename
- Name with path of the config file
-
getFileConfiguration
Description copied from class:AbstractDataSourceManager
Get the file configuration of data sources- Specified by:
getFileConfiguration
in classAbstractDataSourceManager
- Returns:
- the file
-
getDataSourcePrefixId
Description copied from class:AbstractDataSourceManager
Get the prefix for data source identifier- Specified by:
getDataSourcePrefixId
in classAbstractDataSourceManager
- Returns:
- the id prefix
-
doReadConfiguration
Description copied from class:AbstractDataSourceManager
Actually read configuration.- Specified by:
doReadConfiguration
in classAbstractDataSourceManager
- Parameters:
file
- the definitions file.- Returns:
- all definitions.
-
checkParameters
Description copied from class:AbstractDataSourceManager
Checks the parameters of a data source- Specified by:
checkParameters
in classAbstractDataSourceManager
- Parameters:
parameters
- the parameters of the data source- Throws:
ItemCheckerTestFailureException
- if the test failed
-
createDataSource
Description copied from class:AbstractDataSourceManager
Creates a data source from its configuration- Specified by:
createDataSource
in classAbstractDataSourceManager
- Parameters:
dataSource
- the data source configuration
-
deleteDataSource
Description copied from class:AbstractDataSourceManager
Deletes a data source- Specified by:
deleteDataSource
in classAbstractDataSourceManager
- Parameters:
dataSource
- the data source configuration
-
editDataSource
Description copied from class:AbstractDataSourceManager
Edit a data source from its configuration- Specified by:
editDataSource
in classAbstractDataSourceManager
- Parameters:
dataSource
- the data source configuration
-
internalSetDefaultDataSource
Description copied from class:AbstractDataSourceManager
Set a default data source internally- Specified by:
internalSetDefaultDataSource
in classAbstractDataSourceManager
-