updated description, removed HL
This commit is contained in:
parent
8242bcb97f
commit
1c50a32e1a
|
@ -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
|
||||
|
||||
* The source code is present in the src folder.
|
||||
|
|
21
pom.xml
21
pom.xml
|
@ -1,5 +1,6 @@
|
|||
<?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">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -73,6 +74,10 @@
|
|||
<artifactId>custom-portal-handler</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.common</groupId>
|
||||
<artifactId>storagehub-client-library</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.portal</groupId>
|
||||
<artifactId>notifications-common-library</artifactId>
|
||||
|
@ -83,16 +88,6 @@
|
|||
<artifactId>aslsocial</artifactId>
|
||||
<scope>provided</scope>
|
||||
</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>
|
||||
<groupId>org.gcube.portal</groupId>
|
||||
<artifactId>social-networking-library</artifactId>
|
||||
|
@ -195,7 +190,7 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<executions>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>compile</phase>
|
||||
<goals>
|
||||
|
@ -211,7 +206,7 @@
|
|||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>${maven.compiler.source}</source>
|
||||
<source>${maven.compiler.source}</source>
|
||||
<target>${maven.compiler.target}</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
|
|
@ -10,11 +10,11 @@ import org.gcube.applicationsupportlayer.social.ApplicationNotificationsManager;
|
|||
import org.gcube.applicationsupportlayer.social.NotificationsManager;
|
||||
import org.gcube.applicationsupportlayer.social.shared.SocialNetworkingSite;
|
||||
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.scope.impl.ScopeBean;
|
||||
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.notifications.bean.GenericItemBean;
|
||||
import org.gcube.portal.notifications.thread.MessageNotificationsThread;
|
||||
|
@ -220,8 +220,8 @@ public class ManageUsersServiceImpl extends RemoteServiceServlet implements Mana
|
|||
PortalContext pContext = PortalContext.getConfiguration();
|
||||
String scope = pContext.getCurrentScope(getThreadLocalRequest());
|
||||
GCubeUser currentUser = pContext.getCurrentUser(getThreadLocalRequest());
|
||||
Workspace workspace = HomeLibrary.getUserWorkspace(currentUser.getUsername());
|
||||
|
||||
|
||||
MessageManagerClient client = AbstractPlugin.messages().build();
|
||||
|
||||
List<String> recipientIds = new ArrayList<String>();
|
||||
recipientIds.add(addressee.getId());
|
||||
|
@ -236,7 +236,8 @@ public class ManageUsersServiceImpl extends RemoteServiceServlet implements Mana
|
|||
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";
|
||||
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());
|
||||
NotificationsManager nm = new ApplicationNotificationsManager(new SocialNetworkingSite(getThreadLocalRequest()), scope, new SocialNetworkingUser(
|
||||
|
|
Loading…
Reference in New Issue