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="/" 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/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/> <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"> <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> <dependency-type>uses</dependency-type>
</dependent-module> </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"> <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> <dependency-type>uses</dependency-type>
</dependent-module> </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="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
<property name="context-root" value="tabular-data-portlet"/> <property name="context-root" value="tabular-data-portlet"/>
</wb-module> </wb-module>

View File

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

View File

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

View File

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

View File

@ -61,7 +61,7 @@ public class EditingToolBar {
FlexTable importLayout = new FlexTable(); FlexTable importLayout = new FlexTable();
importGroup.add(importLayout); importGroup.add(importLayout);
/*
importButton = new TextButton("Import", TabularDataResources.INSTANCE.importTD()); importButton = new TextButton("Import", TabularDataResources.INSTANCE.importTD());
importButton.setScale(ButtonScale.LARGE); importButton.setScale(ButtonScale.LARGE);
importButton.setIconAlign(IconAlign.TOP); importButton.setIconAlign(IconAlign.TOP);
@ -142,7 +142,7 @@ public class EditingToolBar {
exportLayout.setWidget(1, 2, exportSDMXButton); exportLayout.setWidget(1, 2, exportSDMXButton);
cleanCells(exportLayout.getElement()); cleanCells(exportLayout.getElement());
*/
} }
protected void cleanCells(Element elem) { 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.ciw.server.CSVTDImporter;
import org.gcube.portlets.user.td.client.rpc.TabularDataService; import org.gcube.portlets.user.td.client.rpc.TabularDataService;
import org.gcube.portlets.user.td.importer.server.TabularDataImporterManager; 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 com.google.gwt.user.server.rpc.RemoteServiceServlet;
import org.slf4j.*; import org.slf4j.*;
@ -39,6 +42,8 @@ public class TabularDataServiceImpl extends RemoteServiceServlet implements Tabu
//System.out.println("Registered DemoCSVTarget"); //System.out.println("Registered DemoCSVTarget");
ScopeProvider.instance.set("/gcube/devsec"); ScopeProvider.instance.set("/gcube/devsec");
DataSourceFactoryRegistry.getInstance().add(new TDDataSourceFactory());
} }