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

@ -1,5 +1,6 @@
<?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">
@ -104,7 +105,8 @@
<wb-module deploy-name="geoportal-data-entry-app-3.2.0-SNAPSHOT"> <wb-module deploy-name="geoportal-data-entry-app-3.2.0-SNAPSHOT">
@ -209,7 +211,8 @@
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/> <wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
@ -314,7 +317,8 @@
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/> <wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
@ -419,7 +423,8 @@
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
@ -485,10 +490,8 @@
<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>
@ -593,7 +596,8 @@
<property name="context-root" value="geoportal-data-entry-app"/> <property name="context-root" value="geoportal-data-entry-app"/>
@ -698,7 +702,8 @@
<property name="java-output-path" value="/geoportal-data-entry-app/target/geoportal-data-entry-app-2.0.0-SNAPSHOT/WEB-INF/classes"/> <property name="java-output-path" value="/geoportal-data-entry-app/target/geoportal-data-entry-app-2.0.0-SNAPSHOT/WEB-INF/classes"/>
@ -803,7 +808,8 @@
</wb-module> </wb-module>

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.