package org.gcube.portlets.user.reportgenerator.client;
import org.gcube.portlets.d4sreporting.common.shared.Model;
import org.gcube.portlets.d4sreporting.common.shared.RepTimeSeries;
import org.gcube.portlets.d4sreporting.common.shared.Table;
import org.gcube.portlets.user.exporter.shared.TypeExporter;
import org.gcube.portlets.user.reportgenerator.shared.SessionInfo;
import com.google.gwt.user.client.rpc.AsyncCallback;
/**
* * Service interface for server Async communication
* @author Massimiliano Assante, ISTI-CNR - massimiliano.assante@isti.cnr.it
*
*/
public interface ReportServiceAsync {
/**
* return the first ten records of the timeseries having id as param
* @param sTS .
* @param callback .
*/
void getSampleTimeSeries(RepTimeSeries sTS, AsyncCallback
callback);
/**
*
* @param callback .
*/
void getUserTemplateNames(AsyncCallback callback);
/**
*
* @param templateName .
* @param templateObjectID .
* @param isTemplate says if you're opening a template or a report
* @param isImporting says if your importing or youre loading a template in the UI
* @param callback .
*/
void readModel(String templateName, String templateObjectID, boolean isTemplate, boolean isImporting, AsyncCallback callback);
/**
*
* @param model .
* @param callback .
*/
void storeTemplateInSession(Model model, AsyncCallback callback);
/**
*
* call for the model previously stored in the session
* @param callback .
*/
void readTemplateFromSession( AsyncCallback callback);
/**
* @param callback .
* @param folderid .
*/
void saveReport(String folderid, String newname, AsyncCallback callback);
/**
*
* @param callback .
*/
void saveReport(AsyncCallback callback);
/**
*
* @param currentHost
* @param callback
*/
void getSessionInfo(String currentHost, AsyncCallback callback);
void getWorkflowDocumentFromDocumentLibrary(
AsyncCallback callback);
void updateWorkflowDocument(boolean update, AsyncCallback callback);
void renewLock(AsyncCallback callback);
void readImportedModel(String tempPath,
AsyncCallback callback);
void save(String filePath, String workspaceFolderId, String ItemName,
TypeExporter type, boolean overwrite, AsyncCallback callback);
}