Compare commits

..

No commits in common. "master" and "Feature/23194" have entirely different histories.

5 changed files with 11 additions and 25 deletions

View File

@ -4,13 +4,8 @@
All notable changes to this project will be documented in this file. 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). This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v1.8.1] - 2023-05-14
- EmailNotificationsConsumer set debug false ## [v1.8.0-SNAPSHOT] - 2022-05-05
- Bug 27457: get application profile multiple times before settling on sitelandingpath
## [v1.8.0] - 2022-05-05
- fixed some notification methods - fixed some notification methods

View File

@ -11,7 +11,7 @@
<groupId>org.gcube.applicationsupportlayer</groupId> <groupId>org.gcube.applicationsupportlayer</groupId>
<artifactId>aslsocial</artifactId> <artifactId>aslsocial</artifactId>
<version>1.8.1</version> <version>1.8.0-SNAPSHOT</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>Social Portal ASL Extension</name> <name>Social Portal ASL Extension</name>
<description> <description>

View File

@ -42,8 +42,6 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen
public static final String USER_MESSAGES_FRIENDLY_URL = "/messages"; public static final String USER_MESSAGES_FRIENDLY_URL = "/messages";
public static final String USER_NOTIFICATION_FRIENDLY_URL = "/notifications"; public static final String USER_NOTIFICATION_FRIENDLY_URL = "/notifications";
private final int MAX_TRIAL = 10;
private String portalName; private String portalName;
private String senderEmail; private String senderEmail;
private String portalURL; private String portalURL;
@ -206,19 +204,15 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen
* @return . * @return .
*/ */
private String getApplicationUrl() { private String getApplicationUrl() {
int count = 0;
while (count < MAX_TRIAL){
if (applicationProfile != null && applicationProfile.getUrl() != null) { if (applicationProfile != null && applicationProfile.getUrl() != null) {
_log.trace("getApplicationUrl="+applicationProfile.getUrl()); _log.trace("getApplicationUrl="+applicationProfile.getUrl());
return applicationProfile.getUrl(); return applicationProfile.getUrl();
} }
if (applicationProfile != null && applicationProfile.getKey() != null) else {
applicationProfile = getProfileFromInfrastrucure(applicationProfile.getKey());
count++;
}
_log.warn("applicationProfile NULL or url is empty returning " + siteLandingPagePath); _log.warn("applicationProfile NULL or url is empty returning " + siteLandingPagePath);
return siteLandingPagePath; return siteLandingPagePath;
} }
}
/** /**
* {@inheritDoc} * {@inheritDoc}
* @throws InternalErrorException * @throws InternalErrorException

View File

@ -39,8 +39,6 @@ public class SocialPortalBridge {
protected ApplicationProfile applicationProfile; protected ApplicationProfile applicationProfile;
//unique instance //unique instance
private static DatabookStore store; private static DatabookStore store;
private String portletClassName;
/** /**
* *
* @param scope the current scope * @param scope the current scope
@ -62,7 +60,6 @@ public class SocialPortalBridge {
public SocialPortalBridge(String scope, SocialNetworkingUser currUser, String portletClassName) { public SocialPortalBridge(String scope, SocialNetworkingUser currUser, String portletClassName) {
this(scope, currUser); this(scope, currUser);
this.applicationProfile = getProfileFromInfrastrucure(portletClassName); this.applicationProfile = getProfileFromInfrastrucure(portletClassName);
this.portletClassName = portletClassName;
_log.debug("ASLSocial called on " + portletClassName); _log.debug("ASLSocial called on " + portletClassName);
} }
@ -101,7 +98,7 @@ public class SocialPortalBridge {
* @param portletClassName your servlet class name will be used ad unique identifier for your applicationProfile * @param portletClassName your servlet class name will be used ad unique identifier for your applicationProfile
* @return the applicationProfile profile * @return the applicationProfile profile
*/ */
protected ApplicationProfile getProfileFromInfrastrucure(String portletClassName) { private ApplicationProfile getProfileFromInfrastrucure(String portletClassName) {
ScopeBean scope = new ScopeBean(currScope); ScopeBean scope = new ScopeBean(currScope);
_log.debug("Trying to fetch applicationProfile profile from the infrastructure for " + portletClassName + " scope: " + scope); _log.debug("Trying to fetch applicationProfile profile from the infrastructure for " + portletClassName + " scope: " + scope);
try { try {

View File

@ -116,7 +116,7 @@ public class EmailNotificationsConsumer extends Thread {
session = Session.getDefaultInstance(props); session = Session.getDefaultInstance(props);
} }
session.setDebug(false); session.setDebug(true);
for (;;) { for (;;) {
try { try {