com.liferay.portal.service.http
Class RoleServiceHttp
java.lang.Object
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 is generated.
Method Summary |
static Role |
addRole(HttpPrincipal httpPrincipal,
String name,
Map<Locale,String> titleMap,
String description,
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,
String description,
String subtype)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RoleServiceHttp
public RoleServiceHttp()
addRole
public static Role addRole(HttpPrincipal httpPrincipal,
String name,
Map<Locale,String> titleMap,
String description,
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 SystemException
- Throws:
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 SystemException
- Throws:
SystemException
getUserGroupRoles
public static List<Role> getUserGroupRoles(HttpPrincipal httpPrincipal,
long userId,
long groupId)
throws SystemException
- Throws:
SystemException
getUserRelatedRoles
public static List<Role> getUserRelatedRoles(HttpPrincipal httpPrincipal,
long userId,
List<Group> groups)
throws SystemException
- Throws:
SystemException
getUserRoles
public static List<Role> getUserRoles(HttpPrincipal httpPrincipal,
long userId)
throws SystemException
- Throws:
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,
String description,
String subtype)
throws PortalException,
SystemException
- Throws:
PortalException
SystemException