From 3047749c1bdc505d3f4e0bf2ac62011da177c450 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Wed, 27 Aug 2014 10:09:53 +0000 Subject: [PATCH] Updated OperationMonitor git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@99297 82a268e6-3cf1-43bd-a215-b396298e98cf --- .settings/org.eclipse.wst.validation.prefs | 2 ++ .../user/td/gwtservice/client/rpc/TDGWTService.java | 3 ++- .../user/td/gwtservice/client/rpc/TDGWTServiceAsync.java | 2 +- .../user/td/gwtservice/server/TDGWTServiceImpl.java | 7 ++++--- 4 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 .settings/org.eclipse.wst.validation.prefs diff --git a/.settings/org.eclipse.wst.validation.prefs b/.settings/org.eclipse.wst.validation.prefs new file mode 100644 index 0000000..04cad8c --- /dev/null +++ b/.settings/org.eclipse.wst.validation.prefs @@ -0,0 +1,2 @@ +disabled=06target +eclipse.preferences.version=1 diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/client/rpc/TDGWTService.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/client/rpc/TDGWTService.java index e5ea414..3d2bc6e 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/client/rpc/TDGWTService.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/client/rpc/TDGWTService.java @@ -278,9 +278,10 @@ public interface TDGWTService extends RemoteService { * Call discard operation on tabular resource * * @param trId + * @return * @throws TDGWTServiceException */ - public RollBackSession discard(TRId trId) throws TDGWTServiceException; + public String startDiscard(TRId trId) throws TDGWTServiceException; // Share /** diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/client/rpc/TDGWTServiceAsync.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/client/rpc/TDGWTServiceAsync.java index d612293..6e3eaa6 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/client/rpc/TDGWTServiceAsync.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/client/rpc/TDGWTServiceAsync.java @@ -111,7 +111,7 @@ public interface TDGWTServiceAsync { //RollBack void startRollBack(RollBackSession rollBackSession,AsyncCallback callback); - void discard(TRId trId,AsyncCallback callback); + void startDiscard(TRId trId,AsyncCallback callback); //Share void getShareInfo(TRId trId, AsyncCallback callback); diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TDGWTServiceImpl.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TDGWTServiceImpl.java index c8a8e9f..7fbecee 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TDGWTServiceImpl.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TDGWTServiceImpl.java @@ -4815,7 +4815,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public RollBackSession discard(TRId trId) throws TDGWTServiceException { + public String startDiscard(TRId trId) throws TDGWTServiceException { try { HttpSession session = this.getThreadLocalRequest().getSession(); ASLSession aslSession = SessionUtil.getAslSession(session); @@ -4836,6 +4836,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements String opDesc = null, opName = null; OpHistory op = null; RollBackSession rollBackSession = null; + String taskId=null; if (history != null) { if (history.size() > 1) { HistoryStep step = history.get(history.size() - 2); @@ -4847,7 +4848,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements sdf.format(step.getExecutionDate().getTime())); logger.debug("Discard :" + op); rollBackSession = new RollBackSession(trId, historyId); - startRollBack(rollBackSession); + taskId=startRollBack(rollBackSession); } else { logger.debug("Discard : step null"); @@ -4860,7 +4861,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements logger.debug("Discard : not present"); } - return rollBackSession; + return taskId; } catch (TDGWTSessionExpiredException e) { throw e;