Compare commits

..

22 Commits

Author SHA1 Message Date
Francesco Mangiacrapa eb41add25e updated lower bound of geoportal-data-mapper at 1.1.0. Fixing
[#27494#note-14]
2024-10-29 10:35:00 +01:00
Francesco Mangiacrapa 901ff3d902 Included: Bug fixing StorageID resolver [#28276]. Added
HealthCheckResponse via `microprofile-health-api`
2024-10-16 11:21:03 +02:00
Francesco Mangiacrapa a3c5679895 Merge pull request 'fix_28276' (!9) from fix_28276 into master
Reviewed-on: #9
2024-10-16 11:11:32 +02:00
Francesco Mangiacrapa 7bd66b4628 updated the changelog 2024-10-16 11:11:03 +02:00
Francesco Mangiacrapa 22bf660710 updated HealthCheckResponse 2024-10-16 11:04:36 +02:00
Francesco Mangiacrapa deca344022 updated UriResolverHealthCheck 2024-10-15 17:19:01 +02:00
Francesco Mangiacrapa e2b0020484 added implementation of HealthCheckResponse 2024-10-15 17:08:42 +02:00
Francesco Mangiacrapa a1db22e5b8 updated interface `health` 2024-10-15 16:55:16 +02:00
Francesco Mangiacrapa d22eba4c0a integrated `health` with `microprofile-health-api` 2024-10-15 16:45:28 +02:00
Francesco Mangiacrapa 1e38d32776 removed `spring_metrics` path 2024-10-15 16:31:02 +02:00
Francesco Mangiacrapa 66632e1f82 added `spring_metrics` path 2024-10-15 16:28:03 +02:00
Francesco Mangiacrapa 427ceed7a0 add path as metrics 2024-10-15 16:18:31 +02:00
Francesco Mangiacrapa 06932cdd68 updated at 2.10.1-SNAPSHOT 2024-10-15 16:08:37 +02:00
Francesco Mangiacrapa f8428995ce fixed test case 2024-10-15 16:06:43 +02:00
Francesco Mangiacrapa c3e9f16ea0 removed -SNAPSHOT to be released 2024-09-24 12:36:32 +02:00
Francesco Mangiacrapa a0ce6a4aac Moved to `gcube-smartgears-bom 2.5.1{-SNAPSHOT}` 2024-09-23 15:29:28 +02:00
Francesco Mangiacrapa e31fcd5619 fixed version at 2.10.0-SNAPSHOT 2024-09-17 11:46:51 +02:00
Francesco Mangiacrapa 7108880a1d Moved to `gcube-smartgears-bom 2.6.0{-SNAPSHOT}` [#28026] 2024-09-17 11:44:09 +02:00
Francesco Mangiacrapa ca1c9c20bc removed -SNAPSHOT to be released 2024-08-05 11:05:03 +02:00
Francesco Mangiacrapa 4a3c879294 - Just to include the new SHUB client library [#27944] 2024-08-05 10:33:20 +02:00
Francesco Mangiacrapa bae7b1aac7 removed -SNAPSHOT to be released 2024-06-28 15:22:06 +02:00
Francesco Mangiacrapa bed35ccfa3 Merge pull request 'export_to_pdf' (!8) from export_to_pdf into master
Reviewed-on: #8
2024-06-28 15:17:38 +02:00
8 changed files with 247 additions and 38 deletions

View File

@ -30,6 +30,11 @@
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>
<buildCommand>
<name>org.springframework.ide.eclipse.boot.validation.springbootbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec> </buildSpec>
<natures> <natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature> <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0"> <?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
@ -40,8 +40,40 @@
<wb-module deploy-name="uri-resolver-2.10.0-SNAPSHOT">
<wb-module deploy-name="uri-resolver-2.10.0">
@ -83,7 +115,23 @@
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/> <wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
@ -125,7 +173,23 @@
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/> <wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
@ -167,7 +231,23 @@
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
@ -209,13 +289,29 @@
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<dependent-module archiveName="metadata-profile-form-builder-widget-2.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/metadata-profile-form-builder-widget/metadata-profile-form-builder-widget"> <dependent-module archiveName="geoportal-client-1.2.2.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-client/geoportal-client">
<dependency-type>uses</dependency-type> <dependency-type>uses</dependency-type>
</dependent-module> </dependent-module>
<dependent-module archiveName="geoportal-common-1.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-common/geoportal-common"> <dependent-module archiveName="geoportal-common-1.1.1.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-common/geoportal-common">
<dependency-type>uses</dependency-type> <dependency-type>uses</dependency-type>
</dependent-module> </dependent-module>
@ -257,7 +353,23 @@
<property name="context-root" value="uri-resolver"/> <property name="context-root" value="uri-resolver"/>
@ -299,7 +411,23 @@
<property name="java-output-path" value="/uri-resolver/target/classes"/> <property name="java-output-path" value="/uri-resolver/target/classes"/>
@ -341,7 +469,23 @@
</wb-module> </wb-module>

View File

@ -0,0 +1,2 @@
boot.validation.initialized=true
eclipse.preferences.version=1

View File

@ -4,11 +4,15 @@
All notable changes to this project will be documented in this file. 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). This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v2.10.0-SNAPSHOT] ## [v2.10.0]
- GeoPortal-Resolver enhancement: implemented share link towards Geoportal Data-Entry facility [#27135] - GeoPortal-Resolver enhancement: implemented share link towards Geoportal Data-Entry facility [#27135]
- Added Geoportal Exporter as PDF [#27274] - Added Geoportal Exporter as PDF [#27274]
- Migrated to `catalogue-util-library` [#27423] - Migrated to `catalogue-util-library` [#27423]
- Included new SHUB client library [#27944]
- Moved to `gcube-smartgears-bom 2.5.1{-SNAPSHOT}` [#28026]
- Bug fixing StorageID resolver [#28276]
- Added HealthCheckResponse via `microprofile-health-api` (see https://microprofile.io/specifications/microprofile-health/)
## [v2.9.0] ## [v2.9.0]

31
pom.xml
View File

@ -9,7 +9,7 @@
</parent> </parent>
<groupId>org.gcube.data.transfer</groupId> <groupId>org.gcube.data.transfer</groupId>
<artifactId>uri-resolver</artifactId> <artifactId>uri-resolver</artifactId>
<version>2.10.0-SNAPSHOT</version> <version>2.10.0</version>
<packaging>war</packaging> <packaging>war</packaging>
<description>The URI Resolver is an HTTP URI resolver implemented as a REST service which gives access trough HTTP to different gcube Resolvers and gCube Applications.</description> <description>The URI Resolver is an HTTP URI resolver implemented as a REST service which gives access trough HTTP to different gcube Resolvers and gCube Applications.</description>
@ -31,7 +31,7 @@
</activation> </activation>
<properties> <properties>
<!-- <gcube-bom>2.4.0</gcube-bom> --> <!-- <gcube-bom>2.4.0</gcube-bom> -->
<gcube-smartgears-bom-version>2.5.0</gcube-smartgears-bom-version> <gcube-smartgears-bom-version>2.5.1</gcube-smartgears-bom-version>
<authorization-utils-range>[2.0.0, 3.0.0-SNAPSHOT)</authorization-utils-range> <authorization-utils-range>[2.0.0, 3.0.0-SNAPSHOT)</authorization-utils-range>
</properties> </properties>
</profile> </profile>
@ -45,7 +45,7 @@
</activation> </activation>
<properties> <properties>
<!-- <gcube-bom>2.4.1-SNAPSHOT</gcube-bom> --> <!-- <gcube-bom>2.4.1-SNAPSHOT</gcube-bom> -->
<gcube-smartgears-bom-version>2.5.0</gcube-smartgears-bom-version> <gcube-smartgears-bom-version>2.5.1-SNAPSHOT</gcube-smartgears-bom-version>
<authorization-utils-range>[2.0.0, 3.0.0-SNAPSHOT)</authorization-utils-range> <authorization-utils-range>[2.0.0, 3.0.0-SNAPSHOT)</authorization-utils-range>
</properties> </properties>
</profile> </profile>
@ -54,7 +54,8 @@
<properties> <properties>
<jersey.version>2.25.1</jersey.version> <jersey.version>2.25.1</jersey.version>
<!-- Using 2.8.4 because storagehub-model.1.1.1 uses indirectly this version via jsersey-media-json --> <!-- Using 2.8.4 because storagehub-model.1.1.1 uses indirectly this version
via jsersey-media-json -->
<jackson.version>2.8.4</jackson.version> <jackson.version>2.8.4</jackson.version>
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.target>1.8</maven.compiler.target>
@ -63,13 +64,6 @@
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>
<!-- <dependency> -->
<!-- <groupId>org.gcube.distribution</groupId> -->
<!-- <artifactId>gcube-bom</artifactId> -->
<!-- <version>${gcube-bom}</version> -->
<!-- <type>pom</type> -->
<!-- <scope>import</scope> -->
<!-- </dependency> -->
<dependency> <dependency>
<groupId>org.gcube.distribution</groupId> <groupId>org.gcube.distribution</groupId>
<artifactId>gcube-smartgears-bom</artifactId> <artifactId>gcube-smartgears-bom</artifactId>
@ -88,6 +82,13 @@
<artifactId>common-smartgears</artifactId> <artifactId>common-smartgears</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.microprofile.health</groupId>
<artifactId>microprofile-health-api</artifactId>
<version>4.0</version>
</dependency>
<dependency> <dependency>
<groupId>org.gcube.core</groupId> <groupId>org.gcube.core</groupId>
<artifactId>common-smartgears-app</artifactId> <artifactId>common-smartgears-app</artifactId>
@ -101,13 +102,13 @@
<dependency> <dependency>
<groupId>org.gcube.contentmanagement</groupId> <groupId>org.gcube.contentmanagement</groupId>
<artifactId>storage-manager-wrapper</artifactId> <artifactId>storage-manager-wrapper</artifactId>
<version>[3.0.0-SNAPSHOT, 4.0.0-SNAPSHOT)</version> <version>[3.0.0, 4.0.0-SNAPSHOT)</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.gcube.contentmanagement</groupId> <groupId>org.gcube.contentmanagement</groupId>
<artifactId>storage-manager-core</artifactId> <artifactId>storage-manager-core</artifactId>
<version>[3.0.0-SNAPSHOT,4.0.0-SNAPSHOT)</version> <version>[3.0.0,4.0.0-SNAPSHOT)</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<artifactId>slf4j-nop</artifactId> <artifactId>slf4j-nop</artifactId>
@ -132,7 +133,7 @@
<dependency> <dependency>
<groupId>org.gcube.data.analysis</groupId> <groupId>org.gcube.data.analysis</groupId>
<artifactId>dataminer-invocation-model</artifactId> <artifactId>dataminer-invocation-model</artifactId>
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version> <version>[1.0.0,2.0.0-SNAPSHOT)</version>
</dependency> </dependency>
<dependency> <dependency>
@ -313,7 +314,7 @@
<dependency> <dependency>
<groupId>org.gcube.application</groupId> <groupId>org.gcube.application</groupId>
<artifactId>geoportal-data-mapper</artifactId> <artifactId>geoportal-data-mapper</artifactId>
<version>[1.0.0, 2.0.0-SNAPSHOT)</version> <version>[1.1.0, 2.0.0-SNAPSHOT)</version>
<!-- Excluding these beacuse geoportal uses [2-3] ranges conflicting with <!-- Excluding these beacuse geoportal uses [2-3] ranges conflicting with
[3-4] used by URI-Resolver --> [3-4] used by URI-Resolver -->
<exclusions> <exclusions>

View File

@ -169,6 +169,9 @@ public class StorageIDResolver {
//Reading the content size //Reading the content size
size = metaFile.getSize(); size = metaFile.getSize();
LOG.debug("Read size {} from {}", size, StorageMetadataFile.class.getSimpleName()); LOG.debug("Read size {} from {}", size, StorageMetadataFile.class.getSimpleName());
}else {
//Bug fixing #28276
throw ExceptionManager.notFoundException(httpRequest, "Error on accessing the "+STORAGE_ID+ " '"+storageId+"'. Is it a valid id?", StorageIDResolver.class, help);
} }
//CHECKING TO DEFAULT METADATA //CHECKING TO DEFAULT METADATA

View File

@ -0,0 +1,47 @@
package org.gcube.datatransfer.resolver.services;
import java.util.Map;
import java.util.Optional;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import org.eclipse.microprofile.health.HealthCheck;
import org.eclipse.microprofile.health.HealthCheckResponse;
import org.eclipse.microprofile.health.HealthCheckResponse.Status;
import org.eclipse.microprofile.health.Liveness;
/**
* The Class UriResolverHealthCheck.
*
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
*
* Oct 15, 2024
*/
@Path("health")
public class UriResolverHealthCheck implements HealthCheck {
@GET
@Path("")
@Produces({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON })
public Response check() {
HealthCheckResponse hcr = call();
return Response.ok().entity(hcr).build();
}
/**
* Call.
*
* @return the health check response
*/
@Liveness
@Override
public HealthCheckResponse call() {
return new HealthCheckResponse("uri-resolver", Status.UP, Optional.empty());
}
}

View File

@ -63,8 +63,10 @@ public class RuntimeResourceReader {
ScopeProvider.instance.set(scope); ScopeProvider.instance.set(scope);
SimpleQuery query = queryFor(ServiceEndpoint.class); SimpleQuery query = queryFor(ServiceEndpoint.class);
query.addCondition("$resource/Profile/Platform/Name/text() eq '" + platformName + "'"); if (platformName != null)
query.addCondition("$resource/Profile/Category/text() eq '" + category + "'"); query.addCondition("$resource/Profile/Platform/Name/text() eq '" + platformName + "'");
if (category != null)
query.addCondition("$resource/Profile/Category/text() eq '" + category + "'");
if (endPoint != null && !endPoint.isEmpty()) if (endPoint != null && !endPoint.isEmpty())
query.addCondition("$resource/Profile/AccessPoint/Interface/Endpoint/text() eq '" + endPoint + "'"); query.addCondition("$resource/Profile/AccessPoint/Interface/Endpoint/text() eq '" + endPoint + "'");
@ -127,27 +129,28 @@ public class RuntimeResourceReader {
// String scope = "/pred4s/preprod/preVRE"; // String scope = "/pred4s/preprod/preVRE";
// String scope = "/d4science.research-infrastructures.eu/D4OS/GNA"; // String scope = "/d4science.research-infrastructures.eu/D4OS/GNA";
String scope = "/gcube/devsec/devVRE"; // String scope = "/gcube/devsec/devVRE";
//String scope = "/d4science.research-infrastructures.eu/gCubeApps/Esquiline"; String scope = "/d4science.research-infrastructures.eu/gCubeApps/ProtectedAreaImpactMaps";
// String scope = "/d4science.research-infrastructures.eu/gCubeApps/Esquiline";
// String scope = "/d4science.research-infrastructures.eu/D4OS/ARIADNEplus_Project"; // String scope = "/d4science.research-infrastructures.eu/D4OS/ARIADNEplus_Project";
// String platformName = "geonetwork"; // String platformName = "geonetwork";
// String category = "Gis"; // String category = "Gis";
// String platformName = "GeoServer"; String platformName = "GeoServer";
// String category = "Gis"; String category = null;
// String platformName = "postgis"; // String platformName = "postgis";
// String category = "Database"; // String category = "Database";
String platformName = "postgres"; // String platformName = "postgres";
String category = "Database"; // String category = "Database";
// String platformName = "mongodb"; // String platformName = "mongodb";
// String category = "Database"; // String category = "Database";
// scope = "/pred4s/preprod/preVRE"; // scope = "/pred4s/preprod/preVRE";
// scope = "/d4science.research-infrastructures.eu/D4OS/Blue-Cloud2026Project"; // scope = "/d4science.research-infrastructures.eu/D4OS/Blue-Cloud2026Project";
// platformName = "Zenodo"; // platformName = "Zenodo";
// category = "Repository"; // category = "Repository";