modified to use non indexed version of listUsersByGroup

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/admin/register-vre-users@141430 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2016-12-29 16:10:41 +00:00
parent ec658e588c
commit fd22725f3d
1 changed files with 1 additions and 8 deletions

View File

@ -5,7 +5,6 @@ import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.gcube.applicationsupportlayer.social.ApplicationNotificationsManager;
import org.gcube.applicationsupportlayer.social.NotificationsManager;
import org.gcube.applicationsupportlayer.social.shared.SocialNetworkingSite;
@ -15,16 +14,12 @@ 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.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;
import org.gcube.portlets.admin.manageusers.client.ManageUsersService;
import org.gcube.portlets.admin.manageusers.shared.PortalUserDTO;
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.LiferayGroupManager;
import org.gcube.vomanagement.usermanagement.impl.LiferayUserManager;
import org.gcube.vomanagement.usermanagement.model.GCubeUser;
@ -102,8 +97,6 @@ public class ManageUsersServiceImpl extends RemoteServiceServlet implements Mana
*
* @param request
* @return the current Group instance based on the request
* @throws PortalException
* @throws SystemException
*/
private Group getSiteFromServletRequest(final HttpServletRequest request) throws Exception {
String serverName = request.getServerName();
@ -145,7 +138,7 @@ public class ManageUsersServiceImpl extends RemoteServiceServlet implements Mana
//List<GCubeUser> notBelongingUsers = userM.listUnregisteredUsersByGroup(getCurrentGroupID());
long currSiteGroupId = getSiteFromServletRequest(getThreadLocalRequest()).getGroupId();
UserManager userM = new LiferayUserManager();
List<GCubeUser> nonBelongingUsers = userM.listUsersByGroup(currSiteGroupId); //the users of i-marine or services etc
List<GCubeUser> nonBelongingUsers = userM.listUsersByGroup(currSiteGroupId, false); //the users of i-marine or services etc
nonBelongingUsers.removeAll(userM.listUsersByGroup(pContext.getCurrentGroupId(getThreadLocalRequest())));
for (GCubeUser u : nonBelongingUsers) {