Liferay 6.1.2-ce-ga3

com.liferay.portal.service.http
Class RoleServiceHttp

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

public class RoleServiceHttp
extends Object

This class provides a HTTP utility for the 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 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.

See Also:
RoleServiceSoap, HttpPrincipal, RoleServiceUtil
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time it is generated.

Constructor Summary
RoleServiceHttp()
           
 
Method Summary
static Role addRole(HttpPrincipal httpPrincipal, String className, long classPK, String name, Map<Locale,String> titleMap, Map<Locale,String> descriptionMap, int type, String subType)
           
static Role addRole(HttpPrincipal httpPrincipal, String name, Map<Locale,String> titleMap, Map<Locale,String> descriptionMap, int type)
           
static void addUserRoles(HttpPrincipal httpPrincipal, long userId, long[] roleIds)
           
static void deleteRole(HttpPrincipal httpPrincipal, long roleId)
           
static List<Role> getGroupRoles(HttpPrincipal httpPrincipal, long groupId)
           
static Role getRole(HttpPrincipal httpPrincipal, long roleId)
           
static Role getRole(HttpPrincipal httpPrincipal, long companyId, String name)
           
static List<Role> getUserGroupGroupRoles(HttpPrincipal httpPrincipal, long userId, long groupId)
           
static List<Role> getUserGroupRoles(HttpPrincipal httpPrincipal, long userId, long groupId)
           
static List<Role> getUserRelatedRoles(HttpPrincipal httpPrincipal, long userId, List<Group> groups)
           
static List<Role> getUserRoles(HttpPrincipal httpPrincipal, long userId)
           
static boolean hasUserRole(HttpPrincipal httpPrincipal, long userId, long companyId, String name, boolean inherited)
           
static boolean hasUserRoles(HttpPrincipal httpPrincipal, long userId, long companyId, String[] names, boolean inherited)
           
static void unsetUserRoles(HttpPrincipal httpPrincipal, long userId, long[] roleIds)
           
static Role updateRole(HttpPrincipal httpPrincipal, long roleId, String name, Map<Locale,String> titleMap, Map<Locale,String> descriptionMap, 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 Role addRole(HttpPrincipal httpPrincipal,
                           String className,
                           long classPK,
                           String name,
                           Map<Locale,String> titleMap,
                           Map<Locale,String> descriptionMap,
                           int type,
                           String subType)
                    throws PortalException,
                           SystemException
Throws:
PortalException
SystemException

addRole

public static Role addRole(HttpPrincipal httpPrincipal,
                           String name,
                           Map<Locale,String> titleMap,
                           Map<Locale,String> descriptionMap,
                           int type)
                    throws PortalException,
                           SystemException
Throws:
PortalException
SystemException

addUserRoles

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

deleteRole

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

getGroupRoles

public static List<Role> getGroupRoles(HttpPrincipal httpPrincipal,
                                       long groupId)
                                throws PortalException,
                                       SystemException
Throws:
PortalException
SystemException

getRole

public static Role getRole(HttpPrincipal httpPrincipal,
                           long roleId)
                    throws PortalException,
                           SystemException
Throws:
PortalException
SystemException

getRole

public static Role getRole(HttpPrincipal httpPrincipal,
                           long companyId,
                           String name)
                    throws PortalException,
                           SystemException
Throws:
PortalException
SystemException

getUserGroupGroupRoles

public static List<Role> getUserGroupGroupRoles(HttpPrincipal httpPrincipal,
                                                long userId,
                                                long groupId)
                                         throws PortalException,
                                                SystemException
Throws:
PortalException
SystemException

getUserGroupRoles

public static List<Role> getUserGroupRoles(HttpPrincipal httpPrincipal,
                                           long userId,
                                           long groupId)
                                    throws PortalException,
                                           SystemException
Throws:
PortalException
SystemException

getUserRelatedRoles

public static List<Role> getUserRelatedRoles(HttpPrincipal httpPrincipal,
                                             long userId,
                                             List<Group> groups)
                                      throws PortalException,
                                             SystemException
Throws:
PortalException
SystemException

getUserRoles

public static List<Role> getUserRoles(HttpPrincipal httpPrincipal,
                                      long userId)
                               throws PortalException,
                                      SystemException
Throws:
PortalException
SystemException

hasUserRole

public static boolean hasUserRole(HttpPrincipal httpPrincipal,
                                  long userId,
                                  long companyId,
                                  String name,
                                  boolean inherited)
                           throws PortalException,
                                  SystemException
Throws:
PortalException
SystemException

hasUserRoles

public static boolean hasUserRoles(HttpPrincipal httpPrincipal,
                                   long userId,
                                   long companyId,
                                   String[] names,
                                   boolean inherited)
                            throws PortalException,
                                   SystemException
Throws:
PortalException
SystemException

unsetUserRoles

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

updateRole

public static Role updateRole(HttpPrincipal httpPrincipal,
                              long roleId,
                              String name,
                              Map<Locale,String> titleMap,
                              Map<Locale,String> descriptionMap,
                              String subtype)
                       throws PortalException,
                              SystemException
Throws:
PortalException
SystemException

Liferay 6.1.2-ce-ga3