Minor Updated
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@92764 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
b86924dc6a
commit
22872c5ba5
|
@ -3483,6 +3483,42 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void startDeleteRows(DeleteRowsSession deleteRowsSession)
|
||||||
|
throws TDGWTServiceException {
|
||||||
|
try {
|
||||||
|
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||||
|
SessionUtil.setDeleteRowsSession(session, deleteRowsSession);
|
||||||
|
ASLSession aslSession = SessionUtil.getAslSession(session);
|
||||||
|
|
||||||
|
AuthorizationProvider.instance.set(new AuthorizationToken(
|
||||||
|
aslSession.getUsername()));
|
||||||
|
TabularDataService service = TabularDataServiceFactory.getService();
|
||||||
|
|
||||||
|
OperationExecution invocation = retrieveOperationExecution(service,
|
||||||
|
deleteRowsSession);
|
||||||
|
if (invocation == null) {
|
||||||
|
throw new TDGWTServiceException(
|
||||||
|
"Error Delete Rows invocation: Operation not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
TabularResourceId serviceTR = new TabularResourceId(
|
||||||
|
Long.valueOf(deleteRowsSession.getTrId().getId()));
|
||||||
|
logger.debug("OperationInvocation: \n" + invocation.toString());
|
||||||
|
Task trTask = service.execute(invocation, serviceTR);
|
||||||
|
logger.debug("Start Task on service: TaskId " + trTask.getId());
|
||||||
|
SessionUtil.setDeleteRowsTask(session, trTask);
|
||||||
|
return;
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
throw new TDGWTServiceException("Error Deleting Rows: "
|
||||||
|
+ e.getLocalizedMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DeleteRowsMonitor getDeleteRowsMonitor()
|
public DeleteRowsMonitor getDeleteRowsMonitor()
|
||||||
throws TDGWTServiceException {
|
throws TDGWTServiceException {
|
||||||
|
@ -3586,38 +3622,4 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void startDeleteRows(DeleteRowsSession deleteRowsSession)
|
|
||||||
throws TDGWTServiceException {
|
|
||||||
try {
|
|
||||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
|
||||||
SessionUtil.setDeleteRowsSession(session, deleteRowsSession);
|
|
||||||
ASLSession aslSession = SessionUtil.getAslSession(session);
|
|
||||||
|
|
||||||
AuthorizationProvider.instance.set(new AuthorizationToken(
|
|
||||||
aslSession.getUsername()));
|
|
||||||
TabularDataService service = TabularDataServiceFactory.getService();
|
|
||||||
|
|
||||||
OperationExecution invocation = retrieveOperationExecution(service,
|
|
||||||
deleteRowsSession);
|
|
||||||
if (invocation == null) {
|
|
||||||
throw new TDGWTServiceException(
|
|
||||||
"Error Delete Rows invocation: Operation not supported");
|
|
||||||
}
|
|
||||||
|
|
||||||
TabularResourceId serviceTR = new TabularResourceId(
|
|
||||||
Long.valueOf(deleteRowsSession.getTrId().getId()));
|
|
||||||
logger.debug("OperationInvocation: \n" + invocation.toString());
|
|
||||||
Task trTask = service.execute(invocation, serviceTR);
|
|
||||||
logger.debug("Start Task on service: TaskId " + trTask.getId());
|
|
||||||
SessionUtil.setDeleteRowsTask(session, trTask);
|
|
||||||
return;
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
throw new TDGWTServiceException("Error Deleting Rows: "
|
|
||||||
+ e.getLocalizedMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue