org.ametys.plugins.datainclusion.data.ldap
Class LdapDataSourceFactory

java.lang.Object
  extended by org.ametys.plugins.datainclusion.data.ldap.LdapDataSourceFactory
All Implemented Interfaces:
DataSourceFactory

public class LdapDataSourceFactory
extends Object
implements DataSourceFactory

LDAP Data Source factory.


Field Summary
static String DATASOURCE_CONFIGURATION_ADMINDN
          adminDn configuration parameter.
static String DATASOURCE_CONFIGURATION_ADMINPASSWORD
          adminPassword configuration parameter.
static String DATASOURCE_CONFIGURATION_AUTHMETHOD
          authMethod configuration parameter.
static String DATASOURCE_CONFIGURATION_BASEURL
          Base URL configuration parameter.
static String DATASOURCE_CONFIGURATION_FILTER
          filter configuration parameter.
static List<String> DATASOURCE_CONFIGURATION_PARAMETERS
          Data Source configuration parameters.
static String DATASOURCE_CONFIGURATION_SCOPE
          scope configuration parameter.
static String DATASOURCE_CONFIGURATION_USESSL
          useSsl configuration parameter.
static String QUERY_CONFIGURATION_ATTRIBUTES
          "Attributes to return" configuration parameter.
static String QUERY_CONFIGURATION_CONSTRAINT
          Constraint configuration parameter.
static List<String> QUERY_CONFIGURATION_PARAMETERS
          Query configuration parameters.
 
Constructor Summary
LdapDataSourceFactory()
           
 
Method Summary
 LdapDataSource buildDataSource(String id, String type, String name, String description, Map<String,String> additionalConfiguration)
          Build a data source with the specified information.
 LdapQuery buildQuery(String id, String type, String name, String description, Query.ResultType resultType, DataSource dataSource, Map<String,String> additionalConfiguration)
          Build a query with the specified information.
 Collection<String> getDataSourceConfigurationParameters(String type)
          The configuration parameters needed to build a DataSource of the specified type.
 Collection<String> getHandledTypes()
          Get the types that the factory can build.
 Collection<String> getQueryConfigurationParameters(String type)
          The configuration parameters needed to build a Query of the specified type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATASOURCE_CONFIGURATION_BASEURL

public static final String DATASOURCE_CONFIGURATION_BASEURL
Base URL configuration parameter.

See Also:
Constant Field Values

DATASOURCE_CONFIGURATION_FILTER

public static final String DATASOURCE_CONFIGURATION_FILTER
filter configuration parameter.

See Also:
Constant Field Values

DATASOURCE_CONFIGURATION_SCOPE

public static final String DATASOURCE_CONFIGURATION_SCOPE
scope configuration parameter.

See Also:
Constant Field Values

DATASOURCE_CONFIGURATION_ADMINDN

public static final String DATASOURCE_CONFIGURATION_ADMINDN
adminDn configuration parameter.

See Also:
Constant Field Values

DATASOURCE_CONFIGURATION_ADMINPASSWORD

public static final String DATASOURCE_CONFIGURATION_ADMINPASSWORD
adminPassword configuration parameter.

See Also:
Constant Field Values

DATASOURCE_CONFIGURATION_AUTHMETHOD

public static final String DATASOURCE_CONFIGURATION_AUTHMETHOD
authMethod configuration parameter.

See Also:
Constant Field Values

DATASOURCE_CONFIGURATION_USESSL

public static final String DATASOURCE_CONFIGURATION_USESSL
useSsl configuration parameter.

See Also:
Constant Field Values

DATASOURCE_CONFIGURATION_PARAMETERS

public static final List<String> DATASOURCE_CONFIGURATION_PARAMETERS
Data Source configuration parameters.


QUERY_CONFIGURATION_ATTRIBUTES

public static final String QUERY_CONFIGURATION_ATTRIBUTES
"Attributes to return" configuration parameter.

See Also:
Constant Field Values

QUERY_CONFIGURATION_CONSTRAINT

public static final String QUERY_CONFIGURATION_CONSTRAINT
Constraint configuration parameter.

See Also:
Constant Field Values

QUERY_CONFIGURATION_PARAMETERS

public static final List<String> QUERY_CONFIGURATION_PARAMETERS
Query configuration parameters.

Constructor Detail

LdapDataSourceFactory

public LdapDataSourceFactory()
Method Detail

getHandledTypes

public Collection<String> getHandledTypes()
Description copied from interface: DataSourceFactory
Get the types that the factory can build.

Specified by:
getHandledTypes in interface DataSourceFactory
Returns:
the handled types as a Collection.

getDataSourceConfigurationParameters

public Collection<String> getDataSourceConfigurationParameters(String type)
Description copied from interface: DataSourceFactory
The configuration parameters needed to build a DataSource of the specified type.

Specified by:
getDataSourceConfigurationParameters in interface DataSourceFactory
Parameters:
type - the type of the DataSource.
Returns:
the configuration parameters as a Collection.

getQueryConfigurationParameters

public Collection<String> getQueryConfigurationParameters(String type)
Description copied from interface: DataSourceFactory
The configuration parameters needed to build a Query of the specified type.

Specified by:
getQueryConfigurationParameters in interface DataSourceFactory
Parameters:
type - the type of the Query.
Returns:
the configuration parameters as a Collection.

buildDataSource

public LdapDataSource buildDataSource(String id,
                                      String type,
                                      String name,
                                      String description,
                                      Map<String,String> additionalConfiguration)
                               throws DataInclusionException
Description copied from interface: DataSourceFactory
Build a data source with the specified information.

Specified by:
buildDataSource in interface DataSourceFactory
Parameters:
id - the DataSource ID.
type - the DataSource type.
name - the DataSource name.
description - the DataSource description.
additionalConfiguration - additional data source configuration parameter values as a Map<parameterName, parameterValue>.
Returns:
the data source.
Throws:
DataInclusionException - if an error occurs trying to create the DataSource.

buildQuery

public LdapQuery buildQuery(String id,
                            String type,
                            String name,
                            String description,
                            Query.ResultType resultType,
                            DataSource dataSource,
                            Map<String,String> additionalConfiguration)
                     throws DataInclusionException
Description copied from interface: DataSourceFactory
Build a query with the specified information.

Specified by:
buildQuery in interface DataSourceFactory
Parameters:
id - the Query ID.
type - the Query type.
name - the Query name.
description - the Query description.
resultType - the Query result type (single/multiple).
dataSource - the DataSource the Query depends on.
additionalConfiguration - additional query configuration parameter values as a Map<parameterName, parameterValue>.
Returns:
the query.
Throws:
DataInclusionException - if an error occurs trying to create the Query.


Copyright © 2010 Anyware Services. All Rights Reserved.