public class RoleServiceHttp
extends java.lang.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.model.Role |
addRole(HttpPrincipal httpPrincipal,
java.lang.String className,
long classPK,
java.lang.String name,
java.util.Map<java.util.Locale,java.lang.String> titleMap,
java.util.Map<java.util.Locale,java.lang.String> descriptionMap,
int type,
java.lang.String subtype,
com.liferay.portal.service.ServiceContext serviceContext) |
static com.liferay.portal.model.Role |
addRole(HttpPrincipal httpPrincipal,
java.lang.String name,
java.util.Map<java.util.Locale,java.lang.String> titleMap,
java.util.Map<java.util.Locale,java.lang.String> descriptionMap,
int type) |
static void |
addUserRoles(HttpPrincipal httpPrincipal,
long userId,
long[] roleIds) |
static void |
deleteRole(HttpPrincipal httpPrincipal,
long roleId) |
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> |
getUserGroupGroupRoles(HttpPrincipal httpPrincipal,
long userId,
long groupId) |
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> titleMap,
java.util.Map<java.util.Locale,java.lang.String> descriptionMap,
java.lang.String subtype,
com.liferay.portal.service.ServiceContext serviceContext) |
public static com.liferay.portal.model.Role addRole(HttpPrincipal httpPrincipal, java.lang.String className, long classPK, java.lang.String name, java.util.Map<java.util.Locale,java.lang.String> titleMap, java.util.Map<java.util.Locale,java.lang.String> descriptionMap, int type, java.lang.String subtype, com.liferay.portal.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException
com.liferay.portal.kernel.exception.PortalExceptioncom.liferay.portal.kernel.exception.SystemExceptionpublic static com.liferay.portal.model.Role addRole(HttpPrincipal httpPrincipal, java.lang.String name, java.util.Map<java.util.Locale,java.lang.String> titleMap, java.util.Map<java.util.Locale,java.lang.String> descriptionMap, int type) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException
com.liferay.portal.kernel.exception.PortalExceptioncom.liferay.portal.kernel.exception.SystemExceptionpublic static void addUserRoles(HttpPrincipal httpPrincipal, long userId, long[] roleIds) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException
com.liferay.portal.kernel.exception.PortalExceptioncom.liferay.portal.kernel.exception.SystemExceptionpublic static void deleteRole(HttpPrincipal httpPrincipal, long roleId) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException
com.liferay.portal.kernel.exception.PortalExceptioncom.liferay.portal.kernel.exception.SystemExceptionpublic static java.util.List<com.liferay.portal.model.Role> getGroupRoles(HttpPrincipal httpPrincipal, long groupId) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException
com.liferay.portal.kernel.exception.PortalExceptioncom.liferay.portal.kernel.exception.SystemExceptionpublic static com.liferay.portal.model.Role getRole(HttpPrincipal httpPrincipal, long roleId) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException
com.liferay.portal.kernel.exception.PortalExceptioncom.liferay.portal.kernel.exception.SystemExceptionpublic static com.liferay.portal.model.Role getRole(HttpPrincipal httpPrincipal, long companyId, java.lang.String name) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException
com.liferay.portal.kernel.exception.PortalExceptioncom.liferay.portal.kernel.exception.SystemExceptionpublic static java.util.List<com.liferay.portal.model.Role> getUserGroupGroupRoles(HttpPrincipal httpPrincipal, long userId, long groupId) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException
com.liferay.portal.kernel.exception.PortalExceptioncom.liferay.portal.kernel.exception.SystemExceptionpublic static java.util.List<com.liferay.portal.model.Role> getUserGroupRoles(HttpPrincipal httpPrincipal, long userId, long groupId) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException
com.liferay.portal.kernel.exception.PortalExceptioncom.liferay.portal.kernel.exception.SystemExceptionpublic 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.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException
com.liferay.portal.kernel.exception.PortalExceptioncom.liferay.portal.kernel.exception.SystemExceptionpublic static java.util.List<com.liferay.portal.model.Role> getUserRoles(HttpPrincipal httpPrincipal, long userId) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException
com.liferay.portal.kernel.exception.PortalExceptioncom.liferay.portal.kernel.exception.SystemExceptionpublic static boolean hasUserRole(HttpPrincipal httpPrincipal, long userId, long companyId, java.lang.String name, boolean inherited) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException
com.liferay.portal.kernel.exception.PortalExceptioncom.liferay.portal.kernel.exception.SystemExceptionpublic static boolean hasUserRoles(HttpPrincipal httpPrincipal, long userId, long companyId, java.lang.String[] names, boolean inherited) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException
com.liferay.portal.kernel.exception.PortalExceptioncom.liferay.portal.kernel.exception.SystemExceptionpublic static void unsetUserRoles(HttpPrincipal httpPrincipal, long userId, long[] roleIds) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException
com.liferay.portal.kernel.exception.PortalExceptioncom.liferay.portal.kernel.exception.SystemExceptionpublic static com.liferay.portal.model.Role updateRole(HttpPrincipal httpPrincipal, long roleId, java.lang.String name, java.util.Map<java.util.Locale,java.lang.String> titleMap, java.util.Map<java.util.Locale,java.lang.String> descriptionMap, java.lang.String subtype, com.liferay.portal.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException
com.liferay.portal.kernel.exception.PortalExceptioncom.liferay.portal.kernel.exception.SystemException