multiple trials to get app profile
This commit is contained in:
parent
2495cc56ff
commit
59e74ddd3a
|
@ -4,6 +4,9 @@
|
|||
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
|
||||
|
||||
- Bug 27457: get application profile multiple times before settling on sitelandingpath
|
||||
|
||||
## [v1.8.0] - 2022-05-05
|
||||
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -11,7 +11,7 @@
|
|||
|
||||
<groupId>org.gcube.applicationsupportlayer</groupId>
|
||||
<artifactId>aslsocial</artifactId>
|
||||
<version>1.8.0</version>
|
||||
<version>1.8.1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>Social Portal ASL Extension</name>
|
||||
<description>
|
||||
|
|
|
@ -42,6 +42,8 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen
|
|||
public static final String USER_MESSAGES_FRIENDLY_URL = "/messages";
|
||||
public static final String USER_NOTIFICATION_FRIENDLY_URL = "/notifications";
|
||||
|
||||
private final int MAX_TRIAL = 10;
|
||||
|
||||
private String portalName;
|
||||
private String senderEmail;
|
||||
private String portalURL;
|
||||
|
@ -204,14 +206,16 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen
|
|||
* @return .
|
||||
*/
|
||||
private String getApplicationUrl() {
|
||||
if (applicationProfile != null && applicationProfile.getUrl() != null) {
|
||||
_log.trace("getApplicationUrl="+applicationProfile.getUrl());
|
||||
return applicationProfile.getUrl();
|
||||
}
|
||||
else {
|
||||
_log.warn("applicationProfile NULL or url is empty returning " + siteLandingPagePath);
|
||||
return siteLandingPagePath;
|
||||
int count = 0;
|
||||
while (count < MAX_TRIAL){
|
||||
if (applicationProfile != null && applicationProfile.getUrl() != null) {
|
||||
_log.trace("getApplicationUrl="+applicationProfile.getUrl());
|
||||
return applicationProfile.getUrl();
|
||||
}
|
||||
count++;
|
||||
}
|
||||
_log.warn("applicationProfile NULL or url is empty returning " + siteLandingPagePath);
|
||||
return siteLandingPagePath;
|
||||
}
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
|
|
Loading…
Reference in New Issue