org.exoplatform.forum.common
Class UserHelper

java.lang.Object
  extended by org.exoplatform.forum.common.UserHelper

public class UserHelper
extends Object

Version:
$Revision$
Author:
Patrice Lamarque

Constructor Summary
UserHelper()
           
 
Method Summary
static String checkValueUser(String values)
           
static List<org.exoplatform.services.organization.Group> findGroups(org.exoplatform.services.organization.Group group)
           
static Collection findMembershipsByUser(String userId)
           
static List<org.exoplatform.services.organization.Group> getAllGroup()
           
static List<String> getAllGroupAndMembershipOfUser(String userId)
           
static List<String> getAllGroupId()
           
static String getCurrentUser()
           
static String getEmailUser(String userName)
           
static org.exoplatform.services.organization.OrganizationService getOrganizationService()
           
static org.exoplatform.commons.utils.PageList getPageListUser()
           
static org.exoplatform.services.organization.User getUserByUserId(String userId)
           
static String[] getUserGroups()
           
static org.exoplatform.commons.utils.PageList getUserPageListByGroupId(String groupId)
           
static boolean hasGroupIdAndMembershipId(String str)
           
static boolean hasUserInGroup(String groupId, String userId)
           
static boolean isAnonim()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserHelper

public UserHelper()
Method Detail

getOrganizationService

public static org.exoplatform.services.organization.OrganizationService getOrganizationService()

getAllGroup

public static List<org.exoplatform.services.organization.Group> getAllGroup()
                                                                     throws Exception
Throws:
Exception

checkValueUser

public static String checkValueUser(String values)
                             throws Exception
Throws:
Exception

hasGroupIdAndMembershipId

public static boolean hasGroupIdAndMembershipId(String str)
                                         throws Exception
Throws:
Exception

hasUserInGroup

public static boolean hasUserInGroup(String groupId,
                                     String userId)
                              throws Exception
Throws:
Exception

getUserPageListByGroupId

public static org.exoplatform.commons.utils.PageList getUserPageListByGroupId(String groupId)
                                                                       throws Exception
Throws:
Exception

getUserByUserId

public static org.exoplatform.services.organization.User getUserByUserId(String userId)
                                                                  throws Exception
Throws:
Exception

getUserGroups

public static String[] getUserGroups()
                              throws Exception
Throws:
Exception

getAllGroupId

public static List<String> getAllGroupId()
                                  throws Exception
Throws:
Exception

findGroups

public static List<org.exoplatform.services.organization.Group> findGroups(org.exoplatform.services.organization.Group group)
                                                                    throws Exception
Throws:
Exception

getPageListUser

public static org.exoplatform.commons.utils.PageList getPageListUser()
                                                              throws Exception
Throws:
Exception

isAnonim

public static boolean isAnonim()

findMembershipsByUser

public static Collection findMembershipsByUser(String userId)

getAllGroupAndMembershipOfUser

public static List<String> getAllGroupAndMembershipOfUser(String userId)
Parameters:
userId - username
Returns:
list of groups an user belong, and memberships of the user in each group. If userId is null, groups and memberships of the current user will be returned.
Throws:
Exception

getEmailUser

public static String getEmailUser(String userName)
                           throws Exception
Throws:
Exception

getCurrentUser

public static String getCurrentUser()


Copyright © 2013 eXo Platform SAS. All Rights Reserved.