Added check on tabular resource of type flow
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@100985 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
ea14059285
commit
64bd8edf11
|
@ -3901,6 +3901,12 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
return parameterInstances;
|
return parameterInstances;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param trId
|
||||||
|
* @throws TDGWTServiceException
|
||||||
|
*/
|
||||||
protected void checkTRId(TRId trId) throws TDGWTServiceException {
|
protected void checkTRId(TRId trId) throws TDGWTServiceException {
|
||||||
if (trId == null) {
|
if (trId == null) {
|
||||||
logger.error("TRId is null");
|
logger.error("TRId is null");
|
||||||
|
@ -4037,9 +4043,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
Long.valueOf(trId.getId()));
|
Long.valueOf(trId.getId()));
|
||||||
TabularResource tabularResource = service
|
TabularResource tabularResource = service
|
||||||
.getTabularResource(tabularResourceId);
|
.getTabularResource(tabularResourceId);
|
||||||
|
|
||||||
|
checkTabularResourceIsFlow(tabularResource);
|
||||||
checkTabularResourceLocked(tabularResource);
|
checkTabularResourceLocked(tabularResource);
|
||||||
|
|
||||||
// Export SDMX Codelist
|
// Export SDMX Codelist
|
||||||
OperationDefinition exportSDMXOperation = OperationDefinitionMap
|
OperationDefinition exportSDMXOperation = OperationDefinitionMap
|
||||||
.map(OperationsId.SDMXCodelistExport.toString(), service);
|
.map(OperationsId.SDMXCodelistExport.toString(), service);
|
||||||
|
@ -4109,7 +4116,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
Long.valueOf(trId.getId()));
|
Long.valueOf(trId.getId()));
|
||||||
TabularResource tabularResource = service
|
TabularResource tabularResource = service
|
||||||
.getTabularResource(tabularResourceId);
|
.getTabularResource(tabularResourceId);
|
||||||
|
|
||||||
|
checkTabularResourceIsFlow(tabularResource);
|
||||||
checkTabularResourceLocked(tabularResource);
|
checkTabularResourceLocked(tabularResource);
|
||||||
|
|
||||||
OpExecution4CSVExport opEx = new OpExecution4CSVExport(session,
|
OpExecution4CSVExport opEx = new OpExecution4CSVExport(session,
|
||||||
|
@ -4182,7 +4190,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
Long.valueOf(trId.getId()));
|
Long.valueOf(trId.getId()));
|
||||||
TabularResource tabularResource = service
|
TabularResource tabularResource = service
|
||||||
.getTabularResource(tabularResourceId);
|
.getTabularResource(tabularResourceId);
|
||||||
|
|
||||||
|
checkTabularResourceIsFlow(tabularResource);
|
||||||
checkTabularResourceLocked(tabularResource);
|
checkTabularResourceLocked(tabularResource);
|
||||||
|
|
||||||
OpExecution4JSONExport opEx = new OpExecution4JSONExport(session,
|
OpExecution4JSONExport opEx = new OpExecution4JSONExport(session,
|
||||||
|
@ -4248,7 +4257,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
.getTrId().getId()));
|
.getTrId().getId()));
|
||||||
TabularResource tabularResource = service
|
TabularResource tabularResource = service
|
||||||
.getTabularResource(tabularResourceId);
|
.getTabularResource(tabularResourceId);
|
||||||
|
|
||||||
|
checkTabularResourceIsFlow(tabularResource);
|
||||||
checkTabularResourceLocked(tabularResource);
|
checkTabularResourceLocked(tabularResource);
|
||||||
checkTabularResourceIsFinal(tabularResource);
|
checkTabularResourceIsFinal(tabularResource);
|
||||||
|
|
||||||
|
@ -4309,6 +4319,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
TabularResource tabularResource = service
|
TabularResource tabularResource = service
|
||||||
.getTabularResource(tabularResourceId);
|
.getTabularResource(tabularResourceId);
|
||||||
|
|
||||||
|
checkTabularResourceIsFlow(tabularResource);
|
||||||
checkTabularResourceLocked(tabularResource);
|
checkTabularResourceLocked(tabularResource);
|
||||||
checkTabularResourceIsFinal(tabularResource);
|
checkTabularResourceIsFinal(tabularResource);
|
||||||
|
|
||||||
|
@ -4369,7 +4380,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
Long.valueOf(deleteColumnSession.getTrId().getId()));
|
Long.valueOf(deleteColumnSession.getTrId().getId()));
|
||||||
TabularResource tabularResource = service
|
TabularResource tabularResource = service
|
||||||
.getTabularResource(tabularResourceId);
|
.getTabularResource(tabularResourceId);
|
||||||
|
|
||||||
|
checkTabularResourceIsFlow(tabularResource);
|
||||||
checkTabularResourceLocked(tabularResource);
|
checkTabularResourceLocked(tabularResource);
|
||||||
checkTabularResourceIsFinal(tabularResource);
|
checkTabularResourceIsFinal(tabularResource);
|
||||||
|
|
||||||
|
@ -4445,7 +4457,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
.getId()));
|
.getId()));
|
||||||
TabularResource tabularResource = service
|
TabularResource tabularResource = service
|
||||||
.getTabularResource(tabularResourceId);
|
.getTabularResource(tabularResourceId);
|
||||||
|
|
||||||
|
checkTabularResourceIsFlow(tabularResource);
|
||||||
checkTabularResourceLocked(tabularResource);
|
checkTabularResourceLocked(tabularResource);
|
||||||
checkTabularResourceIsFinal(tabularResource);
|
checkTabularResourceIsFinal(tabularResource);
|
||||||
|
|
||||||
|
@ -4522,7 +4535,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
.getTrId().getId()));
|
.getTrId().getId()));
|
||||||
TabularResource tabularResource = service
|
TabularResource tabularResource = service
|
||||||
.getTabularResource(tabularResourceId);
|
.getTabularResource(tabularResourceId);
|
||||||
|
|
||||||
|
checkTabularResourceIsFlow(tabularResource);
|
||||||
checkTabularResourceLocked(tabularResource);
|
checkTabularResourceLocked(tabularResource);
|
||||||
checkTabularResourceIsFinal(tabularResource);
|
checkTabularResourceIsFinal(tabularResource);
|
||||||
|
|
||||||
|
@ -4593,7 +4607,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
Long.valueOf(labelColumnSession.getTrId().getId()));
|
Long.valueOf(labelColumnSession.getTrId().getId()));
|
||||||
TabularResource tabularResource = service
|
TabularResource tabularResource = service
|
||||||
.getTabularResource(tabularResourceId);
|
.getTabularResource(tabularResourceId);
|
||||||
|
|
||||||
|
checkTabularResourceIsFlow(tabularResource);
|
||||||
checkTabularResourceLocked(tabularResource);
|
checkTabularResourceLocked(tabularResource);
|
||||||
checkTabularResourceIsFinal(tabularResource);
|
checkTabularResourceIsFinal(tabularResource);
|
||||||
|
|
||||||
|
@ -4656,7 +4671,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
Long.valueOf(changeTableTypeSession.getTrId().getId()));
|
Long.valueOf(changeTableTypeSession.getTrId().getId()));
|
||||||
TabularResource tabularResource = service
|
TabularResource tabularResource = service
|
||||||
.getTabularResource(tabularResourceId);
|
.getTabularResource(tabularResourceId);
|
||||||
|
|
||||||
|
checkTabularResourceIsFlow(tabularResource);
|
||||||
checkTabularResourceLocked(tabularResource);
|
checkTabularResourceLocked(tabularResource);
|
||||||
checkTabularResourceIsFinal(tabularResource);
|
checkTabularResourceIsFinal(tabularResource);
|
||||||
|
|
||||||
|
@ -4835,7 +4851,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
Long.valueOf(deleteRowsSession.getTrId().getId()));
|
Long.valueOf(deleteRowsSession.getTrId().getId()));
|
||||||
TabularResource tabularResource = service
|
TabularResource tabularResource = service
|
||||||
.getTabularResource(tabularResourceId);
|
.getTabularResource(tabularResourceId);
|
||||||
|
|
||||||
|
checkTabularResourceIsFlow(tabularResource);
|
||||||
checkTabularResourceLocked(tabularResource);
|
checkTabularResourceLocked(tabularResource);
|
||||||
checkTabularResourceIsFinal(tabularResource);
|
checkTabularResourceIsFinal(tabularResource);
|
||||||
|
|
||||||
|
@ -4985,7 +5002,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
Long.valueOf(duplicatesSession.getTrId().getId()));
|
Long.valueOf(duplicatesSession.getTrId().getId()));
|
||||||
TabularResource tabularResource = service
|
TabularResource tabularResource = service
|
||||||
.getTabularResource(tabularResourceId);
|
.getTabularResource(tabularResourceId);
|
||||||
|
|
||||||
|
checkTabularResourceIsFlow(tabularResource);
|
||||||
checkTabularResourceLocked(tabularResource);
|
checkTabularResourceLocked(tabularResource);
|
||||||
checkTabularResourceIsFinal(tabularResource);
|
checkTabularResourceIsFinal(tabularResource);
|
||||||
|
|
||||||
|
@ -5245,7 +5263,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
TabularResourceId tabularResourceId = new TabularResourceId(
|
TabularResourceId tabularResourceId = new TabularResourceId(
|
||||||
Long.valueOf(tabResource.getTrId().getId()));
|
Long.valueOf(tabResource.getTrId().getId()));
|
||||||
TabularResource tr = service.getTabularResource(tabularResourceId);
|
TabularResource tr = service.getTabularResource(tabularResourceId);
|
||||||
|
|
||||||
|
|
||||||
checkTabularResourceLocked(tr);
|
checkTabularResourceLocked(tr);
|
||||||
checkTabularResourceIsFinal(tr);
|
checkTabularResourceIsFinal(tr);
|
||||||
|
|
||||||
|
@ -5608,7 +5627,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
Long.valueOf(replaceColumnSession.getTrId().getId()));
|
Long.valueOf(replaceColumnSession.getTrId().getId()));
|
||||||
TabularResource tabularResource = service
|
TabularResource tabularResource = service
|
||||||
.getTabularResource(tabularResourceId);
|
.getTabularResource(tabularResourceId);
|
||||||
|
|
||||||
|
checkTabularResourceIsFlow(tabularResource);
|
||||||
checkTabularResourceLocked(tabularResource);
|
checkTabularResourceLocked(tabularResource);
|
||||||
checkTabularResourceIsFinal(tabularResource);
|
checkTabularResourceIsFinal(tabularResource);
|
||||||
|
|
||||||
|
@ -5674,7 +5694,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
Long.valueOf(replaceBatchColumnSession.getTrId().getId()));
|
Long.valueOf(replaceBatchColumnSession.getTrId().getId()));
|
||||||
TabularResource tabularResource = service
|
TabularResource tabularResource = service
|
||||||
.getTabularResource(tabularResourceId);
|
.getTabularResource(tabularResourceId);
|
||||||
|
|
||||||
|
checkTabularResourceIsFlow(tabularResource);
|
||||||
checkTabularResourceLocked(tabularResource);
|
checkTabularResourceLocked(tabularResource);
|
||||||
checkTabularResourceIsFinal(tabularResource);
|
checkTabularResourceIsFinal(tabularResource);
|
||||||
|
|
||||||
|
@ -6015,7 +6036,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
Long.valueOf(trId.getId()));
|
Long.valueOf(trId.getId()));
|
||||||
TabularResource tabularResource = service
|
TabularResource tabularResource = service
|
||||||
.getTabularResource(tabularResourceId);
|
.getTabularResource(tabularResourceId);
|
||||||
|
|
||||||
|
checkTabularResourceIsFlow(tabularResource);
|
||||||
checkTabularResourceLocked(tabularResource);
|
checkTabularResourceLocked(tabularResource);
|
||||||
checkTabularResourceIsFinal(tabularResource);
|
checkTabularResourceIsFinal(tabularResource);
|
||||||
|
|
||||||
|
@ -6122,7 +6144,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
Long.valueOf(rollBackSession.getTrId().getId()));
|
Long.valueOf(rollBackSession.getTrId().getId()));
|
||||||
TabularResource tabularResource = service
|
TabularResource tabularResource = service
|
||||||
.getTabularResource(tabularResourceId);
|
.getTabularResource(tabularResourceId);
|
||||||
|
|
||||||
|
checkTabularResourceIsFlow(tabularResource);
|
||||||
checkTabularResourceLocked(tabularResource);
|
checkTabularResourceLocked(tabularResource);
|
||||||
checkTabularResourceIsFinal(tabularResource);
|
checkTabularResourceIsFinal(tabularResource);
|
||||||
|
|
||||||
|
@ -6273,7 +6296,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
Long.valueOf(editRowSession.getTrId().getId()));
|
Long.valueOf(editRowSession.getTrId().getId()));
|
||||||
TabularResource tabularResource = service
|
TabularResource tabularResource = service
|
||||||
.getTabularResource(tabularResourceId);
|
.getTabularResource(tabularResourceId);
|
||||||
|
|
||||||
|
checkTabularResourceIsFlow(tabularResource);
|
||||||
checkTabularResourceLocked(tabularResource);
|
checkTabularResourceLocked(tabularResource);
|
||||||
checkTabularResourceIsFinal(tabularResource);
|
checkTabularResourceIsFinal(tabularResource);
|
||||||
|
|
||||||
|
@ -6386,7 +6410,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
Long.valueOf(taskResubmitSession.getTrId().getId()));
|
Long.valueOf(taskResubmitSession.getTrId().getId()));
|
||||||
TabularResource tabularResource = service
|
TabularResource tabularResource = service
|
||||||
.getTabularResource(tabularResourceId);
|
.getTabularResource(tabularResourceId);
|
||||||
|
|
||||||
|
checkTabularResourceIsFlow(tabularResource);
|
||||||
checkTabularResourceLocked(tabularResource);
|
checkTabularResourceLocked(tabularResource);
|
||||||
checkTabularResourceIsFinal(tabularResource);
|
checkTabularResourceIsFinal(tabularResource);
|
||||||
|
|
||||||
|
@ -6445,7 +6470,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
Long.valueOf(taskResumeSession.getTrId().getId()));
|
Long.valueOf(taskResumeSession.getTrId().getId()));
|
||||||
TabularResource tabularResource = service
|
TabularResource tabularResource = service
|
||||||
.getTabularResource(tabularResourceId);
|
.getTabularResource(tabularResourceId);
|
||||||
|
|
||||||
|
checkTabularResourceIsFlow(tabularResource);
|
||||||
checkTabularResourceLocked(tabularResource);
|
checkTabularResourceLocked(tabularResource);
|
||||||
checkTabularResourceIsFinal(tabularResource);
|
checkTabularResourceIsFinal(tabularResource);
|
||||||
|
|
||||||
|
@ -6594,7 +6620,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
Long.valueOf(extractCodelistSession.getTrId().getId()));
|
Long.valueOf(extractCodelistSession.getTrId().getId()));
|
||||||
TabularResource tabularResource = service
|
TabularResource tabularResource = service
|
||||||
.getTabularResource(tabularResourceId);
|
.getTabularResource(tabularResourceId);
|
||||||
|
|
||||||
|
checkTabularResourceIsFlow(tabularResource);
|
||||||
checkTabularResourceLocked(tabularResource);
|
checkTabularResourceLocked(tabularResource);
|
||||||
|
|
||||||
OpExecution4ExtractCodelist opEx = new OpExecution4ExtractCodelist(
|
OpExecution4ExtractCodelist opEx = new OpExecution4ExtractCodelist(
|
||||||
|
@ -6658,7 +6685,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
.getId()));
|
.getId()));
|
||||||
TabularResource tabularResource = service
|
TabularResource tabularResource = service
|
||||||
.getTabularResource(tabularResourceId);
|
.getTabularResource(tabularResourceId);
|
||||||
|
|
||||||
|
checkTabularResourceIsFlow(tabularResource);
|
||||||
checkTabularResourceLocked(tabularResource);
|
checkTabularResourceLocked(tabularResource);
|
||||||
checkTabularResourceIsFinal(tabularResource);
|
checkTabularResourceIsFinal(tabularResource);
|
||||||
|
|
||||||
|
@ -6724,7 +6752,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
.getTrId().getId()));
|
.getTrId().getId()));
|
||||||
TabularResource tabularResource = service
|
TabularResource tabularResource = service
|
||||||
.getTabularResource(tabularResourceId);
|
.getTabularResource(tabularResourceId);
|
||||||
|
|
||||||
|
checkTabularResourceIsFlow(tabularResource);
|
||||||
checkTabularResourceLocked(tabularResource);
|
checkTabularResourceLocked(tabularResource);
|
||||||
checkTabularResourceIsFinal(tabularResource);
|
checkTabularResourceIsFinal(tabularResource);
|
||||||
|
|
||||||
|
@ -6970,7 +6999,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
Long.valueOf(codelistMappingSession.getTrId().getId()));
|
Long.valueOf(codelistMappingSession.getTrId().getId()));
|
||||||
TabularResource tabularResource = service
|
TabularResource tabularResource = service
|
||||||
.getTabularResource(tabularResourceId);
|
.getTabularResource(tabularResourceId);
|
||||||
|
|
||||||
|
checkTabularResourceIsFlow(tabularResource);
|
||||||
checkTabularResourceLocked(tabularResource);
|
checkTabularResourceLocked(tabularResource);
|
||||||
checkTabularResourceIsFinal(tabularResource);
|
checkTabularResourceIsFinal(tabularResource);
|
||||||
|
|
||||||
|
@ -7017,7 +7047,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
Long.valueOf(groupBySession.getTrId().getId()));
|
Long.valueOf(groupBySession.getTrId().getId()));
|
||||||
TabularResource tabularResource = service
|
TabularResource tabularResource = service
|
||||||
.getTabularResource(tabularResourceId);
|
.getTabularResource(tabularResourceId);
|
||||||
|
|
||||||
|
checkTabularResourceIsFlow(tabularResource);
|
||||||
checkTabularResourceLocked(tabularResource);
|
checkTabularResourceLocked(tabularResource);
|
||||||
checkTabularResourceIsFinal(tabularResource);
|
checkTabularResourceIsFinal(tabularResource);
|
||||||
|
|
||||||
|
@ -7078,7 +7109,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
Long.valueOf(normalizationSession.getTrId().getId()));
|
Long.valueOf(normalizationSession.getTrId().getId()));
|
||||||
TabularResource tabularResource = service
|
TabularResource tabularResource = service
|
||||||
.getTabularResource(tabularResourceId);
|
.getTabularResource(tabularResourceId);
|
||||||
|
|
||||||
|
checkTabularResourceIsFlow(tabularResource);
|
||||||
checkTabularResourceLocked(tabularResource);
|
checkTabularResourceLocked(tabularResource);
|
||||||
checkTabularResourceIsFinal(tabularResource);
|
checkTabularResourceIsFinal(tabularResource);
|
||||||
|
|
||||||
|
@ -7144,7 +7176,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
Long.valueOf(denormalizationSession.getTrId().getId()));
|
Long.valueOf(denormalizationSession.getTrId().getId()));
|
||||||
TabularResource tabularResource = service
|
TabularResource tabularResource = service
|
||||||
.getTabularResource(tabularResourceId);
|
.getTabularResource(tabularResourceId);
|
||||||
|
|
||||||
|
checkTabularResourceIsFlow(tabularResource);
|
||||||
checkTabularResourceLocked(tabularResource);
|
checkTabularResourceLocked(tabularResource);
|
||||||
checkTabularResourceIsFinal(tabularResource);
|
checkTabularResourceIsFinal(tabularResource);
|
||||||
|
|
||||||
|
@ -7206,7 +7239,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
Long.valueOf(unionSession.getTrId().getId()));
|
Long.valueOf(unionSession.getTrId().getId()));
|
||||||
TabularResource tabularResource = service
|
TabularResource tabularResource = service
|
||||||
.getTabularResource(tabularResourceId);
|
.getTabularResource(tabularResourceId);
|
||||||
|
|
||||||
|
checkTabularResourceIsFlow(tabularResource);
|
||||||
checkTabularResourceLocked(tabularResource);
|
checkTabularResourceLocked(tabularResource);
|
||||||
checkTabularResourceIsFinal(tabularResource);
|
checkTabularResourceIsFinal(tabularResource);
|
||||||
|
|
||||||
|
@ -7267,7 +7301,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
Long.valueOf(statisticalOperationSession.getTrId().getId()));
|
Long.valueOf(statisticalOperationSession.getTrId().getId()));
|
||||||
TabularResource tabularResource = service
|
TabularResource tabularResource = service
|
||||||
.getTabularResource(tabularResourceId);
|
.getTabularResource(tabularResourceId);
|
||||||
|
|
||||||
|
checkTabularResourceIsFlow(tabularResource);
|
||||||
checkTabularResourceLocked(tabularResource);
|
checkTabularResourceLocked(tabularResource);
|
||||||
|
|
||||||
OpExecution4StatisticalOperation opEx = new OpExecution4StatisticalOperation(service, aslSession,
|
OpExecution4StatisticalOperation opEx = new OpExecution4StatisticalOperation(service, aslSession,
|
||||||
|
|
Loading…
Reference in New Issue