Compare commits
4 Commits
Feature/23
...
master
Author | SHA1 | Date |
---|---|---|
Massimiliano Assante | 7ee74ebe93 | |
Massimiliano Assante | a857397a24 | |
Ahmed Salah Tawfik Ibrahim | 59e74ddd3a | |
Massimiliano Assante | 2495cc56ff |
|
@ -4,8 +4,13 @@
|
|||
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] - 2023-05-14
|
||||
|
||||
## [v1.8.0-SNAPSHOT] - 2022-05-05
|
||||
- EmailNotificationsConsumer set debug false
|
||||
- Bug 27457: get application profile multiple times before settling on sitelandingpath
|
||||
|
||||
|
||||
## [v1.8.0] - 2022-05-05
|
||||
|
||||
- fixed some notification methods
|
||||
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -11,7 +11,7 @@
|
|||
|
||||
<groupId>org.gcube.applicationsupportlayer</groupId>
|
||||
<artifactId>aslsocial</artifactId>
|
||||
<version>1.8.0-SNAPSHOT</version>
|
||||
<version>1.8.1</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,18 @@ 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();
|
||||
}
|
||||
if (applicationProfile != null && applicationProfile.getKey() != null)
|
||||
applicationProfile = getProfileFromInfrastrucure(applicationProfile.getKey());
|
||||
count++;
|
||||
}
|
||||
_log.warn("applicationProfile NULL or url is empty returning " + siteLandingPagePath);
|
||||
return siteLandingPagePath;
|
||||
}
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -116,7 +116,7 @@ public class EmailNotificationsConsumer extends Thread {
|
|||
session = Session.getDefaultInstance(props);
|
||||
}
|
||||
|
||||
session.setDebug(true);
|
||||
session.setDebug(false);
|
||||
|
||||
for (;;) {
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue