diff --git a/CHANGELOG.md b/CHANGELOG.md index ea1ba62..5e94128 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ 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.1-SNAPSHOT] - 2023-05-14 +## [v1.8.1] - 2023-05-14 - Bug 27457: get application profile multiple times before settling on sitelandingpath diff --git a/pom.xml b/pom.xml index 439cfe7..38b08b4 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ org.gcube.applicationsupportlayer aslsocial - 1.8.1-SNAPSHOT + 1.8.1 jar Social Portal ASL Extension diff --git a/src/main/java/org/gcube/applicationsupportlayer/social/ApplicationNotificationsManager.java b/src/main/java/org/gcube/applicationsupportlayer/social/ApplicationNotificationsManager.java index 9d9e9a5..0bef7ad 100644 --- a/src/main/java/org/gcube/applicationsupportlayer/social/ApplicationNotificationsManager.java +++ b/src/main/java/org/gcube/applicationsupportlayer/social/ApplicationNotificationsManager.java @@ -212,6 +212,8 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen _log.trace("getApplicationUrl="+applicationProfile.getUrl()); return applicationProfile.getUrl(); } + if (applicationProfile != null && applicationProfile.getKey() != null) + applicationProfile = getProfileFromInfrastrucure(applicationProfile.getKey()); count++; } _log.warn("applicationProfile NULL or url is empty returning " + siteLandingPagePath); diff --git a/src/main/java/org/gcube/applicationsupportlayer/social/SocialPortalBridge.java b/src/main/java/org/gcube/applicationsupportlayer/social/SocialPortalBridge.java index 492e5eb..1271b41 100644 --- a/src/main/java/org/gcube/applicationsupportlayer/social/SocialPortalBridge.java +++ b/src/main/java/org/gcube/applicationsupportlayer/social/SocialPortalBridge.java @@ -39,6 +39,8 @@ public class SocialPortalBridge { protected ApplicationProfile applicationProfile; //unique instance private static DatabookStore store; + + private String portletClassName; /** * * @param scope the current scope @@ -60,6 +62,7 @@ public class SocialPortalBridge { public SocialPortalBridge(String scope, SocialNetworkingUser currUser, String portletClassName) { this(scope, currUser); this.applicationProfile = getProfileFromInfrastrucure(portletClassName); + this.portletClassName = portletClassName; _log.debug("ASLSocial called on " + portletClassName); } @@ -98,7 +101,7 @@ public class SocialPortalBridge { * @param portletClassName your servlet class name will be used ad unique identifier for your applicationProfile * @return the applicationProfile profile */ - private ApplicationProfile getProfileFromInfrastrucure(String portletClassName) { + protected ApplicationProfile getProfileFromInfrastrucure(String portletClassName) { ScopeBean scope = new ScopeBean(currScope); _log.debug("Trying to fetch applicationProfile profile from the infrastructure for " + portletClassName + " scope: " + scope); try {