com.liferay.portal.service.impl
Class RoleLocalServiceImpl
java.lang.Object
com.liferay.portal.service.base.RoleLocalServiceBaseImpl
com.liferay.portal.service.impl.RoleLocalServiceImpl
- All Implemented Interfaces:
- com.liferay.portal.service.RoleLocalService
public class RoleLocalServiceImpl
- extends RoleLocalServiceBaseImpl
View Source
- Author:
- Brian Wing Shun Chan
Fields inherited from class com.liferay.portal.service.base.RoleLocalServiceBaseImpl |
accountLocalService, accountPersistence, accountService, addressLocalService, addressPersistence, addressService, classNameLocalService, classNamePersistence, classNameService, companyLocalService, companyPersistence, companyService, contactLocalService, contactPersistence, contactService, counterLocalService, counterService, countryPersistence, countryService, emailAddressLocalService, emailAddressPersistence, emailAddressService, groupFinder, groupLocalService, groupPersistence, groupService, imageLocalService, imagePersistence, layoutFinder, layoutLocalService, layoutPersistence, layoutService, layoutSetLocalService, layoutSetPersistence, layoutSetService, layoutTemplateLocalService, listTypePersistence, listTypeService, membershipRequestLocalService, membershipRequestPersistence, membershipRequestService, organizationFinder, organizationLocalService, organizationPersistence, organizationService, orgGroupPermissionFinder, orgGroupPermissionPersistence, orgGroupRolePersistence, orgLaborLocalService, orgLaborPersistence, orgLaborService, passwordPolicyFinder, passwordPolicyLocalService, passwordPolicyPersistence, passwordPolicyRelLocalService, passwordPolicyRelPersistence, passwordPolicyService, passwordTrackerLocalService, passwordTrackerPersistence, permissionFinder, permissionLocalService, permissionPersistence, permissionService, permissionUserFinder, phoneLocalService, phonePersistence, phoneService, pluginSettingLocalService, pluginSettingPersistence, pluginSettingService, portalLocalService, portalService, portletItemLocalService, portletItemPersistence, portletLocalService, portletPersistence, portletPreferencesFinder, portletPreferencesLocalService, portletPreferencesPersistence, portletPreferencesService, portletService, quartzLocalService, regionPersistence, regionService, releaseLocalService, releasePersistence, resourceCodeLocalService, resourceCodePersistence, resourceFinder, resourceLocalService, resourcePersistence, resourceService, roleFinder, roleLocalService, rolePersistence, roleService, serviceComponentLocalService, serviceComponentPersistence, subscriptionLocalService, subscriptionPersistence, themeLocalService, themeService, userFinder, userGroupFinder, userGroupLocalService, userGroupPersistence, userGroupRoleLocalService, userGroupRolePersistence, userGroupRoleService, userGroupService, userIdMapperLocalService, userIdMapperPersistence, userLocalService, userPersistence, userService, userTrackerLocalService, userTrackerPathLocalService, userTrackerPathPersistence, userTrackerPersistence, webDAVPropsLocalService, webDAVPropsPersistence, websiteLocalService, websitePersistence, websiteService |
Method Summary |
com.liferay.portal.model.Role |
addRole(long userId,
long companyId,
java.lang.String name,
java.lang.String description,
int type)
|
com.liferay.portal.model.Role |
addRole(long userId,
long companyId,
java.lang.String name,
java.lang.String description,
int type,
java.lang.String className,
long classPK)
|
void |
addUserRoles(long userId,
long[] roleIds)
|
void |
checkSystemRoles(long companyId)
|
void |
deleteRole(long roleId)
|
com.liferay.portal.model.Role |
getGroupRole(long companyId,
long groupId)
|
java.util.List<com.liferay.portal.model.Role> |
getGroupRoles(long groupId)
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getResourceRoles(long companyId,
java.lang.String name,
int scope,
java.lang.String primKey)
|
com.liferay.portal.model.Role |
getRole(long roleId)
|
com.liferay.portal.model.Role |
getRole(long companyId,
java.lang.String name)
|
java.util.List<com.liferay.portal.model.Role> |
getRoles(long companyId)
|
java.util.List<com.liferay.portal.model.Role> |
getRoles(long[] roleIds)
|
java.util.List<com.liferay.portal.model.Role> |
getUserGroupRoles(long userId,
long groupId)
|
java.util.List<com.liferay.portal.model.Role> |
getUserRelatedRoles(long userId,
java.util.List<com.liferay.portal.model.Group> groups)
|
java.util.List<com.liferay.portal.model.Role> |
getUserRelatedRoles(long userId,
long groupId)
|
java.util.List<com.liferay.portal.model.Role> |
getUserRelatedRoles(long userId,
long[] groupIds)
|
java.util.List<com.liferay.portal.model.Role> |
getUserRoles(long userId)
|
boolean |
hasUserRole(long userId,
long roleId)
|
boolean |
hasUserRole(long userId,
long companyId,
java.lang.String name,
boolean inherited)
Returns true if the user has the role. |
boolean |
hasUserRoles(long userId,
long companyId,
java.lang.String[] names,
boolean inherited)
Returns true if the user has any one of the specified roles. |
java.util.List<com.liferay.portal.model.Role> |
search(long companyId,
java.lang.String name,
java.lang.String description,
java.lang.Integer type,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator obc)
|
java.util.List<com.liferay.portal.model.Role> |
search(long companyId,
java.lang.String name,
java.lang.String description,
java.lang.Integer type,
java.util.LinkedHashMap<java.lang.String,java.lang.Object> params,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator obc)
|
int |
searchCount(long companyId,
java.lang.String name,
java.lang.String description,
java.lang.Integer type)
|
int |
searchCount(long companyId,
java.lang.String name,
java.lang.String description,
java.lang.Integer type,
java.util.LinkedHashMap<java.lang.String,java.lang.Object> params)
|
protected void |
setLocalizedAttributes(com.liferay.portal.model.Role role,
java.util.Map<java.util.Locale,java.lang.String> localeTitlesMap)
|
void |
setUserRoles(long userId,
long[] roleIds)
|
void |
unsetUserRoles(long userId,
long[] roleIds)
|
com.liferay.portal.model.Role |
updateRole(long roleId,
java.lang.String name,
java.util.Map<java.util.Locale,java.lang.String> localeTitlesMap,
java.lang.String description,
java.lang.String subtype)
|
protected void |
validate(long roleId,
long companyId,
java.lang.String name)
|
Methods inherited from class com.liferay.portal.service.base.RoleLocalServiceBaseImpl |
addRole, createRole, deleteRole, dynamicQuery, dynamicQuery, getAccountLocalService, getAccountPersistence, getAccountService, getAddressLocalService, getAddressPersistence, getAddressService, getClassNameLocalService, getClassNamePersistence, getClassNameService, getCompanyLocalService, getCompanyPersistence, getCompanyService, getContactLocalService, getContactPersistence, getContactService, getCounterLocalService, getCounterService, getCountryPersistence, getCountryService, getEmailAddressLocalService, getEmailAddressPersistence, getEmailAddressService, getGroupFinder, getGroupLocalService, getGroupPersistence, getGroupService, getImageLocalService, getImagePersistence, getLayoutFinder, getLayoutLocalService, getLayoutPersistence, getLayoutService, getLayoutSetLocalService, getLayoutSetPersistence, getLayoutSetService, getLayoutTemplateLocalService, getListTypePersistence, getListTypeService, getMembershipRequestLocalService, getMembershipRequestPersistence, getMembershipRequestService, getOrganizationFinder, getOrganizationLocalService, getOrganizationPersistence, getOrganizationService, getOrgGroupPermissionFinder, getOrgGroupPermissionPersistence, getOrgGroupRolePersistence, getOrgLaborLocalService, getOrgLaborPersistence, getOrgLaborService, getPasswordPolicyFinder, getPasswordPolicyLocalService, getPasswordPolicyPersistence, getPasswordPolicyRelLocalService, getPasswordPolicyRelPersistence, getPasswordPolicyService, getPasswordTrackerLocalService, getPasswordTrackerPersistence, getPermissionFinder, getPermissionLocalService, getPermissionPersistence, getPermissionService, getPermissionUserFinder, getPhoneLocalService, getPhonePersistence, getPhoneService, getPluginSettingLocalService, getPluginSettingPersistence, getPluginSettingService, getPortalLocalService, getPortalService, getPortletItemLocalService, getPortletItemPersistence, getPortletLocalService, getPortletPersistence, getPortletPreferencesFinder, getPortletPreferencesLocalService, getPortletPreferencesPersistence, getPortletPreferencesService, getPortletService, getQuartzLocalService, getRegionPersistence, getRegionService, getReleaseLocalService, getReleasePersistence, getResourceCodeLocalService, getResourceCodePersistence, getResourceFinder, getResourceLocalService, getResourcePersistence, getResourceService, getRoleFinder, getRoleLocalService, getRolePersistence, getRoles, getRolesCount, getRoleService, getServiceComponentLocalService, getServiceComponentPersistence, getSubscriptionLocalService, getSubscriptionPersistence, getThemeLocalService, getThemeService, getUserFinder, getUserGroupFinder, getUserGroupLocalService, getUserGroupPersistence, getUserGroupRoleLocalService, getUserGroupRolePersistence, getUserGroupRoleService, getUserGroupService, getUserIdMapperLocalService, getUserIdMapperPersistence, getUserLocalService, getUserPersistence, getUserService, getUserTrackerLocalService, getUserTrackerPathLocalService, getUserTrackerPathPersistence, getUserTrackerPersistence, getWebDAVPropsLocalService, getWebDAVPropsPersistence, getWebsiteLocalService, getWebsitePersistence, getWebsiteService, setAccountLocalService, setAccountPersistence, setAccountService, setAddressLocalService, setAddressPersistence, setAddressService, setClassNameLocalService, setClassNamePersistence, setClassNameService, setCompanyLocalService, setCompanyPersistence, setCompanyService, setContactLocalService, setContactPersistence, setContactService, setCounterLocalService, setCounterService, setCountryPersistence, setCountryService, setEmailAddressLocalService, setEmailAddressPersistence, setEmailAddressService, setGroupFinder, setGroupLocalService, setGroupPersistence, setGroupService, setImageLocalService, setImagePersistence, setLayoutFinder, setLayoutLocalService, setLayoutPersistence, setLayoutService, setLayoutSetLocalService, setLayoutSetPersistence, setLayoutSetService, setLayoutTemplateLocalService, setListTypePersistence, setListTypeService, setMembershipRequestLocalService, setMembershipRequestPersistence, setMembershipRequestService, setOrganizationFinder, setOrganizationLocalService, setOrganizationPersistence, setOrganizationService, setOrgGroupPermissionFinder, setOrgGroupPermissionPersistence, setOrgGroupRolePersistence, setOrgLaborLocalService, setOrgLaborPersistence, setOrgLaborService, setPasswordPolicyFinder, setPasswordPolicyLocalService, setPasswordPolicyPersistence, setPasswordPolicyRelLocalService, setPasswordPolicyRelPersistence, setPasswordPolicyService, setPasswordTrackerLocalService, setPasswordTrackerPersistence, setPermissionFinder, setPermissionLocalService, setPermissionPersistence, setPermissionService, setPermissionUserFinder, setPhoneLocalService, setPhonePersistence, setPhoneService, setPluginSettingLocalService, setPluginSettingPersistence, setPluginSettingService, setPortalLocalService, setPortalService, setPortletItemLocalService, setPortletItemPersistence, setPortletLocalService, setPortletPersistence, setPortletPreferencesFinder, setPortletPreferencesLocalService, setPortletPreferencesPersistence, setPortletPreferencesService, setPortletService, setQuartzLocalService, setRegionPersistence, setRegionService, setReleaseLocalService, setReleasePersistence, setResourceCodeLocalService, setResourceCodePersistence, setResourceFinder, setResourceLocalService, setResourcePersistence, setResourceService, setRoleFinder, setRoleLocalService, setRolePersistence, setRoleService, setServiceComponentLocalService, setServiceComponentPersistence, setSubscriptionLocalService, setSubscriptionPersistence, setThemeLocalService, setThemeService, setUserFinder, setUserGroupFinder, setUserGroupLocalService, setUserGroupPersistence, setUserGroupRoleLocalService, setUserGroupRolePersistence, setUserGroupRoleService, setUserGroupService, setUserIdMapperLocalService, setUserIdMapperPersistence, setUserLocalService, setUserPersistence, setUserService, setUserTrackerLocalService, setUserTrackerPathLocalService, setUserTrackerPathPersistence, setUserTrackerPersistence, setWebDAVPropsLocalService, setWebDAVPropsPersistence, setWebsiteLocalService, setWebsitePersistence, setWebsiteService, updateRole |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RoleLocalServiceImpl
public RoleLocalServiceImpl()
addRole
public com.liferay.portal.model.Role addRole(long userId,
long companyId,
java.lang.String name,
java.lang.String description,
int type)
throws com.liferay.portal.PortalException,
com.liferay.portal.SystemException
- Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException
addRole
public com.liferay.portal.model.Role addRole(long userId,
long companyId,
java.lang.String name,
java.lang.String description,
int type,
java.lang.String className,
long classPK)
throws com.liferay.portal.PortalException,
com.liferay.portal.SystemException
- Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException
addUserRoles
public void addUserRoles(long userId,
long[] roleIds)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
checkSystemRoles
public void checkSystemRoles(long companyId)
throws com.liferay.portal.PortalException,
com.liferay.portal.SystemException
- Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException
deleteRole
public void deleteRole(long roleId)
throws com.liferay.portal.PortalException,
com.liferay.portal.SystemException
- Specified by:
deleteRole
in interface com.liferay.portal.service.RoleLocalService
- Overrides:
deleteRole
in class RoleLocalServiceBaseImpl
- Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException
getGroupRole
public com.liferay.portal.model.Role getGroupRole(long companyId,
long groupId)
throws com.liferay.portal.PortalException,
com.liferay.portal.SystemException
- Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException
getGroupRoles
public java.util.List<com.liferay.portal.model.Role> getGroupRoles(long groupId)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
getResourceRoles
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getResourceRoles(long companyId,
java.lang.String name,
int scope,
java.lang.String primKey)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
getRole
public com.liferay.portal.model.Role getRole(long roleId)
throws com.liferay.portal.PortalException,
com.liferay.portal.SystemException
- Specified by:
getRole
in interface com.liferay.portal.service.RoleLocalService
- Overrides:
getRole
in class RoleLocalServiceBaseImpl
- Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException
getRole
public com.liferay.portal.model.Role getRole(long companyId,
java.lang.String name)
throws com.liferay.portal.PortalException,
com.liferay.portal.SystemException
- Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException
getRoles
public java.util.List<com.liferay.portal.model.Role> getRoles(long companyId)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
getRoles
public java.util.List<com.liferay.portal.model.Role> getRoles(long[] roleIds)
throws com.liferay.portal.PortalException,
com.liferay.portal.SystemException
- Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException
getUserGroupRoles
public java.util.List<com.liferay.portal.model.Role> getUserGroupRoles(long userId,
long groupId)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
getUserRelatedRoles
public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(long userId,
long groupId)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
getUserRelatedRoles
public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(long userId,
long[] groupIds)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
getUserRelatedRoles
public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(long userId,
java.util.List<com.liferay.portal.model.Group> groups)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
getUserRoles
public java.util.List<com.liferay.portal.model.Role> getUserRoles(long userId)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
hasUserRole
public boolean hasUserRole(long userId,
long roleId)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
hasUserRole
public boolean hasUserRole(long userId,
long companyId,
java.lang.String name,
boolean inherited)
throws com.liferay.portal.PortalException,
com.liferay.portal.SystemException
- Returns true if the user has the role.
- Parameters:
userId
- the user id of the usercompanyId
- the company id of the companyname
- the name of the roleinherited
- boolean value for whether to check roles inherited
from the community, organization, location, or user group
- Returns:
- true if the user has the role
- Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException
hasUserRoles
public boolean hasUserRoles(long userId,
long companyId,
java.lang.String[] names,
boolean inherited)
throws com.liferay.portal.PortalException,
com.liferay.portal.SystemException
- Returns true if the user has any one of the specified roles.
- Parameters:
userId
- the user id of the usercompanyId
- the company id of the companynames
- an array of role namesinherited
- boolean value for whether to check roles inherited
from the community, organization, location, or user group
- Returns:
- true if the user has the role
- Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException
search
public java.util.List<com.liferay.portal.model.Role> search(long companyId,
java.lang.String name,
java.lang.String description,
java.lang.Integer type,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator obc)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
search
public java.util.List<com.liferay.portal.model.Role> search(long companyId,
java.lang.String name,
java.lang.String description,
java.lang.Integer type,
java.util.LinkedHashMap<java.lang.String,java.lang.Object> params,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator obc)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
searchCount
public int searchCount(long companyId,
java.lang.String name,
java.lang.String description,
java.lang.Integer type)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
searchCount
public int searchCount(long companyId,
java.lang.String name,
java.lang.String description,
java.lang.Integer type,
java.util.LinkedHashMap<java.lang.String,java.lang.Object> params)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
setUserRoles
public void setUserRoles(long userId,
long[] roleIds)
throws com.liferay.portal.PortalException,
com.liferay.portal.SystemException
- Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException
unsetUserRoles
public void unsetUserRoles(long userId,
long[] roleIds)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
updateRole
public com.liferay.portal.model.Role updateRole(long roleId,
java.lang.String name,
java.util.Map<java.util.Locale,java.lang.String> localeTitlesMap,
java.lang.String description,
java.lang.String subtype)
throws com.liferay.portal.PortalException,
com.liferay.portal.SystemException
- Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException
setLocalizedAttributes
protected void setLocalizedAttributes(com.liferay.portal.model.Role role,
java.util.Map<java.util.Locale,java.lang.String> localeTitlesMap)
validate
protected void validate(long roleId,
long companyId,
java.lang.String name)
throws com.liferay.portal.PortalException,
com.liferay.portal.SystemException
- Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException