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
This commit is contained in:
Giancarlo Panichi 2014-08-27 10:09:53 +00:00
parent b04933862f
commit 3047749c1b
4 changed files with 9 additions and 5 deletions

View File

@ -0,0 +1,2 @@
disabled=06target
eclipse.preferences.version=1

View File

@ -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
/**

View File

@ -111,7 +111,7 @@ public interface TDGWTServiceAsync {
//RollBack
void startRollBack(RollBackSession rollBackSession,AsyncCallback<String> callback);
void discard(TRId trId,AsyncCallback<RollBackSession> callback);
void startDiscard(TRId trId,AsyncCallback<String> callback);
//Share
void getShareInfo(TRId trId, AsyncCallback<ShareInfo> callback);

View File

@ -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;