|
Liferay 6.0-ee-sp2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.liferay.portal.service.RoleLocalServiceUtil
public class RoleLocalServiceUtil
The utility for the role local service. This utility wraps com.liferay.portal.service.impl.RoleLocalServiceImpl and is the primary access point for service operations in application layer code running on the local server.
This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
RoleLocalService,
RoleLocalServiceBaseImpl,
com.liferay.portal.service.impl.RoleLocalServiceImpl| Constructor Summary | |
|---|---|
RoleLocalServiceUtil()
|
|
| 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)
Adds the role to the database. |
static void |
addUserRoles(long userId,
long[] roleIds)
|
static void |
checkSystemRoles()
|
static void |
checkSystemRoles(long companyId)
|
static Role |
createRole(long roleId)
Creates a new role with the primary key. |
static void |
deleteRole(long roleId)
Deletes the role with the primary key from the database. |
static void |
deleteRole(Role role)
Deletes the role from the database. |
static List |
dynamicQuery(DynamicQuery dynamicQuery)
Performs a dynamic query on the database and returns the matching rows. |
static List |
dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end)
Performs a dynamic query on the database and returns a range of the matching rows. |
static List |
dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end,
OrderByComparator orderByComparator)
Performs a dynamic query on the database and returns an ordered range of the matching rows. |
static long |
dynamicQueryCount(DynamicQuery dynamicQuery)
Returns the number of rows that match the dynamic query. |
static String |
getBeanIdentifier()
Returns the Spring bean ID for this bean. |
static Role |
getDefaultGroupRole(long groupId)
|
static List<Role> |
getGroupRoles(long groupId)
|
static PersistedModel |
getPersistedModel(Serializable primaryKeyObj)
|
static Map<String,List<String>> |
getResourceRoles(long companyId,
String name,
int scope,
String primKey)
|
static List<Role> |
getResourceRoles(long companyId,
String name,
int scope,
String primKey,
String actionId)
|
static Role |
getRole(long roleId)
Returns the role with the primary key. |
static Role |
getRole(long companyId,
String name)
|
static List<Role> |
getRoles(int start,
int end)
Returns a range of all the roles. |
static List<Role> |
getRoles(int type,
String subtype)
|
static List<Role> |
getRoles(long companyId)
|
static List<Role> |
getRoles(long[] roleIds)
|
static int |
getRolesCount()
Returns the number of roles. |
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 keywords,
Integer[] types,
int start,
int end,
OrderByComparator obc)
|
static List<Role> |
search(long companyId,
String keywords,
Integer[] types,
LinkedHashMap<String,Object> params,
int start,
int end,
OrderByComparator obc)
|
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 keywords,
Integer[] types)
|
static int |
searchCount(long companyId,
String keywords,
Integer[] types,
LinkedHashMap<String,Object> params)
|
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)
|
static void |
setBeanIdentifier(String beanIdentifier)
Sets the Spring bean ID for this bean. |
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)
Updates the role in the database or adds it if it does not yet exist. |
static Role |
updateRole(Role role,
boolean merge)
Updates the role in the database or adds it if it does not yet exist. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RoleLocalServiceUtil()
| Method Detail |
|---|
public static Role addRole(Role role)
throws SystemException
role - the role
SystemException - if a system exception occurredpublic static Role createRole(long roleId)
roleId - the primary key for the new role
public static void deleteRole(long roleId)
throws PortalException,
SystemException
roleId - the primary key of the role
PortalException - if a role with the primary key could not be found
SystemException - if a system exception occurred
public static void deleteRole(Role role)
throws PortalException,
SystemException
role - the role
PortalException
SystemException - if a system exception occurred
public static List dynamicQuery(DynamicQuery dynamicQuery)
throws SystemException
dynamicQuery - the dynamic query
SystemException - if a system exception occurred
public static List dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end)
throws SystemException
Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.
dynamicQuery - the dynamic querystart - the lower bound of the range of model instancesend - the upper bound of the range of model instances (not inclusive)
SystemException - if a system exception occurred
public static List dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end,
OrderByComparator orderByComparator)
throws SystemException
Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.
dynamicQuery - the dynamic querystart - the lower bound of the range of model instancesend - the upper bound of the range of model instances (not inclusive)orderByComparator - the comparator to order the results by (optionally null)
SystemException - if a system exception occurred
public static long dynamicQueryCount(DynamicQuery dynamicQuery)
throws SystemException
dynamicQuery - the dynamic query
SystemException - if a system exception occurred
public static Role getRole(long roleId)
throws PortalException,
SystemException
roleId - the primary key of the role
PortalException - if a role with the primary key could not be found
SystemException - if a system exception occurred
public static PersistedModel getPersistedModel(Serializable primaryKeyObj)
throws PortalException,
SystemException
PortalException
SystemException
public static List<Role> getRoles(int start,
int end)
throws SystemException
Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.
start - the lower bound of the range of rolesend - the upper bound of the range of roles (not inclusive)
SystemException - if a system exception occurred
public static int getRolesCount()
throws SystemException
SystemException - if a system exception occurred
public static Role updateRole(Role role)
throws SystemException
role - the role
SystemException - if a system exception occurred
public static Role updateRole(Role role,
boolean merge)
throws SystemException
role - the rolemerge - whether to merge the role with the current session. See BatchSession.update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean) for an explanation.
SystemException - if a system exception occurredpublic static String getBeanIdentifier()
public static void setBeanIdentifier(String beanIdentifier)
beanIdentifier - the Spring bean ID for this bean
public static Role addRole(long userId,
long companyId,
String name,
Map<Locale,String> titleMap,
String description,
int type)
throws PortalException,
SystemException
PortalException
SystemException
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
PortalException
SystemException
public static void addUserRoles(long userId,
long[] roleIds)
throws PortalException,
SystemException
PortalException
SystemException
public static void checkSystemRoles()
throws PortalException,
SystemException
PortalException
SystemException
public static void checkSystemRoles(long companyId)
throws PortalException,
SystemException
PortalException
SystemException
public static Role getDefaultGroupRole(long groupId)
throws PortalException,
SystemException
PortalException
SystemException
public static List<Role> getGroupRoles(long groupId)
throws SystemException
SystemException
public static Map<String,List<String>> getResourceRoles(long companyId,
String name,
int scope,
String primKey)
throws SystemException
SystemException
public static List<Role> getResourceRoles(long companyId,
String name,
int scope,
String primKey,
String actionId)
throws SystemException
SystemException
public static Role getRole(long companyId,
String name)
throws PortalException,
SystemException
PortalException
SystemException
public static List<Role> getRoles(int type,
String subtype)
throws SystemException
SystemException
public static List<Role> getRoles(long companyId)
throws SystemException
SystemException
public static List<Role> getRoles(long[] roleIds)
throws PortalException,
SystemException
PortalException
SystemException
public static List<Role> getSubtypeRoles(String subtype)
throws SystemException
SystemException
public static int getSubtypeRolesCount(String subtype)
throws SystemException
SystemException
public static Role getTeamRole(long companyId,
long teamId)
throws PortalException,
SystemException
PortalException
SystemException
public static List<Role> getUserGroupGroupRoles(long userId,
long groupId)
throws SystemException
SystemException
public static List<Role> getUserGroupRoles(long userId,
long groupId)
throws SystemException
SystemException
public static List<Role> getUserRelatedRoles(long userId,
List<Group> groups)
throws SystemException
SystemException
public static List<Role> getUserRelatedRoles(long userId,
long groupId)
throws SystemException
SystemException
public static List<Role> getUserRelatedRoles(long userId,
long[] groupIds)
throws SystemException
SystemException
public static List<Role> getUserRoles(long userId)
throws SystemException
SystemException
public static boolean hasUserRole(long userId,
long roleId)
throws SystemException
SystemException
public static boolean hasUserRole(long userId,
long companyId,
String name,
boolean inherited)
throws PortalException,
SystemException
true if the user has the regular role.
true if the user has the regular role
PortalException
SystemException
public static boolean hasUserRoles(long userId,
long companyId,
String[] names,
boolean inherited)
throws PortalException,
SystemException
true if the user has any one of the specified
regular roles.
true if the user has the regular role
PortalException
SystemException
public static List<Role> search(long companyId,
String keywords,
Integer[] types,
int start,
int end,
OrderByComparator obc)
throws SystemException
SystemException
public static List<Role> search(long companyId,
String keywords,
Integer[] types,
LinkedHashMap<String,Object> params,
int start,
int end,
OrderByComparator obc)
throws SystemException
SystemException
public static List<Role> search(long companyId,
String name,
String description,
Integer[] types,
int start,
int end,
OrderByComparator obc)
throws SystemException
SystemException
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
SystemException
public static int searchCount(long companyId,
String keywords,
Integer[] types)
throws SystemException
SystemException
public static int searchCount(long companyId,
String keywords,
Integer[] types,
LinkedHashMap<String,Object> params)
throws SystemException
SystemException
public static int searchCount(long companyId,
String name,
String description,
Integer[] types)
throws SystemException
SystemException
public static int searchCount(long companyId,
String name,
String description,
Integer[] types,
LinkedHashMap<String,Object> params)
throws SystemException
SystemException
public static void setUserRoles(long userId,
long[] roleIds)
throws PortalException,
SystemException
PortalException
SystemException
public static void unsetUserRoles(long userId,
long[] roleIds)
throws PortalException,
SystemException
PortalException
SystemException
public static Role updateRole(long roleId,
String name,
Map<Locale,String> titleMap,
String description,
String subtype)
throws PortalException,
SystemException
PortalException
SystemExceptionpublic static RoleLocalService getService()
public void setService(RoleLocalService service)
|
Liferay 6.0-ee-sp2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||