This commit is contained in:
Francesco Mangiacrapa 2024-04-03 17:21:26 +02:00
parent 71a5bbfd93
commit 3dbd14b2b6
5 changed files with 21 additions and 14 deletions

View File

@ -25,11 +25,11 @@
<attribute name="org.eclipse.jst.component.nondependency" value=""/> <attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="lib" path="/home/francescomangiacrapa/config-work-isti/log4jconfiguration"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="owner.project.facets" value="java"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="lib" path="/home/francescomangiacrapa/config-work-isti/log4jconfiguration"/>
<classpathentry kind="output" path="target/classes"/> <classpathentry kind="output" path="target/classes"/>
</classpath> </classpath>

View File

@ -6,6 +6,6 @@ org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.compiler.source=1.8

View File

@ -3,6 +3,10 @@
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).
## [v1.8.0-SNAPSHOT]
- Enhanced the Geoportal-Resolver. Supported share links to Geoportal Data-Entry app [#27160]
## [v1.7.0] ## [v1.7.0]
- Integrated the new Geoportal-Resolver [#24842] - Integrated the new Geoportal-Resolver [#24842]

View File

@ -4,14 +4,14 @@
<parent> <parent>
<artifactId>maven-parent</artifactId> <artifactId>maven-parent</artifactId>
<groupId>org.gcube.tools</groupId> <groupId>org.gcube.tools</groupId>
<version>1.1.0</version> <version>1.2.0</version>
<relativePath /> <relativePath />
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.gcube.portlets.user</groupId> <groupId>org.gcube.portlets.user</groupId>
<artifactId>uri-resolver-manager</artifactId> <artifactId>uri-resolver-manager</artifactId>
<version>1.7.0</version> <version>1.8.0-SNAPSHOT</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>uri-resolver-manager</name> <name>uri-resolver-manager</name>
<description>The URI Resolver Manager</description> <description>The URI Resolver Manager</description>

View File

@ -132,28 +132,31 @@ public class UriResolverManagerTest {
public void testGeoportalCreateLink() { public void testGeoportalCreateLink() {
try { try {
ScopeProvider.instance.set("/gcube"); String scope = "/gcube/devsec/devVRE";
// String scope = "/pred4s/preprod/preVRE";
ScopeProvider.instance.set(scope);
UriResolverManager resolver; UriResolverManager resolver;
String gcubeScope = "/gcube/devsec/devVRE"; String gcubeScope = scope;
String itemId = "63d011c4dcac4551b9a6b930"; String itemId = "6384aaac308f5c28c5ee0888";
String itemType = "profiledConcessioni"; String itemType = "profiledConcessioni";
resolver = new UriResolverManager("GEO"); resolver = new UriResolverManager("GEO");
Map<String, String> params = null;
//Method 1 //Method 1
// Map<String, String> params = new HashMap<String, String>(); params = new HashMap<String, String>();
// params.put(GeoportalResolverQueryStringBuilder.GCUBE_SCOPE_PARAMETER, gcubeScope); params.put(GeoportalResolverQueryStringBuilder.GCUBE_SCOPE_PARAMETER, gcubeScope);
// params.put(GeoportalResolverQueryStringBuilder.ITEM_ID_PARAMETER, itemId); params.put(GeoportalResolverQueryStringBuilder.ITEM_ID_PARAMETER, itemId);
// params.put(GeoportalResolverQueryStringBuilder.ITEM_TYPE_PARAMETER, itemType); params.put(GeoportalResolverQueryStringBuilder.ITEM_TYPE_PARAMETER, itemType);
// params.put(GeoportalResolverQueryStringBuilder.RESOLVE_AS_PARAMETER, GeoportalResolverQueryStringBuilder.RESOLVE_AS.PUBLIC.getParamValue()); params.put(GeoportalResolverQueryStringBuilder.RESOLVE_AS_PARAMETER, GeoportalResolverQueryStringBuilder.RESOLVE_AS.PUBLIC.getParamValue());
//Method 2 //Method 2
GeoportalResolverQueryStringBuilder builder = new GeoportalResolverQueryStringBuilder(itemType,itemId); GeoportalResolverQueryStringBuilder builder = new GeoportalResolverQueryStringBuilder(itemType,itemId);
builder.scope(gcubeScope); builder.scope(gcubeScope);
builder.resolverAs(RESOLVE_AS.PUBLIC); builder.resolverAs(RESOLVE_AS.PUBLIC);
//builder.resolverAs(RESOLVE_AS.PRIVATE); //builder.resolverAs(RESOLVE_AS.PRIVATE);
Map<String, String> params = builder.buildQueryParameters(); params = builder.buildQueryParameters();
String shortLink = resolver.getLink(params, true); String shortLink = resolver.getLink(params, true);
System.out.println(shortLink); System.out.println(shortLink);