@ProviderType public class RoleLocalServiceWrapper extends Object implements RoleLocalService, ServiceWrapper<RoleLocalService>
RoleLocalService
.RoleLocalService
Constructor and Description |
---|
RoleLocalServiceWrapper(RoleLocalService roleLocalService) |
Modifier and Type | Method and Description |
---|---|
void |
addGroupRole(long groupId,
long roleId) |
void |
addGroupRole(long groupId,
Role role) |
void |
addGroupRoles(long groupId,
List<Role> roles) |
void |
addGroupRoles(long groupId,
long[] roleIds) |
Role |
addRole(long userId,
String className,
long classPK,
String name,
Map<Locale,String> titleMap,
Map<Locale,String> descriptionMap,
int type,
String subtype,
ServiceContext serviceContext)
Adds a role with additional parameters.
|
Role |
addRole(Role role)
Adds the role to the database.
|
void |
addUserRole(long userId,
long roleId) |
void |
addUserRole(long userId,
Role role) |
void |
addUserRoles(long userId,
List<Role> roles) |
void |
addUserRoles(long userId,
long[] roleIds) |
void |
checkSystemRoles()
Checks to ensure that the system roles map has appropriate default roles
in each company.
|
void |
checkSystemRoles(long companyId)
Checks to ensure that the system roles map has appropriate default roles
in the company.
|
void |
clearGroupRoles(long groupId) |
void |
clearUserRoles(long userId) |
Role |
createRole(long roleId)
Creates a new role with the primary key.
|
void |
deleteGroupRole(long groupId,
long roleId) |
void |
deleteGroupRole(long groupId,
Role role) |
void |
deleteGroupRoles(long groupId,
List<Role> roles) |
void |
deleteGroupRoles(long groupId,
long[] roleIds) |
PersistedModel |
deletePersistedModel(PersistedModel persistedModel) |
Role |
deleteRole(long roleId)
Deletes the role with the primary key from the database.
|
Role |
deleteRole(Role role)
Deletes the role from the database.
|
void |
deleteUserRole(long userId,
long roleId) |
void |
deleteUserRole(long userId,
Role role) |
void |
deleteUserRoles(long userId,
List<Role> roles) |
void |
deleteUserRoles(long userId,
long[] roleIds) |
DynamicQuery |
dynamicQuery() |
<T> List<T> |
dynamicQuery(DynamicQuery dynamicQuery)
Performs a dynamic query on the database and returns the matching rows.
|
<T> List<T> |
dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end)
Performs a dynamic query on the database and returns a range of the matching rows.
|
<T> List<T> |
dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end,
OrderByComparator<T> orderByComparator)
Performs a dynamic query on the database and returns an ordered range of the matching rows.
|
long |
dynamicQueryCount(DynamicQuery dynamicQuery)
Returns the number of rows matching the dynamic query.
|
long |
dynamicQueryCount(DynamicQuery dynamicQuery,
Projection projection)
Returns the number of rows matching the dynamic query.
|
Role |
fetchRole(long roleId) |
Role |
fetchRole(long companyId,
String name)
Returns the role with the name in the company.
|
Role |
fetchRoleByUuidAndCompanyId(String uuid,
long companyId)
Returns the role with the matching UUID and company.
|
ActionableDynamicQuery |
getActionableDynamicQuery() |
Role |
getDefaultGroupRole(long groupId)
Returns the default role for the group with the primary key.
|
ExportActionableDynamicQuery |
getExportActionableDynamicQuery(PortletDataContext portletDataContext) |
long[] |
getGroupPrimaryKeys(long roleId)
Returns the groupIds of the groups associated with the role.
|
List<Role> |
getGroupRelatedRoles(long groupId) |
List<Role> |
getGroupRoles(long groupId) |
List<Role> |
getGroupRoles(long groupId,
int start,
int end) |
List<Role> |
getGroupRoles(long groupId,
int start,
int end,
OrderByComparator<Role> orderByComparator) |
List<Role> |
getGroupRolesAndTeamRoles(long companyId,
String keywords,
List<String> excludedNames,
int[] types,
long excludedTeamRoleId,
long teamGroupId,
int start,
int end) |
int |
getGroupRolesAndTeamRolesCount(long companyId,
String keywords,
List<String> excludedNames,
int[] types,
long excludedTeamRoleId,
long teamGroupId) |
int |
getGroupRolesCount(long groupId) |
IndexableActionableDynamicQuery |
getIndexableActionableDynamicQuery() |
String |
getOSGiServiceIdentifier()
Returns the OSGi service identifier.
|
PersistedModel |
getPersistedModel(Serializable primaryKeyObj) |
List<Role> |
getResourceBlockRoles(long resourceBlockId,
String className,
String actionId) |
Map<String,List<String>> |
getResourceRoles(long companyId,
String name,
int scope,
String primKey)
Returns a map of role names to associated action IDs for the named
resource in the company within the permission scope.
|
List<Role> |
getResourceRoles(long companyId,
String name,
int scope,
String primKey,
String actionId)
Returns all the roles associated with the action ID in the company within
the permission scope.
|
Role |
getRole(long roleId)
Returns the role with the primary key.
|
Role |
getRole(long companyId,
String name)
Returns the role with the name in the company.
|
Role |
getRoleByUuidAndCompanyId(String uuid,
long companyId)
Returns the role with the matching UUID and company.
|
List<Role> |
getRoles(int start,
int end)
Returns a range of all the roles.
|
List<Role> |
getRoles(int type,
String subtype)
Returns all the roles of the type and subtype.
|
List<Role> |
getRoles(long companyId)
Returns all the roles in the company.
|
List<Role> |
getRoles(long[] roleIds)
Returns all the roles with the primary keys.
|
List<Role> |
getRoles(long companyId,
int[] types)
Returns all the roles with the types.
|
int |
getRolesCount()
Returns the number of roles.
|
List<Role> |
getSubtypeRoles(String subtype)
Returns all the roles of the subtype.
|
int |
getSubtypeRolesCount(String subtype)
Returns the number of roles of the subtype.
|
Role |
getTeamRole(long companyId,
long teamId)
Returns the team role in the company.
|
Map<Team,Role> |
getTeamRoleMap(long groupId)
Returns the team role map for the group.
|
List<Role> |
getTeamRoles(long groupId)
Returns the team roles in the group.
|
List<Role> |
getTeamRoles(long groupId,
long[] excludedRoleIds)
Returns the team roles in the group, excluding the specified role IDs.
|
List<Role> |
getTeamsRoles(long companyId,
long[] teamIds)
Returns the team roles in the company.
|
List<Role> |
getTypeRoles(int type)
Returns all the roles of the type.
|
List<Role> |
getTypeRoles(int type,
int start,
int end)
Returns a range of all the roles of the type.
|
int |
getTypeRolesCount(int type)
Returns the number of roles of the type.
|
List<Role> |
getUserGroupGroupRoles(long userId,
long groupId)
Returns all the user's roles within the user group.
|
List<Role> |
getUserGroupGroupRoles(long userId,
long groupId,
int start,
int end) |
int |
getUserGroupGroupRolesCount(long userId,
long groupId) |
List<Role> |
getUserGroupRoles(long userId,
long groupId)
Returns all the user's roles within the user group.
|
long[] |
getUserPrimaryKeys(long roleId)
Returns the userIds of the users associated with the role.
|
List<Role> |
getUserRelatedRoles(long userId,
List<Group> groups)
Returns the union of all the user's roles within the groups.
|
List<Role> |
getUserRelatedRoles(long userId,
long groupId)
Returns all the user's roles within the group.
|
List<Role> |
getUserRelatedRoles(long userId,
long[] groupIds)
Returns the union of all the user's roles within the groups.
|
List<Role> |
getUserRoles(long userId) |
List<Role> |
getUserRoles(long userId,
int start,
int end) |
List<Role> |
getUserRoles(long userId,
int start,
int end,
OrderByComparator<Role> orderByComparator) |
int |
getUserRolesCount(long userId) |
List<Role> |
getUserTeamRoles(long userId,
long groupId) |
RoleLocalService |
getWrappedService() |
boolean |
hasGroupRole(long groupId,
long roleId) |
boolean |
hasGroupRoles(long groupId) |
boolean |
hasUserRole(long userId,
long roleId) |
boolean |
hasUserRole(long userId,
long companyId,
String name,
boolean inherited)
Returns
true if the user is associated with the named
regular role. |
boolean |
hasUserRoles(long userId) |
boolean |
hasUserRoles(long userId,
long companyId,
String[] names,
boolean inherited)
Returns
true if the user has any one of the named regular
roles. |
Role |
loadFetchRole(long companyId,
String name)
Returns a role with the name in the company.
|
Role |
loadGetRole(long companyId,
String name)
Returns a role with the name in the company.
|
List<Role> |
search(long companyId,
String keywords,
Integer[] types,
int start,
int end,
OrderByComparator<Role> obc)
Returns an ordered range of all the roles that match the keywords and
types.
|
List<Role> |
search(long companyId,
String keywords,
Integer[] types,
LinkedHashMap<String,Object> params,
int start,
int end,
OrderByComparator<Role> obc)
Returns an ordered range of all the roles that match the keywords, types,
and params.
|
List<Role> |
search(long companyId,
String name,
String description,
Integer[] types,
int start,
int end,
OrderByComparator<Role> obc)
Returns an ordered range of all the roles that match the name,
description, and types.
|
List<Role> |
search(long companyId,
String name,
String description,
Integer[] types,
LinkedHashMap<String,Object> params,
int start,
int end,
OrderByComparator<Role> obc)
Returns an ordered range of all the roles that match the name,
description, types, and params.
|
int |
searchCount(long companyId,
String keywords,
Integer[] types)
Returns the number of roles that match the keywords and types.
|
int |
searchCount(long companyId,
String keywords,
Integer[] types,
LinkedHashMap<String,Object> params)
Returns the number of roles that match the keywords, types and params.
|
int |
searchCount(long companyId,
String name,
String description,
Integer[] types)
Returns the number of roles that match the name, description, and types.
|
int |
searchCount(long companyId,
String name,
String description,
Integer[] types,
LinkedHashMap<String,Object> params)
Returns the number of roles that match the name, description, types, and
params.
|
void |
setGroupRoles(long groupId,
long[] roleIds) |
void |
setUserRoles(long userId,
long[] roleIds) |
void |
setWrappedService(RoleLocalService roleLocalService) |
void |
unsetUserRoles(long userId,
long[] roleIds)
Removes the matching roles associated with the user.
|
Role |
updateRole(long roleId,
String name,
Map<Locale,String> titleMap,
Map<Locale,String> descriptionMap,
String subtype,
ServiceContext serviceContext)
Updates the role with the primary key.
|
Role |
updateRole(Role role)
Updates the role in the database or adds it if it does not yet exist.
|
public RoleLocalServiceWrapper(RoleLocalService roleLocalService)
public void addGroupRole(long groupId, long roleId)
addGroupRole
in interface RoleLocalService
public void addGroupRole(long groupId, Role role)
addGroupRole
in interface RoleLocalService
public void addGroupRoles(long groupId, List<Role> roles)
addGroupRoles
in interface RoleLocalService
public void addGroupRoles(long groupId, long[] roleIds)
addGroupRoles
in interface RoleLocalService
public Role addRole(long userId, String className, long classPK, String name, Map<Locale,String> titleMap, Map<Locale,String> descriptionMap, int type, String subtype, ServiceContext serviceContext) throws PortalException
addRole
in interface RoleLocalService
userId
- the primary key of the userclassName
- the name of the class for which the role is created
(optionally null
)classPK
- 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 expando bridge attributes for the
role.PortalException
public Role addRole(Role role)
addRole
in interface RoleLocalService
role
- the rolepublic void addUserRole(long userId, long roleId) throws PortalException
addUserRole
in interface RoleLocalService
PortalException
public void addUserRole(long userId, Role role) throws PortalException
addUserRole
in interface RoleLocalService
PortalException
public void addUserRoles(long userId, List<Role> roles) throws PortalException
addUserRoles
in interface RoleLocalService
PortalException
public void addUserRoles(long userId, long[] roleIds) throws PortalException
addUserRoles
in interface RoleLocalService
PortalException
public void checkSystemRoles() throws PortalException
checkSystemRoles
in interface RoleLocalService
PortalException
public void checkSystemRoles(long companyId) throws PortalException
checkSystemRoles
in interface RoleLocalService
companyId
- the primary key of the companyPortalException
public void clearGroupRoles(long groupId)
clearGroupRoles
in interface RoleLocalService
public void clearUserRoles(long userId) throws PortalException
clearUserRoles
in interface RoleLocalService
PortalException
public Role createRole(long roleId)
createRole
in interface RoleLocalService
roleId
- the primary key for the new rolepublic void deleteGroupRole(long groupId, long roleId)
deleteGroupRole
in interface RoleLocalService
public void deleteGroupRole(long groupId, Role role)
deleteGroupRole
in interface RoleLocalService
public void deleteGroupRoles(long groupId, List<Role> roles)
deleteGroupRoles
in interface RoleLocalService
public void deleteGroupRoles(long groupId, long[] roleIds)
deleteGroupRoles
in interface RoleLocalService
public PersistedModel deletePersistedModel(PersistedModel persistedModel) throws PortalException
deletePersistedModel
in interface PersistedModelLocalService
deletePersistedModel
in interface RoleLocalService
PortalException
public Role deleteRole(long roleId) throws PortalException
deleteRole
in interface RoleLocalService
roleId
- the primary key of the rolePortalException
- if a role with the primary key could not be foundpublic Role deleteRole(Role role) throws PortalException
deleteRole
in interface RoleLocalService
role
- the rolePortalException
public void deleteUserRole(long userId, long roleId) throws PortalException
deleteUserRole
in interface RoleLocalService
PortalException
public void deleteUserRole(long userId, Role role) throws PortalException
deleteUserRole
in interface RoleLocalService
PortalException
public void deleteUserRoles(long userId, List<Role> roles) throws PortalException
deleteUserRoles
in interface RoleLocalService
PortalException
public void deleteUserRoles(long userId, long[] roleIds) throws PortalException
deleteUserRoles
in interface RoleLocalService
PortalException
public DynamicQuery dynamicQuery()
dynamicQuery
in interface RoleLocalService
public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery)
dynamicQuery
in interface RoleLocalService
dynamicQuery
- the dynamic querypublic <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
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. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil.ALL_POS
), then the query will include the default ORDER BY logic from RoleModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
dynamicQuery
in interface RoleLocalService
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> orderByComparator)
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. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil.ALL_POS
), then the query will include the default ORDER BY logic from RoleModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
dynamicQuery
in interface RoleLocalService
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
)public long dynamicQueryCount(DynamicQuery dynamicQuery)
dynamicQueryCount
in interface RoleLocalService
dynamicQuery
- the dynamic querypublic long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection)
dynamicQueryCount
in interface RoleLocalService
dynamicQuery
- the dynamic queryprojection
- the projection to apply to the querypublic Role fetchRole(long roleId)
fetchRole
in interface RoleLocalService
public Role fetchRole(long companyId, String name)
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.
fetchRole
in interface RoleLocalService
companyId
- the primary key of the companyname
- the role's namenull
if a role
with the name could not be found in the companypublic Role fetchRoleByUuidAndCompanyId(String uuid, long companyId)
fetchRoleByUuidAndCompanyId
in interface RoleLocalService
uuid
- the role's UUIDcompanyId
- the primary key of the companynull
if a matching role could not be foundpublic ActionableDynamicQuery getActionableDynamicQuery()
getActionableDynamicQuery
in interface RoleLocalService
public Role getDefaultGroupRole(long groupId) throws PortalException
If the group is a site, then the default role is RoleConstants#SITE_MEMBER
. If the group is an organization, then the
default role is RoleConstants#ORGANIZATION_USER
. If the group is
a user or user group, then the default role is RoleConstants#POWER_USER
. For all other group types, the default role is
RoleConstants#USER
.
getDefaultGroupRole
in interface RoleLocalService
groupId
- the primary key of the groupPortalException
public ExportActionableDynamicQuery getExportActionableDynamicQuery(PortletDataContext portletDataContext)
getExportActionableDynamicQuery
in interface RoleLocalService
public long[] getGroupPrimaryKeys(long roleId)
getGroupPrimaryKeys
in interface RoleLocalService
roleId
- the roleId of the rolepublic List<Role> getGroupRelatedRoles(long groupId) throws PortalException
getGroupRelatedRoles
in interface RoleLocalService
PortalException
public List<Role> getGroupRoles(long groupId)
getGroupRoles
in interface RoleLocalService
public List<Role> getGroupRoles(long groupId, int start, int end)
getGroupRoles
in interface RoleLocalService
public List<Role> getGroupRoles(long groupId, int start, int end, OrderByComparator<Role> orderByComparator)
getGroupRoles
in interface RoleLocalService
public List<Role> getGroupRolesAndTeamRoles(long companyId, String keywords, List<String> excludedNames, int[] types, long excludedTeamRoleId, long teamGroupId, int start, int end)
getGroupRolesAndTeamRoles
in interface RoleLocalService
public int getGroupRolesAndTeamRolesCount(long companyId, String keywords, List<String> excludedNames, int[] types, long excludedTeamRoleId, long teamGroupId)
getGroupRolesAndTeamRolesCount
in interface RoleLocalService
public int getGroupRolesCount(long groupId)
getGroupRolesCount
in interface RoleLocalService
public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
getIndexableActionableDynamicQuery
in interface RoleLocalService
public String getOSGiServiceIdentifier()
getOSGiServiceIdentifier
in interface RoleLocalService
public PersistedModel getPersistedModel(Serializable primaryKeyObj) throws PortalException
getPersistedModel
in interface PersistedModelLocalService
getPersistedModel
in interface RoleLocalService
PortalException
public List<Role> getResourceBlockRoles(long resourceBlockId, String className, String actionId)
getResourceBlockRoles
in interface RoleLocalService
public Map<String,List<String>> getResourceRoles(long companyId, String name, int scope, String primKey)
getResourceRoles
in interface RoleLocalService
companyId
- the primary key of the companyname
- the resource namescope
- the permission scopeprimKey
- the primary key of the resource's classRoleFinder.findByC_N_S_P(
long, String, int, String)
public List<Role> getResourceRoles(long companyId, String name, int scope, String primKey, String actionId)
getResourceRoles
in interface RoleLocalService
companyId
- the primary key of the companyname
- the resource namescope
- the permission scopeprimKey
- the primary key of the resource's classactionId
- the name of the resource actionRoleFinder.findByC_N_S_P_A(
long, String, int, String, String)
public Role getRole(long roleId) throws PortalException
getRole
in interface RoleLocalService
roleId
- the primary key of the rolePortalException
- if a role with the primary key could not be foundpublic Role getRole(long companyId, String name) throws PortalException
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.
getRole
in interface RoleLocalService
companyId
- the primary key of the companyname
- the role's namePortalException
public Role getRoleByUuidAndCompanyId(String uuid, long companyId) throws PortalException
getRoleByUuidAndCompanyId
in interface RoleLocalService
uuid
- the role's UUIDcompanyId
- the primary key of the companyPortalException
- if a matching role could not be foundpublic List<Role> getRoles(int start, int end)
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. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil.ALL_POS
), then the query will include the default ORDER BY logic from RoleModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
getRoles
in interface RoleLocalService
start
- the lower bound of the range of rolesend
- the upper bound of the range of roles (not inclusive)public List<Role> getRoles(int type, String subtype)
getRoles
in interface RoleLocalService
type
- the role's type (optionally 0
)subtype
- the role's subtype (optionally null
)public List<Role> getRoles(long companyId)
getRoles
in interface RoleLocalService
companyId
- the primary key of the companypublic List<Role> getRoles(long companyId, int[] types)
getRoles
in interface RoleLocalService
companyId
- the primary key of the companytypes
- the role types (optionally null
)public List<Role> getRoles(long[] roleIds) throws PortalException
getRoles
in interface RoleLocalService
roleIds
- the primary keys of the rolesPortalException
public int getRolesCount()
getRolesCount
in interface RoleLocalService
public List<Role> getSubtypeRoles(String subtype)
getSubtypeRoles
in interface RoleLocalService
subtype
- the role's subtype (optionally null
)public int getSubtypeRolesCount(String subtype)
getSubtypeRolesCount
in interface RoleLocalService
subtype
- the role's subtype (optionally null
)public Role getTeamRole(long companyId, long teamId) throws PortalException
getTeamRole
in interface RoleLocalService
companyId
- the primary key of the companyteamId
- the primary key of the teamPortalException
public Map<Team,Role> getTeamRoleMap(long groupId) throws PortalException
getTeamRoleMap
in interface RoleLocalService
groupId
- the primary key of the groupPortalException
public List<Role> getTeamRoles(long groupId) throws PortalException
getTeamRoles
in interface RoleLocalService
groupId
- the primary key of the groupPortalException
public List<Role> getTeamRoles(long groupId, long[] excludedRoleIds) throws PortalException
getTeamRoles
in interface RoleLocalService
groupId
- the primary key of the groupexcludedRoleIds
- the primary keys of the roles to exclude
(optionally null
)PortalException
public List<Role> getTeamsRoles(long companyId, long[] teamIds) throws PortalException
getTeamsRoles
in interface RoleLocalService
companyId
- the primary key of the companyteamIds
- the primary keys of the teamsPortalException
public List<Role> getTypeRoles(int type)
getTypeRoles
in interface RoleLocalService
type
- the role's type (optionally 0
)public List<Role> getTypeRoles(int type, int start, int end)
getTypeRoles
in interface RoleLocalService
type
- the role's type (optionally 0
)start
- the lower bound of the range of roles to returnend
- the upper bound of the range of roles to return (not
inclusive)public int getTypeRolesCount(int type)
getTypeRolesCount
in interface RoleLocalService
type
- the role's type (optionally 0
)public List<Role> getUserGroupGroupRoles(long userId, long groupId)
getUserGroupGroupRoles
in interface RoleLocalService
userId
- the primary key of the usergroupId
- the primary key of the groupRoleFinder.findByUserGroupGroupRole(
long, long)
public List<Role> getUserGroupGroupRoles(long userId, long groupId, int start, int end)
getUserGroupGroupRoles
in interface RoleLocalService
public int getUserGroupGroupRolesCount(long userId, long groupId)
getUserGroupGroupRolesCount
in interface RoleLocalService
public List<Role> getUserGroupRoles(long userId, long groupId)
getUserGroupRoles
in interface RoleLocalService
userId
- the primary key of the usergroupId
- the primary key of the groupRoleFinder.findByUserGroupRole(
long, long)
public long[] getUserPrimaryKeys(long roleId)
getUserPrimaryKeys
in interface RoleLocalService
roleId
- the roleId of the rolepublic List<Role> getUserRelatedRoles(long userId, List<Group> groups)
getUserRelatedRoles
in interface RoleLocalService
userId
- the primary key of the usergroups
- the groups (optionally null
)RoleFinder.findByU_G(
long, List)
public List<Role> getUserRelatedRoles(long userId, long groupId)
getUserRelatedRoles
in interface RoleLocalService
userId
- the primary key of the usergroupId
- the primary key of the groupRoleFinder.findByU_G(
long, long)
public List<Role> getUserRelatedRoles(long userId, long[] groupIds)
getUserRelatedRoles
in interface RoleLocalService
userId
- the primary key of the usergroupIds
- the primary keys of the groupsRoleFinder.findByU_G(
long, long[])
public List<Role> getUserRoles(long userId)
getUserRoles
in interface RoleLocalService
public List<Role> getUserRoles(long userId, int start, int end)
getUserRoles
in interface RoleLocalService
public List<Role> getUserRoles(long userId, int start, int end, OrderByComparator<Role> orderByComparator)
getUserRoles
in interface RoleLocalService
public int getUserRolesCount(long userId)
getUserRolesCount
in interface RoleLocalService
public List<Role> getUserTeamRoles(long userId, long groupId)
getUserTeamRoles
in interface RoleLocalService
public boolean hasGroupRole(long groupId, long roleId)
hasGroupRole
in interface RoleLocalService
public boolean hasGroupRoles(long groupId)
hasGroupRoles
in interface RoleLocalService
public boolean hasUserRole(long userId, long roleId)
hasUserRole
in interface RoleLocalService
public boolean hasUserRole(long userId, long companyId, String name, boolean inherited) throws PortalException
true
if the user is associated with the named
regular role.hasUserRole
in interface RoleLocalService
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
otherwisePortalException
public boolean hasUserRoles(long userId)
hasUserRoles
in interface RoleLocalService
public boolean hasUserRoles(long userId, long companyId, String[] names, boolean inherited) throws PortalException
true
if the user has any one of the named regular
roles.hasUserRoles
in interface RoleLocalService
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
otherwisePortalException
public Role loadFetchRole(long companyId, String name)
loadFetchRole
in interface RoleLocalService
companyId
- the primary key of the companyname
- the role's name (optionally null
)null
if a role with the
name could not be found in the companypublic Role loadGetRole(long companyId, String name) throws PortalException
loadGetRole
in interface RoleLocalService
companyId
- the primary key of the companyname
- the role's namePortalException
public List<Role> search(long companyId, String keywords, Integer[] types, int start, int end, OrderByComparator<Role> obc)
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.
search
in interface RoleLocalService
companyId
- the primary key of the companykeywords
- the keywords (space separated), which may occur in the
role's name or description (optionally null
)types
- the role types (optionally null
)start
- the lower bound of the range of roles to returnend
- the upper bound of the range of roles to return (not
inclusive)obc
- the comparator to order the roles (optionally
null
)obc
RoleFinder
public List<Role> search(long companyId, String keywords, Integer[] types, LinkedHashMap<String,Object> params, int start, int end, OrderByComparator<Role> obc)
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.
search
in interface RoleLocalService
companyId
- the primary key of the companykeywords
- the keywords (space separated), which may occur in the
role's name or description (optionally null
)types
- the role types (optionally null
)params
- the finder parameters. Can specify values for the
"usersRoles" key. For more information, see RoleFinder
start
- the lower bound of the range of roles to returnend
- the upper bound of the range of roles to return (not
inclusive)obc
- the comparator to order the roles (optionally
null
)obc
RoleFinder
public List<Role> search(long companyId, String name, String description, Integer[] types, int start, int end, OrderByComparator<Role> obc)
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.
search
in interface RoleLocalService
companyId
- the primary key of the companyname
- the role's name (optionally null
)description
- the role's description (optionally null
)types
- the role types (optionally null
)start
- the lower bound of the range of the roles to returnend
- the upper bound of the range of the roles to return (not
inclusive)obc
- the comparator to order the roles (optionally
null
)obc
RoleFinder
public List<Role> search(long companyId, String name, String description, Integer[] types, LinkedHashMap<String,Object> params, int start, int end, OrderByComparator<Role> obc)
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.
search
in interface RoleLocalService
companyId
- the primary key of the companyname
- the role's name (optionally null
)description
- the role's description (optionally null
)types
- the role types (optionally null
)params
- the finder's parameters. Can specify values for the
"usersRoles" key. For more information, see RoleFinder
start
- the lower bound of the range of the roles to returnend
- the upper bound of the range of the roles to return (not
inclusive)obc
- the comparator to order the roles (optionally
null
)obc
RoleFinder
public int searchCount(long companyId, String keywords, Integer[] types)
searchCount
in interface RoleLocalService
companyId
- the primary key of the companykeywords
- the keywords (space separated), which may occur in the
role's name or description (optionally null
)types
- the role types (optionally null
)public int searchCount(long companyId, String keywords, Integer[] types, LinkedHashMap<String,Object> params)
searchCount
in interface RoleLocalService
companyId
- the primary key of the companykeywords
- the keywords (space separated), which may occur in the
role's name or description (optionally null
)types
- the role types (optionally null
)params
- the finder parameters. For more information, see RoleFinder
public int searchCount(long companyId, String name, String description, Integer[] types)
searchCount
in interface RoleLocalService
companyId
- the primary key of the companyname
- the role's name (optionally null
)description
- the role's description (optionally null
)types
- the role types (optionally null
)public int searchCount(long companyId, String name, String description, Integer[] types, LinkedHashMap<String,Object> params)
searchCount
in interface RoleLocalService
companyId
- the primary key of the companyname
- the role's name (optionally null
)description
- the role's description (optionally null
)types
- the role types (optionally null
)params
- the finder parameters. Can specify values for the
"usersRoles" key. For more information, see RoleFinder
public void setGroupRoles(long groupId, long[] roleIds)
setGroupRoles
in interface RoleLocalService
public void setUserRoles(long userId, long[] roleIds) throws PortalException
setUserRoles
in interface RoleLocalService
PortalException
public void unsetUserRoles(long userId, long[] roleIds) throws PortalException
unsetUserRoles
in interface RoleLocalService
userId
- the primary key of the userroleIds
- the primary keys of the rolesPortalException
public Role updateRole(long roleId, String name, Map<Locale,String> titleMap, Map<Locale,String> descriptionMap, String subtype, ServiceContext serviceContext) throws PortalException
updateRole
in interface RoleLocalService
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 expando bridge attributes for the
role.PortalException
public Role updateRole(Role role)
updateRole
in interface RoleLocalService
role
- the rolepublic RoleLocalService getWrappedService()
getWrappedService
in interface ServiceWrapper<RoleLocalService>
public void setWrappedService(RoleLocalService roleLocalService)
setWrappedService
in interface ServiceWrapper<RoleLocalService>