public class RoleServiceImpl extends RoleServiceBaseImpl
accountLocalService, accountPersistence, accountService, addressLocalService, addressPersistence, addressService, backgroundTaskLocalService, backgroundTaskPersistence, backgroundTaskService, browserTrackerLocalService, browserTrackerPersistence, classNameLocalService, classNamePersistence, classNameService, clusterGroupLocalService, clusterGroupPersistence, cmisRepositoryLocalService, companyLocalService, companyPersistence, companyService, contactLocalService, contactPersistence, contactService, counterLocalService, countryPersistence, countryService, emailAddressLocalService, emailAddressPersistence, emailAddressService, expandoRowLocalService, expandoRowPersistence, groupFinder, groupLocalService, groupPersistence, groupService, imageLocalService, imagePersistence, imageService, layoutBranchLocalService, layoutBranchPersistence, layoutBranchService, layoutFinder, layoutFriendlyURLLocalService, layoutFriendlyURLPersistence, layoutLocalService, layoutPersistence, layoutPrototypeLocalService, layoutPrototypePersistence, layoutPrototypeService, layoutRevisionLocalService, layoutRevisionPersistence, layoutRevisionService, layoutService, layoutSetBranchLocalService, layoutSetBranchPersistence, layoutSetBranchService, layoutSetLocalService, layoutSetPersistence, layoutSetPrototypeLocalService, layoutSetPrototypePersistence, layoutSetPrototypeService, layoutSetService, layoutTemplateLocalService, listTypePersistence, listTypeService, lockFinder, lockLocalService, lockPersistence, membershipRequestLocalService, membershipRequestPersistence, membershipRequestService, organizationFinder, organizationLocalService, organizationPersistence, organizationService, orgGroupRolePersistence, orgLaborLocalService, orgLaborPersistence, orgLaborService, passwordPolicyFinder, passwordPolicyLocalService, passwordPolicyPersistence, passwordPolicyRelLocalService, passwordPolicyRelPersistence, passwordPolicyService, passwordTrackerLocalService, passwordTrackerPersistence, permissionService, phoneLocalService, phonePersistence, phoneService, pluginSettingLocalService, pluginSettingPersistence, pluginSettingService, portalLocalService, portalPreferencesLocalService, portalPreferencesPersistence, portalService, portletItemLocalService, portletItemPersistence, portletLocalService, portletPersistence, portletPreferencesFinder, portletPreferencesLocalService, portletPreferencesPersistence, portletPreferencesService, portletService, quartzLocalService, regionPersistence, regionService, releaseLocalService, releasePersistence, repositoryEntryLocalService, repositoryEntryPersistence, repositoryLocalService, repositoryPersistence, repositoryService, resourceActionLocalService, resourceActionPersistence, resourceBlockFinder, resourceBlockLocalService, resourceBlockPermissionLocalService, resourceBlockPermissionPersistence, resourceBlockPersistence, resourceBlockService, resourceLocalService, resourcePermissionFinder, resourcePermissionLocalService, resourcePermissionPersistence, resourcePermissionService, resourceTypePermissionFinder, resourceTypePermissionLocalService, resourceTypePermissionPersistence, roleFinder, roleLocalService, rolePersistence, roleService, serviceComponentLocalService, serviceComponentPersistence, shardLocalService, shardPersistence, stagingLocalService, stagingService, subscriptionLocalService, subscriptionPersistence, systemEventLocalService, systemEventPersistence, teamFinder, teamLocalService, teamPersistence, teamService, themeLocalService, themeService, ticketLocalService, ticketPersistence, userFinder, userGroupFinder, userGroupGroupRoleLocalService, userGroupGroupRolePersistence, userGroupGroupRoleService, userGroupLocalService, userGroupPersistence, userGroupRoleFinder, userGroupRoleLocalService, userGroupRolePersistence, userGroupRoleService, userGroupService, userIdMapperLocalService, userIdMapperPersistence, userLocalService, userNotificationDeliveryLocalService, userNotificationDeliveryPersistence, userNotificationEventLocalService, userNotificationEventPersistence, userPersistence, userService, userTrackerLocalService, userTrackerPathLocalService, userTrackerPathPersistence, userTrackerPersistence, virtualHostLocalService, virtualHostPersistence, webDAVPropsLocalService, webDAVPropsPersistence, websiteLocalService, websitePersistence, websiteService, workflowDefinitionLinkLocalService, workflowDefinitionLinkPersistence, workflowInstanceLinkLocalService, workflowInstanceLinkPersistence| Constructor and Description |
|---|
RoleServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
com.liferay.portal.model.Role |
addRole(java.lang.String className,
long classPK,
java.lang.String name,
java.util.Map<java.util.Locale,java.lang.String> titleMap,
java.util.Map<java.util.Locale,java.lang.String> descriptionMap,
int type,
java.lang.String subtype,
com.liferay.portal.service.ServiceContext serviceContext)
Adds a role.
|
com.liferay.portal.model.Role |
addRole(java.lang.String name,
java.util.Map<java.util.Locale,java.lang.String> titleMap,
java.util.Map<java.util.Locale,java.lang.String> descriptionMap,
int type)
Deprecated.
As of 6.2.0, replaced by
addRole(String, long,
String, Map, Map, int, String, ServiceContext) |
void |
addUserRoles(long userId,
long[] roleIds)
Adds the roles to the user.
|
protected void |
checkUserRolesPermission(long userId,
long[] roleIds) |
void |
deleteRole(long roleId)
Deletes the role with the primary key and its associated permissions.
|
protected java.util.List<com.liferay.portal.model.Role> |
filterRoles(java.util.List<com.liferay.portal.model.Role> roles) |
java.util.List<com.liferay.portal.model.Role> |
getGroupRoles(long groupId)
Returns all the roles associated with the group.
|
com.liferay.portal.model.Role |
getRole(long roleId)
Returns the role with the primary key.
|
com.liferay.portal.model.Role |
getRole(long companyId,
java.lang.String name)
Returns the role with the name in the company.
|
java.util.List<com.liferay.portal.model.Role> |
getUserGroupGroupRoles(long userId,
long groupId)
Returns all the user's roles within the user group.
|
java.util.List<com.liferay.portal.model.Role> |
getUserGroupRoles(long userId,
long groupId)
Returns all the user's roles within the user group.
|
java.util.List<com.liferay.portal.model.Role> |
getUserRelatedRoles(long userId,
java.util.List<com.liferay.portal.model.Group> groups)
Returns the union of all the user's roles within the groups.
|
java.util.List<com.liferay.portal.model.Role> |
getUserRoles(long userId)
Returns all the roles associated with the user.
|
boolean |
hasUserRole(long userId,
long companyId,
java.lang.String name,
boolean inherited)
Returns
true if the user is associated with the named
regular role. |
boolean |
hasUserRoles(long userId,
long companyId,
java.lang.String[] names,
boolean inherited)
Returns
true if the user has any one of the named regular
roles. |
void |
unsetUserRoles(long userId,
long[] roleIds)
Removes the matching roles associated with the user.
|
com.liferay.portal.model.Role |
updateRole(long roleId,
java.lang.String name,
java.util.Map<java.util.Locale,java.lang.String> titleMap,
java.util.Map<java.util.Locale,java.lang.String> descriptionMap,
java.lang.String subtype,
com.liferay.portal.service.ServiceContext serviceContext)
Updates the role with the primary key.
|
afterPropertiesSet, destroy, getAccountLocalService, getAccountPersistence, getAccountService, getAddressLocalService, getAddressPersistence, getAddressService, getBackgroundTaskLocalService, getBackgroundTaskPersistence, getBackgroundTaskService, getBeanIdentifier, getBrowserTrackerLocalService, getBrowserTrackerPersistence, getClassNameLocalService, getClassNamePersistence, getClassNameService, getClusterGroupLocalService, getClusterGroupPersistence, getCMISRepositoryLocalService, getCompanyLocalService, getCompanyPersistence, getCompanyService, getContactLocalService, getContactPersistence, getContactService, getCounterLocalService, getCountryPersistence, getCountryService, getEmailAddressLocalService, getEmailAddressPersistence, getEmailAddressService, getExpandoRowLocalService, getExpandoRowPersistence, getGroupFinder, getGroupLocalService, getGroupPersistence, getGroupService, getImageLocalService, getImagePersistence, getImageService, getLayoutBranchLocalService, getLayoutBranchPersistence, getLayoutBranchService, getLayoutFinder, getLayoutFriendlyURLLocalService, getLayoutFriendlyURLPersistence, getLayoutLocalService, getLayoutPersistence, getLayoutPrototypeLocalService, getLayoutPrototypePersistence, getLayoutPrototypeService, getLayoutRevisionLocalService, getLayoutRevisionPersistence, getLayoutRevisionService, getLayoutService, getLayoutSetBranchLocalService, getLayoutSetBranchPersistence, getLayoutSetBranchService, getLayoutSetLocalService, getLayoutSetPersistence, getLayoutSetPrototypeLocalService, getLayoutSetPrototypePersistence, getLayoutSetPrototypeService, getLayoutSetService, getLayoutTemplateLocalService, getListTypePersistence, getListTypeService, getLockFinder, getLockLocalService, getLockPersistence, getMembershipRequestLocalService, getMembershipRequestPersistence, getMembershipRequestService, getModelClass, getModelClassName, getOrganizationFinder, getOrganizationLocalService, getOrganizationPersistence, getOrganizationService, getOrgGroupRolePersistence, getOrgLaborLocalService, getOrgLaborPersistence, getOrgLaborService, getPasswordPolicyFinder, getPasswordPolicyLocalService, getPasswordPolicyPersistence, getPasswordPolicyRelLocalService, getPasswordPolicyRelPersistence, getPasswordPolicyService, getPasswordTrackerLocalService, getPasswordTrackerPersistence, getPermissionService, getPhoneLocalService, getPhonePersistence, getPhoneService, getPluginSettingLocalService, getPluginSettingPersistence, getPluginSettingService, getPortalLocalService, getPortalPreferencesLocalService, getPortalPreferencesPersistence, getPortalService, getPortletItemLocalService, getPortletItemPersistence, getPortletLocalService, getPortletPersistence, getPortletPreferencesFinder, getPortletPreferencesLocalService, getPortletPreferencesPersistence, getPortletPreferencesService, getPortletService, getQuartzLocalService, getRegionPersistence, getRegionService, getReleaseLocalService, getReleasePersistence, getRepositoryEntryLocalService, getRepositoryEntryPersistence, getRepositoryLocalService, getRepositoryPersistence, getRepositoryService, getResourceActionLocalService, getResourceActionPersistence, getResourceBlockFinder, getResourceBlockLocalService, getResourceBlockPermissionLocalService, getResourceBlockPermissionPersistence, getResourceBlockPersistence, getResourceBlockService, getResourceLocalService, getResourcePermissionFinder, getResourcePermissionLocalService, getResourcePermissionPersistence, getResourcePermissionService, getResourceTypePermissionFinder, getResourceTypePermissionLocalService, getResourceTypePermissionPersistence, getRoleFinder, getRoleLocalService, getRolePersistence, getRoleService, getServiceComponentLocalService, getServiceComponentPersistence, getShardLocalService, getShardPersistence, getStagingLocalService, getStagingService, getSubscriptionLocalService, getSubscriptionPersistence, getSystemEventLocalService, getSystemEventPersistence, getTeamFinder, getTeamLocalService, getTeamPersistence, getTeamService, getThemeLocalService, getThemeService, getTicketLocalService, getTicketPersistence, getUserFinder, getUserGroupFinder, getUserGroupGroupRoleLocalService, getUserGroupGroupRolePersistence, getUserGroupGroupRoleService, getUserGroupLocalService, getUserGroupPersistence, getUserGroupRoleFinder, getUserGroupRoleLocalService, getUserGroupRolePersistence, getUserGroupRoleService, getUserGroupService, getUserIdMapperLocalService, getUserIdMapperPersistence, getUserLocalService, getUserNotificationDeliveryLocalService, getUserNotificationDeliveryPersistence, getUserNotificationEventLocalService, getUserNotificationEventPersistence, getUserPersistence, getUserService, getUserTrackerLocalService, getUserTrackerPathLocalService, getUserTrackerPathPersistence, getUserTrackerPersistence, getVirtualHostLocalService, getVirtualHostPersistence, getWebDAVPropsLocalService, getWebDAVPropsPersistence, getWebsiteLocalService, getWebsitePersistence, getWebsiteService, getWorkflowDefinitionLinkLocalService, getWorkflowDefinitionLinkPersistence, getWorkflowInstanceLinkLocalService, getWorkflowInstanceLinkPersistence, runSQL, setAccountLocalService, setAccountPersistence, setAccountService, setAddressLocalService, setAddressPersistence, setAddressService, setBackgroundTaskLocalService, setBackgroundTaskPersistence, setBackgroundTaskService, setBeanIdentifier, setBrowserTrackerLocalService, setBrowserTrackerPersistence, setClassNameLocalService, setClassNamePersistence, setClassNameService, setClusterGroupLocalService, setClusterGroupPersistence, setCMISRepositoryLocalService, setCompanyLocalService, setCompanyPersistence, setCompanyService, setContactLocalService, setContactPersistence, setContactService, setCounterLocalService, setCountryPersistence, setCountryService, setEmailAddressLocalService, setEmailAddressPersistence, setEmailAddressService, setExpandoRowLocalService, setExpandoRowPersistence, setGroupFinder, setGroupLocalService, setGroupPersistence, setGroupService, setImageLocalService, setImagePersistence, setImageService, setLayoutBranchLocalService, setLayoutBranchPersistence, setLayoutBranchService, setLayoutFinder, setLayoutFriendlyURLLocalService, setLayoutFriendlyURLPersistence, setLayoutLocalService, setLayoutPersistence, setLayoutPrototypeLocalService, setLayoutPrototypePersistence, setLayoutPrototypeService, setLayoutRevisionLocalService, setLayoutRevisionPersistence, setLayoutRevisionService, setLayoutService, setLayoutSetBranchLocalService, setLayoutSetBranchPersistence, setLayoutSetBranchService, setLayoutSetLocalService, setLayoutSetPersistence, setLayoutSetPrototypeLocalService, setLayoutSetPrototypePersistence, setLayoutSetPrototypeService, setLayoutSetService, setLayoutTemplateLocalService, setListTypePersistence, setListTypeService, setLockFinder, setLockLocalService, setLockPersistence, setMembershipRequestLocalService, setMembershipRequestPersistence, setMembershipRequestService, setOrganizationFinder, setOrganizationLocalService, setOrganizationPersistence, setOrganizationService, setOrgGroupRolePersistence, setOrgLaborLocalService, setOrgLaborPersistence, setOrgLaborService, setPasswordPolicyFinder, setPasswordPolicyLocalService, setPasswordPolicyPersistence, setPasswordPolicyRelLocalService, setPasswordPolicyRelPersistence, setPasswordPolicyService, setPasswordTrackerLocalService, setPasswordTrackerPersistence, setPermissionService, setPhoneLocalService, setPhonePersistence, setPhoneService, setPluginSettingLocalService, setPluginSettingPersistence, setPluginSettingService, setPortalLocalService, setPortalPreferencesLocalService, setPortalPreferencesPersistence, setPortalService, setPortletItemLocalService, setPortletItemPersistence, setPortletLocalService, setPortletPersistence, setPortletPreferencesFinder, setPortletPreferencesLocalService, setPortletPreferencesPersistence, setPortletPreferencesService, setPortletService, setQuartzLocalService, setRegionPersistence, setRegionService, setReleaseLocalService, setReleasePersistence, setRepositoryEntryLocalService, setRepositoryEntryPersistence, setRepositoryLocalService, setRepositoryPersistence, setRepositoryService, setResourceActionLocalService, setResourceActionPersistence, setResourceBlockFinder, setResourceBlockLocalService, setResourceBlockPermissionLocalService, setResourceBlockPermissionPersistence, setResourceBlockPersistence, setResourceBlockService, setResourceLocalService, setResourcePermissionFinder, setResourcePermissionLocalService, setResourcePermissionPersistence, setResourcePermissionService, setResourceTypePermissionFinder, setResourceTypePermissionLocalService, setResourceTypePermissionPersistence, setRoleFinder, setRoleLocalService, setRolePersistence, setRoleService, setServiceComponentLocalService, setServiceComponentPersistence, setShardLocalService, setShardPersistence, setStagingLocalService, setStagingService, setSubscriptionLocalService, setSubscriptionPersistence, setSystemEventLocalService, setSystemEventPersistence, setTeamFinder, setTeamLocalService, setTeamPersistence, setTeamService, setThemeLocalService, setThemeService, setTicketLocalService, setTicketPersistence, setUserFinder, setUserGroupFinder, setUserGroupGroupRoleLocalService, setUserGroupGroupRolePersistence, setUserGroupGroupRoleService, setUserGroupLocalService, setUserGroupPersistence, setUserGroupRoleFinder, setUserGroupRoleLocalService, setUserGroupRolePersistence, setUserGroupRoleService, setUserGroupService, setUserIdMapperLocalService, setUserIdMapperPersistence, setUserLocalService, setUserNotificationDeliveryLocalService, setUserNotificationDeliveryPersistence, setUserNotificationEventLocalService, setUserNotificationEventPersistence, setUserPersistence, setUserService, setUserTrackerLocalService, setUserTrackerPathLocalService, setUserTrackerPathPersistence, setUserTrackerPersistence, setVirtualHostLocalService, setVirtualHostPersistence, setWebDAVPropsLocalService, setWebDAVPropsPersistence, setWebsiteLocalService, setWebsitePersistence, setWebsiteService, setWorkflowDefinitionLinkLocalService, setWorkflowDefinitionLinkPersistence, setWorkflowInstanceLinkLocalService, setWorkflowInstanceLinkPersistencepublic com.liferay.portal.model.Role addRole(java.lang.String className,
long classPK,
java.lang.String name,
java.util.Map<java.util.Locale,java.lang.String> titleMap,
java.util.Map<java.util.Locale,java.lang.String> descriptionMap,
int type,
java.lang.String subtype,
com.liferay.portal.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
className - the name of the class for which the role is createdclassPK - the primary key of the class for which the role is
created (optionally 0)name - the role's nametitleMap - the role's localized titles (optionally
null)descriptionMap - the role's localized descriptions (optionally
null)type - the role's type (optionally 0)subtype - the role's subtype (optionally null)serviceContext - the service context to be applied (optionally
null). Can set the expando bridge attributes for the
role.com.liferay.portal.kernel.exception.PortalException - if a user with the primary key could not be
found, if the user did not have permission to add roles, if the
class name or the role name were invalid, or if the role is a
duplicatecom.liferay.portal.kernel.exception.SystemException - if a system exception occurredpublic com.liferay.portal.model.Role addRole(java.lang.String name,
java.util.Map<java.util.Locale,java.lang.String> titleMap,
java.util.Map<java.util.Locale,java.lang.String> descriptionMap,
int type)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
addRole(String, long,
String, Map, Map, int, String, ServiceContext)name - the role's nametitleMap - the role's localized titles (optionally
null)descriptionMap - the role's localized descriptions (optionally
null)type - the role's type (optionally 0)com.liferay.portal.kernel.exception.PortalException - if a user with the primary key could not be
found, if the user did not have permission to add roles, if
the class name or the role name were invalid, or if the role
is a duplicatecom.liferay.portal.kernel.exception.SystemException - if a system exception occurredpublic void addUserRoles(long userId,
long[] roleIds)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
userId - the primary key of the userroleIds - the primary keys of the rolescom.liferay.portal.kernel.exception.PortalException - if a user with the primary key could not be found
or if the user did not have permission to assign members to one
of the rolescom.liferay.portal.kernel.exception.SystemException - if a system exception occurredpublic void deleteRole(long roleId)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
roleId - the primary key of the rolecom.liferay.portal.kernel.exception.PortalException - if the user did not have permission to delete the
role, if a role with the primary key could not be found, if the
role is a default system role, or if the role's resource could
not be foundcom.liferay.portal.kernel.exception.SystemException - if a system exception occurredpublic java.util.List<com.liferay.portal.model.Role> getGroupRoles(long groupId)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
groupId - the primary key of the groupcom.liferay.portal.kernel.exception.PortalException - if a portal exception occurredcom.liferay.portal.kernel.exception.SystemException - if a system exception occurredpublic com.liferay.portal.model.Role getRole(long roleId)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
roleId - the primary key of the rolecom.liferay.portal.kernel.exception.PortalException - if a role with the primary key could not be found
or if the user did not have permission to view the rolecom.liferay.portal.kernel.exception.SystemException - if a system exception occurredpublic com.liferay.portal.model.Role getRole(long companyId,
java.lang.String name)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
The method searches the system roles map first for default roles. If a role with the name is not found, then the method will query the database.
companyId - the primary key of the companyname - the role's namecom.liferay.portal.kernel.exception.PortalException - if a role with the name could not be found in the
company or if the user did not have permission to view the rolecom.liferay.portal.kernel.exception.SystemException - if a system exception occurredpublic java.util.List<com.liferay.portal.model.Role> getUserGroupGroupRoles(long userId,
long groupId)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
userId - the primary key of the usergroupId - the primary key of the groupcom.liferay.portal.kernel.exception.PortalException - if a portal exception occurredcom.liferay.portal.kernel.exception.SystemException - if a system exception occurredpublic java.util.List<com.liferay.portal.model.Role> getUserGroupRoles(long userId,
long groupId)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
userId - the primary key of the usergroupId - the primary key of the groupcom.liferay.portal.kernel.exception.PortalException - if a portal exception occurredcom.liferay.portal.kernel.exception.SystemException - if a system exception occurredpublic java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(long userId,
java.util.List<com.liferay.portal.model.Group> groups)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
userId - the primary key of the usergroups - the groups (optionally null)com.liferay.portal.kernel.exception.PortalException - if a portal exception occurredcom.liferay.portal.kernel.exception.SystemException - if a system exception occurredpublic java.util.List<com.liferay.portal.model.Role> getUserRoles(long userId)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
userId - the primary key of the usercom.liferay.portal.kernel.exception.PortalException - if a portal exception occurredcom.liferay.portal.kernel.exception.SystemException - if a system exception occurredpublic boolean hasUserRole(long userId,
long companyId,
java.lang.String name,
boolean inherited)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
true if the user is associated with the named
regular role.userId - the primary key of the usercompanyId - the primary key of the companyname - the name of the roleinherited - whether to include the user's inherited roles in the
searchtrue if the user is associated with the regular
role; false otherwisecom.liferay.portal.kernel.exception.PortalException - if a role with the name could not be found in the
company or if a default user for the company could not be foundcom.liferay.portal.kernel.exception.SystemException - if a system exception occurredpublic boolean hasUserRoles(long userId,
long companyId,
java.lang.String[] names,
boolean inherited)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
true if the user has any one of the named regular
roles.userId - the primary key of the usercompanyId - the primary key of the companynames - the names of the rolesinherited - whether to include the user's inherited roles in the
searchtrue if the user has any one of the regular roles;
false otherwisecom.liferay.portal.kernel.exception.PortalException - if any one of the roles with the names could not
be found in the company or if the default user for the company
could not be foundcom.liferay.portal.kernel.exception.SystemException - if a system exception occurredpublic void unsetUserRoles(long userId,
long[] roleIds)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
userId - the primary key of the userroleIds - the primary keys of the rolescom.liferay.portal.kernel.exception.PortalException - if a user with the primary key could not be
found, if the user did not have permission to remove members from
a role, or if a role with any one of the primary keys could not
be foundcom.liferay.portal.kernel.exception.SystemException - if a system exception occurredpublic com.liferay.portal.model.Role updateRole(long roleId,
java.lang.String name,
java.util.Map<java.util.Locale,java.lang.String> titleMap,
java.util.Map<java.util.Locale,java.lang.String> descriptionMap,
java.lang.String subtype,
com.liferay.portal.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
roleId - the primary key of the rolename - the role's new nametitleMap - the new localized titles (optionally null)
to replace those existing for the roledescriptionMap - the new localized descriptions (optionally
null) to replace those existing for the rolesubtype - the role's new subtype (optionally null)serviceContext - the service context to be applied (optionally
null). Can set the expando bridge attributes for the
role.com.liferay.portal.kernel.exception.PortalException - if the user did not have permission to update the
role, if a role with the primary could not be found, or if the
role's name was invalidcom.liferay.portal.kernel.exception.SystemException - if a system exception occurredprotected void checkUserRolesPermission(long userId,
long[] roleIds)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionprotected java.util.List<com.liferay.portal.model.Role> filterRoles(java.util.List<com.liferay.portal.model.Role> roles)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException