Updated discard
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@100336 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
2f52c38946
commit
8bf48d4298
|
@ -259,6 +259,9 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
protected static SimpleDateFormat sdfDate = new SimpleDateFormat(
|
||||
"yyyy-MM-dd");
|
||||
|
||||
protected static SimpleDateFormat sdfPerformance = new SimpleDateFormat(
|
||||
"yyyy-MM-dd HH:mm:ss.SSS");
|
||||
|
||||
/**
|
||||
*
|
||||
* {@inheritDoc}
|
||||
|
@ -4011,7 +4014,11 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
|
||||
TabularResourceId serviceTR = new TabularResourceId(id);
|
||||
logger.debug("OperationInvocation: \n" + invocation.toString());
|
||||
|
||||
logger.debug("Start Replace on Service:"+sdfPerformance.format(new Date()));
|
||||
Task trTask = service.execute(invocation, serviceTR);
|
||||
logger.debug("Start Replace returned task:"+sdfPerformance.format(new Date()));
|
||||
|
||||
logger.debug("Replace Column by Expression on service: TaskId "
|
||||
+ trTask.getId());
|
||||
|
||||
|
@ -4390,6 +4397,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
Task trTask = service.execute(invocation, cloneTR.getId());
|
||||
logger.debug("Start Task on service: TaskId " + trTask.getId());
|
||||
|
||||
|
||||
TaskWrapper taskWrapper = new TaskWrapper(trTask,
|
||||
UIOperationsId.Clone, trIdClone);
|
||||
SessionUtil.setStartedTask(session, taskWrapper);
|
||||
|
@ -5314,7 +5322,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||
ASLSession aslSession = SessionUtil.getAslSession(session);
|
||||
|
||||
logger.debug("discard(): " + trId);
|
||||
logger.debug("StartDiscard: " + trId);
|
||||
|
||||
AuthorizationProvider.instance.set(new AuthorizationToken(
|
||||
aslSession.getUsername(), aslSession.getScope()));
|
||||
|
@ -5343,8 +5351,34 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
op = new OpHistory(historyId, opName, opDesc,
|
||||
sdf.format(step.getExecutionDate().getTime()));
|
||||
logger.debug("Discard :" + op);
|
||||
|
||||
rollBackSession = new RollBackSession(trId, historyId);
|
||||
taskId = startRollBack(rollBackSession);
|
||||
logger.debug("Start Discard:"+sdfPerformance.format(new Date()));
|
||||
|
||||
//
|
||||
logger.debug("rollBack(): " + rollBackSession);
|
||||
SessionUtil.setRollBackSession(session, rollBackSession);
|
||||
|
||||
HistoryStepId historyStepId = new HistoryStepId(
|
||||
rollBackSession.getHistoryId());
|
||||
logger.debug("Start RollBack task:"+sdfPerformance.format(new Date()));
|
||||
Task trTask = service.rollbackTo(tabularResourceId, historyStepId);
|
||||
logger.debug("Start RollBack returned task:"+sdfPerformance.format(new Date()));
|
||||
|
||||
if (trTask == null) {
|
||||
logger.error("Error on service Task null");
|
||||
throw new TDGWTServiceException("Task not started");
|
||||
}
|
||||
logger.debug("Start Task on service: " + trTask.getId());
|
||||
|
||||
TaskWrapper taskWrapper = new TaskWrapper(trTask,
|
||||
UIOperationsId.RollBack, rollBackSession.getTrId());
|
||||
SessionUtil.setStartedTask(session, taskWrapper);
|
||||
taskId=trTask.getId().getValue();
|
||||
|
||||
//
|
||||
logger.debug("Start Discard returned task:"+sdfPerformance.format(new Date()));
|
||||
|
||||
|
||||
} else {
|
||||
logger.debug("Discard : step null");
|
||||
|
@ -5397,8 +5431,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
Long.valueOf(rollBackSession.getTrId().getId()));
|
||||
HistoryStepId historyStepId = new HistoryStepId(
|
||||
rollBackSession.getHistoryId());
|
||||
|
||||
logger.debug("Start RollBack task:"+sdfPerformance.format(new Date()));
|
||||
Task trTask = service.rollbackTo(tabularResourceId, historyStepId);
|
||||
logger.debug("Start RollBack returned task:"+sdfPerformance.format(new Date()));
|
||||
|
||||
if (trTask == null) {
|
||||
logger.error("Error on service Task null");
|
||||
throw new TDGWTServiceException("Task not started");
|
||||
|
@ -6461,7 +6497,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
|
||||
TaskWrapper taskWrapper = SessionUtil.getStartedTask(session,
|
||||
operationMonitorSession.getTaskId());
|
||||
|
||||
logger.debug("Start Monitor Time:"+sdfPerformance.format(new Date()));
|
||||
OperationMonitorCreator operationMonitorCreator = new OperationMonitorCreator(
|
||||
session, aslSession, taskWrapper, operationMonitorSession);
|
||||
OperationMonitor operationMonitor = operationMonitorCreator
|
||||
|
|
Loading…
Reference in New Issue