org.pentaho.platform.dataaccess.datasource.wizard.service.gwt
Class CsvDatasourceServiceServlet

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.pentaho.platform.dataaccess.datasource.wizard.service.gwt.CsvDatasourceServiceServlet
All Implemented Interfaces:
com.google.gwt.user.client.rpc.RemoteService, com.google.gwt.user.server.rpc.SerializationPolicyProvider, Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, ICsvDatasourceService

public class CsvDatasourceServiceServlet
extends com.google.gwt.user.server.rpc.RemoteServiceServlet
implements ICsvDatasourceService

See Also:
Serialized Form

Constructor Summary
CsvDatasourceServiceServlet()
           
 
Method Summary
 String getEncoding(String fileName)
           
 List<String> getPreviewRows(String filename, boolean isFirstRowHeader, int rows, String encoding)
           
 FileInfo[] getStagedFiles()
           
 List<String> listDatasourceNames()
           
 FileTransformStats stageData(ModelInfo modelInfo, boolean truncateTable)
           
 ModelInfo stageFile(String fileName, String delimiter, String enclosure, boolean isFirstRowHeader, String encoding)
           
 
Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet
getSerializationPolicy, processCall, processPost
 
Methods inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
doPost
 
Methods inherited from class javax.servlet.http.HttpServlet
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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CsvDatasourceServiceServlet

public CsvDatasourceServiceServlet()
Method Detail

stageFile

public ModelInfo stageFile(String fileName,
                           String delimiter,
                           String enclosure,
                           boolean isFirstRowHeader,
                           String encoding)
                    throws Exception
Specified by:
stageFile in interface ICsvDatasourceService
Throws:
Exception

getStagedFiles

public FileInfo[] getStagedFiles()
                          throws Exception
Specified by:
getStagedFiles in interface ICsvDatasourceService
Throws:
Exception

stageData

public FileTransformStats stageData(ModelInfo modelInfo,
                                    boolean truncateTable)
                             throws Exception
Specified by:
stageData in interface ICsvDatasourceService
Throws:
Exception

getPreviewRows

public List<String> getPreviewRows(String filename,
                                   boolean isFirstRowHeader,
                                   int rows,
                                   String encoding)
                            throws Exception
Specified by:
getPreviewRows in interface ICsvDatasourceService
Throws:
Exception

getEncoding

public String getEncoding(String fileName)
Specified by:
getEncoding in interface ICsvDatasourceService

listDatasourceNames

public List<String> listDatasourceNames()
                                 throws IOException
Specified by:
listDatasourceNames in interface ICsvDatasourceService
Throws:
IOException