Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@90936 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
64eb836398
commit
ee648e046d
|
@ -456,8 +456,10 @@ public class SessionUtil {
|
|||
|
||||
public static Boolean getCSVExportEnd(HttpSession httpSession) {
|
||||
Boolean end = (Boolean) httpSession.getAttribute(CSV_EXPORT_END);
|
||||
logger.debug("getCSVExportEnd(): "+end);
|
||||
if (end == null) {
|
||||
logger.error("CSV_EXPORT_END was not acquired");
|
||||
end=false;
|
||||
}
|
||||
return end;
|
||||
}
|
||||
|
|
|
@ -1996,7 +1996,6 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
exportMonitor.setProgress(task.getProgress());
|
||||
break;
|
||||
case SUCCEDED:
|
||||
SessionUtil.setCSVExportEnd(session, true);
|
||||
logger.debug("Task Result:" + task.getResult());
|
||||
exportMonitor.setProgress(task.getProgress());
|
||||
Table table = task.getResult().getPrimaryTable();
|
||||
|
@ -2053,8 +2052,11 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
ExportMetadata exportMetadata, CSVExportSession exportSession)
|
||||
throws TDGWTServiceException {
|
||||
logger.debug("Save Export In Destination");
|
||||
logger.debug("Destination: "+exportSession.getDestination().getId());
|
||||
if (exportSession.getDestination().getId().compareTo("Workspace") == 0) {
|
||||
if (SessionUtil.getCSVExportEnd(session) == false) {
|
||||
logger.debug("Save on Workspace");
|
||||
boolean end=SessionUtil.getCSVExportEnd(session);
|
||||
if (end == false) {
|
||||
SessionUtil.setCSVExportEnd(session, true);
|
||||
FilesStorage storage = new FilesStorage();
|
||||
logger.debug("Create Item On Workspace: [ uri: "
|
||||
|
@ -2068,9 +2070,14 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
exportSession.getFileName(),
|
||||
exportSession.getFileDescription(), "text/csv",
|
||||
exportSession.getItemId());
|
||||
|
||||
} else {
|
||||
logger.debug("getCSVExportEnd(): true");
|
||||
}
|
||||
} else {
|
||||
|
||||
logger.error("Destination No Present");
|
||||
throw new TDGWTServiceException(
|
||||
"Error in exportCSV CSVExportMonitor: no destination present");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue