First import

This commit is contained in:
Fabio Sinibaldi 2022-09-07 15:16:23 +02:00
parent f29a8c3ef0
commit 8d664f6ba1
9 changed files with 151 additions and 93 deletions

View File

@ -4,6 +4,11 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v3.0.0-SNAPSHOT] - 2022-08-09
- Support for Use Case Descriptors
## [v2.3.0] - 2022-07-26
#### Bug fixed

150
pom.xml
View File

@ -14,13 +14,13 @@
<groupId>org.gcube.portlets.user</groupId>
<artifactId>geoportal-data-viewer-app</artifactId>
<packaging>war</packaging>
<version>2.3.0</version>
<version>3.0.0-SNAPSHOT</version>
<name>GeoPortal Data Viewer App</name>
<description>The GeoPortal Data Viewer App is an application to access, discovery and navigate the GeoNa products by a Web-Map Interface</description>
<properties>
<!-- Convenience property to set the GWT version -->
<gwt.version>2.9.0</gwt.version>
<gwt.version>2.8.2</gwt.version>
<gwt.compiler.style>PRETTY</gwt.compiler.style>
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
<!-- GWT 2.9 support 8, 9 and 11 -->
@ -63,11 +63,86 @@
<dependencies>
<!-- FORCING THESE DEPENDENCIES IN ORDER TO USE THE "OLD" CONCESSIONI CLIENT/MODEL -->
<dependency>
<groupId>org.gcube.common</groupId>
<artifactId>metadata-profile-discovery</artifactId>
<version>[1.0.0-SNAPSHOT, 1.1.0-SNAPSHOT)</version>
</dependency>
<dependency>
<groupId>org.gcube.application</groupId>
<artifactId>geoportal-data-common</artifactId>
<version>[1.0.0-SNAPSHOT, 1.5.0-SNAPSHOT)</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.gcube.application</groupId>
<artifactId>geoportal-client</artifactId>
<version>[1.0.0, 1.1.0-SNAPSHOT)</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>org.gcube.resources.discovery</groupId>
<artifactId>ic-client</artifactId>
</exclusion>
<exclusion>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- END FORCING -->
<dependency>
<groupId>com.github.gwtbootstrap</groupId>
<artifactId>gwt-bootstrap</artifactId>
<version>2.3.2.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.github.tdesjardins</groupId>
<artifactId>gwt-ol3</artifactId>
<!-- <version>8.1.0-gwt2_9</version> -->
<version>8.2.0-gwt2_8</version>
</dependency>
<dependency>
<groupId>org.gcube.spatial.data</groupId>
<artifactId>geo-utility</artifactId>
<version>[1.0.0,2.0.0-SNAPSHOT)</version>
</dependency>
<dependency>
<groupId>org.gcube.portlets.user</groupId>
<artifactId>gcube-url-shortener</artifactId>
<version>[1.0.0,2.0.0-SNAPSHOT)</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.gcube.common</groupId>
<artifactId>keycloak-client</artifactId>
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
</dependency>
<!-- <dependency> -->
<!-- <groupId>org.projectlombok</groupId> -->
<!-- <artifactId>lombok</artifactId> -->
<!-- <version>1.14.8</version> -->
<!-- </dependency> -->
<!-- PROVIDED in GATEWAY -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
<!-- <scope>system</scope> -->
<!-- <systemPath>/Users/fabioisti/.m2/repository/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar</systemPath> -->
</dependency>
<dependency>
@ -105,22 +180,7 @@
<artifactId>oidc-library</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.tdesjardins</groupId>
<artifactId>gwt-ol3</artifactId>
<version>8.1.0-gwt2_9</version>
</dependency>
<dependency>
<groupId>com.github.gwtbootstrap</groupId>
<artifactId>gwt-bootstrap</artifactId>
<version>2.3.2.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.gcube.spatial.data</groupId>
<artifactId>geo-utility</artifactId>
<version>[1.0.0,2.0.0-SNAPSHOT)</version>
</dependency>
<dependency>
<groupId>org.gcube.resources.discovery</groupId>
<artifactId>ic-client</artifactId>
@ -141,73 +201,33 @@
<artifactId>usermanagement-core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.portlets.user</groupId>
<artifactId>gcube-url-shortener</artifactId>
<version>[1.0.0,2.0.0-SNAPSHOT)</version>
<scope>compile</scope>
</dependency>
<!-- FORCING THESE DEPENDENCIES IN ORDER TO USE THE "OLD" CONCESSIONI CLIENT/MODEL -->
<dependency>
<groupId>org.gcube.common</groupId>
<artifactId>metadata-profile-discovery</artifactId>
<version>[1.0.0-SNAPSHOT, 1.1.0-SNAPSHOT)</version>
</dependency>
<dependency>
<groupId>org.gcube.application</groupId>
<artifactId>geoportal-data-common</artifactId>
<version>[1.0.0-SNAPSHOT, 1.5.0-SNAPSHOT)</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.gcube.application</groupId>
<artifactId>geoportal-client</artifactId>
<version>[1.0.0, 1.1.0-SNAPSHOT)</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>org.gcube.resources.discovery</groupId>
<artifactId>ic-client</artifactId>
</exclusion>
<exclusion>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- END FORCING -->
<dependency>
<groupId>org.gcube.common</groupId>
<artifactId>keycloak-client</artifactId>
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
</dependency>
<dependency>
<groupId>com.liferay.portal</groupId>
<artifactId>portal-service</artifactId>
<!-- <version>6.2.5</version> -->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.portlet</groupId>
<artifactId>portlet-api</artifactId>
<!-- <version>2.0</version> -->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<!-- <version>1.6.4</version> -->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<!-- <version>1.6.4</version> -->
<scope>provided</scope>
</dependency>
<!-- TEST -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>

View File

@ -116,6 +116,7 @@ public class GeoportalDataViewer implements EntryPoint {
@Override
public void onFailure(Throwable caught) {
RootPanel.get(APP_DIV).remove(loaderApp);
GWT.log("Failure on loading base layers", caught);
Window.alert("Sorry, an error occurred on instancing the GeoPortale Viewer. Please, contact the support");
}

View File

@ -2,14 +2,13 @@ package org.gcube.portlets.user.geoportaldataviewer.client;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.Window;
import lombok.Getter;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Set;
@Getter
class StartParameters {
public StartParameters(Map<String, List<String>> parameters) {
if (parameters == null || parameters.isEmpty())
@ -18,8 +17,6 @@ class StartParameters {
paramWmsRequest = getFirst(parameters, GeoportalDataViewerConstants.GET_WMS_PARAMETER);
paramLayerTitle = Window.Location.getParameter(GeoportalDataViewerConstants.GET_LAYER_TITLE);
paramGeonaItemType = Window.Location.getParameter(GeoportalDataViewerConstants.GET_GEONA_ITEM_TYPE);
paramGeonaItemID = Window.Location.getParameter(GeoportalDataViewerConstants.GET_GEONA_ITEM_ID);
}
@ -66,4 +63,22 @@ class StartParameters {
private String paramGeonaItemID;
public String getParamWmsRequest() {
return paramWmsRequest;
}
public String getParamGeonaItemType() {
return paramGeonaItemType;
}
public String getParamLayerTitle() {
return paramLayerTitle;
}
public String getParamGeonaItemID() {
return paramGeonaItemID;
}
}

View File

@ -13,6 +13,6 @@ public class OpenCollectionsEvent extends GwtEvent<OpenCollectionsEventHandler>
@Override
protected void dispatch(OpenCollectionsEventHandler h) {
h.
}
}

View File

@ -155,19 +155,24 @@ public class GeonaDataViewMainPanel extends Composite {
linkPresetLocation.setCustomIconStyle(GNAIcons.CustomIconType.PRESET_LOCATION.get());
linkLayers.setCustomIconStyle(GNAIcons.CustomIconType.LAYERS.get());
searchFacility = new SearchFacilityUI(applicationBus, sortByFields, searchForFields, initialSortFilter);
searchFacility.setSearchButton(searchFacilityButton);
searchFacilityButton.setIcon(IconType.SEARCH);
searchFacilityPanel.add(searchFacility);
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
@Override
public void execute() {
searchFacilityPanel.getElement().getParentElement().getStyle().setOpacity(0.9);
}
});
// TODO
GWT.log("!!! NB TODO : Search facility is skipped ");
// searchFacility = new SearchFacilityUI(applicationBus, sortByFields, searchForFields, initialSortFilter);
// searchFacility.setSearchButton(searchFacilityButton);
// searchFacilityButton.setIcon(IconType.SEARCH);
// searchFacilityPanel.add(searchFacility);
// Scheduler.get().scheduleDeferred(new ScheduledCommand() {
//
// @Override
// public void execute() {
// searchFacilityPanel.getElement().getParentElement().getStyle().setOpacity(0.9);
//
// }
//
// });
// layersDDB.setToggle(true);
bindEvents();

View File

@ -77,7 +77,8 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
* @throws Exception the exception
*/
private GNADataViewerConfigProfile getGNADataVieweConfigProfile() throws Exception {
LOG.info("METHOD getDataResult called");
GNADataViewerConfigProfile profile = SessionUtil.getGNADataViewerConfigProfile(getThreadLocalRequest());
if (profile == null) {
LOG.info(GNADataViewerConfigProfile.class.getSimpleName() + " is null, loading configurations from IS");
@ -114,6 +115,7 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
*/
public GeoInformationForWMSRequest loadGeoInfoForWmsRequest(String wmsLink, String layerName) throws Exception {
try {
LOG.info("METHOD load GEO infor for WMS Req called");
WMSUrlValidator validator = new WMSUrlValidator(wmsLink, layerName);
String wmsServiceHost = validator.getWmsServiceHost();
String validWMSRequest = validator.parseWMSRequest(true, true);
@ -164,7 +166,7 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
@Override
public List<GeoNaSpatialQueryResult> getDataResult(List<LayerObject> layerObjects, String mapSrsName,
BoundsMap selectBBOX, int maxWFSFeature, double zoomLevel) {
LOG.info("getDataResult called");
LOG.info("METHOD getDataResult called");
List<GeoNaSpatialQueryResult> listDAO = new ArrayList<GeoNaSpatialQueryResult>(layerObjects.size());
@ -426,7 +428,9 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
*/
public Map<String, String> getParametersFromURL(String theURL, List<String> parameters) {
LOG.info("METHOD getPAramsFromURL");
if (theURL == null)
return null;
@ -450,6 +454,7 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
*/
@Override
public String getMyLogin() {
LOG.info("METHOD getMYLogin ");
try {
GCubeUser user = SessionUtil.getCurrentUser(this.getThreadLocalRequest());
if (user == null)
@ -551,6 +556,7 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
* @throws Exception the exception
*/
public boolean isSessionExpired() throws Exception {
LOG.info("METHOD isSessionExpired ");
return SessionUtil.isSessionExpired(this.getThreadLocalRequest());
}
@ -700,7 +706,7 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
public List<BaseMapLayer> getListBaseLayers() {
LOG.info("getListBaseLayers called");
List<BaseMapLayer> listBL = new ArrayList<BaseMapLayer>();
// Setting scope in the cuurent thread
// Setting scope in the current thread
SessionUtil.getCurrentContext(this.getThreadLocalRequest(), true);
listBL = SessionUtil.getGNABaseMaps(this.getThreadLocalRequest());
LOG.info("getListBaseLayers returning " + listBL.size() + " base maps");

View File

@ -1,12 +1,14 @@
package org.gcube.portlets.user.geoportaldataviewer.shared;
import lombok.Data;
import java.io.Serializable;
//@Data
public class GCubeCollection implements Serializable {
// private Document ucd;
// private List<IndexLayer> indexes;
}

View File

@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<web-app>
<!-- xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -->
<!-- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee -->
<!-- http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" -->
<!-- version="3.0"> -->
<!-- Default page to serve -->
<welcome-file-list>