Passed to Geoportal_Resolver service [#25031]

This commit is contained in:
Francesco Mangiacrapa 2023-05-03 10:04:48 +02:00
parent 612e6a3814
commit 83aba5d29f
5 changed files with 54 additions and 44 deletions

View File

@ -82,6 +82,7 @@
@ -187,6 +188,7 @@
@ -292,6 +294,7 @@
@ -397,6 +400,7 @@
@ -454,6 +458,7 @@
@ -485,9 +490,7 @@
<dependent-module archiveName="metadata-profile-form-builder-widget-2.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/metadata-profile-form-builder-widget/metadata-profile-form-builder-widget"> <dependent-module archiveName="metadata-profile-form-builder-widget-2.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/metadata-profile-form-builder-widget/metadata-profile-form-builder-widget">
<dependency-type>uses</dependency-type> <dependency-type>uses</dependency-type>
</dependent-module> </dependent-module>
<dependent-module archiveName="geoportal-data-common-2.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-data-common/geoportal-data-common">
<dependency-type>uses</dependency-type>
</dependent-module>
@ -676,6 +679,7 @@
@ -781,6 +785,7 @@
@ -886,6 +891,7 @@

View File

@ -6,9 +6,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
## [v3.2.0-SNAPSHOT] - 2022-02-09 ## [v3.2.0-SNAPSHOT] - 2022-02-09
- [#24166] Implemented the Update facility - Implemented the Update facility [#24166]
- [#24244] Integrated with the geoportal-data-mapper library - Integrated with the geoportal-data-mapper library [#24244]
- [#25015] Integrated the Geoportal Data-Viewer Widget - Integrated the Geoportal Data-Viewer Widget [#25015]
- Passed to Geoportal_Resolver service [#25031]
## [v3.1.0] - 2023-03-06 ## [v3.1.0] - 2023-03-06

View File

@ -20,7 +20,11 @@ The GeoPortal Data Entry App is an application to build the web forms for data e
## Documentation ## Documentation
N/A D4GNA Use Case - 3 Phase Lifecycle
<img src="https://gcube.wiki.gcube-system.org/images_gcube/4/46/D4GNA_Workflow_Phases_and_Operations.png" style="max-width:800px;" alt="GeoPortal Data-Entry - Workflow & Phases & Operations" />
Geoportal Service Documentation is available at [gCube CMS Suite]([ISTI-CNR Infrascience Group](http://nemis.isti.cnr.it/groups/infrascience)
## Change log ## Change log

View File

@ -854,12 +854,11 @@ public class GeoportalDataEntryServiceImpl extends RemoteServiceServlet implemen
public GeoportalItemReferences getLinksFor(String itemId, String profileID) throws Exception { public GeoportalItemReferences getLinksFor(String itemId, String profileID) throws Exception {
LOG.info("getLinksFor called"); LOG.info("getLinksFor called");
SessionUtil.getCurrentContext(this.getThreadLocalRequest(), true); String scope = SessionUtil.getCurrentContext(this.getThreadLocalRequest(), true);
GNADataViewerConfigProfile grViewerProfile = SessionUtil //GNADataViewerConfigProfile grViewerProfile = SessionUtil.getGeportalViewerResourceProfile(getThreadLocalRequest());
.getGeportalViewerResourceProfile(getThreadLocalRequest()); GeoportalCommon gc = new GeoportalCommon();
GeoportalCommon gc = new GeoportalCommon(grViewerProfile);
GeoportalItemReferences item = new GeoportalItemReferences(itemId, profileID); GeoportalItemReferences item = new GeoportalItemReferences(itemId, profileID);
item = gc.getPublicLinksFor(item, true); item = gc.getPublicLinksFor(scope, item, true);
LOG.info("Returning: " + item); LOG.info("Returning: " + item);
return item; return item;
} }

View File

@ -43,7 +43,7 @@ public class SessionUtil {
private static final String GNA_DATAENTRY_CONFIG_PROFILE = "GNA_DATAENTRY_CONFIG_PROFILE"; private static final String GNA_DATAENTRY_CONFIG_PROFILE = "GNA_DATAENTRY_CONFIG_PROFILE";
private static final String LATEST_RESULT_SET_SORTED = "LATEST_RESULT_SET_SORTED"; private static final String LATEST_RESULT_SET_SORTED = "LATEST_RESULT_SET_SORTED";
private static final String GEONA_DATAVIEWER_PROFILE = "GEONA_DATAVIEWER_PROFILE"; //private static final String GEONA_DATAVIEWER_PROFILE = "GEONA_DATAVIEWER_PROFILE";
private static final String LIST_OF_CONCESSIONI = "LIST_OF_CONCESSIONI"; private static final String LIST_OF_CONCESSIONI = "LIST_OF_CONCESSIONI";
private static final String LIST_OF_RELATIONSHIP_DEFINITION = "LIST_OF_RELATIONSHIP_DEFINITION"; private static final String LIST_OF_RELATIONSHIP_DEFINITION = "LIST_OF_RELATIONSHIP_DEFINITION";
@ -232,28 +232,28 @@ public class SessionUtil {
return listOfConcessioni; return listOfConcessioni;
} }
/** // /**
* Gets the geportal viewer resource profile. // * Gets the geportal viewer resource profile.
* // *
* @param httpServletRequest the http servlet request // * @param httpServletRequest the http servlet request
* @return the geportal viewer resource profile // * @return the geportal viewer resource profile
* @throws Exception the exception // * @throws Exception the exception
*/ // */
public static GNADataViewerConfigProfile getGeportalViewerResourceProfile(HttpServletRequest httpServletRequest) // public static GNADataViewerConfigProfile getGeportalViewerResourceProfile(HttpServletRequest httpServletRequest)
throws Exception { // throws Exception {
HttpSession session = httpServletRequest.getSession(); // HttpSession session = httpServletRequest.getSession();
GNADataViewerConfigProfile geoNaDataViewerProfile = (GNADataViewerConfigProfile) session // GNADataViewerConfigProfile geoNaDataViewerProfile = (GNADataViewerConfigProfile) session
.getAttribute(GEONA_DATAVIEWER_PROFILE); // .getAttribute(GEONA_DATAVIEWER_PROFILE);
//
if (geoNaDataViewerProfile == null) { // if (geoNaDataViewerProfile == null) {
GeoportalCommon gc = new GeoportalCommon(); // GeoportalCommon gc = new GeoportalCommon();
geoNaDataViewerProfile = gc.readGNADataViewerConfig(null); // geoNaDataViewerProfile = gc.readGNADataViewerConfig(null);
session.setAttribute(GEONA_DATAVIEWER_PROFILE, geoNaDataViewerProfile); // session.setAttribute(GEONA_DATAVIEWER_PROFILE, geoNaDataViewerProfile);
} // }
//
return geoNaDataViewerProfile; // return geoNaDataViewerProfile;
//
} // }
/** /**
* Gets the latest result set sorted. * Gets the latest result set sorted.