public class MLiferayUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
ROLE_ADMINISTRATOR |
static String |
ROLE_GUEST |
static String |
ROLE_ORGANIZATION_ADMINISTRATOR |
static String |
ROLE_ORGANIZATION_CONTENT_REVIEWER |
static String |
ROLE_ORGANIZATION_OWNER |
static String |
ROLE_ORGANIZATION_USER |
static String |
ROLE_OWNER |
static String |
ROLE_PORTAL_CONTENT_REVIEWER |
static String |
ROLE_POWER_USER |
static String |
ROLE_SITE_ADMINISTRATOR |
static String |
ROLE_SITE_CONTENT_REVIEWER |
static String |
ROLE_SITE_MEMBER |
static String |
ROLE_SITE_OWNER |
static String |
ROLE_USER |
| Constructor and Description |
|---|
MLiferayUtil() |
| Modifier and Type | Method and Description |
|---|---|
static long |
getCompanyGroupId(javax.portlet.PortletRequest request) |
static String |
getWebUrlForFriendlyUrl(javax.portlet.PortletRequest request,
String friendly,
String attributes) |
static boolean |
hasRole(com.liferay.portal.kernel.model.User user,
List<String> roles)
Returns true if the user is member in one of this roles.
|
static boolean |
hasRole(com.liferay.portal.kernel.model.User user,
String role)
Returns true if the use is member of the given role name.
|
public static final String ROLE_ADMINISTRATOR
public static final String ROLE_GUEST
public static final String ROLE_OWNER
public static final String ROLE_POWER_USER
public static final String ROLE_SITE_MEMBER
public static final String ROLE_SITE_OWNER
public static final String ROLE_SITE_ADMINISTRATOR
public static final String ROLE_SITE_CONTENT_REVIEWER
public static final String ROLE_PORTAL_CONTENT_REVIEWER
public static final String ROLE_USER
public static final String ROLE_ORGANIZATION_OWNER
public static final String ROLE_ORGANIZATION_USER
public static final String ROLE_ORGANIZATION_ADMINISTRATOR
public static final String ROLE_ORGANIZATION_CONTENT_REVIEWER
public static boolean hasRole(com.liferay.portal.kernel.model.User user,
String role)
throws com.liferay.portal.kernel.exception.SystemException
user - user or null. If null it will return falserole - Role name or null. If null it will return false'com.liferay.portal.kernel.exception.SystemExceptionpublic static boolean hasRole(com.liferay.portal.kernel.model.User user,
List<String> roles)
throws com.liferay.portal.kernel.exception.SystemException
user - roles - com.liferay.portal.kernel.exception.SystemExceptionpublic static String getWebUrlForFriendlyUrl(javax.portlet.PortletRequest request, String friendly, String attributes)
public static long getCompanyGroupId(javax.portlet.PortletRequest request)
Copyright © 2018. All rights reserved.