Liferay 7.0-ce-b4

com.liferay.portal.service.http
Class RoleServiceHttp

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

@ProviderType
public class RoleServiceHttp
extends Object

Provides the 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, ServiceContext serviceContext)
           
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 Role fetchRole(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> getRoles(HttpPrincipal httpPrincipal, int type, String subtype)
           
static List<Role> getRoles(HttpPrincipal httpPrincipal, long companyId, int[] types)
           
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 List<Role> search(HttpPrincipal httpPrincipal, long companyId, String keywords, Integer[] types, LinkedHashMap<String,Object> params, int start, int end, OrderByComparator<Role> obc)
           
static int searchCount(HttpPrincipal httpPrincipal, long companyId, String keywords, Integer[] types, LinkedHashMap<String,Object> params)
           
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, ServiceContext serviceContext)
           
 
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,
                           ServiceContext serviceContext)
                    throws PortalException
Throws:
PortalException

addRole

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

addUserRoles

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

deleteRole

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

fetchRole

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

getGroupRoles

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

getRole

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

getRole

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

getRoles

public static List<Role> getRoles(HttpPrincipal httpPrincipal,
                                  int type,
                                  String subtype)
                           throws PortalException
Throws:
PortalException

getRoles

public static List<Role> getRoles(HttpPrincipal httpPrincipal,
                                  long companyId,
                                  int[] types)
                           throws PortalException
Throws:
PortalException

getUserGroupGroupRoles

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

getUserGroupRoles

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

getUserRelatedRoles

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

getUserRoles

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

hasUserRole

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

hasUserRoles

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

search

public static List<Role> search(HttpPrincipal httpPrincipal,
                                long companyId,
                                String keywords,
                                Integer[] types,
                                LinkedHashMap<String,Object> params,
                                int start,
                                int end,
                                OrderByComparator<Role> obc)

searchCount

public static int searchCount(HttpPrincipal httpPrincipal,
                              long companyId,
                              String keywords,
                              Integer[] types,
                              LinkedHashMap<String,Object> params)

unsetUserRoles

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

updateRole

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

Liferay 7.0-ce-b4