|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ametys.plugins.datainclusion.data.sql.SqlDataSourceFactory
public class SqlDataSourceFactory
SQL Data Source & Query Factory. Must provide these additional configuration information for the Data Source : - "driver" : JDBC driver. - "url" : JDBC url. - "user" : JDBC user. - "password" : JDBC password. Must provide these additional configuration information for the Query : - "queryString" : the SQL query as a String, which can contain parameters in the form ${parameterName}.
| Field Summary | |
|---|---|
static String |
DATASOURCE_CONFIGURATION_DRIVER
Driver configuration parameter. |
static List<String> |
DATASOURCE_CONFIGURATION_PARAMETERS
Data Source configuration parameters. |
static String |
DATASOURCE_CONFIGURATION_PASSWORD
Password configuration parameter. |
static String |
DATASOURCE_CONFIGURATION_URL
URL configuration parameter. |
static String |
DATASOURCE_CONFIGURATION_USER
User configuration parameter. |
static List<String> |
QUERY_CONFIGURATION_PARAMETERS
Query configuration parameters. |
static String |
QUERY_CONFIGURATION_QUERYSTRING
Query string configuration parameter. |
| Constructor Summary | |
|---|---|
SqlDataSourceFactory()
|
|
| Method Summary | |
|---|---|
SqlDataSource |
buildDataSource(String id,
String type,
String name,
String description,
Map<String,String> additionalConfiguration)
Build a data source with the specified information. |
SqlQuery |
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 |
|---|
public static final String DATASOURCE_CONFIGURATION_DRIVER
public static final String DATASOURCE_CONFIGURATION_URL
public static final String DATASOURCE_CONFIGURATION_USER
public static final String DATASOURCE_CONFIGURATION_PASSWORD
public static final List<String> DATASOURCE_CONFIGURATION_PARAMETERS
public static final String QUERY_CONFIGURATION_QUERYSTRING
public static final List<String> QUERY_CONFIGURATION_PARAMETERS
| Constructor Detail |
|---|
public SqlDataSourceFactory()
| Method Detail |
|---|
public Collection<String> getHandledTypes()
DataSourceFactory
getHandledTypes in interface DataSourceFactorypublic Collection<String> getDataSourceConfigurationParameters(String type)
DataSourceFactory
getDataSourceConfigurationParameters in interface DataSourceFactorytype - the type of the DataSource.
public Collection<String> getQueryConfigurationParameters(String type)
DataSourceFactory
getQueryConfigurationParameters in interface DataSourceFactorytype - the type of the Query.
public SqlDataSource buildDataSource(String id,
String type,
String name,
String description,
Map<String,String> additionalConfiguration)
throws DataInclusionException
DataSourceFactory
buildDataSource in interface DataSourceFactoryid - 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>.
DataInclusionException - if an error occurs trying to create the DataSource.
public SqlQuery buildQuery(String id,
String type,
String name,
String description,
Query.ResultType resultType,
DataSource dataSource,
Map<String,String> additionalConfiguration)
throws DataInclusionException
DataSourceFactory
buildQuery in interface DataSourceFactoryid - 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>.
DataInclusionException - if an error occurs trying to create the Query.
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||