package org.gcube.portlets.user.reportgenerator.client; import org.gcube.portlets.d4sreporting.common.shared.SerializableModel; import org.gcube.portlets.d4sreporting.common.shared.SerializableTable; import org.gcube.portlets.d4sreporting.common.shared.SerializableTimeSeries; import org.gcube.portlets.user.reportgenerator.client.model.ExportManifestationType; import org.gcube.portlets.user.reportgenerator.shared.SessionInfo; import com.google.gwt.user.client.rpc.RemoteService; /** * Service interface for server communication * @author Massimiliano Assante, ISTI-CNR - massimiliano.assante@isti.cnr.it * @version november 2008 (0.1) */ public interface ReportService extends RemoteService{ /** * return the first ten records of the timeseries having id as param * @param sTS . * @return . */ SerializableTable getSampleTimeSeries(SerializableTimeSeries sTS); /** * * @return . */ String[] getUserTemplateNames(); /** * @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 * @return . */ SerializableModel readModel(String templateName, String templateObjectID, boolean isTemplate, boolean isImporting); /** * * @param model . * @param type . * @return . */ boolean generateManifestation(SerializableModel model, ExportManifestationType type); /** * each portlet instance runs in a scope * each portlet instance is used by a unique username from within the portal * @param currentHost . * @return a SessionInfo bean containing the username the scope andis opening a workflow document or not */ SessionInfo getSessionInfo(String currentHost); /** * * @param model . */ void storeTemplateInSession(SerializableModel model); /** * * @return the model previously stored in the session */ SerializableModel readTemplateFromSession(); /** * the report model is taken from the session * @param folderid the basket id where to save the report */ void saveReport(String folderid, String newname); /** * the report model is taken from the session, the id also */ void saveReport(); SerializableModel getWorkflowDocumentFromDocumentLibrary(); void updateWorkflowDocument(boolean update); void renewLock(); String generateTempDocx(SerializableModel model); /** * * @param tempPath * @return */ SerializableModel readImportedModel(String tempPath); }