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=""/>
</attributes>
</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">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="/home/francescomangiacrapa/config-work-isti/log4jconfiguration"/>
<classpathentry kind="output" path="target/classes"/>
</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.enumIdentifier=error
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.source=1.8

View File

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

View File

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

View File

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