com.liferay.portal.service.http
Class RoleServiceHttp
java.lang.Object
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- {$generated.description}
|
Method Summary |
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 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)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RoleServiceHttp
public RoleServiceHttp()
addRole
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
- 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
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
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
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> obc)
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
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