updated description, removed HL

This commit is contained in:
Massimiliano Assante 2021-10-27 16:17:32 +02:00
parent 8242bcb97f
commit 1c50a32e1a
3 changed files with 16 additions and 20 deletions

View File

@ -1,6 +1,6 @@
# gCube System - VRE Apps Integration Portlet # gCube System - Register VRE Users Portlet
This component is a Liferay 6.2.6 CE Porlet which iinteracts with the VRE Modeler service during new VRE Creations This component is a Liferay 6.2.6 CE Porlet which allow to select a user from the portal and the user to the VRE.
## Structure of the project ## Structure of the project
* The source code is present in the src folder. * The source code is present in the src folder.

21
pom.xml
View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
@ -73,6 +74,10 @@
<artifactId>custom-portal-handler</artifactId> <artifactId>custom-portal-handler</artifactId>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>org.gcube.common</groupId>
<artifactId>storagehub-client-library</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.gcube.portal</groupId> <groupId>org.gcube.portal</groupId>
<artifactId>notifications-common-library</artifactId> <artifactId>notifications-common-library</artifactId>
@ -83,16 +88,6 @@
<artifactId>aslsocial</artifactId> <artifactId>aslsocial</artifactId>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>org.gcube.common</groupId>
<artifactId>home-library-jcr</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.common</groupId>
<artifactId>home-library</artifactId>
<scope>provided</scope>
</dependency>
<dependency> <dependency>
<groupId>org.gcube.portal</groupId> <groupId>org.gcube.portal</groupId>
<artifactId>social-networking-library</artifactId> <artifactId>social-networking-library</artifactId>
@ -195,7 +190,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId> <artifactId>maven-war-plugin</artifactId>
<executions> <executions>
<execution> <execution>
<phase>compile</phase> <phase>compile</phase>
<goals> <goals>
@ -211,7 +206,7 @@
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<configuration> <configuration>
<source>${maven.compiler.source}</source> <source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target> <target>${maven.compiler.target}</target>
</configuration> </configuration>
</plugin> </plugin>

View File

@ -10,11 +10,11 @@ import org.gcube.applicationsupportlayer.social.ApplicationNotificationsManager;
import org.gcube.applicationsupportlayer.social.NotificationsManager; import org.gcube.applicationsupportlayer.social.NotificationsManager;
import org.gcube.applicationsupportlayer.social.shared.SocialNetworkingSite; import org.gcube.applicationsupportlayer.social.shared.SocialNetworkingSite;
import org.gcube.applicationsupportlayer.social.shared.SocialNetworkingUser; import org.gcube.applicationsupportlayer.social.shared.SocialNetworkingUser;
import org.gcube.common.homelibrary.home.HomeLibrary;
import org.gcube.common.homelibrary.home.workspace.Workspace;
import org.gcube.common.portal.PortalContext; import org.gcube.common.portal.PortalContext;
import org.gcube.common.scope.impl.ScopeBean; import org.gcube.common.scope.impl.ScopeBean;
import org.gcube.common.scope.impl.ScopeBean.Type; import org.gcube.common.scope.impl.ScopeBean.Type;
import org.gcube.common.storagehub.client.plugins.AbstractPlugin;
import org.gcube.common.storagehub.client.proxies.MessageManagerClient;
import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper; import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper;
import org.gcube.portal.notifications.bean.GenericItemBean; import org.gcube.portal.notifications.bean.GenericItemBean;
import org.gcube.portal.notifications.thread.MessageNotificationsThread; import org.gcube.portal.notifications.thread.MessageNotificationsThread;
@ -220,8 +220,8 @@ public class ManageUsersServiceImpl extends RemoteServiceServlet implements Mana
PortalContext pContext = PortalContext.getConfiguration(); PortalContext pContext = PortalContext.getConfiguration();
String scope = pContext.getCurrentScope(getThreadLocalRequest()); String scope = pContext.getCurrentScope(getThreadLocalRequest());
GCubeUser currentUser = pContext.getCurrentUser(getThreadLocalRequest()); GCubeUser currentUser = pContext.getCurrentUser(getThreadLocalRequest());
Workspace workspace = HomeLibrary.getUserWorkspace(currentUser.getUsername());
MessageManagerClient client = AbstractPlugin.messages().build();
List<String> recipientIds = new ArrayList<String>(); List<String> recipientIds = new ArrayList<String>();
recipientIds.add(addressee.getId()); recipientIds.add(addressee.getId());
@ -236,7 +236,8 @@ public class ManageUsersServiceImpl extends RemoteServiceServlet implements Mana
String subject = "Registration to VRE notification"; String subject = "Registration to VRE notification";
String body = "Dear "+addressee.getName()+", \n\n I just registered you to the VRE " + pContext.getCurrentGroupName(getThreadLocalRequest())+" on the " + gatewayName + ". \n\n"; String body = "Dear "+addressee.getName()+", \n\n I just registered you to the VRE " + pContext.getCurrentGroupName(getThreadLocalRequest())+" on the " + gatewayName + ". \n\n";
body += "Please, click here to access the VRE: " + vreURL; body += "Please, click here to access the VRE: " + vreURL;
String messageId = workspace.getWorkspaceMessageManager().sendMessageToPortalLogins(subject, body, new ArrayList<String>(), recipientIds); String messageId = client.sendMessage(recipientIds, subject, body, new ArrayList<String>());
_log.debug("Sending message notification to: " + recipientIds.toString()); _log.debug("Sending message notification to: " + recipientIds.toString());
NotificationsManager nm = new ApplicationNotificationsManager(new SocialNetworkingSite(getThreadLocalRequest()), scope, new SocialNetworkingUser( NotificationsManager nm = new ApplicationNotificationsManager(new SocialNetworkingSite(getThreadLocalRequest()), scope, new SocialNetworkingUser(