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
Method Summary |
com.liferay.portal.model.Role |
addRole(long userId,
long companyId,
java.lang.String name,
int type)
|
com.liferay.portal.model.Role |
addRole(long userId,
long companyId,
java.lang.String name,
int type,
java.lang.String className,
long classPK)
|
void |
checkSystemRoles(long companyId)
|
void |
deleteRole(long roleId)
|
com.liferay.portal.model.Role |
getGroupRole(long companyId,
long groupId)
|
java.util.List |
getGroupRoles(long groupId)
|
java.util.Map |
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 |
getUserGroupRoles(long userId,
long groupId)
|
java.util.List |
getUserRelatedRoles(long userId,
java.util.List groups)
|
java.util.List |
getUserRelatedRoles(long userId,
long groupId)
|
java.util.List |
getUserRelatedRoles(long userId,
long[] groupIds)
|
java.util.List |
getUserRoles(long userId)
|
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 |
search(long companyId,
java.lang.String name,
java.lang.String description,
java.lang.Integer type,
int begin,
int end)
|
int |
searchCount(long companyId,
java.lang.String name,
java.lang.String description,
java.lang.Integer type)
|
void |
setUserRoles(long userId,
long[] roleIds)
|
com.liferay.portal.model.Role |
updateRole(long roleId,
java.lang.String name)
|
protected void |
validate(long roleId,
long companyId,
java.lang.String name)
|
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,
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,
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
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
- 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 getGroupRoles(long groupId)
throws com.liferay.portal.PortalException,
com.liferay.portal.SystemException
- Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException
getResourceRoles
public java.util.Map 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
- 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
getUserGroupRoles
public java.util.List getUserGroupRoles(long userId,
long groupId)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
getUserRelatedRoles
public java.util.List getUserRelatedRoles(long userId,
long groupId)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
getUserRelatedRoles
public java.util.List getUserRelatedRoles(long userId,
long[] groupIds)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
getUserRelatedRoles
public java.util.List getUserRelatedRoles(long userId,
java.util.List groups)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
getUserRoles
public java.util.List getUserRoles(long userId)
throws com.liferay.portal.PortalException,
com.liferay.portal.SystemException
- Throws:
com.liferay.portal.PortalException
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 search(long companyId,
java.lang.String name,
java.lang.String description,
java.lang.Integer type,
int begin,
int end)
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
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
updateRole
public com.liferay.portal.model.Role updateRole(long roleId,
java.lang.String name)
throws com.liferay.portal.PortalException,
com.liferay.portal.SystemException
- Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException
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