Class RoleServiceHttp

Object
com.liferay.portal.service.http.RoleServiceHttp

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.

Author:
Brian Wing Shun Chan
{$generated.description}
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static com.liferay.portal.kernel.model.Role
    addRole(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, String externalReferenceCode, String className, long classPK, String name, Map<Locale,String> titleMap, Map<Locale,String> descriptionMap, int type, String subtype, com.liferay.portal.kernel.service.ServiceContext serviceContext)
     
    static void
    addUserRoles(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long userId, long[] roleIds)
     
    static void
    deleteRole(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long roleId)
     
    static com.liferay.portal.kernel.model.Role
    fetchRole(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long roleId)
     
    static com.liferay.portal.kernel.model.Role
    fetchRole(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long companyId, String name)
     
    static com.liferay.portal.kernel.model.Role
    fetchRoleByExternalReferenceCode(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, String externalReferenceCode, long companyId)
     
    static List<com.liferay.portal.kernel.model.Role>
    getGroupRoles(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long groupId)
     
    static List<com.liferay.portal.kernel.model.Role>
    getGroupRolesAndTeamRoles(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long companyId, String name, List<String> excludedNames, String title, String description, int[] types, long excludedTeamRoleId, long teamGroupId, int start, int end)
     
    static int
    getGroupRolesAndTeamRolesCount(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long companyId, String name, List<String> excludedNames, String title, String description, int[] types, long excludedTeamRoleId, long teamGroupId)
     
    static com.liferay.portal.kernel.model.Role
    getRole(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long roleId)
     
    static com.liferay.portal.kernel.model.Role
    getRole(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long companyId, String name)
     
    static com.liferay.portal.kernel.model.Role
    getRoleByExternalReferenceCode(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, String externalReferenceCode, long companyId)
     
    static List<com.liferay.portal.kernel.model.Role>
    getRoles(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, int type, String subtype)
     
    static List<com.liferay.portal.kernel.model.Role>
    getRoles(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long companyId, int[] types)
     
    static List<com.liferay.portal.kernel.model.Role>
    getUserGroupGroupRoles(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long userId, long groupId)
     
    static List<com.liferay.portal.kernel.model.Role>
    getUserGroupRoles(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long userId, long groupId)
     
    static List<com.liferay.portal.kernel.model.Role>
    getUserRelatedRoles(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long userId, List<com.liferay.portal.kernel.model.Group> groups)
     
    static List<com.liferay.portal.kernel.model.Role>
    getUserRoles(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long userId)
     
    static boolean
    hasUserRole(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long userId, long companyId, String name, boolean inherited)
     
    static boolean
    hasUserRoles(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long userId, long companyId, String[] names, boolean inherited)
     
    static List<com.liferay.portal.kernel.model.Role>
    search(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long companyId, String keywords, Integer[] types, LinkedHashMap<String,Object> params, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Role> orderByComparator)
     
    static int
    searchCount(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long companyId, String keywords, Integer[] types, LinkedHashMap<String,Object> params)
     
    static void
    unsetUserRoles(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long userId, long[] roleIds)
     
    static com.liferay.portal.kernel.model.Role
    updateExternalReferenceCode(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long roleId, String externalReferenceCode)
     
    static com.liferay.portal.kernel.model.Role
    updateExternalReferenceCode(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, com.liferay.portal.kernel.model.Role role, String externalReferenceCode)
     
    static com.liferay.portal.kernel.model.Role
    updateRole(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long roleId, String name, Map<Locale,String> titleMap, Map<Locale,String> descriptionMap, String subtype, com.liferay.portal.kernel.service.ServiceContext serviceContext)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RoleServiceHttp

      public RoleServiceHttp()
  • Method Details

    • addRole

      public static com.liferay.portal.kernel.model.Role addRole(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, String externalReferenceCode, String className, long classPK, String name, Map<Locale,String> titleMap, Map<Locale,String> descriptionMap, int type, String subtype, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addUserRoles

      public static void addUserRoles(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long userId, long[] roleIds) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteRole

      public static void deleteRole(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long roleId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • fetchRole

      public static com.liferay.portal.kernel.model.Role fetchRole(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long roleId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • fetchRole

      public static com.liferay.portal.kernel.model.Role fetchRole(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long companyId, String name) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • fetchRoleByExternalReferenceCode

      public static com.liferay.portal.kernel.model.Role fetchRoleByExternalReferenceCode(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, String externalReferenceCode, long companyId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getGroupRoles

      public static List<com.liferay.portal.kernel.model.Role> getGroupRoles(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getGroupRolesAndTeamRoles

      public static List<com.liferay.portal.kernel.model.Role> getGroupRolesAndTeamRoles(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long companyId, String name, List<String> excludedNames, String title, String description, int[] types, long excludedTeamRoleId, long teamGroupId, int start, int end)
    • getGroupRolesAndTeamRolesCount

      public static int getGroupRolesAndTeamRolesCount(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long companyId, String name, List<String> excludedNames, String title, String description, int[] types, long excludedTeamRoleId, long teamGroupId)
    • getRole

      public static com.liferay.portal.kernel.model.Role getRole(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long roleId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getRole

      public static com.liferay.portal.kernel.model.Role getRole(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long companyId, String name) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getRoleByExternalReferenceCode

      public static com.liferay.portal.kernel.model.Role getRoleByExternalReferenceCode(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, String externalReferenceCode, long companyId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getRoles

      public static List<com.liferay.portal.kernel.model.Role> getRoles(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, int type, String subtype) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getRoles

      public static List<com.liferay.portal.kernel.model.Role> getRoles(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long companyId, int[] types) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getUserGroupGroupRoles

      public static List<com.liferay.portal.kernel.model.Role> getUserGroupGroupRoles(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long userId, long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getUserGroupRoles

      public static List<com.liferay.portal.kernel.model.Role> getUserGroupRoles(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long userId, long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getUserRelatedRoles

      public static List<com.liferay.portal.kernel.model.Role> getUserRelatedRoles(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long userId, List<com.liferay.portal.kernel.model.Group> groups) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getUserRoles

      public static List<com.liferay.portal.kernel.model.Role> getUserRoles(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long userId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • hasUserRole

      public static boolean hasUserRole(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long userId, long companyId, String name, boolean inherited) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • hasUserRoles

      public static boolean hasUserRoles(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long userId, long companyId, String[] names, boolean inherited) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • search

      public static List<com.liferay.portal.kernel.model.Role> search(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long companyId, String keywords, Integer[] types, LinkedHashMap<String,Object> params, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Role> orderByComparator)
    • searchCount

      public static int searchCount(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long companyId, String keywords, Integer[] types, LinkedHashMap<String,Object> params)
    • unsetUserRoles

      public static void unsetUserRoles(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long userId, long[] roleIds) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateExternalReferenceCode

      public static com.liferay.portal.kernel.model.Role updateExternalReferenceCode(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long roleId, String externalReferenceCode) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateExternalReferenceCode

      public static com.liferay.portal.kernel.model.Role updateExternalReferenceCode(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, com.liferay.portal.kernel.model.Role role, String externalReferenceCode) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateRole

      public static com.liferay.portal.kernel.model.Role updateRole(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long roleId, String name, Map<Locale,String> titleMap, Map<Locale,String> descriptionMap, String subtype, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException