diff --git a/.classpath b/.classpath
index e33fe09..02eafb5 100644
--- a/.classpath
+++ b/.classpath
@@ -1,6 +1,6 @@
-
+
@@ -31,5 +31,5 @@
-
+
diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component
index 7f8bd6a..4f15ac2 100644
--- a/.settings/org.eclipse.wst.common.component
+++ b/.settings/org.eclipse.wst.common.component
@@ -5,7 +5,7 @@
-
+
uses
diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml
index b3a52d7..3b9d922 100644
--- a/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ b/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -1,8 +1,8 @@
-
+
-
+
diff --git a/distro/INSTALL b/distro/INSTALL
deleted file mode 100644
index 139597f..0000000
--- a/distro/INSTALL
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/distro/LICENSE b/distro/LICENSE
index cdb5851..2d9616a 100644
--- a/distro/LICENSE
+++ b/distro/LICENSE
@@ -1,7 +1 @@
-gCube System - License
-------------------------------------------------------------
-
-The gCube/gCore software is licensed as Free Open Source software conveying to the EUPL (http://ec.europa.eu/idabc/eupl).
-The software and documentation is provided by its authors/distributors "as is" and no expressed or
-implied warranty is given for its use, quality or fitness for a particular case.
-
+${gcube.license}
\ No newline at end of file
diff --git a/distro/MAINTAINERS b/distro/MAINTAINERS
deleted file mode 100644
index 680cebb..0000000
--- a/distro/MAINTAINERS
+++ /dev/null
@@ -1,6 +0,0 @@
-Mantainers
--------
-
-* Massimiliano Assante (massimiliano.assante@isti.cnr.it), CNR Pisa,
- Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo".
-
diff --git a/distro/README b/distro/README
index 69447ac..70cc12c 100644
--- a/distro/README
+++ b/distro/README
@@ -1,35 +1,45 @@
-The gCube System - Social Library
+The gCube System
------------------------------------------------------------
-This work is partially funded by the European Commission in the
-context of the iMarine project (www.i-marine.eu), under the 1st call of FP7 IST priority.
+${gcube.description}
+
+${gcube.funding}
+
+
+Version
+--------------------------------------------------
+${version} (${buildDate})
+
+Please see the file named "changelog.xml" in this directory for the release notes.
+
Authors
-------
-Massimiliano Assante
-*
-Version and Release Date
-------------------------
-Jan 2013
+
+
+Massimiliano Assante (massimiliano.assante-AT-isti.cnr.it), Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo" - CNR, Pisa (Italy).
-Description
+Maintainers
-----------
-Social networking Library
-
-Download information
---------------------
-Source code is available from SVN:
-https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/notifications
-
-Binaries can be downloaded from:
-http://software.d4science.research-infrastructures.eu/
-
-Documentation
+
+Massimiliano Assante (massimiliano.assante-AT-isti.cnr.it), Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo" - CNR, Pisa (Italy).
+
+
+Documentation
-------------
-Documentation is available on-line from the Projects Documentation Wiki:
+Documentation is available on - line from the Projects Documentation wiki:
+
+ {gcube.wikiRoot}/gcube/index.php/UserManagement_Core
+
+
+Support
+--------------------------------------------------
+Bugs and support requests can be reported in the gCube issue tracking tool:
+ ${gcube.issueTracking}
+
+
Licensing
----------
-
-This software is licensed under the terms you may find in the file named "LICENSE" in this directory.
+--------------------------------------------------
+This software is licensed under the terms you may find in the file named "LICENSE" in this directory.
diff --git a/distro/svnpath.txt b/distro/svnpath.txt
deleted file mode 100644
index edacb04..0000000
--- a/distro/svnpath.txt
+++ /dev/null
@@ -1 +0,0 @@
-${scm.url}
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 74843ab..aa8a7d2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -12,7 +12,7 @@
org.gcube.portlets.admin
register-vre-users
war
- 1.4.2-SNAPSHOT
+ 2.0.0-SNAPSHOT
Register VRE Users
Rigister VRE Users Portlet allow to select a user from the portal and add her to the VRE.
@@ -29,7 +29,7 @@
1.7
1.7
${project.build.directory}/${project.build.finalName}
-
+ 6.2.5
UTF-8
UTF-8
@@ -57,6 +57,12 @@
${gwtVersion}
provided
+
+ com.google.gwt
+ gwt-dev
+ provided
+ ${gwtVersion}
+
org.gcube.applicationsupportlayer
aslcore
@@ -70,6 +76,7 @@
org.gcube.portal
custom-portal-handler
+ [2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)
provided
@@ -132,10 +139,30 @@
org.gcube.dvos
usermanagement-core
provided
+ [2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)
+
+
+ com.liferay.portal
+ portal-service
+ ${liferay.version}
+ provided
com.liferay.portal
- portal-service
+ util-bridges
+ ${liferay.version}
+ provided
+
+
+ com.liferay.portal
+ util-taglib
+ ${liferay.version}
+ provided
+
+
+ com.liferay.portal
+ util-java
+ ${liferay.version}
provided
diff --git a/src/main/java/org/gcube/portlets/admin/manageusers/server/ManageUsersServiceImpl.java b/src/main/java/org/gcube/portlets/admin/manageusers/server/ManageUsersServiceImpl.java
index f8d4f72..e1aaf72 100644
--- a/src/main/java/org/gcube/portlets/admin/manageusers/server/ManageUsersServiceImpl.java
+++ b/src/main/java/org/gcube/portlets/admin/manageusers/server/ManageUsersServiceImpl.java
@@ -11,7 +11,7 @@ import org.gcube.common.homelibrary.home.HomeLibrary;
import org.gcube.common.homelibrary.home.workspace.Workspace;
import org.gcube.common.scope.impl.ScopeBean;
import org.gcube.common.scope.impl.ScopeBean.Type;
-import org.gcube.portal.custom.communitymanager.OrganizationsUtil;
+import org.gcube.portal.custom.communitymanager.SiteManagerUtil;
import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper;
import org.gcube.portal.notifications.bean.GenericItemBean;
import org.gcube.portal.notifications.thread.MessageNotificationsThread;
@@ -21,9 +21,9 @@ import org.gcube.vomanagement.usermanagement.GroupManager;
import org.gcube.vomanagement.usermanagement.UserManager;
import org.gcube.vomanagement.usermanagement.exception.GroupRetrievalFault;
import org.gcube.vomanagement.usermanagement.exception.UserManagementSystemException;
-import org.gcube.vomanagement.usermanagement.impl.liferay.LiferayGroupManager;
-import org.gcube.vomanagement.usermanagement.impl.liferay.LiferayUserManager;
-import org.gcube.vomanagement.usermanagement.model.UserModel;
+import org.gcube.vomanagement.usermanagement.impl.LiferayGroupManager;
+import org.gcube.vomanagement.usermanagement.impl.LiferayUserManager;
+import org.gcube.vomanagement.usermanagement.model.GCubeUser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -103,23 +103,23 @@ public class ManageUsersServiceImpl extends RemoteServiceServlet implements Man
public ArrayList getNonBelongingUsersForVRE() {
try {
- long companyId = OrganizationsUtil.getCompany().getCompanyId();
+ long companyId = SiteManagerUtil.getCompany().getCompanyId();
_log.trace("Setting Thread Permission");
User user = UserLocalServiceUtil.getUserByScreenName(companyId, ScopeHelper.getAdministratorUsername());
- PermissionChecker permissionChecker = PermissionCheckerFactoryUtil.create(user, false);
+ PermissionChecker permissionChecker = PermissionCheckerFactoryUtil.create(user);
PermissionThreadLocal.setPermissionChecker(permissionChecker);
_log.trace("Setting Permission ok!");
ArrayList unregisteredUsers = new ArrayList();
- List notBelongingUsers = userM.listUnregisteredUsersByGroup(getCurrentGroupID());
- for (UserModel u : notBelongingUsers) {
+ List notBelongingUsers = userM.listUnregisteredUsersByGroup(getCurrentGroupID());
+ for (GCubeUser u : notBelongingUsers) {
String id = u.getScreenName();
user = UserLocalServiceUtil.getUserByScreenName(companyId, id);
String position = (user.getExpandoBridge().getAttribute(POSITION) != null) ? user.getExpandoBridge().getAttribute(POSITION).toString() : "";
String labs = (user.getExpandoBridge().getAttribute(LABS) != null) ? user.getExpandoBridge().getAttribute(LABS).toString() : "";
- if ((u.getLastname() != null && u.getLastname().compareTo("") != 0)) {
- String firstLetter = u.getLastname().substring(0,1);
+ if ((u.getLastName() != null && u.getLastName().compareTo("") != 0)) {
+ String firstLetter = u.getLastName().substring(0,1);
String scope = getASLSession().getScope();
ScopeBean validator = new ScopeBean(scope);
String email = u.getEmail();
@@ -127,7 +127,7 @@ public class ManageUsersServiceImpl extends RemoteServiceServlet implements Man
if (validator.is(Type.VRE)) {
email = "********@"+ email.split("@")[1];
}
- PortalUserDTO myUser = new PortalUserDTO(username, firstLetter, u.getFirstname(), u.getLastname(), email, position, labs);
+ PortalUserDTO myUser = new PortalUserDTO(username, firstLetter, u.getFirstName(), u.getLastName(), email, position, labs);
unregisteredUsers.add(myUser);
}
}
@@ -203,10 +203,10 @@ public class ManageUsersServiceImpl extends RemoteServiceServlet implements Man
* @return the current group ID or null if an exception is thrown
* @throws Exception
*/
- private String getCurrentGroupID() {
+ private long getCurrentGroupID() {
ASLSession session = getASLSession();
_log.debug("The current group NAME is --> " + session.getGroupName());
- String toReturn = null;
+ long toReturn = -1;
try {
toReturn = groupM.getGroupId(session.getGroupName());
} catch (UserManagementSystemException | GroupRetrievalFault e) {
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml
index 08133fe..1b65202 100644
--- a/src/main/webapp/WEB-INF/web.xml
+++ b/src/main/webapp/WEB-INF/web.xml
@@ -1,9 +1,8 @@
-
-
-
+
manageUsersServlet