org.gcube.portlets.user.td.gwtservice.server
Class TDGWTServiceImpl

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
              extended by com.google.gwt.user.server.rpc.RemoteServiceServlet
                  extended by org.gcube.portlets.user.td.gwtservice.server.TDGWTServiceImpl
All Implemented Interfaces:
com.google.gwt.user.client.rpc.RemoteService, com.google.gwt.user.server.rpc.SerializationPolicyProvider, Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, TDGWTService

public class TDGWTServiceImpl
extends com.google.gwt.user.server.rpc.RemoteServiceServlet
implements TDGWTService

Author:
"Giancarlo Panichi" g.panichi@isti.cnr.it
See Also:
Serialized Form

Field Summary
protected  org.gcube.application.framework.core.session.ASLSession aslSession
           
protected static org.slf4j.Logger logger
           
protected static SimpleDateFormat sdf
           
protected  org.gcube.data.analysis.tabulardata.service.TabularDataService service
           
protected  javax.servlet.http.HttpSession session
           
 
Fields inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
perThreadRequest, perThreadResponse
 
Constructor Summary
TDGWTServiceImpl()
           
 
Method Summary
 ArrayList<CSVRowError> checkCSV(long errorsLimit)
          
 ArrayList<String> configureCSVParser(String encoding, HeaderPresence headerPresence, char delimiter, char comment)
           
 TabResource createTabularResource(TabResource tabResource)
          Creates a TabResource on Service
protected  Map<String,Object> csvImportFileParameter(String fileUrlOnStorage, FileUploadSession fileUploadSession, CSVImportSession csvImportSession)
           
 ArrayList<Agencies> getAgencies()
          Get Agecies on a registry
 AvailableCharsetList getAvailableCharset()
          
 ArrayList<Codelist> getCodelists()
          Get Codelist on a registry
 CSVImportMonitor getCSVImportMonitor()
          Get Operation Monitor during the CSV Import operation
 ArrayList<Dataset> getDatasets()
          Get Datasets on a registry
 void getFileFromWorkspace(CSVImportSession csvImportSession)
           
 FileUploadMonitor getFileUploadMonitor()
          Get File Upload Monitor during the file upload operation in Import CSV
 TableData getLastTable(TRId trId)
          Return Last Table
protected  org.gcube.data.analysis.tabulardata.operation.OperationDescriptor getOperationDescriptorWithId(String op, List<org.gcube.data.analysis.tabulardata.operation.OperationDescriptor> capabilities)
           
 SDMXImportMonitor getSDMXImportMonitor()
          Get Operation Monitor during the SDMX Import operation
 ArrayList<TRMetadata> getTableMetadata(TRId trId)
          Return Metadata
 TabResource getTabResourceInformation()
          Get informations on the current tabular resource
 ArrayList<TabResource> getTabularResources()
          Return all tabular resource of a user
protected  void importCSVFileOnService(String user, FileUploadSession fileUploadSession, CSVImportSession csvImportSession)
           
 void removeTabularResource(TabResource tabResource)
           
protected  Map<String,Object> retrieveOperationParameters(SDMXImportSession sdmxImportSession)
           
protected  void retriveTRMetadataFromService(org.gcube.data.analysis.tabulardata.service.tabular.TabularResource tr)
           
protected  TabResource retriveTRMetadataFromService(org.gcube.data.analysis.tabulardata.service.tabular.TabularResource tr, int i)
          Retrieves the informations for a specific Tabular Resource from service
 void setCSVSession(CSVImportSession importSession)
          
 void setSDMXSession(SDMXImportSession sdmxImportSession)
          Set SDMXImportSession for SDMX Import
 void setTabResource(TabResource tabResource)
          Set current tabular resource
 void setTDOpenSession(TDOpenSession s)
          Set open session for return all tabular resource of a user
 void startCSVImport(CSVImportSession csvImportSession)
          Start CSV Import and invokes the client library
 void startSDMXImport(SDMXImportSession sdmxImportSession)
          Start SDMX Import and invokes the client library
protected  void syncTRMetaData(org.gcube.data.analysis.tabulardata.service.tabular.TabularResource tr, TabResource tabResource)
           
 
Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet
checkPermutationStrongName, doGetSerializationPolicy, getSerializationPolicy, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processPost, shouldCompressResponse
 
Methods inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
doPost, doUnexpectedFailure, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContent
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static org.slf4j.Logger logger

sdf

protected static SimpleDateFormat sdf

service

protected org.gcube.data.analysis.tabulardata.service.TabularDataService service

session

protected javax.servlet.http.HttpSession session

aslSession

protected org.gcube.application.framework.core.session.ASLSession aslSession
Constructor Detail

TDGWTServiceImpl

public TDGWTServiceImpl()
Method Detail

setTabResource

public void setTabResource(TabResource tabResource)
                    throws TDGWTServiceException
Set current tabular resource

Specified by:
setTabResource in interface TDGWTService
Throws:
TDGWTServiceException

getTabResourceInformation

public TabResource getTabResourceInformation()
                                      throws TDGWTServiceException
Get informations on the current tabular resource

Specified by:
getTabResourceInformation in interface TDGWTService
Returns:
Throws:
TDGWTServiceException

getLastTable

public TableData getLastTable(TRId trId)
                       throws TDGWTServiceException
Description copied from interface: TDGWTService
Return Last Table

Specified by:
getLastTable in interface TDGWTService
Returns:
Throws:
TDGWTServiceException

setTDOpenSession

public void setTDOpenSession(TDOpenSession s)
                      throws TDGWTServiceException
Set open session for return all tabular resource of a user

Specified by:
setTDOpenSession in interface TDGWTService
Throws:
TDGWTServiceException

syncTRMetaData

protected void syncTRMetaData(org.gcube.data.analysis.tabulardata.service.tabular.TabularResource tr,
                              TabResource tabResource)
Parameters:
tr -
tabResource -

retriveTRMetadataFromService

protected void retriveTRMetadataFromService(org.gcube.data.analysis.tabulardata.service.tabular.TabularResource tr)
                                     throws TDGWTServiceException
Parameters:
tr -
Throws:
TDGWTServiceException

retriveTRMetadataFromService

protected TabResource retriveTRMetadataFromService(org.gcube.data.analysis.tabulardata.service.tabular.TabularResource tr,
                                                   int i)
                                            throws TDGWTServiceException
Retrieves the informations for a specific Tabular Resource from service

Parameters:
tr - TabularResource on service
i - Index on Grid
Returns:
TabResource for Grid
Throws:
TDGWTServiceException

getTabularResources

public ArrayList<TabResource> getTabularResources()
                                           throws TDGWTServiceException
Return all tabular resource of a user

Specified by:
getTabularResources in interface TDGWTService
Returns:
Throws:
TDGWTServiceException

removeTabularResource

public void removeTabularResource(TabResource tabResource)
                           throws TDGWTServiceException
Parameters:
tabResource -
Throws:
TDGWTServiceException

createTabularResource

public TabResource createTabularResource(TabResource tabResource)
                                  throws TDGWTServiceException
Creates a TabResource on Service

Specified by:
createTabularResource in interface TDGWTService
Returns:
Throws:
TDGWTServiceException

getCodelists

public ArrayList<Codelist> getCodelists()
                                 throws TDGWTServiceException
Get Codelist on a registry

Specified by:
getCodelists in interface TDGWTService
Returns:
Throws:
TDGWTServiceException

getDatasets

public ArrayList<Dataset> getDatasets()
                               throws TDGWTServiceException
Get Datasets on a registry

Specified by:
getDatasets in interface TDGWTService
Returns:
Throws:
TDGWTServiceException

getAgencies

public ArrayList<Agencies> getAgencies()
                                throws TDGWTServiceException
Get Agecies on a registry

Specified by:
getAgencies in interface TDGWTService
Returns:
Throws:
TDGWTServiceException

retrieveOperationParameters

protected Map<String,Object> retrieveOperationParameters(SDMXImportSession sdmxImportSession)
Parameters:
sdmxImportSession -
Returns:

startSDMXImport

public void startSDMXImport(SDMXImportSession sdmxImportSession)
                     throws TDGWTServiceException
Start SDMX Import and invokes the client library

Specified by:
startSDMXImport in interface TDGWTService
Throws:
TDGWTServiceException

getOperationDescriptorWithId

protected org.gcube.data.analysis.tabulardata.operation.OperationDescriptor getOperationDescriptorWithId(String op,
                                                                                                         List<org.gcube.data.analysis.tabulardata.operation.OperationDescriptor> capabilities)
                                                                                                  throws TDGWTServiceException
Parameters:
op -
capabilities -
Returns:
Throws:
TDGWTServiceException

getSDMXImportMonitor

public SDMXImportMonitor getSDMXImportMonitor()
                                       throws TDGWTServiceException
Get Operation Monitor during the SDMX Import operation

Specified by:
getSDMXImportMonitor in interface TDGWTService
Returns:
Throws:
TDGWTServiceException

setSDMXSession

public void setSDMXSession(SDMXImportSession sdmxImportSession)
                    throws TDGWTServiceException
Set SDMXImportSession for SDMX Import

Specified by:
setSDMXSession in interface TDGWTService
Throws:
TDGWTServiceException

setCSVSession

public void setCSVSession(CSVImportSession importSession)
                   throws TDGWTServiceException

Specified by:
setCSVSession in interface TDGWTService
Throws:
TDGWTServiceException

getFileUploadMonitor

public FileUploadMonitor getFileUploadMonitor()
                                       throws TDGWTServiceException
Get File Upload Monitor during the file upload operation in Import CSV

Specified by:
getFileUploadMonitor in interface TDGWTService
Returns:
Throws:
TDGWTServiceException

getAvailableCharset

public AvailableCharsetList getAvailableCharset()
                                         throws TDGWTServiceException

Specified by:
getAvailableCharset in interface TDGWTService
Returns:
Throws:
TDGWTServiceException

configureCSVParser

public ArrayList<String> configureCSVParser(String encoding,
                                            HeaderPresence headerPresence,
                                            char delimiter,
                                            char comment)
                                     throws TDGWTServiceException
Specified by:
configureCSVParser in interface TDGWTService
Returns:
Throws:
TDGWTServiceException

checkCSV

public ArrayList<CSVRowError> checkCSV(long errorsLimit)
                                throws TDGWTServiceException

Specified by:
checkCSV in interface TDGWTService
Returns:
Throws:
TDGWTServiceException

startCSVImport

public void startCSVImport(CSVImportSession csvImportSession)
                    throws TDGWTServiceException
Start CSV Import and invokes the client library

Specified by:
startCSVImport in interface TDGWTService
Throws:
TDGWTServiceException

csvImportFileParameter

protected Map<String,Object> csvImportFileParameter(String fileUrlOnStorage,
                                                    FileUploadSession fileUploadSession,
                                                    CSVImportSession csvImportSession)
Parameters:
fileUrlOnStorage -
fileUploadSession -
csvImportSession -
Returns:

importCSVFileOnService

protected void importCSVFileOnService(String user,
                                      FileUploadSession fileUploadSession,
                                      CSVImportSession csvImportSession)
                               throws TDGWTServiceException
Parameters:
user -
fileUploadSession -
csvImportSession -
Throws:
TDGWTServiceException

getCSVImportMonitor

public CSVImportMonitor getCSVImportMonitor()
                                     throws TDGWTServiceException
Get Operation Monitor during the CSV Import operation

Specified by:
getCSVImportMonitor in interface TDGWTService
Returns:
Throws:
TDGWTServiceException

getFileFromWorkspace

public void getFileFromWorkspace(CSVImportSession csvImportSession)
                          throws TDGWTServiceException
Specified by:
getFileFromWorkspace in interface TDGWTService
Throws:
TDGWTServiceException

getTableMetadata

public ArrayList<TRMetadata> getTableMetadata(TRId trId)
                                       throws TDGWTServiceException
Description copied from interface: TDGWTService
Return Metadata

Specified by:
getTableMetadata in interface TDGWTService
Returns:
Throws:
TDGWTServiceException


Copyright © 2013. All Rights Reserved.