refactored to be compliant with the notifications common library

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portal/liferay62-plugins/landing-page-library@141834 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2017-01-26 16:34:50 +00:00
parent f44a79de76
commit 65fa07c99a
4 changed files with 13 additions and 4 deletions

View File

@ -16,12 +16,12 @@
</arguments> </arguments>
</buildCommand> </buildCommand>
<buildCommand> <buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name> <name>org.eclipse.wst.validation.validationbuilder</name>
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>
<buildCommand> <buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name> <name>org.eclipse.m2e.core.maven2Builder</name>
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>

View File

@ -0,0 +1,2 @@
disabled=06target
eclipse.preferences.version=1

View File

@ -9,7 +9,7 @@
</parent> </parent>
<groupId>org.gcube.portal</groupId> <groupId>org.gcube.portal</groupId>
<artifactId>landing-page-library</artifactId> <artifactId>landing-page-library</artifactId>
<version>1.0.0-SNAPSHOT</version> <version>1.1.0-SNAPSHOT</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>landing-page-library</name> <name>landing-page-library</name>
@ -30,6 +30,11 @@
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
<dependencies> <dependencies>
<dependency>
<groupId>org.gcube.dvos</groupId>
<artifactId>usermanagement-core</artifactId>
<scope>provided</scope>
</dependency>
<dependency> <dependency>
<groupId>org.gcube.common.portal</groupId> <groupId>org.gcube.common.portal</groupId>
<artifactId>portal-manager</artifactId> <artifactId>portal-manager</artifactId>

View File

@ -7,6 +7,8 @@ import javax.servlet.http.HttpServletRequest;
import org.gcube.common.portal.PortalContext; import org.gcube.common.portal.PortalContext;
import org.gcube.portal.notifications.thread.NewUserSiteRegistrationNotificationThread; import org.gcube.portal.notifications.thread.NewUserSiteRegistrationNotificationThread;
import org.gcube.vomanagement.usermanagement.impl.LiferayRoleManager;
import org.gcube.vomanagement.usermanagement.impl.LiferayUserManager;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -98,7 +100,7 @@ public class LandingPageManager {
private static void registerUserToSite(User user, Group site, String siteURL) throws SystemException { private static void registerUserToSite(User user, Group site, String siteURL) throws SystemException {
UserLocalServiceUtil.addGroupUser(site.getGroupId(), user.getUserId()); UserLocalServiceUtil.addGroupUser(site.getGroupId(), user.getUserId());
_log.debug("User " + user.getScreenName() +" registered to " + site.getName()); _log.debug("User " + user.getScreenName() +" registered to " + site.getName());
Thread emailSiteManagersThread = new Thread(new NewUserSiteRegistrationNotificationThread(user, site, siteURL)); Thread emailSiteManagersThread = new Thread(new NewUserSiteRegistrationNotificationThread(new LiferayUserManager(), new LiferayRoleManager() ,user, site, siteURL));
emailSiteManagersThread.start(); emailSiteManagersThread.start();
} }