com.liferay.portal.service
Class RoleLocalServiceUtil
java.lang.Object
com.liferay.portal.service.RoleLocalServiceUtil
public class RoleLocalServiceUtil
- extends Object
This class provides static methods for the
RoleLocalService bean. The static methods of
this class calls the same methods of the bean instance. It's convenient to be
able to just write one line to call a method on a bean instead of writing a
lookup call and a method call.
- See Also:
RoleLocalService- ServiceBuilder generated this class. Modifications in this class will be overwritten the next time is generated.
|
Method Summary |
static Role |
addRole(long userId,
long companyId,
String name,
Map<Locale,String> titleMap,
String description,
int type)
|
static Role |
addRole(long userId,
long companyId,
String name,
Map<Locale,String> titleMap,
String description,
int type,
String className,
long classPK)
|
static Role |
addRole(Role role)
|
static void |
addUserRoles(long userId,
long[] roleIds)
|
static void |
checkSystemRoles(long companyId)
|
static Role |
createRole(long roleId)
|
static void |
deleteRole(long roleId)
|
static void |
deleteRole(Role role)
|
static List |
dynamicQuery(DynamicQuery dynamicQuery)
|
static List |
dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end)
|
static List |
dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end,
OrderByComparator orderByComparator)
|
static long |
dynamicQueryCount(DynamicQuery dynamicQuery)
|
static Role |
getDefaultGroupRole(long groupId)
|
static List<Role> |
getGroupRoles(long groupId)
|
static Map<String,List<String>> |
getResourceRoles(long companyId,
String name,
int scope,
String primKey)
|
static Role |
getRole(long roleId)
|
static Role |
getRole(long companyId,
String name)
|
static List<Role> |
getRoles(int start,
int end)
|
static List<Role> |
getRoles(int type,
String subtype)
|
static List<Role> |
getRoles(long companyId)
|
static List<Role> |
getRoles(long[] roleIds)
|
static int |
getRolesCount()
|
static RoleLocalService |
getService()
|
static List<Role> |
getSubtypeRoles(String subtype)
|
static int |
getSubtypeRolesCount(String subtype)
|
static Role |
getTeamRole(long companyId,
long teamId)
|
static List<Role> |
getUserGroupGroupRoles(long userId,
long groupId)
|
static List<Role> |
getUserGroupRoles(long userId,
long groupId)
|
static List<Role> |
getUserRelatedRoles(long userId,
List<Group> groups)
|
static List<Role> |
getUserRelatedRoles(long userId,
long groupId)
|
static List<Role> |
getUserRelatedRoles(long userId,
long[] groupIds)
|
static List<Role> |
getUserRoles(long userId)
|
static boolean |
hasUserRole(long userId,
long roleId)
|
static boolean |
hasUserRole(long userId,
long companyId,
String name,
boolean inherited)
Returns true if the user has the regular role. |
static boolean |
hasUserRoles(long userId,
long companyId,
String[] names,
boolean inherited)
Returns true if the user has any one of the specified
regular roles. |
static List<Role> |
search(long companyId,
String name,
String description,
Integer[] types,
int start,
int end,
OrderByComparator obc)
|
static List<Role> |
search(long companyId,
String name,
String description,
Integer[] types,
LinkedHashMap<String,Object> params,
int start,
int end,
OrderByComparator obc)
|
static int |
searchCount(long companyId,
String name,
String description,
Integer[] types)
|
static int |
searchCount(long companyId,
String name,
String description,
Integer[] types,
LinkedHashMap<String,Object> params)
|
void |
setService(RoleLocalService service)
|
static void |
setUserRoles(long userId,
long[] roleIds)
|
static void |
unsetUserRoles(long userId,
long[] roleIds)
|
static Role |
updateRole(long roleId,
String name,
Map<Locale,String> titleMap,
String description,
String subtype)
|
static Role |
updateRole(Role role)
|
static Role |
updateRole(Role role,
boolean merge)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RoleLocalServiceUtil
public RoleLocalServiceUtil()
addRole
public static Role addRole(Role role)
throws SystemException
- Throws:
SystemException
createRole
public static Role createRole(long roleId)
deleteRole
public static void deleteRole(long roleId)
throws PortalException,
SystemException
- Throws:
PortalException
SystemException
deleteRole
public static void deleteRole(Role role)
throws SystemException
- Throws:
SystemException
dynamicQuery
public static List dynamicQuery(DynamicQuery dynamicQuery)
throws SystemException
- Throws:
SystemException
dynamicQuery
public static List dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end)
throws SystemException
- Throws:
SystemException
dynamicQuery
public static List dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end,
OrderByComparator orderByComparator)
throws SystemException
- Throws:
SystemException
dynamicQueryCount
public static long dynamicQueryCount(DynamicQuery dynamicQuery)
throws SystemException
- Throws:
SystemException
getRole
public static Role getRole(long roleId)
throws PortalException,
SystemException
- Throws:
PortalException
SystemException
getRoles
public static List<Role> getRoles(int start,
int end)
throws SystemException
- Throws:
SystemException
getRolesCount
public static int getRolesCount()
throws SystemException
- Throws:
SystemException
updateRole
public static Role updateRole(Role role)
throws SystemException
- Throws:
SystemException
updateRole
public static Role updateRole(Role role,
boolean merge)
throws SystemException
- Throws:
SystemException
addRole
public static Role addRole(long userId,
long companyId,
String name,
Map<Locale,String> titleMap,
String description,
int type)
throws PortalException,
SystemException
- Throws:
PortalException
SystemException
addRole
public static Role addRole(long userId,
long companyId,
String name,
Map<Locale,String> titleMap,
String description,
int type,
String className,
long classPK)
throws PortalException,
SystemException
- Throws:
PortalException
SystemException
addUserRoles
public static void addUserRoles(long userId,
long[] roleIds)
throws PortalException,
SystemException
- Throws:
PortalException
SystemException
checkSystemRoles
public static void checkSystemRoles(long companyId)
throws PortalException,
SystemException
- Throws:
PortalException
SystemException
getDefaultGroupRole
public static Role getDefaultGroupRole(long groupId)
throws PortalException,
SystemException
- Throws:
PortalException
SystemException
getGroupRoles
public static List<Role> getGroupRoles(long groupId)
throws SystemException
- Throws:
SystemException
getResourceRoles
public static Map<String,List<String>> getResourceRoles(long companyId,
String name,
int scope,
String primKey)
throws SystemException
- Throws:
SystemException
getRole
public static Role getRole(long companyId,
String name)
throws PortalException,
SystemException
- Throws:
PortalException
SystemException
getRoles
public static List<Role> getRoles(long companyId)
throws SystemException
- Throws:
SystemException
getRoles
public static List<Role> getRoles(long[] roleIds)
throws PortalException,
SystemException
- Throws:
PortalException
SystemException
getRoles
public static List<Role> getRoles(int type,
String subtype)
throws SystemException
- Throws:
SystemException
getSubtypeRoles
public static List<Role> getSubtypeRoles(String subtype)
throws SystemException
- Throws:
SystemException
getSubtypeRolesCount
public static int getSubtypeRolesCount(String subtype)
throws SystemException
- Throws:
SystemException
getTeamRole
public static Role getTeamRole(long companyId,
long teamId)
throws PortalException,
SystemException
- Throws:
PortalException
SystemException
getUserGroupGroupRoles
public static List<Role> getUserGroupGroupRoles(long userId,
long groupId)
throws SystemException
- Throws:
SystemException
getUserGroupRoles
public static List<Role> getUserGroupRoles(long userId,
long groupId)
throws SystemException
- Throws:
SystemException
getUserRelatedRoles
public static List<Role> getUserRelatedRoles(long userId,
long groupId)
throws SystemException
- Throws:
SystemException
getUserRelatedRoles
public static List<Role> getUserRelatedRoles(long userId,
long[] groupIds)
throws SystemException
- Throws:
SystemException
getUserRelatedRoles
public static List<Role> getUserRelatedRoles(long userId,
List<Group> groups)
throws SystemException
- Throws:
SystemException
getUserRoles
public static List<Role> getUserRoles(long userId)
throws SystemException
- Throws:
SystemException
hasUserRole
public static boolean hasUserRole(long userId,
long roleId)
throws SystemException
- Throws:
SystemException
hasUserRole
public static boolean hasUserRole(long userId,
long companyId,
String name,
boolean inherited)
throws PortalException,
SystemException
- Returns
true if the user has the regular role.
- Returns:
true if the user has the regular role
- Throws:
PortalException
SystemException
hasUserRoles
public static boolean hasUserRoles(long userId,
long companyId,
String[] names,
boolean inherited)
throws PortalException,
SystemException
- Returns
true if the user has any one of the specified
regular roles.
- Returns:
true if the user has the regular role
- Throws:
PortalException
SystemException
search
public static List<Role> search(long companyId,
String name,
String description,
Integer[] types,
int start,
int end,
OrderByComparator obc)
throws SystemException
- Throws:
SystemException
search
public static List<Role> search(long companyId,
String name,
String description,
Integer[] types,
LinkedHashMap<String,Object> params,
int start,
int end,
OrderByComparator obc)
throws SystemException
- Throws:
SystemException
searchCount
public static int searchCount(long companyId,
String name,
String description,
Integer[] types)
throws SystemException
- Throws:
SystemException
searchCount
public static int searchCount(long companyId,
String name,
String description,
Integer[] types,
LinkedHashMap<String,Object> params)
throws SystemException
- Throws:
SystemException
setUserRoles
public static void setUserRoles(long userId,
long[] roleIds)
throws PortalException,
SystemException
- Throws:
PortalException
SystemException
unsetUserRoles
public static void unsetUserRoles(long userId,
long[] roleIds)
throws PortalException,
SystemException
- Throws:
PortalException
SystemException
updateRole
public static Role updateRole(long roleId,
String name,
Map<Locale,String> titleMap,
String description,
String subtype)
throws PortalException,
SystemException
- Throws:
PortalException
SystemException
getService
public static RoleLocalService getService()
setService
public void setService(RoleLocalService service)