Fixing #24432 GWT serialization
This commit is contained in:
parent
9a7edeada1
commit
3c12d6a841
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -43,7 +44,8 @@
|
|||
|
||||
|
||||
<wb-module deploy-name="geoportal-data-viewer-app-3.1.0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -87,7 +89,8 @@
|
|||
|
||||
|
||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -131,7 +134,8 @@
|
|||
|
||||
|
||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -175,7 +179,8 @@
|
|||
|
||||
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -219,7 +224,8 @@
|
|||
|
||||
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -263,7 +269,11 @@
|
|||
|
||||
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
|
||||
<dependent-module archiveName="geoportal-data-common-2.0.1.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-data-common/geoportal-data-common">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -307,7 +317,8 @@
|
|||
|
||||
|
||||
<property name="java-output-path" value="/geoportal-data-viewer-app/target/geoportal-data-viewer-app-0.0.1-SNAPSHOT/WEB-INF/classes"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -351,7 +362,8 @@
|
|||
|
||||
|
||||
<property name="context-root" value="geoportal-data-viewer-app"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -395,7 +407,8 @@
|
|||
|
||||
|
||||
</wb-module>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|||
- Reduced the BBOX when resolving a project by share link
|
||||
- GNA Project binding with automatically adding of the layers to Map
|
||||
- [#24390] Read the access policy from the fileset json section
|
||||
- [#24432] Fixing serialization issue using LinkedHashMap<String, String> instead of LinkedHashMap<String, Object>
|
||||
|
||||
## [v3.0.0] - 2022-11-28
|
||||
|
||||
|
|
|
@ -168,6 +168,7 @@ public class GeoportalDataViewer implements EntryPoint {
|
|||
public void onFailure(Throwable caught) {
|
||||
RootPanel.get(APP_DIV).remove(loaderApp);
|
||||
Window.alert(caught.getMessage());
|
||||
RootPanel.get(APP_DIV).setHeight("800px");
|
||||
RootPanel.get(APP_DIV).add(getGeneralErrorPanel());
|
||||
}
|
||||
|
||||
|
|
|
@ -158,7 +158,7 @@ public interface GeoportalDataViewerService extends RemoteService {
|
|||
* @param limit the limit
|
||||
* @return the entry sets document for project ID
|
||||
*/
|
||||
LinkedHashMap<String, Object> getEntrySetsDocumentForProjectID(String profileID, String projectID, int limit);
|
||||
LinkedHashMap<String, String> getEntrySetsDocumentForProjectID(String profileID, String projectID, int limit);
|
||||
|
||||
/**
|
||||
* Gets the relationships for timeline.
|
||||
|
|
|
@ -69,7 +69,7 @@ public interface GeoportalDataViewerServiceAsync {
|
|||
void getInitialConfiguration(AsyncCallback<ViewerConfiguration> callback);
|
||||
|
||||
void getEntrySetsDocumentForProjectID(String profileID, String projectID, int limit,
|
||||
AsyncCallback<LinkedHashMap<String, Object>> callback);
|
||||
AsyncCallback<LinkedHashMap<String, String>> callback);
|
||||
|
||||
void getRelationshipsForTimeline(String profileID, String projectID, AsyncCallback<List<String>> callback);
|
||||
|
||||
|
|
|
@ -929,7 +929,7 @@ public class LayerManager {
|
|||
intFlex.setCellPadding(1);
|
||||
intFlex.setCellSpacing(1);
|
||||
if (projectDV.getTheDocument() != null) {
|
||||
LinkedHashMap<String, Object> map = projectDV.getTheDocument().getDocumentAsMap();
|
||||
LinkedHashMap<String, String> map = projectDV.getTheDocument().getDocumentAsMap();
|
||||
// my-html-table
|
||||
// intFlex.getElement().addClassName("my-html-table");
|
||||
int i = 0;
|
||||
|
@ -953,6 +953,7 @@ public class LayerManager {
|
|||
}
|
||||
|
||||
TemporalReferenceDV tempRef = projectDV.getTemporalReference();
|
||||
GWT.log("Temporal reference is: "+tempRef);
|
||||
if (tempRef != null) {
|
||||
|
||||
flex.setHTML(flex.getRowCount() + 1, 0, ProjectUtil.toHTMLCode(tempRef));
|
||||
|
@ -1138,7 +1139,7 @@ public class LayerManager {
|
|||
intFlex.setCellPadding(1);
|
||||
intFlex.setCellSpacing(1);
|
||||
if (projectDV.getTheDocument() != null) {
|
||||
LinkedHashMap<String, Object> map = projectDV.getTheDocument().getDocumentAsMap();
|
||||
LinkedHashMap<String, String> map = projectDV.getTheDocument().getDocumentAsMap();
|
||||
// my-html-table
|
||||
// intFlex.getElement().addClassName("my-html-table");
|
||||
// int i = 0;
|
||||
|
|
|
@ -14,7 +14,7 @@ public class ProjectUtil {
|
|||
if (document == null)
|
||||
return htmlCode;
|
||||
|
||||
Entry<String, Object> firstEntrySet = document.getFirstEntryOfMap();
|
||||
Entry<String, String> firstEntrySet = document.getFirstEntryOfMap();
|
||||
if (firstEntrySet != null) {
|
||||
htmlCode += firstEntrySet.getKey() + ": <b>" + firstEntrySet.getValue() + "</b>";
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ public class ProjectUtil {
|
|||
if (document == null)
|
||||
return htmlCode;
|
||||
|
||||
Entry<String, Object> firstEntrySet = document.getFirstEntryOfMap();
|
||||
Entry<String, String> firstEntrySet = document.getFirstEntryOfMap();
|
||||
if (firstEntrySet != null) {
|
||||
htmlCode += showkey ? firstEntrySet.getKey() + ": <b>" + firstEntrySet.getValue() + "</b>"
|
||||
: firstEntrySet.getValue();
|
||||
|
@ -51,7 +51,7 @@ public class ProjectUtil {
|
|||
if (document == null)
|
||||
return htmlCode;
|
||||
|
||||
Entry<String, Object> firstEntrySet = document.getFirstEntryOfMap();
|
||||
Entry<String, String> firstEntrySet = document.getFirstEntryOfMap();
|
||||
if (firstEntrySet != null) {
|
||||
htmlCode += firstEntrySet.getKey() + ": <b>" + firstEntrySet.getValue() + "</b>";
|
||||
}
|
||||
|
|
|
@ -121,7 +121,7 @@ public class ViewRelationshipPanel extends Composite {
|
|||
firstProjectPanelContainer.clear();
|
||||
secondProjectPanelContainer.clear();
|
||||
|
||||
Entry<String, Object> firstEntrySet = project.getTheDocument().getFirstEntryOfMap();
|
||||
Entry<String, String> firstEntrySet = project.getTheDocument().getFirstEntryOfMap();
|
||||
String htmlMsg = firstEntrySet.getKey() + ": <b>" + firstEntrySet.getValue() + "</b> (id: " + project.getId()
|
||||
+ ")";
|
||||
|
||||
|
|
|
@ -66,10 +66,10 @@ public class DragDropLayer extends FlowPanel {
|
|||
labelProject.setTitle(referProjectID);
|
||||
GeoportalDataViewerServiceAsync.Util.getInstance().getEntrySetsDocumentForProjectID(
|
||||
layerObject.getProjectDV().getProfileID(), layerObject.getProjectDV().getId(), 1,
|
||||
new AsyncCallback<LinkedHashMap<String, Object>>() {
|
||||
new AsyncCallback<LinkedHashMap<String, String>>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(LinkedHashMap<String, Object> result) {
|
||||
public void onSuccess(LinkedHashMap<String, String> result) {
|
||||
String realProjectName = "";
|
||||
if (result != null) {
|
||||
for (String key : result.keySet()) {
|
||||
|
|
|
@ -894,8 +894,10 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
|
|||
theProjectDV.setProfileName(ucd.getName());
|
||||
|
||||
TemporalReferenceDV temporalReference = temporalReferenceForProject(theProject);
|
||||
|
||||
if (temporalReference == null)
|
||||
temporalReference = new TemporalReferenceDV();
|
||||
|
||||
theProjectDV.setTemporalReference(temporalReference);
|
||||
|
||||
ProjectView projectView = Geoportal_JSON_Mapper.loadProjectView(theProjectDV, scope, userName);
|
||||
|
@ -1102,7 +1104,7 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
|
|||
if (layerObject.getProjectDV().getTheDocument() == null) {
|
||||
try {
|
||||
|
||||
LinkedHashMap<String, Object> documentAsMap = getEntrySetsDocumentForProjectID(
|
||||
LinkedHashMap<String, String> documentAsMap = getEntrySetsDocumentForProjectID(
|
||||
layerObject.getProfileID(), layerObject.getProjectID(), 1);
|
||||
DocumentDV documentDV = new DocumentDV();
|
||||
documentDV.setDocumentAsMap(documentAsMap);
|
||||
|
@ -1198,7 +1200,7 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
|
|||
});
|
||||
|
||||
if (loadDocument) {
|
||||
LinkedHashMap<String, Object> theDocument = getEntrySetsDocumentForProjectID(profileID, projectID,
|
||||
LinkedHashMap<String, String> theDocument = getEntrySetsDocumentForProjectID(profileID, projectID,
|
||||
limitDocumentEntries);
|
||||
DocumentDV docDV = new DocumentDV();
|
||||
docDV.setDocumentAsMap(theDocument);
|
||||
|
@ -1247,11 +1249,11 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
|
|||
* @return the entry sets document for project ID
|
||||
*/
|
||||
@Override
|
||||
public LinkedHashMap<String, Object> getEntrySetsDocumentForProjectID(String profileID, String projectID,
|
||||
public LinkedHashMap<String, String> getEntrySetsDocumentForProjectID(String profileID, String projectID,
|
||||
int limit) {
|
||||
LOG.debug("called getEntrySetsDocumentForProjectID for profileID: " + profileID + ", projectID: " + projectID);
|
||||
|
||||
LinkedHashMap<String, Object> documentAsMap = new LinkedHashMap<String, Object>(limit);
|
||||
LinkedHashMap<String, String> documentAsMap = new LinkedHashMap<String, String>(limit);
|
||||
|
||||
try {
|
||||
|
||||
|
@ -1267,7 +1269,7 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
|
|||
break;
|
||||
|
||||
Entry<String, Object> entry = entrySetsIt.next();
|
||||
documentAsMap.put(entry.getKey(), entry.getValue());
|
||||
documentAsMap.put(entry.getKey(), entry.getValue()!=null?entry.getValue().toString():null);
|
||||
i++;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,12 +8,13 @@ import org.gcube.application.geoportalcommon.shared.geoportal.ucd.UseCaseDescrip
|
|||
|
||||
public class ItemFieldsResponse implements Serializable {
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -8778792633248190350L;
|
||||
UseCaseDescriptorDV useCaseDescriptorDV;
|
||||
List<ItemFieldDV> listItemFields;
|
||||
private static final long serialVersionUID = -6723902864074541278L;
|
||||
private UseCaseDescriptorDV useCaseDescriptorDV;
|
||||
private List<ItemFieldDV> listItemFields;
|
||||
|
||||
public ItemFieldsResponse() {
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@ public class LayerObject implements Serializable {
|
|||
private ProjectDV projectDV;
|
||||
|
||||
public LayerObject() {
|
||||
super();
|
||||
}
|
||||
|
||||
public LayerObject(LayerObjectType type, LayerItem item) {
|
||||
|
|
Loading…
Reference in New Issue