Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@95424 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
a1db75ab64
commit
f558e79fe3
2
pom.xml
2
pom.xml
|
@ -149,7 +149,7 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.common</groupId>
|
||||
<artifactId>csv4j</artifactId>
|
||||
<version>[1.2.0-SNAPSHOT, 2.0.0-common)</version>
|
||||
<version>[1.2.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Service Client -->
|
||||
|
|
|
@ -3801,24 +3801,28 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
* @return
|
||||
* @throws TDGWTServiceException
|
||||
*/
|
||||
protected OperationExecution retrieveOperationExecution(
|
||||
protected ArrayList<OperationExecution> retrieveOperationExecution(
|
||||
TabularDataService service, DeleteColumnSession deleteColumnSession)
|
||||
throws TDGWTServiceException {
|
||||
|
||||
OperationExecution invocation = null;
|
||||
List<OperationDefinition> capabilities = service.getCapabilities();
|
||||
|
||||
logger.debug(deleteColumnSession.toString());
|
||||
List<OperationDefinition> capabilities = service.getCapabilities();
|
||||
OperationDefinition operationDefinition;
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
|
||||
operationDefinition = OperationDefinitionMap.map(
|
||||
OperationsId.RemoveColumn.toString(), capabilities);
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
|
||||
invocation = new OperationExecution(deleteColumnSession.getColumnData()
|
||||
.getColumnId(), operationDefinition.getOperationId(), map);
|
||||
ArrayList<OperationExecution> invocations = new ArrayList<OperationExecution>();
|
||||
for (ColumnData col : deleteColumnSession.getColumns()) {
|
||||
|
||||
return invocation;
|
||||
OperationExecution invocation = null;
|
||||
|
||||
invocation = new OperationExecution(col.getColumnId(),
|
||||
operationDefinition.getOperationId(), map);
|
||||
invocations.add(invocation);
|
||||
}
|
||||
|
||||
return invocations;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4146,7 +4150,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
aslSession.getUsername()));
|
||||
TabularDataService service = TabularDataServiceFactory.getService();
|
||||
|
||||
OperationExecution invocation = retrieveOperationExecution(service,
|
||||
ArrayList<OperationExecution> invocation = retrieveOperationExecution(service,
|
||||
deleteColumnSession);
|
||||
if (invocation == null) {
|
||||
throw new TDGWTServiceException(
|
||||
|
@ -4154,10 +4158,9 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
}
|
||||
|
||||
TabularResourceId serviceTR = new TabularResourceId(
|
||||
Long.valueOf(deleteColumnSession.getColumnData().getTrId()
|
||||
.getId()));
|
||||
Long.valueOf(deleteColumnSession.getTrId().getId()));
|
||||
logger.debug("OperationInvocation: \n" + invocation.toString());
|
||||
Task trTask = service.execute(invocation, serviceTR);
|
||||
Task trTask = service.executeBatch(invocation, serviceTR);
|
||||
logger.debug("Start Task on service: TaskId " + trTask.getId());
|
||||
SessionUtil.setDeleteColumnTask(session, trTask);
|
||||
return;
|
||||
|
@ -4220,8 +4223,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
table = task.getResult().getPrimaryTable();
|
||||
logger.debug("Table retrived: " + table.toString());
|
||||
trId = new TRId();
|
||||
trId.setId(deleteColumnSession.getColumnData()
|
||||
.getTrId().getId());
|
||||
trId.setId(deleteColumnSession.getTrId().getId());
|
||||
trId = retrieveTabularResourceBasicData(trId);
|
||||
|
||||
deleteColumnMonitor.setTrId(trId);
|
||||
|
@ -4246,8 +4248,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
table = task.getResult().getPrimaryTable();
|
||||
logger.debug("Table retrived: " + table.toString());
|
||||
trId = new TRId();
|
||||
trId.setId(deleteColumnSession.getColumnData()
|
||||
.getTrId().getId());
|
||||
trId.setId(deleteColumnSession.getTrId().getId());
|
||||
trId = retrieveTabularResourceBasicData(trId);
|
||||
|
||||
deleteColumnMonitor.setTrId(trId);
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
package org.gcube.portlets.user.td.gwtservice.shared.tr.column;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -14,21 +16,43 @@ public class DeleteColumnSession implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = -1896235499708614266L;
|
||||
|
||||
protected ColumnData columnData;
|
||||
protected TRId trId;
|
||||
protected ArrayList<ColumnData> columns;
|
||||
|
||||
|
||||
public ColumnData getColumnData() {
|
||||
return columnData;
|
||||
public DeleteColumnSession(){
|
||||
|
||||
}
|
||||
public void setColumnData(ColumnData columnData) {
|
||||
this.columnData = columnData;
|
||||
|
||||
public DeleteColumnSession(TRId trId,ArrayList<ColumnData> columns){
|
||||
this.trId=trId;
|
||||
this.columns=columns;
|
||||
}
|
||||
|
||||
public TRId getTrId() {
|
||||
return trId;
|
||||
}
|
||||
|
||||
public void setTrId(TRId trId) {
|
||||
this.trId = trId;
|
||||
}
|
||||
|
||||
public ArrayList<ColumnData> getColumns() {
|
||||
return columns;
|
||||
}
|
||||
|
||||
public void setColumns(ArrayList<ColumnData> columns) {
|
||||
this.columns = columns;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "DeleteColumnSession [columnData=" + columnData + "]";
|
||||
return "DeleteColumnSession [trId=" + trId + ", columns=" + columns
|
||||
+ "]";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue