Minor update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@100930 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
67621940f4
commit
6c44669117
|
@ -141,6 +141,7 @@ import org.gcube.portlets.user.td.gwtservice.server.trservice.LicenceMap;
|
||||||
import org.gcube.portlets.user.td.gwtservice.server.trservice.OperationDefinitionMap;
|
import org.gcube.portlets.user.td.gwtservice.server.trservice.OperationDefinitionMap;
|
||||||
import org.gcube.portlets.user.td.gwtservice.server.trservice.QueryService;
|
import org.gcube.portlets.user.td.gwtservice.server.trservice.QueryService;
|
||||||
import org.gcube.portlets.user.td.gwtservice.server.trservice.TDTypeValueMap;
|
import org.gcube.portlets.user.td.gwtservice.server.trservice.TDTypeValueMap;
|
||||||
|
import org.gcube.portlets.user.td.gwtservice.server.trservice.TabularResourceTypeMap;
|
||||||
import org.gcube.portlets.user.td.gwtservice.server.trservice.TaskStateMap;
|
import org.gcube.portlets.user.td.gwtservice.server.trservice.TaskStateMap;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.Constants;
|
import org.gcube.portlets.user.td.gwtservice.shared.Constants;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.OperationsId;
|
import org.gcube.portlets.user.td.gwtservice.shared.OperationsId;
|
||||||
|
@ -618,7 +619,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
Contacts owner = new Contacts("", tr.getOwner(), false);
|
Contacts owner = new Contacts("", tr.getOwner(), false);
|
||||||
currentTR.setOwner(owner);
|
currentTR.setOwner(owner);
|
||||||
currentTR.setContacts(retrieveShareInfo(tr));
|
currentTR.setContacts(retrieveShareInfo(tr));
|
||||||
|
|
||||||
|
|
||||||
SessionUtil.setTabResource(session, currentTR);
|
SessionUtil.setTabResource(session, currentTR);
|
||||||
logger.debug("GetTabResourceInformation() updated information:"
|
logger.debug("GetTabResourceInformation() updated information:"
|
||||||
+ currentTR.toString());
|
+ currentTR.toString());
|
||||||
|
@ -680,7 +682,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
Contacts owner = new Contacts("", tr.getOwner(), false);
|
Contacts owner = new Contacts("", tr.getOwner(), false);
|
||||||
currentTR.setOwner(owner);
|
currentTR.setOwner(owner);
|
||||||
currentTR.setContacts(retrieveShareInfo(tr));
|
currentTR.setContacts(retrieveShareInfo(tr));
|
||||||
|
|
||||||
|
|
||||||
logger.debug("GetTabResourceInformation() updated information:"
|
logger.debug("GetTabResourceInformation() updated information:"
|
||||||
+ currentTR);
|
+ currentTR);
|
||||||
return currentTR;
|
return currentTR;
|
||||||
|
@ -1512,7 +1515,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
if (viewTable == null) {
|
if (viewTable == null) {
|
||||||
logger.debug("ViewTable is null");
|
logger.debug("ViewTable is null");
|
||||||
newTRId = new TRId(trId.getId());
|
newTRId = new TRId(trId.getId());
|
||||||
newTRId.setTabularResourceType(trId.getTabularResourceType());
|
newTRId.setTableTypeName(trId.getTableTypeName());
|
||||||
newTRId.setTableId(String.valueOf(table.getId().getValue()));
|
newTRId.setTableId(String.valueOf(table.getId().getValue()));
|
||||||
newTRId.setTableType(table.getTableType().getName());
|
newTRId.setTableType(table.getTableType().getName());
|
||||||
newTRId.setViewTable(false);
|
newTRId.setViewTable(false);
|
||||||
|
@ -1573,7 +1576,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
} else {
|
} else {
|
||||||
logger.debug("ViewTable is not null");
|
logger.debug("ViewTable is not null");
|
||||||
newTRId = new TRId(trId.getId());
|
newTRId = new TRId(trId.getId());
|
||||||
newTRId.setTabularResourceType(trId.getTabularResourceType());
|
newTRId.setTableTypeName(trId.getTableTypeName());
|
||||||
newTRId.setTableId(String.valueOf(viewTable.getId().getValue()));
|
newTRId.setTableId(String.valueOf(viewTable.getId().getValue()));
|
||||||
newTRId.setTableType(viewTable.getTableType().getName());
|
newTRId.setTableType(viewTable.getTableType().getName());
|
||||||
newTRId.setReferenceTargetTableId(String.valueOf(table.getId()
|
newTRId.setReferenceTargetTableId(String.valueOf(table.getId()
|
||||||
|
@ -1686,7 +1689,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
if (viewTable == null) {
|
if (viewTable == null) {
|
||||||
logger.debug("ViewTable is null");
|
logger.debug("ViewTable is null");
|
||||||
TRId newTRId = new TRId(trId.getId());
|
TRId newTRId = new TRId(trId.getId());
|
||||||
newTRId.setTabularResourceType(trId.getTabularResourceType());
|
newTRId.setTableTypeName(trId.getTableTypeName());
|
||||||
newTRId.setTableId(String.valueOf(table.getId().getValue()));
|
newTRId.setTableId(String.valueOf(table.getId().getValue()));
|
||||||
newTRId.setTableType(table.getTableType().getName());
|
newTRId.setTableType(table.getTableType().getName());
|
||||||
newTRId.setViewTable(false);
|
newTRId.setViewTable(false);
|
||||||
|
@ -1747,7 +1750,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
} else {
|
} else {
|
||||||
logger.debug("ViewTable is not null");
|
logger.debug("ViewTable is not null");
|
||||||
TRId newTRId = new TRId(trId.getId());
|
TRId newTRId = new TRId(trId.getId());
|
||||||
newTRId.setTabularResourceType(trId.getTabularResourceType());
|
newTRId.setTableTypeName(trId.getTableTypeName());
|
||||||
newTRId.setTableId(String.valueOf(viewTable.getId().getValue()));
|
newTRId.setTableId(String.valueOf(viewTable.getId().getValue()));
|
||||||
newTRId.setTableType(viewTable.getTableType().getName());
|
newTRId.setTableType(viewTable.getTableType().getName());
|
||||||
newTRId.setReferenceTargetTableId(String.valueOf(table.getId()
|
newTRId.setReferenceTargetTableId(String.valueOf(table.getId()
|
||||||
|
@ -1948,7 +1951,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
try {
|
try {
|
||||||
TabResource t = new TabResource();
|
TabResource t = new TabResource();
|
||||||
TRId trId = new TRId(String.valueOf(tr.getId().getValue()));
|
TRId trId = new TRId(String.valueOf(tr.getId().getValue()));
|
||||||
trId.setTabularResourceType(tr.getTableType());
|
trId.setTableTypeName(tr.getTableType());
|
||||||
|
|
||||||
t.setId(String.valueOf(i));
|
t.setId(String.valueOf(i));
|
||||||
t.setTrId(trId);
|
t.setTrId(trId);
|
||||||
t.setValid(tr.isValid());
|
t.setValid(tr.isValid());
|
||||||
|
@ -1956,7 +1960,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
t.setLocked(tr.isLocked());
|
t.setLocked(tr.isLocked());
|
||||||
Contacts owner = new Contacts("", tr.getOwner(), false);
|
Contacts owner = new Contacts("", tr.getOwner(), false);
|
||||||
t.setOwner(owner);
|
t.setOwner(owner);
|
||||||
|
|
||||||
if (tr.contains(NameMetadata.class)) {
|
if (tr.contains(NameMetadata.class)) {
|
||||||
NameMetadata nameMeta = tr.getMetadata(NameMetadata.class);
|
NameMetadata nameMeta = tr.getMetadata(NameMetadata.class);
|
||||||
if (nameMeta != null && nameMeta.getValue() != null) {
|
if (nameMeta != null && nameMeta.getValue() != null) {
|
||||||
|
@ -2084,13 +2088,13 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
|
|
||||||
if (viewTable == null) {
|
if (viewTable == null) {
|
||||||
trId = new TRId(String.valueOf(tr.getId().getValue()),
|
trId = new TRId(String.valueOf(tr.getId().getValue()),
|
||||||
tr.getTableType(), String.valueOf(tableId
|
TabularResourceTypeMap.map(tr.getTabularResourceType()), tr.getTableType(), String.valueOf(tableId
|
||||||
.getValue()), table.getTableType()
|
.getValue()), table.getTableType()
|
||||||
.getName());
|
.getName());
|
||||||
} else {
|
} else {
|
||||||
trId = new TRId(String.valueOf(tr.getId().getValue()),
|
trId = new TRId(String.valueOf(tr.getId().getValue()),
|
||||||
tr.getTableType(), String.valueOf(viewTable.getId()
|
TabularResourceTypeMap.map(tr.getTabularResourceType()), tr.getTableType(), String.valueOf(viewTable.getId()
|
||||||
.getValue()), viewTable.getTableType()
|
.getValue()), viewTable.getTableType()
|
||||||
.getName(), String.valueOf(tableId
|
.getName(), String.valueOf(tableId
|
||||||
.getValue()), true);
|
.getValue()), true);
|
||||||
|
|
||||||
|
@ -2674,8 +2678,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
syncTRMetaData(serviceTR, tabResource);
|
syncTRMetaData(serviceTR, tabResource);
|
||||||
|
|
||||||
TRId trId = new TRId(String.valueOf(serviceTR.getId().getValue()),
|
TRId trId = new TRId(String.valueOf(serviceTR.getId().getValue()),
|
||||||
serviceTR.getTableType(), String.valueOf(table.getId()
|
TabularResourceTypeMap.map(serviceTR.getTabularResourceType()), serviceTR.getTableType(), String.valueOf(table.getId()
|
||||||
.getValue()), table.getTableType().getName());
|
.getValue()), table.getTableType().getName());
|
||||||
tabResource.setTrId(trId);
|
tabResource.setTrId(trId);
|
||||||
|
|
||||||
return tabResource;
|
return tabResource;
|
||||||
|
@ -2877,13 +2881,13 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
TRId newTRId;
|
TRId newTRId;
|
||||||
if (viewTable == null) {
|
if (viewTable == null) {
|
||||||
newTRId = new TRId(String.valueOf(tr.getId().getValue()),
|
newTRId = new TRId(String.valueOf(tr.getId().getValue()),
|
||||||
tr.getTableType(), String.valueOf(table.getId()
|
TabularResourceTypeMap.map(tr.getTabularResourceType()), tr.getTableType(), String.valueOf(table.getId()
|
||||||
.getValue()), table.getTableType().getName());
|
.getValue()), table.getTableType().getName());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
newTRId = new TRId(String.valueOf(tr.getId().getValue()),
|
newTRId = new TRId(String.valueOf(tr.getId().getValue()),
|
||||||
tr.getTableType(), String.valueOf(viewTable.getId()
|
TabularResourceTypeMap.map(tr.getTabularResourceType()), tr.getTableType(), String.valueOf(viewTable.getId()
|
||||||
.getValue()), viewTable.getTableType()
|
.getValue()), viewTable.getTableType()
|
||||||
.getName(), String.valueOf(table.getId()
|
.getName(), String.valueOf(table.getId()
|
||||||
.getValue()), true);
|
.getValue()), true);
|
||||||
|
|
||||||
|
@ -3321,6 +3325,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
*
|
*
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getTRCreationDate(TRId trId) throws TDGWTServiceException {
|
public String getTRCreationDate(TRId trId) throws TDGWTServiceException {
|
||||||
try {
|
try {
|
||||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||||
|
@ -3355,6 +3360,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
* @return
|
* @return
|
||||||
* @throws TDGWTServiceException
|
* @throws TDGWTServiceException
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Boolean isTabularResourceValid(TRId trId)
|
public Boolean isTabularResourceValid(TRId trId)
|
||||||
throws TDGWTServiceException {
|
throws TDGWTServiceException {
|
||||||
try {
|
try {
|
||||||
|
@ -4205,12 +4211,13 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO UpThis Monitor not updated
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String startChangeColumnType(
|
public String startChangeColumnType(
|
||||||
ChangeColumnTypeSession changeColumnTypeSession)
|
ChangeColumnTypeSession changeColumnTypeSession)
|
||||||
throws TDGWTServiceException {
|
throws TDGWTServiceException {
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
package org.gcube.portlets.user.td.gwtservice.server.trservice;
|
||||||
|
|
||||||
|
import org.gcube.data.analysis.tabulardata.commons.webservice.types.TabularResourceType;
|
||||||
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.TabResourceType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author "Giancarlo Panichi"
|
||||||
|
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class TabularResourceTypeMap {
|
||||||
|
public static TabResourceType map(TabularResourceType tabularResourceType) {
|
||||||
|
switch (tabularResourceType) {
|
||||||
|
case FLOW:
|
||||||
|
return TabResourceType.FLOW;
|
||||||
|
case STANDARD:
|
||||||
|
return TabResourceType.STANDARD;
|
||||||
|
default:
|
||||||
|
return TabResourceType.UNKNOWN;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -21,6 +21,7 @@ import org.gcube.data.analysis.tabulardata.service.tabular.TabularResource;
|
||||||
import org.gcube.data.analysis.tabulardata.service.tabular.TabularResourceId;
|
import org.gcube.data.analysis.tabulardata.service.tabular.TabularResourceId;
|
||||||
import org.gcube.portlets.user.td.gwtservice.server.SessionUtil;
|
import org.gcube.portlets.user.td.gwtservice.server.SessionUtil;
|
||||||
import org.gcube.portlets.user.td.gwtservice.server.storage.FilesStorage;
|
import org.gcube.portlets.user.td.gwtservice.server.storage.FilesStorage;
|
||||||
|
import org.gcube.portlets.user.td.gwtservice.server.trservice.TabularResourceTypeMap;
|
||||||
import org.gcube.portlets.user.td.gwtservice.server.trservice.TaskStateMap;
|
import org.gcube.portlets.user.td.gwtservice.server.trservice.TaskStateMap;
|
||||||
import org.gcube.portlets.user.td.gwtservice.server.trservice.WorkerStateMap;
|
import org.gcube.portlets.user.td.gwtservice.server.trservice.WorkerStateMap;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVExportSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVExportSession;
|
||||||
|
@ -307,13 +308,13 @@ public class BackgroundOperationMonitorCreator {
|
||||||
TRId newTRId;
|
TRId newTRId;
|
||||||
if (viewTable == null) {
|
if (viewTable == null) {
|
||||||
newTRId = new TRId(String.valueOf(tr.getId().getValue()),
|
newTRId = new TRId(String.valueOf(tr.getId().getValue()),
|
||||||
tr.getTableType(), String.valueOf(table.getId()
|
TabularResourceTypeMap.map(tr.getTabularResourceType()), tr.getTableType(), String.valueOf(table.getId()
|
||||||
.getValue()), table.getTableType().getName());
|
.getValue()), table.getTableType().getName());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
newTRId = new TRId(String.valueOf(tr.getId().getValue()),
|
newTRId = new TRId(String.valueOf(tr.getId().getValue()),
|
||||||
tr.getTableType(), String.valueOf(viewTable.getId()
|
TabularResourceTypeMap.map(tr.getTabularResourceType()), tr.getTableType(), String.valueOf(viewTable.getId()
|
||||||
.getValue()), viewTable.getTableType()
|
.getValue()), viewTable.getTableType()
|
||||||
.getName(), String.valueOf(table.getId()
|
.getName(), String.valueOf(table.getId()
|
||||||
.getValue()), true);
|
.getValue()), true);
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ import org.gcube.data.analysis.tabulardata.service.tabular.TabularResource;
|
||||||
import org.gcube.data.analysis.tabulardata.service.tabular.TabularResourceId;
|
import org.gcube.data.analysis.tabulardata.service.tabular.TabularResourceId;
|
||||||
import org.gcube.portlets.user.td.gwtservice.server.SessionUtil;
|
import org.gcube.portlets.user.td.gwtservice.server.SessionUtil;
|
||||||
import org.gcube.portlets.user.td.gwtservice.server.storage.FilesStorage;
|
import org.gcube.portlets.user.td.gwtservice.server.storage.FilesStorage;
|
||||||
|
import org.gcube.portlets.user.td.gwtservice.server.trservice.TabularResourceTypeMap;
|
||||||
import org.gcube.portlets.user.td.gwtservice.server.trservice.TaskStateMap;
|
import org.gcube.portlets.user.td.gwtservice.server.trservice.TaskStateMap;
|
||||||
import org.gcube.portlets.user.td.gwtservice.server.trservice.WorkerStateMap;
|
import org.gcube.portlets.user.td.gwtservice.server.trservice.WorkerStateMap;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVExportSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVExportSession;
|
||||||
|
@ -338,13 +339,13 @@ public class OperationMonitorCreator {
|
||||||
TRId newTRId;
|
TRId newTRId;
|
||||||
if (viewTable == null) {
|
if (viewTable == null) {
|
||||||
newTRId = new TRId(String.valueOf(tr.getId().getValue()),
|
newTRId = new TRId(String.valueOf(tr.getId().getValue()),
|
||||||
tr.getTableType(), String.valueOf(table.getId()
|
TabularResourceTypeMap.map(tr.getTabularResourceType()), tr.getTableType(), String.valueOf(table.getId()
|
||||||
.getValue()), table.getTableType().getName());
|
.getValue()), table.getTableType().getName());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
newTRId = new TRId(String.valueOf(tr.getId().getValue()),
|
newTRId = new TRId(String.valueOf(tr.getId().getValue()),
|
||||||
tr.getTableType(), String.valueOf(viewTable.getId()
|
TabularResourceTypeMap.map(tr.getTabularResourceType()), tr.getTableType(), String.valueOf(viewTable.getId()
|
||||||
.getValue()), viewTable.getTableType()
|
.getValue()), viewTable.getTableType()
|
||||||
.getName(), String.valueOf(table.getId()
|
.getName(), String.valueOf(table.getId()
|
||||||
.getValue()), true);
|
.getValue()), true);
|
||||||
|
|
||||||
|
|
|
@ -97,10 +97,10 @@ public class TabResource implements Serializable {
|
||||||
this.trId = trId;
|
this.trId = trId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTabularResourceType() {
|
public String getTableTypeName() {
|
||||||
String t = "";
|
String t = "";
|
||||||
if (trId != null && trId.getTabularResourceType() != null) {
|
if (trId != null && trId.getTableTypeName() != null) {
|
||||||
t = trId.getTabularResourceType();
|
t = trId.getTableTypeName();
|
||||||
}
|
}
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
@ -197,5 +197,6 @@ public class TabResource implements Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue