org.ametys.plugins.datainclusion.data
Interface QueryDao

All Known Implementing Classes:
JcrQueryDao

public interface QueryDao

Provider for connections and queries.


Field Summary
static String ROLE
          The avalon role name.
 
Method Summary
 String addDataSource(String siteName, DataSource dataSource)
          Add a data source and return its id.
 String addQuery(String siteName, Query query, String dataSourceId)
          Add a query and set its id.
 DataSource getDataSource(String siteName, String id)
          Get a data source from its id.
 Map<String,Query> getDataSourceQueries(String siteName, String dataSourceId)
          Get all the queries of a site.
 Map<String,DataSource> getDataSources(String siteName)
          Get all the data sources of a site.
 Map<String,DataSource> getDataSources(String siteName, String type)
          Get all the data sources of a site and of the specified type.
 Map<String,Query> getQueries(String siteName)
          Get all the queries of a site.
 Map<String,Query> getQueries(String siteName, String type)
          Get all the queries of a site.
 Query getQuery(String siteName, String id)
          Get a query from its id.
 void removeDataSource(String siteName, String id)
          Remove a data source.
 void removeQuery(String siteName, String id)
          Remove a query.
 void updateDataSource(String siteName, DataSource dataSource)
          Update a data source.
 void updateQuery(String siteName, Query query, String dataSourceId)
          Update a query.
 

Field Detail

ROLE

static final String ROLE
The avalon role name.

Method Detail

getDataSources

Map<String,DataSource> getDataSources(String siteName)
                                      throws DataInclusionException
Get all the data sources of a site.

Parameters:
siteName - the site name.
Returns:
the data sources as a Map.
Throws:
DataInclusionException

getDataSources

Map<String,DataSource> getDataSources(String siteName,
                                      String type)
                                      throws DataInclusionException
Get all the data sources of a site and of the specified type.

Parameters:
siteName - the site name.
type - the type id.
Returns:
the data sources as a Map.
Throws:
DataInclusionException

getDataSource

DataSource getDataSource(String siteName,
                         String id)
                         throws DataInclusionException
Get a data source from its id.

Parameters:
siteName - the site name.
id - the data source id.
Returns:
the DataSource.
Throws:
DataInclusionException

addDataSource

String addDataSource(String siteName,
                     DataSource dataSource)
                     throws DataInclusionException
Add a data source and return its id.

Parameters:
siteName - the site name
dataSource - the data source to add. The id member doesn't need to be specified.
Returns:
id of the newly created data source.
Throws:
DataInclusionException

updateDataSource

void updateDataSource(String siteName,
                      DataSource dataSource)
                      throws DataInclusionException
Update a data source. Update the data source specified by its id member with all the data.

Parameters:
siteName - the site name
dataSource - the data source to update.
Throws:
DataInclusionException

removeDataSource

void removeDataSource(String siteName,
                      String id)
                      throws DataInclusionException
Remove a data source.

Parameters:
siteName - the site name
id - the data source id.
Throws:
DataInclusionException

getQueries

Map<String,Query> getQueries(String siteName)
                             throws DataInclusionException
Get all the queries of a site.

Parameters:
siteName - the site name.
Returns:
the queries as a Map.
Throws:
DataInclusionException

getQueries

Map<String,Query> getQueries(String siteName,
                             String type)
                             throws DataInclusionException
Get all the queries of a site.

Parameters:
siteName - the site name.
type -
Returns:
the queries as a Map.
Throws:
DataInclusionException

getDataSourceQueries

Map<String,Query> getDataSourceQueries(String siteName,
                                       String dataSourceId)
                                       throws DataInclusionException
Get all the queries of a site.

Parameters:
siteName - the site name.
dataSourceId -
Returns:
the queries as a Map.
Throws:
DataInclusionException

getQuery

Query getQuery(String siteName,
               String id)
               throws DataInclusionException
Get a query from its id.

Parameters:
siteName - the site name.
id - the query id.
Returns:
the Query.
Throws:
DataInclusionException

addQuery

String addQuery(String siteName,
                Query query,
                String dataSourceId)
                throws DataInclusionException
Add a query and set its id.

Parameters:
siteName - the site name
query - the query to add. The id member doesn't need to be specified.
dataSourceId -
Returns:
id of the newly created data source.
Throws:
DataInclusionException

updateQuery

void updateQuery(String siteName,
                 Query query,
                 String dataSourceId)
                 throws DataInclusionException
Update a query. Update the query specified by its id member with all the data.

Parameters:
siteName - the site name
query - the query to update.
dataSourceId -
Throws:
DataInclusionException

removeQuery

void removeQuery(String siteName,
                 String id)
                 throws DataInclusionException
Remove a query.

Parameters:
siteName - the site name
id - the query id.
Throws:
DataInclusionException


Copyright © 2010 Anyware Services. All Rights Reserved.