@ProviderType
public class RoleServiceHttp
extends Object
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.
RoleServiceSoap
,
HttpPrincipal
,
RoleServiceUtil
Constructor and Description |
---|
RoleServiceHttp() |
Modifier and Type | Method and Description |
---|---|
static com.liferay.portal.kernel.model.Role |
addRole(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal,
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 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 keywords,
List<String> excludedNames,
int[] types,
long excludedTeamRoleId,
long teamGroupId,
int start,
int end) |
static int |
getGroupRolesAndTeamRolesCount(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal,
long companyId,
String keywords,
List<String> excludedNames,
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 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> obc) |
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 |
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) |
public static com.liferay.portal.kernel.model.Role addRole(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, 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
com.liferay.portal.kernel.exception.PortalException
public static void addUserRoles(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long userId, long[] roleIds) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static void deleteRole(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long roleId) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
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
com.liferay.portal.kernel.exception.PortalException
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
com.liferay.portal.kernel.exception.PortalException
public static List<com.liferay.portal.kernel.model.Role> getGroupRolesAndTeamRoles(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long companyId, String keywords, List<String> excludedNames, int[] types, long excludedTeamRoleId, long teamGroupId, int start, int end)
public static int getGroupRolesAndTeamRolesCount(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long companyId, String keywords, List<String> excludedNames, int[] types, long excludedTeamRoleId, long teamGroupId)
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
com.liferay.portal.kernel.exception.PortalException
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
com.liferay.portal.kernel.exception.PortalException
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
com.liferay.portal.kernel.exception.PortalException
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
com.liferay.portal.kernel.exception.PortalException
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
com.liferay.portal.kernel.exception.PortalException
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
com.liferay.portal.kernel.exception.PortalException
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
com.liferay.portal.kernel.exception.PortalException
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
com.liferay.portal.kernel.exception.PortalException
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
com.liferay.portal.kernel.exception.PortalException
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
com.liferay.portal.kernel.exception.PortalException
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> obc)
public static int searchCount(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long companyId, String keywords, Integer[] types, LinkedHashMap<String,Object> params)
public static void unsetUserRoles(com.liferay.portal.kernel.security.auth.HttpPrincipal httpPrincipal, long userId, long[] roleIds) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
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
com.liferay.portal.kernel.exception.PortalException