tabular-data-manager/src/main/java/org/gcube/portlets/user/td/server/TabularDataServiceImpl.java

46 lines
1.3 KiB
Java

package org.gcube.portlets.user.td.server;
import javax.servlet.ServletException;
import org.gcube.common.scope.api.ScopeProvider;
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 com.google.gwt.user.server.rpc.RemoteServiceServlet;
/**
* The server side implementation of the RPC service.
*/
@SuppressWarnings("serial")
public class TabularDataServiceImpl extends RemoteServiceServlet implements TabularDataService {
/**
* {@inheritDoc}
*/
@Override
public void init() throws ServletException {
super.init();
System.out.println("initializing the TabularDataImporterManager");
TabularDataImporterManager importerManager = new TabularDataImporterManager();
//importerManager.scanAvailableImporters();
importerManager.add(new CSVTDImporter());
importerManager.setupImporters();
//register the demo csv target
//CSVTargetRegistry.getInstance().add(new DemoCSVTarget());
//System.out.println("Registered DemoCSVTarget");
ScopeProvider.instance.set("/gcube/devsec");
}
/**
* {@inheritDoc}
*/
public String greetServer(String input) throws IllegalArgumentException {
return "Hello";
}
}