Added TDDataSourceFactory() to TabularDataServiceImpl

to start the factory


git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@81580 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2013-09-16 18:48:44 +00:00
parent bb437b4d8d
commit fe343e78ce
6 changed files with 29 additions and 9 deletions

View File

@ -4,6 +4,12 @@
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<dependent-module archiveName="tabular-data-widget-td-source-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-widget-td-source/tabular-data-widget-td-source">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="tabular-data-widget-2.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-widget/tabular-data-widget">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="csv-import-wizard-gxt3-1.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/csv-import-wizard-gxt3/csv-import-wizard-gxt3">
<dependency-type>uses</dependency-type>
</dependent-module>
@ -16,6 +22,9 @@
<dependent-module archiveName="TDOpen-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-open/tabular-data-open">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="service-client-mock-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/service-client-mock/service-client-mock">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
<property name="context-root" value="tabular-data-portlet"/>
</wb-module>

10
pom.xml
View File

@ -123,7 +123,7 @@
</dependency>
<!-- TABULAR DATA WIDGET -->
<dependency>
<!-- <dependency>
<groupId>org.gcube.portlets.user</groupId>
<artifactId>tabular-data-widget</artifactId>
<version>[1.1.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
@ -134,6 +134,12 @@
<artifactId>tabular-data-widget</artifactId>
<version>[1.1.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
</dependency>
-->
<dependency>
<groupId>org.gcube.portlets.user</groupId>
<artifactId>tabular-data-widget-td-source</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<!-- IMPORTER WIDGET -->
<dependency>
@ -147,7 +153,7 @@
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT]</version>
<classifier>sources</classifier>
</dependency>
<!-- CSV IMPORTER WIDGET -->
<dependency>
<groupId>org.gcube.portlets.user</groupId>

View File

@ -91,7 +91,7 @@ public class TabularDataPortlet implements EntryPoint {
//Grid
final TabularData tabularData = new TabularData("SimpleJDBCDataSourceFactory");
final TabularData tabularData = new TabularData("TDDataSourceFactory");
tabularData.addFailureHandler(new FailureEventHandler() {
@Override
@ -106,8 +106,8 @@ public class TabularDataPortlet implements EntryPoint {
mainPanelLayout.setCenterWidget(grid, gridData);
//TableId tableopening=new TableId("SimpleJDBCDataSourceFactory","1");
//tabularData.openTable(tableopening);
TableId tableopening=new TableId("TDDataSourceFactory","1");
tabularData.openTable(tableopening);
//Main
SimpleContainer mainPanel = new SimpleContainer();
mainPanel.add(mainPanelLayout);

View File

@ -60,7 +60,7 @@ public class AnalysisToolBar {
FlexTable table = new FlexTable();
group.add(table);
/*
TextButton btn = new TextButton("Bar", TabularDataResources.INSTANCE.chartBar());
table.setWidget(0, 0, btn);

View File

@ -61,7 +61,7 @@ public class EditingToolBar {
FlexTable importLayout = new FlexTable();
importGroup.add(importLayout);
/*
importButton = new TextButton("Import", TabularDataResources.INSTANCE.importTD());
importButton.setScale(ButtonScale.LARGE);
importButton.setIconAlign(IconAlign.TOP);
@ -140,9 +140,9 @@ public class EditingToolBar {
exportSDMXButton = new TextButton("SDMX", TabularDataResources.INSTANCE.sdmx());
exportLayout.setWidget(1, 2, exportSDMXButton);
cleanCells(exportLayout.getElement());
cleanCells(exportLayout.getElement());
*/
}
protected void cleanCells(Element elem) {

View File

@ -10,6 +10,9 @@ import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper;
import org.gcube.portlets.user.td.ciw.server.CSVTDImporter;
import org.gcube.portlets.user.td.client.rpc.TabularDataService;
import org.gcube.portlets.user.td.importer.server.TabularDataImporterManager;
import org.gcube.portlets.user.tdw.datasource.td.TDDataSourceFactory;
import org.gcube.portlets.user.tdw.server.datasource.DataSourceFactoryRegistry;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import org.slf4j.*;
@ -39,6 +42,8 @@ public class TabularDataServiceImpl extends RemoteServiceServlet implements Tabu
//System.out.println("Registered DemoCSVTarget");
ScopeProvider.instance.set("/gcube/devsec");
DataSourceFactoryRegistry.getInstance().add(new TDDataSourceFactory());
}