Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@94246 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
a17d4b01cf
commit
701c43759f
|
@ -53,6 +53,7 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.type.Codelist;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.type.Dataset;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.type.Dataset;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
||||||
|
|
||||||
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||||
import com.google.gwt.user.client.rpc.RemoteService;
|
import com.google.gwt.user.client.rpc.RemoteService;
|
||||||
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
|
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
|
||||||
|
|
||||||
|
@ -175,6 +176,17 @@ public interface TDGWTService extends RemoteService {
|
||||||
public ArrayList<TRMetadata> getTRMetadata(TRId trId)
|
public ArrayList<TRMetadata> getTRMetadata(TRId trId)
|
||||||
throws TDGWTServiceException;
|
throws TDGWTServiceException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return true if is a valid tabular resource
|
||||||
|
*
|
||||||
|
* @param trId
|
||||||
|
* @return
|
||||||
|
* @throws TDGWTServiceException
|
||||||
|
*/
|
||||||
|
public Boolean isTabularResourceValid(TRId trId)
|
||||||
|
throws TDGWTServiceException;
|
||||||
|
|
||||||
|
|
||||||
//Share
|
//Share
|
||||||
/**
|
/**
|
||||||
* Retrieves information sharing on the tabular resource
|
* Retrieves information sharing on the tabular resource
|
||||||
|
|
|
@ -97,13 +97,13 @@ public interface TDGWTServiceAsync {
|
||||||
|
|
||||||
void getColumns(TRId trId, AsyncCallback<ArrayList<ColumnData>> callback);
|
void getColumns(TRId trId, AsyncCallback<ArrayList<ColumnData>> callback);
|
||||||
|
|
||||||
|
|
||||||
void getColumnsForDimension(TRId trId, AsyncCallback<ArrayList<ColumnData>> callback);
|
void getColumnsForDimension(TRId trId, AsyncCallback<ArrayList<ColumnData>> callback);
|
||||||
|
|
||||||
void getColumn(TRId trId, String columnName, AsyncCallback<ColumnData> callback);
|
void getColumn(TRId trId, String columnName, AsyncCallback<ColumnData> callback);
|
||||||
|
|
||||||
void removeTabularResource(TRId trId, AsyncCallback<Void> callback);
|
void removeTabularResource(TRId trId, AsyncCallback<Void> callback);
|
||||||
|
|
||||||
|
void isTabularResourceValid(TRId trId,AsyncCallback<Boolean> callback);
|
||||||
|
|
||||||
//Share
|
//Share
|
||||||
void getShareInfo(TRId trId, AsyncCallback<ShareInfo> callback);
|
void getShareInfo(TRId trId, AsyncCallback<ShareInfo> callback);
|
||||||
|
|
|
@ -253,6 +253,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
.getTrId());
|
.getTrId());
|
||||||
updateTabResourceInformation(currentTR, trMetadatas);
|
updateTabResourceInformation(currentTR, trMetadatas);
|
||||||
currentTR.setDate(getTRCreationDate(currentTR.getTrId()));
|
currentTR.setDate(getTRCreationDate(currentTR.getTrId()));
|
||||||
|
currentTR.setValid(isTabularResourceValid(currentTR.getTrId()));
|
||||||
SessionUtil.setTabResource(session, currentTR);
|
SessionUtil.setTabResource(session, currentTR);
|
||||||
logger.debug("GetTabResourceInformation() updated information:"
|
logger.debug("GetTabResourceInformation() updated information:"
|
||||||
+ currentTR.toString());
|
+ currentTR.toString());
|
||||||
|
@ -293,6 +294,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
.getTrId());
|
.getTrId());
|
||||||
updateTabResourceInformation(currentTR, trMetadatas);
|
updateTabResourceInformation(currentTR, trMetadatas);
|
||||||
currentTR.setDate(getTRCreationDate(trId));
|
currentTR.setDate(getTRCreationDate(trId));
|
||||||
|
currentTR.setValid(isTabularResourceValid(trId));
|
||||||
|
|
||||||
logger.debug("GetTabResourceInformation() updated information:"
|
logger.debug("GetTabResourceInformation() updated information:"
|
||||||
+ currentTR.toString());
|
+ currentTR.toString());
|
||||||
return currentTR;
|
return currentTR;
|
||||||
|
@ -936,6 +939,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
+ tabResource.getAgency() + " ,rights:"
|
+ tabResource.getAgency() + " ,rights:"
|
||||||
+ tabResource.getRight() + "]");
|
+ tabResource.getRight() + "]");
|
||||||
tabResource.setDate(sdf.format(tr.getCreationDate().getTime()));
|
tabResource.setDate(sdf.format(tr.getCreationDate().getTime()));
|
||||||
|
tabResource.setValid(tr.isValid());
|
||||||
tr.setMetadata(new NameMetadata(tabResource.getName()));
|
tr.setMetadata(new NameMetadata(tabResource.getName()));
|
||||||
tr.setMetadata(new DescriptionMetadata(tabResource.getDescription()));
|
tr.setMetadata(new DescriptionMetadata(tabResource.getDescription()));
|
||||||
// tr.setMetadata(new CreationDateMetadata(date));
|
// tr.setMetadata(new CreationDateMetadata(date));
|
||||||
|
@ -977,6 +981,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
trId.setTabularResourceType(tr.getTableType());
|
trId.setTabularResourceType(tr.getTableType());
|
||||||
t.setId(String.valueOf(i));
|
t.setId(String.valueOf(i));
|
||||||
t.setTrId(trId);
|
t.setTrId(trId);
|
||||||
|
t.setValid(tr.isValid());
|
||||||
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) {
|
||||||
|
@ -1065,12 +1070,15 @@ 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.getValue()),
|
tr.getTableType(), String.valueOf(tableId
|
||||||
table.getTableType().getName());
|
.getValue()), table.getTableType()
|
||||||
|
.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().getValue()),
|
tr.getTableType(), String.valueOf(viewTable.getId()
|
||||||
viewTable.getTableType().getName(),String.valueOf(tableId.getValue()),true);
|
.getValue()), viewTable.getTableType()
|
||||||
|
.getName(), String.valueOf(tableId
|
||||||
|
.getValue()), true);
|
||||||
|
|
||||||
}
|
}
|
||||||
t = getTabResourceInformation(trId);
|
t = getTabResourceInformation(trId);
|
||||||
|
@ -1111,8 +1119,9 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
try {
|
try {
|
||||||
TabResource t = retrieveTRMetadataFromService(service, tr,
|
TabResource t = retrieveTRMetadataFromService(service, tr,
|
||||||
i);
|
i);
|
||||||
if (t.getTrId() != null) {
|
if (t.getTrId() != null && t.isValid()) {
|
||||||
ltr.add(t);
|
ltr.add(t);
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error("TabResource discarded: " + tr + " cause: "
|
logger.error("TabResource discarded: " + tr + " cause: "
|
||||||
|
@ -1567,13 +1576,21 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
|
|
||||||
TabularResourceId id = new TabularResourceId(Long.valueOf(trId
|
TabularResourceId id = new TabularResourceId(Long.valueOf(trId
|
||||||
.getId()));
|
.getId()));
|
||||||
|
TabularResource tr = service.getTabularResource(id);
|
||||||
|
String owner = tr.getOwner();
|
||||||
|
if (owner != null && owner.compareTo(aslSession.getUsername()) == 0) {
|
||||||
service.removeTabularResource(id);
|
service.removeTabularResource(id);
|
||||||
|
} else {
|
||||||
|
throw new TDGWTServiceException(
|
||||||
|
"You are not the owner of this tabular resource (owner: "
|
||||||
|
+ owner + ")");
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error(
|
logger.error(
|
||||||
"Error removing TabularResource: "
|
"Error deleting the tabular resource: "
|
||||||
+ e.getLocalizedMessage(), e);
|
+ e.getLocalizedMessage(), e);
|
||||||
throw new TDGWTServiceException("Error removing TabularResource: "
|
throw new TDGWTServiceException("Error deleting the tabular resource: "
|
||||||
+ e.getLocalizedMessage());
|
+ e.getLocalizedMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1602,11 +1619,11 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
Table table = service.getLastTable(serviceTR.getId());
|
Table table = service.getLastTable(serviceTR.getId());
|
||||||
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()
|
serviceTR.getTableType(), String.valueOf(table.getId()
|
||||||
.getValue()), table.getTableType().getName());
|
.getValue()), table.getTableType().getName());
|
||||||
tabResource.setTrId(trId);
|
tabResource.setTrId(trId);
|
||||||
|
tabResource.setValid(serviceTR.isValid());
|
||||||
return tabResource;
|
return tabResource;
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error(
|
logger.error(
|
||||||
|
@ -1765,7 +1782,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
TabularResource tr = service.getTabularResource(tabularResourceId);
|
TabularResource tr = service.getTabularResource(tabularResourceId);
|
||||||
Table table = service.getLastTable(tabularResourceId);
|
Table table = service.getLastTable(tabularResourceId);
|
||||||
|
|
||||||
Table viewTable=null;
|
Table viewTable = null;
|
||||||
|
|
||||||
if (table.contains(DatasetViewTableMetadata.class)) {
|
if (table.contains(DatasetViewTableMetadata.class)) {
|
||||||
DatasetViewTableMetadata dwm = table
|
DatasetViewTableMetadata dwm = table
|
||||||
|
@ -1781,14 +1798,15 @@ 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().getValue()),
|
tr.getTableType(), String.valueOf(table.getId()
|
||||||
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().getValue()),
|
tr.getTableType(), String.valueOf(viewTable.getId()
|
||||||
viewTable.getTableType().getName(),
|
.getValue()), viewTable.getTableType()
|
||||||
String.valueOf(table.getId().getValue()),true);
|
.getName(), String.valueOf(table.getId()
|
||||||
|
.getValue()), true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1841,7 +1859,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
importMonitor.setProgress(task.getProgress());
|
importMonitor.setProgress(task.getProgress());
|
||||||
logger.debug("Task Result: " + task.getResult());
|
logger.debug("Task Result: " + task.getResult());
|
||||||
|
|
||||||
trId=retrieveTabularResourceBasicData(trId);
|
trId = retrieveTabularResourceBasicData(trId);
|
||||||
|
|
||||||
sdmxImportTabResource.setTrId(trId);
|
sdmxImportTabResource.setTrId(trId);
|
||||||
SessionUtil.setSDMXImportTabResource(session,
|
SessionUtil.setSDMXImportTabResource(session,
|
||||||
|
@ -1866,7 +1884,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
case STOPPED:
|
case STOPPED:
|
||||||
importMonitor.setProgress(task.getProgress());
|
importMonitor.setProgress(task.getProgress());
|
||||||
logger.debug("Task Result: " + task.getResult());
|
logger.debug("Task Result: " + task.getResult());
|
||||||
trId=retrieveTabularResourceBasicData(trId);
|
trId = retrieveTabularResourceBasicData(trId);
|
||||||
|
|
||||||
sdmxImportTabResource.setTrId(trId);
|
sdmxImportTabResource.setTrId(trId);
|
||||||
SessionUtil.setSDMXImportTabResource(session,
|
SessionUtil.setSDMXImportTabResource(session,
|
||||||
|
@ -2079,7 +2097,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
String user = aslSession.getUsername();
|
String user = aslSession.getUsername();
|
||||||
logger.info("Session User:" + user);
|
logger.info("Session User:" + user);
|
||||||
|
|
||||||
logger.debug("StartCSVImport: "+csvImportSession.toString());
|
logger.debug("StartCSVImport: " + csvImportSession.toString());
|
||||||
|
|
||||||
FileUploadSession fileUploadSession = SessionUtil
|
FileUploadSession fileUploadSession = SessionUtil
|
||||||
.getFileUploadSession(session);
|
.getFileUploadSession(session);
|
||||||
|
@ -2118,7 +2136,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
parameterInstances.put(Constants.PARAMETER_HASHEADER, hasHeader);// true
|
parameterInstances.put(Constants.PARAMETER_HASHEADER, hasHeader);// true
|
||||||
parameterInstances.put(Constants.PARAMETER_FIELDMASK,
|
parameterInstances.put(Constants.PARAMETER_FIELDMASK,
|
||||||
csvImportSession.getColumnToImportMask());// Column Mask
|
csvImportSession.getColumnToImportMask());// Column Mask
|
||||||
parameterInstances.put(Constants.PARAMETER_SKIPERROR, csvImportSession.isSkipInvalidLines());
|
parameterInstances.put(Constants.PARAMETER_SKIPERROR,
|
||||||
|
csvImportSession.isSkipInvalidLines());
|
||||||
return parameterInstances;
|
return parameterInstances;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2251,7 +2270,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
case SUCCEDED:
|
case SUCCEDED:
|
||||||
logger.debug("Task Result: " + task.getResult());
|
logger.debug("Task Result: " + task.getResult());
|
||||||
importMonitor.setProgress(task.getProgress());
|
importMonitor.setProgress(task.getProgress());
|
||||||
trId=retrieveTabularResourceBasicData(trId);
|
trId = retrieveTabularResourceBasicData(trId);
|
||||||
|
|
||||||
csvImportTabResource.setTrId(trId);
|
csvImportTabResource.setTrId(trId);
|
||||||
SessionUtil.setCSVImportTabResource(session,
|
SessionUtil.setCSVImportTabResource(session,
|
||||||
|
@ -2265,7 +2284,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
case STOPPED:
|
case STOPPED:
|
||||||
logger.debug("Task Result: " + task.getResult());
|
logger.debug("Task Result: " + task.getResult());
|
||||||
importMonitor.setProgress(task.getProgress());
|
importMonitor.setProgress(task.getProgress());
|
||||||
trId=retrieveTabularResourceBasicData(trId);
|
trId = retrieveTabularResourceBasicData(trId);
|
||||||
|
|
||||||
csvImportTabResource.setTrId(trId);
|
csvImportTabResource.setTrId(trId);
|
||||||
SessionUtil.setCSVImportTabResource(session,
|
SessionUtil.setCSVImportTabResource(session,
|
||||||
|
@ -2383,7 +2402,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
FileUtil.exceptionDetailMessage(e));
|
FileUtil.exceptionDetailMessage(e));
|
||||||
fileUploadSession.setFileUploadState(FileUploadState.FAILED);
|
fileUploadSession.setFileUploadState(FileUploadState.FAILED);
|
||||||
SessionUtil.setFileUploadSession(session, fileUploadSession);
|
SessionUtil.setFileUploadSession(session, fileUploadSession);
|
||||||
logger.error("Error elaborating the imput stream", e);
|
logger.error("Error elaborating the input stream", e);
|
||||||
throw new TDGWTServiceException(
|
throw new TDGWTServiceException(
|
||||||
"Error in importCSV getFileFromWorkspace: "
|
"Error in importCSV getFileFromWorkspace: "
|
||||||
+ e.getLocalizedMessage(), e);
|
+ e.getLocalizedMessage(), e);
|
||||||
|
@ -2425,6 +2444,39 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param trId
|
||||||
|
* @return
|
||||||
|
* @throws TDGWTServiceException
|
||||||
|
*/
|
||||||
|
public Boolean isTabularResourceValid(TRId trId) throws TDGWTServiceException {
|
||||||
|
try {
|
||||||
|
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||||
|
ASLSession aslSession = SessionUtil.getAslSession(session);
|
||||||
|
|
||||||
|
logger.debug("IsTabularResourceValid: " + trId.toString());
|
||||||
|
|
||||||
|
AuthorizationProvider.instance.set(new AuthorizationToken(
|
||||||
|
aslSession.getUsername()));
|
||||||
|
TabularDataService service = TabularDataServiceFactory.getService();
|
||||||
|
|
||||||
|
TabularResource tr = service
|
||||||
|
.getTabularResource(new TabularResourceId(Long.valueOf(trId
|
||||||
|
.getId())));
|
||||||
|
logger.debug("IsTabularResourceValid: " + tr.isValid());
|
||||||
|
return tr.isValid();
|
||||||
|
|
||||||
|
} catch (Throwable e) {
|
||||||
|
logger.error(
|
||||||
|
"Error checking if it is a valid tabular resource: " + e.getLocalizedMessage(),
|
||||||
|
e);
|
||||||
|
throw new TDGWTServiceException("Error checking if it is a valid tabular resource: "
|
||||||
|
+ e.getLocalizedMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
|
@ -3557,7 +3609,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
trId = new TRId();
|
trId = new TRId();
|
||||||
trId.setId(changeColumnTypeSession.getColumnData()
|
trId.setId(changeColumnTypeSession.getColumnData()
|
||||||
.getTrId().getId());
|
.getTrId().getId());
|
||||||
trId=retrieveTabularResourceBasicData(trId);
|
trId = retrieveTabularResourceBasicData(trId);
|
||||||
|
|
||||||
changeColumnTypeMonitor.setTrId(trId);
|
changeColumnTypeMonitor.setTrId(trId);
|
||||||
tabResource = SessionUtil.getTabResource(session);
|
tabResource = SessionUtil.getTabResource(session);
|
||||||
|
@ -3580,7 +3632,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
trId.setId(changeColumnTypeSession.getColumnData()
|
trId.setId(changeColumnTypeSession.getColumnData()
|
||||||
.getTrId().getId());
|
.getTrId().getId());
|
||||||
|
|
||||||
trId=retrieveTabularResourceBasicData(trId);
|
trId = retrieveTabularResourceBasicData(trId);
|
||||||
|
|
||||||
changeColumnTypeMonitor.setTrId(trId);
|
changeColumnTypeMonitor.setTrId(trId);
|
||||||
tabResource = SessionUtil.getTabResource(session);
|
tabResource = SessionUtil.getTabResource(session);
|
||||||
|
@ -3700,7 +3752,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
trId = new TRId();
|
trId = new TRId();
|
||||||
trId.setId(deleteColumnSession.getColumnData()
|
trId.setId(deleteColumnSession.getColumnData()
|
||||||
.getTrId().getId());
|
.getTrId().getId());
|
||||||
trId=retrieveTabularResourceBasicData(trId);
|
trId = retrieveTabularResourceBasicData(trId);
|
||||||
|
|
||||||
deleteColumnMonitor.setTrId(trId);
|
deleteColumnMonitor.setTrId(trId);
|
||||||
tabResource = SessionUtil.getTabResource(session);
|
tabResource = SessionUtil.getTabResource(session);
|
||||||
|
@ -3724,7 +3776,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
trId = new TRId();
|
trId = new TRId();
|
||||||
trId.setId(deleteColumnSession.getColumnData()
|
trId.setId(deleteColumnSession.getColumnData()
|
||||||
.getTrId().getId());
|
.getTrId().getId());
|
||||||
trId=retrieveTabularResourceBasicData(trId);
|
trId = retrieveTabularResourceBasicData(trId);
|
||||||
|
|
||||||
deleteColumnMonitor.setTrId(trId);
|
deleteColumnMonitor.setTrId(trId);
|
||||||
tabResource = SessionUtil.getTabResource(session);
|
tabResource = SessionUtil.getTabResource(session);
|
||||||
|
@ -3843,7 +3895,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
trId = new TRId();
|
trId = new TRId();
|
||||||
trId.setId(labelColumnSession.getColumnData().getTrId()
|
trId.setId(labelColumnSession.getColumnData().getTrId()
|
||||||
.getId());
|
.getId());
|
||||||
trId=retrieveTabularResourceBasicData(trId);
|
trId = retrieveTabularResourceBasicData(trId);
|
||||||
|
|
||||||
labelColumnMonitor.setTrId(trId);
|
labelColumnMonitor.setTrId(trId);
|
||||||
tabResource = SessionUtil.getTabResource(session);
|
tabResource = SessionUtil.getTabResource(session);
|
||||||
|
@ -3865,7 +3917,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
trId = new TRId();
|
trId = new TRId();
|
||||||
trId.setId(labelColumnSession.getColumnData().getTrId()
|
trId.setId(labelColumnSession.getColumnData().getTrId()
|
||||||
.getId());
|
.getId());
|
||||||
trId=retrieveTabularResourceBasicData(trId);
|
trId = retrieveTabularResourceBasicData(trId);
|
||||||
|
|
||||||
labelColumnMonitor.setTrId(trId);
|
labelColumnMonitor.setTrId(trId);
|
||||||
tabResource = SessionUtil.getTabResource(session);
|
tabResource = SessionUtil.getTabResource(session);
|
||||||
|
@ -3988,7 +4040,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
trId = new TRId();
|
trId = new TRId();
|
||||||
trId.setId(changeTableTypeSession.getTrId().getId());
|
trId.setId(changeTableTypeSession.getTrId().getId());
|
||||||
|
|
||||||
trId=retrieveTabularResourceBasicData(trId);
|
trId = retrieveTabularResourceBasicData(trId);
|
||||||
|
|
||||||
changeTableTypeMonitor.setTrId(trId);
|
changeTableTypeMonitor.setTrId(trId);
|
||||||
tabResource = SessionUtil.getTabResource(session);
|
tabResource = SessionUtil.getTabResource(session);
|
||||||
|
@ -4012,7 +4064,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
trId = new TRId();
|
trId = new TRId();
|
||||||
trId.setId(changeTableTypeSession.getTrId().getId());
|
trId.setId(changeTableTypeSession.getTrId().getId());
|
||||||
|
|
||||||
trId=retrieveTabularResourceBasicData(trId);
|
trId = retrieveTabularResourceBasicData(trId);
|
||||||
|
|
||||||
changeTableTypeMonitor.setTrId(trId);
|
changeTableTypeMonitor.setTrId(trId);
|
||||||
tabResource = SessionUtil.getTabResource(session);
|
tabResource = SessionUtil.getTabResource(session);
|
||||||
|
@ -4221,7 +4273,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
trId = new TRId();
|
trId = new TRId();
|
||||||
trId.setId(deleteRowsSession.getTrId().getId());
|
trId.setId(deleteRowsSession.getTrId().getId());
|
||||||
|
|
||||||
trId=retrieveTabularResourceBasicData(trId);
|
trId = retrieveTabularResourceBasicData(trId);
|
||||||
|
|
||||||
deleteRowsMonitor.setTrId(trId);
|
deleteRowsMonitor.setTrId(trId);
|
||||||
tabResource = SessionUtil.getTabResource(session);
|
tabResource = SessionUtil.getTabResource(session);
|
||||||
|
@ -4242,7 +4294,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
deleteRowsMonitor.setProgress(task.getProgress());
|
deleteRowsMonitor.setProgress(task.getProgress());
|
||||||
trId = new TRId();
|
trId = new TRId();
|
||||||
trId.setId(deleteRowsSession.getTrId().getId());
|
trId.setId(deleteRowsSession.getTrId().getId());
|
||||||
trId=retrieveTabularResourceBasicData(trId);
|
trId = retrieveTabularResourceBasicData(trId);
|
||||||
|
|
||||||
deleteRowsMonitor.setTrId(trId);
|
deleteRowsMonitor.setTrId(trId);
|
||||||
tabResource = SessionUtil.getTabResource(session);
|
tabResource = SessionUtil.getTabResource(session);
|
||||||
|
@ -4294,7 +4346,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
TabularResource cloned = service.cloneTabularResource(serviceTR);
|
TabularResource cloned = service.cloneTabularResource(serviceTR);
|
||||||
Table table = service.getLastTable(serviceTR);
|
Table table = service.getLastTable(serviceTR);
|
||||||
|
|
||||||
Table viewTable=null;
|
Table viewTable = null;
|
||||||
|
|
||||||
if (table.contains(DatasetViewTableMetadata.class)) {
|
if (table.contains(DatasetViewTableMetadata.class)) {
|
||||||
DatasetViewTableMetadata dwm = table
|
DatasetViewTableMetadata dwm = table
|
||||||
|
@ -4309,22 +4361,19 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
|
|
||||||
TRId trId;
|
TRId trId;
|
||||||
if (viewTable == null) {
|
if (viewTable == null) {
|
||||||
trId = new TRId(
|
trId = new TRId(new Long(cloned.getId().getValue()).toString(),
|
||||||
new Long(cloned.getId().getValue()).toString(),
|
cloned.getTableType(), new Long(table.getId()
|
||||||
cloned.getTableType(),
|
.getValue()).toString(), table.getTableType()
|
||||||
new Long(table.getId().getValue()).toString(), table
|
.getName());
|
||||||
.getTableType().getName());
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
trId = new TRId(new Long(cloned.getId().getValue()).toString(),
|
trId = new TRId(new Long(cloned.getId().getValue()).toString(),
|
||||||
cloned.getTableType(),
|
cloned.getTableType(), String.valueOf(viewTable.getId()
|
||||||
String.valueOf(viewTable.getId().getValue()),
|
.getValue()), viewTable.getTableType()
|
||||||
viewTable.getTableType().getName(),
|
.getName(), String.valueOf(table.getId()
|
||||||
String.valueOf(table.getId().getValue()),true);
|
.getValue()), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TabResource tabResource = new TabResource();
|
TabResource tabResource = new TabResource();
|
||||||
tabResource.setTrId(trId);
|
tabResource.setTrId(trId);
|
||||||
SessionUtil.setTabResource(session, tabResource);
|
SessionUtil.setTabResource(session, tabResource);
|
||||||
|
@ -4432,7 +4481,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
logger.debug("Table retrived: " + table.toString());
|
logger.debug("Table retrived: " + table.toString());
|
||||||
trId = new TRId();
|
trId = new TRId();
|
||||||
trId.setId(duplicatesSession.getTrId().getId());
|
trId.setId(duplicatesSession.getTrId().getId());
|
||||||
trId=retrieveTabularResourceBasicData(trId);
|
trId = retrieveTabularResourceBasicData(trId);
|
||||||
|
|
||||||
duplicatesMonitor.setTrId(trId);
|
duplicatesMonitor.setTrId(trId);
|
||||||
tabResource = SessionUtil.getTabResource(session);
|
tabResource = SessionUtil.getTabResource(session);
|
||||||
|
@ -4456,7 +4505,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
trId = new TRId();
|
trId = new TRId();
|
||||||
trId.setId(duplicatesSession.getTrId().getId());
|
trId.setId(duplicatesSession.getTrId().getId());
|
||||||
|
|
||||||
trId=retrieveTabularResourceBasicData(trId);
|
trId = retrieveTabularResourceBasicData(trId);
|
||||||
|
|
||||||
duplicatesMonitor.setTrId(trId);
|
duplicatesMonitor.setTrId(trId);
|
||||||
tabResource = SessionUtil.getTabResource(session);
|
tabResource = SessionUtil.getTabResource(session);
|
||||||
|
@ -4768,7 +4817,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
trId = new TRId();
|
trId = new TRId();
|
||||||
trId.setId(templateApplySession.getTrId().getId());
|
trId.setId(templateApplySession.getTrId().getId());
|
||||||
|
|
||||||
trId=retrieveTabularResourceBasicData(trId);
|
trId = retrieveTabularResourceBasicData(trId);
|
||||||
|
|
||||||
templateApplyMonitor.setTrId(trId);
|
templateApplyMonitor.setTrId(trId);
|
||||||
tabResource = SessionUtil.getTabResource(session);
|
tabResource = SessionUtil.getTabResource(session);
|
||||||
|
@ -4791,7 +4840,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
trId = new TRId();
|
trId = new TRId();
|
||||||
trId.setId(templateApplySession.getTrId().getId());
|
trId.setId(templateApplySession.getTrId().getId());
|
||||||
|
|
||||||
trId=retrieveTabularResourceBasicData(trId);
|
trId = retrieveTabularResourceBasicData(trId);
|
||||||
|
|
||||||
templateApplyMonitor.setTrId(trId);
|
templateApplyMonitor.setTrId(trId);
|
||||||
tabResource = SessionUtil.getTabResource(session);
|
tabResource = SessionUtil.getTabResource(session);
|
||||||
|
@ -4948,7 +4997,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
trId = new TRId();
|
trId = new TRId();
|
||||||
trId.setId(replaceColumnSession.getTrId().getId());
|
trId.setId(replaceColumnSession.getTrId().getId());
|
||||||
|
|
||||||
trId=retrieveTabularResourceBasicData(trId);
|
trId = retrieveTabularResourceBasicData(trId);
|
||||||
|
|
||||||
replaceColumnMonitor.setTrId(trId);
|
replaceColumnMonitor.setTrId(trId);
|
||||||
tabResource = SessionUtil.getTabResource(session);
|
tabResource = SessionUtil.getTabResource(session);
|
||||||
|
@ -4971,7 +5020,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
trId.setId(replaceColumnSession.getColumnData()
|
trId.setId(replaceColumnSession.getColumnData()
|
||||||
.getTrId().getId());
|
.getTrId().getId());
|
||||||
|
|
||||||
trId=retrieveTabularResourceBasicData(trId);
|
trId = retrieveTabularResourceBasicData(trId);
|
||||||
|
|
||||||
replaceColumnMonitor.setTrId(trId);
|
replaceColumnMonitor.setTrId(trId);
|
||||||
tabResource = SessionUtil.getTabResource(session);
|
tabResource = SessionUtil.getTabResource(session);
|
||||||
|
|
|
@ -23,6 +23,7 @@ public class TabResource implements Serializable {
|
||||||
protected String agency;
|
protected String agency;
|
||||||
protected String date;
|
protected String date;
|
||||||
protected String right;
|
protected String right;
|
||||||
|
protected boolean valid;
|
||||||
protected TRId trId;
|
protected TRId trId;
|
||||||
|
|
||||||
public TabResource(){}
|
public TabResource(){}
|
||||||
|
@ -101,12 +102,22 @@ public class TabResource implements Serializable {
|
||||||
this.description = description;
|
this.description = description;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isValid() {
|
||||||
|
return valid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValid(boolean valid) {
|
||||||
|
this.valid = valid;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "TabResource [id=" + id + ", name=" + name + ", description="
|
return "TabResource [id=" + id + ", name=" + name + ", description="
|
||||||
+ description + ", agency=" + agency + ", date=" + date
|
+ description + ", agency=" + agency + ", date=" + date
|
||||||
+ ", right=" + right + ", trId=" + trId + "]";
|
+ ", right=" + right + ", valid=" + valid + ", trId=" + trId
|
||||||
|
+ "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue