org.exoplatform.forum.service
Class ForumServiceUtils

java.lang.Object
  extended by org.exoplatform.forum.service.ForumServiceUtils

public class ForumServiceUtils
extends java.lang.Object

Created by The eXo Platform SAS Author : Vu Duy Tu tu.duy@exoplatform.com


Constructor Summary
ForumServiceUtils()
           
 
Method Summary
static java.util.List<java.lang.String> getAllGroupAndMembershipOfUser(java.lang.String userId)
           
static org.exoplatform.services.jcr.ext.common.SessionProvider getSessionProvider()
           
static java.util.List<java.lang.String> getUserPermission(java.lang.String[] userGroupMembership)
          Find usernames matching user, group or membership expressions
static boolean hasPermission(java.lang.String[] userGroupMembership, java.lang.String userId)
          Verify if a user match user, group, membership expressions
static void reparePermissions(javax.jcr.Node node, java.lang.String owner)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ForumServiceUtils

public ForumServiceUtils()
Method Detail

hasPermission

public static boolean hasPermission(java.lang.String[] userGroupMembership,
                                    java.lang.String userId)
                             throws java.lang.Exception
Verify if a user match user, group, membership expressions

Parameters:
userGroupMembership - ist that may contain usernames or group names or membership expressions in the form MEMBERSHIPTYPE:GROUP
userId - username to match against the expressions
Returns:
true if the user match at least one of the expressions
Throws:
java.lang.Exception

getUserPermission

public static java.util.List<java.lang.String> getUserPermission(java.lang.String[] userGroupMembership)
                                                          throws java.lang.Exception
Find usernames matching user, group or membership expressions

Parameters:
userGroupMembership - list that may contain usernames or group names or membership expressions in the form MEMBERSHIPTYPE:GROUP
Returns:
list of users that mach at least one of the userGroupMembership
Throws:
java.lang.Exception

getAllGroupAndMembershipOfUser

public static java.util.List<java.lang.String> getAllGroupAndMembershipOfUser(java.lang.String userId)
                                                                       throws java.lang.Exception
Throws:
java.lang.Exception

reparePermissions

public static void reparePermissions(javax.jcr.Node node,
                                     java.lang.String owner)
                              throws java.lang.Exception
Throws:
java.lang.Exception

getSessionProvider

public static org.exoplatform.services.jcr.ext.common.SessionProvider getSessionProvider()


Copyright © 2011 eXo Platform SAS. All Rights Reserved.