com.liferay.portal.service.http
Class RoleServiceHttp

java.lang.Object
  extended by com.liferay.portal.service.http.RoleServiceHttp

public class RoleServiceHttp
extends java.lang.Object

View Source

ServiceBuilder generated this class. Modifications in this class will be overwritten the next time is generated.

This class provides a HTTP utility for the com.liferay.portal.service.RoleServiceUtil service utility. The static methods of this class calls the same methods of the service utility. However, the signatures are different because it requires an additional com.liferay.portal.security.auth.HttpPrincipal parameter.

The benefits of using the HTTP utility is that it is fast and allows for tunneling without the cost of serializing to text. The drawback is that it only works with Java.

Set the property tunnel.servlet.hosts.allowed in portal.properties to configure security.

The HTTP utility is only generated for remote services.

Author:
Brian Wing Shun Chan
See Also:
HttpPrincipal, RoleServiceUtil, RoleServiceSoap

Constructor Summary
RoleServiceHttp()
           
 
Method Summary
static com.liferay.portal.model.Role addRole(HttpPrincipal httpPrincipal, java.lang.String name, java.lang.String description, int type)
           
static void addUserRoles(HttpPrincipal httpPrincipal, long userId, long[] roleIds)
           
static void deleteRole(HttpPrincipal httpPrincipal, long roleId)
           
static com.liferay.portal.model.Role getGroupRole(HttpPrincipal httpPrincipal, long companyId, long groupId)
           
static java.util.List<com.liferay.portal.model.Role> getGroupRoles(HttpPrincipal httpPrincipal, long groupId)
           
static com.liferay.portal.model.Role getRole(HttpPrincipal httpPrincipal, long roleId)
           
static com.liferay.portal.model.Role getRole(HttpPrincipal httpPrincipal, long companyId, java.lang.String name)
           
static java.util.List<com.liferay.portal.model.Role> getUserGroupRoles(HttpPrincipal httpPrincipal, long userId, long groupId)
           
static java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(HttpPrincipal httpPrincipal, long userId, java.util.List<com.liferay.portal.model.Group> groups)
           
static java.util.List<com.liferay.portal.model.Role> getUserRoles(HttpPrincipal httpPrincipal, long userId)
           
static boolean hasUserRole(HttpPrincipal httpPrincipal, long userId, long companyId, java.lang.String name, boolean inherited)
           
static boolean hasUserRoles(HttpPrincipal httpPrincipal, long userId, long companyId, java.lang.String[] names, boolean inherited)
           
static void unsetUserRoles(HttpPrincipal httpPrincipal, long userId, long[] roleIds)
           
static com.liferay.portal.model.Role updateRole(HttpPrincipal httpPrincipal, long roleId, java.lang.String name, java.util.Map<java.util.Locale,java.lang.String> localeTitlesMap, java.lang.String description, java.lang.String subtype)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoleServiceHttp

public RoleServiceHttp()
Method Detail

addRole

public static com.liferay.portal.model.Role addRole(HttpPrincipal httpPrincipal,
                                                    java.lang.String name,
                                                    java.lang.String description,
                                                    int type)
                                             throws com.liferay.portal.PortalException,
                                                    com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

addUserRoles

public static void addUserRoles(HttpPrincipal httpPrincipal,
                                long userId,
                                long[] roleIds)
                         throws com.liferay.portal.PortalException,
                                com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

deleteRole

public static void deleteRole(HttpPrincipal httpPrincipal,
                              long roleId)
                       throws com.liferay.portal.PortalException,
                              com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getGroupRole

public static com.liferay.portal.model.Role getGroupRole(HttpPrincipal httpPrincipal,
                                                         long companyId,
                                                         long groupId)
                                                  throws com.liferay.portal.PortalException,
                                                         com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getGroupRoles

public static java.util.List<com.liferay.portal.model.Role> getGroupRoles(HttpPrincipal httpPrincipal,
                                                                          long groupId)
                                                                   throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getRole

public static com.liferay.portal.model.Role getRole(HttpPrincipal httpPrincipal,
                                                    long roleId)
                                             throws com.liferay.portal.PortalException,
                                                    com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getRole

public static com.liferay.portal.model.Role getRole(HttpPrincipal httpPrincipal,
                                                    long companyId,
                                                    java.lang.String name)
                                             throws com.liferay.portal.PortalException,
                                                    com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getUserGroupRoles

public static java.util.List<com.liferay.portal.model.Role> getUserGroupRoles(HttpPrincipal httpPrincipal,
                                                                              long userId,
                                                                              long groupId)
                                                                       throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getUserRelatedRoles

public static java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(HttpPrincipal httpPrincipal,
                                                                                long userId,
                                                                                java.util.List<com.liferay.portal.model.Group> groups)
                                                                         throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getUserRoles

public static java.util.List<com.liferay.portal.model.Role> getUserRoles(HttpPrincipal httpPrincipal,
                                                                         long userId)
                                                                  throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

hasUserRole

public static boolean hasUserRole(HttpPrincipal httpPrincipal,
                                  long userId,
                                  long companyId,
                                  java.lang.String name,
                                  boolean inherited)
                           throws com.liferay.portal.PortalException,
                                  com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

hasUserRoles

public static boolean hasUserRoles(HttpPrincipal httpPrincipal,
                                   long userId,
                                   long companyId,
                                   java.lang.String[] names,
                                   boolean inherited)
                            throws com.liferay.portal.PortalException,
                                   com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

unsetUserRoles

public static void unsetUserRoles(HttpPrincipal httpPrincipal,
                                  long userId,
                                  long[] roleIds)
                           throws com.liferay.portal.PortalException,
                                  com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

updateRole

public static com.liferay.portal.model.Role updateRole(HttpPrincipal httpPrincipal,
                                                       long roleId,
                                                       java.lang.String name,
                                                       java.util.Map<java.util.Locale,java.lang.String> localeTitlesMap,
                                                       java.lang.String description,
                                                       java.lang.String subtype)
                                                throws com.liferay.portal.PortalException,
                                                       com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException