Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@94978 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
8346c76f88
commit
4ad7b3e5fd
|
@ -5764,7 +5764,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
.getTabularResource(tabularResourceId);
|
||||
List<HistoryStep> history = tabularResource.getHistory();
|
||||
long historyId = 0;
|
||||
String opDesc=null, opName=null;
|
||||
String opDesc = null, opName = null;
|
||||
HistoryStep lastStep = null;
|
||||
OpHistory op = null;
|
||||
|
||||
|
@ -5774,9 +5774,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
opDesc = lastStep.getOperationDescription();
|
||||
opName = opDesc;
|
||||
historyId = lastStep.getId().getValue();
|
||||
op = new OpHistory(historyId, opName,
|
||||
opDesc, sdf.format(lastStep
|
||||
.getExecutionDate().getTime()));
|
||||
op = new OpHistory(historyId, opName, opDesc,
|
||||
sdf.format(lastStep.getExecutionDate().getTime()));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -5818,7 +5817,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
|
||||
List<HistoryStep> history = tabularResource.getHistory();
|
||||
long historyId = 0;
|
||||
String opDesc=null, opName=null;
|
||||
String opDesc = null, opName = null;
|
||||
HistoryStep lastStep = null;
|
||||
OpHistory op = null;
|
||||
|
||||
|
@ -5828,9 +5827,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
opDesc = lastStep.getOperationDescription();
|
||||
opName = opDesc;
|
||||
historyId = lastStep.getId().getValue();
|
||||
op = new OpHistory(historyId, opName,
|
||||
opDesc, sdf.format(lastStep
|
||||
.getExecutionDate().getTime()));
|
||||
op = new OpHistory(historyId, opName, opDesc,
|
||||
sdf.format(lastStep.getExecutionDate().getTime()));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -5878,7 +5876,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
ArrayList<OpHistory> opHistoryList = new ArrayList<OpHistory>();
|
||||
|
||||
long historyId = 0;
|
||||
String opDesc=null, opName=null;
|
||||
String opDesc = null, opName = null;
|
||||
OpHistory op = null;
|
||||
|
||||
for (HistoryStep step : history) {
|
||||
|
@ -5886,9 +5884,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
historyId = step.getId().getValue();
|
||||
opDesc = step.getOperationDescription();
|
||||
opName = step.getOperationDescription();
|
||||
op = new OpHistory(historyId, opName,
|
||||
opDesc, sdf.format(step
|
||||
.getExecutionDate().getTime()));
|
||||
op = new OpHistory(historyId, opName, opDesc,
|
||||
sdf.format(step.getExecutionDate().getTime()));
|
||||
opHistoryList.add(op);
|
||||
}
|
||||
}
|
||||
|
@ -5931,7 +5928,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
ArrayList<OpHistory> opHistoryList = new ArrayList<OpHistory>();
|
||||
|
||||
long historyId = 0;
|
||||
String opDesc=null, opName=null;
|
||||
String opDesc = null, opName = null;
|
||||
OpHistory op = null;
|
||||
|
||||
for (HistoryStep step : history) {
|
||||
|
@ -5939,9 +5936,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
historyId = step.getId().getValue();
|
||||
opDesc = step.getOperationDescription();
|
||||
opName = step.getOperationDescription();
|
||||
op = new OpHistory(historyId, opName,
|
||||
opDesc, sdf.format(step
|
||||
.getExecutionDate().getTime()));
|
||||
op = new OpHistory(historyId, opName, opDesc,
|
||||
sdf.format(step.getExecutionDate().getTime()));
|
||||
opHistoryList.add(op);
|
||||
}
|
||||
}
|
||||
|
@ -5980,22 +5976,25 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
List<HistoryStep> history = tabularResource.getHistory();
|
||||
|
||||
long historyId = 0;
|
||||
String opDesc=null, opName=null;
|
||||
String opDesc = null, opName = null;
|
||||
OpHistory op = null;
|
||||
RollBackSession rollBackSession=null;
|
||||
RollBackSession rollBackSession = null;
|
||||
if (history != null) {
|
||||
HistoryStep step = history.get(1);
|
||||
if (step != null) {
|
||||
historyId = step.getId().getValue();
|
||||
opDesc= step.getOperationDescription();
|
||||
opName= opDesc;
|
||||
op = new OpHistory(historyId, opName,
|
||||
opDesc, sdf.format(step
|
||||
.getExecutionDate().getTime()));
|
||||
logger.debug("Discard :"+op);
|
||||
rollBackSession=new RollBackSession(trId,historyId);
|
||||
rollBack(rollBackSession);
|
||||
if (history.size() > 1) {
|
||||
HistoryStep step = history.get(history.size() - 2);
|
||||
if (step != null) {
|
||||
historyId = step.getId().getValue();
|
||||
opDesc = step.getOperationDescription();
|
||||
opName = opDesc;
|
||||
op = new OpHistory(historyId, opName, opDesc,
|
||||
sdf.format(step.getExecutionDate().getTime()));
|
||||
logger.debug("Discard :" + op);
|
||||
rollBackSession = new RollBackSession(trId, historyId);
|
||||
rollBack(rollBackSession);
|
||||
|
||||
} else {
|
||||
logger.debug("Discard : step null");
|
||||
}
|
||||
} else {
|
||||
logger.debug("Discard : no previous step exist");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue