Search in sources :

Example 1 with SQLDataSourceDef

use of org.dashbuilder.dataset.def.SQLDataSourceDef in project kie-wb-common by kiegroup.

the class KieSQLDataSourceLocator method list.

@Override
public List<SQLDataSourceDef> list() {
    Collection<DataSourceDefInfo> dataSourceDefInfos = queryService.findGlobalDataSources(true);
    List<SQLDataSourceDef> result = new ArrayList<>();
    for (DataSourceDefInfo dataSourceDefInfo : dataSourceDefInfos) {
        result.add(new SQLDataSourceDef(dataSourceDefInfo.getUuid(), dataSourceDefInfo.getName()));
    }
    return result;
}
Also used : SQLDataSourceDef(org.dashbuilder.dataset.def.SQLDataSourceDef) ArrayList(java.util.ArrayList) DataSourceDefInfo(org.kie.workbench.common.screens.datasource.management.model.DataSourceDefInfo)

Aggregations

ArrayList (java.util.ArrayList)1 SQLDataSourceDef (org.dashbuilder.dataset.def.SQLDataSourceDef)1 DataSourceDefInfo (org.kie.workbench.common.screens.datasource.management.model.DataSourceDefInfo)1