com.liferay.portal.kernel.service.RoleLocalServiceWrapper Maven / Gradle / Ivy
Show all versions of com.liferay.portal.kernel Show documentation
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package com.liferay.portal.kernel.service;
import aQute.bnd.annotation.ProviderType;
/**
* Provides a wrapper for {@link RoleLocalService}.
*
* @author Brian Wing Shun Chan
* @see RoleLocalService
* @generated
*/
@ProviderType
public class RoleLocalServiceWrapper implements RoleLocalService,
ServiceWrapper {
public RoleLocalServiceWrapper(RoleLocalService roleLocalService) {
_roleLocalService = roleLocalService;
}
@Override
public void addGroupRole(long groupId,
com.liferay.portal.kernel.model.Role role) {
_roleLocalService.addGroupRole(groupId, role);
}
@Override
public void addGroupRole(long groupId, long roleId) {
_roleLocalService.addGroupRole(groupId, roleId);
}
@Override
public void addGroupRoles(long groupId,
java.util.List Roles) {
_roleLocalService.addGroupRoles(groupId, Roles);
}
@Override
public void addGroupRoles(long groupId, long[] roleIds) {
_roleLocalService.addGroupRoles(groupId, roleIds);
}
/**
* Adds the role to the database. Also notifies the appropriate model listeners.
*
* @param role the role
* @return the role that was added
*/
@Override
public com.liferay.portal.kernel.model.Role addRole(
com.liferay.portal.kernel.model.Role role) {
return _roleLocalService.addRole(role);
}
/**
* Adds a role with additional parameters. The user is reindexed after role
* is added.
*
* @param userId the primary key of the user
* @param className the name of the class for which the role is created
(optionally null
)
* @param classPK the primary key of the class for which the role is
created (optionally 0
)
* @param name the role's name
* @param titleMap the role's localized titles (optionally
null
)
* @param descriptionMap the role's localized descriptions (optionally
null
)
* @param type the role's type (optionally 0
)
* @param subtype the role's subtype (optionally null
)
* @param serviceContext the service context to be applied (optionally
null
). Can set expando bridge attributes for the
role.
* @return the role
*/
@Override
public com.liferay.portal.kernel.model.Role addRole(long userId,
java.lang.String className, long classPK, java.lang.String name,
java.util.Map titleMap,
java.util.Map descriptionMap,
int type, java.lang.String subtype,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException {
return _roleLocalService.addRole(userId, className, classPK, name,
titleMap, descriptionMap, type, subtype, serviceContext);
}
@Override
public void addUserRole(long userId,
com.liferay.portal.kernel.model.Role role) {
_roleLocalService.addUserRole(userId, role);
}
@Override
public void addUserRole(long userId, long roleId) {
_roleLocalService.addUserRole(userId, roleId);
}
/**
* @throws PortalException
*/
@Override
public void addUserRoles(long userId,
java.util.List Roles)
throws com.liferay.portal.kernel.exception.PortalException {
_roleLocalService.addUserRoles(userId, Roles);
}
/**
* @throws PortalException
*/
@Override
public void addUserRoles(long userId, long[] roleIds)
throws com.liferay.portal.kernel.exception.PortalException {
_roleLocalService.addUserRoles(userId, roleIds);
}
/**
* Checks to ensure that the system roles map has appropriate default roles
* in each company.
*/
@Override
public void checkSystemRoles()
throws com.liferay.portal.kernel.exception.PortalException {
_roleLocalService.checkSystemRoles();
}
/**
* Checks to ensure that the system roles map has appropriate default roles
* in the company.
*
* @param companyId the primary key of the company
*/
@Override
public void checkSystemRoles(long companyId)
throws com.liferay.portal.kernel.exception.PortalException {
_roleLocalService.checkSystemRoles(companyId);
}
@Override
public void clearGroupRoles(long groupId) {
_roleLocalService.clearGroupRoles(groupId);
}
@Override
public void clearUserRoles(long userId) {
_roleLocalService.clearUserRoles(userId);
}
/**
* Creates a new role with the primary key. Does not add the role to the database.
*
* @param roleId the primary key for the new role
* @return the new role
*/
@Override
public com.liferay.portal.kernel.model.Role createRole(long roleId) {
return _roleLocalService.createRole(roleId);
}
@Override
public void deleteGroupRole(long groupId,
com.liferay.portal.kernel.model.Role role) {
_roleLocalService.deleteGroupRole(groupId, role);
}
@Override
public void deleteGroupRole(long groupId, long roleId) {
_roleLocalService.deleteGroupRole(groupId, roleId);
}
@Override
public void deleteGroupRoles(long groupId,
java.util.List Roles) {
_roleLocalService.deleteGroupRoles(groupId, Roles);
}
@Override
public void deleteGroupRoles(long groupId, long[] roleIds) {
_roleLocalService.deleteGroupRoles(groupId, roleIds);
}
/**
* @throws PortalException
*/
@Override
public com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(
com.liferay.portal.kernel.model.PersistedModel persistedModel)
throws com.liferay.portal.kernel.exception.PortalException {
return _roleLocalService.deletePersistedModel(persistedModel);
}
/**
* Deletes the role from the database. Also notifies the appropriate model listeners.
*
* @param role the role
* @return the role that was removed
* @throws PortalException
*/
@Override
public com.liferay.portal.kernel.model.Role deleteRole(
com.liferay.portal.kernel.model.Role role)
throws com.liferay.portal.kernel.exception.PortalException {
return _roleLocalService.deleteRole(role);
}
/**
* Deletes the role with the primary key from the database. Also notifies the appropriate model listeners.
*
* @param roleId the primary key of the role
* @return the role that was removed
* @throws PortalException if a role with the primary key could not be found
*/
@Override
public com.liferay.portal.kernel.model.Role deleteRole(long roleId)
throws com.liferay.portal.kernel.exception.PortalException {
return _roleLocalService.deleteRole(roleId);
}
@Override
public void deleteUserRole(long userId,
com.liferay.portal.kernel.model.Role role) {
_roleLocalService.deleteUserRole(userId, role);
}
@Override
public void deleteUserRole(long userId, long roleId) {
_roleLocalService.deleteUserRole(userId, roleId);
}
@Override
public void deleteUserRoles(long userId,
java.util.List Roles) {
_roleLocalService.deleteUserRoles(userId, Roles);
}
@Override
public void deleteUserRoles(long userId, long[] roleIds) {
_roleLocalService.deleteUserRoles(userId, roleIds);
}
@Override
public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
return _roleLocalService.dynamicQuery();
}
/**
* Performs a dynamic query on the database and returns the matching rows.
*
* @param dynamicQuery the dynamic query
* @return the matching rows
*/
@Override
public java.util.List dynamicQuery(
com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
return _roleLocalService.dynamicQuery(dynamicQuery);
}
/**
* Performs a dynamic query on the database and returns a range of the matching rows.
*
*
* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.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.
*
*
* @param dynamicQuery the dynamic query
* @param start the lower bound of the range of model instances
* @param end the upper bound of the range of model instances (not inclusive)
* @return the range of matching rows
*/
@Override
public java.util.List dynamicQuery(
com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
int end) {
return _roleLocalService.dynamicQuery(dynamicQuery, start, end);
}
/**
* Performs a dynamic query on the database and returns an ordered range of the matching rows.
*
*
* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.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.
*
*
* @param dynamicQuery the dynamic query
* @param start the lower bound of the range of model instances
* @param end the upper bound of the range of model instances (not inclusive)
* @param orderByComparator the comparator to order the results by (optionally null
)
* @return the ordered range of matching rows
*/
@Override
public java.util.List dynamicQuery(
com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator) {
return _roleLocalService.dynamicQuery(dynamicQuery, start, end,
orderByComparator);
}
/**
* Returns the number of rows matching the dynamic query.
*
* @param dynamicQuery the dynamic query
* @return the number of rows matching the dynamic query
*/
@Override
public long dynamicQueryCount(
com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
return _roleLocalService.dynamicQueryCount(dynamicQuery);
}
/**
* Returns the number of rows matching the dynamic query.
*
* @param dynamicQuery the dynamic query
* @param projection the projection to apply to the query
* @return the number of rows matching the dynamic query
*/
@Override
public long dynamicQueryCount(
com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
com.liferay.portal.kernel.dao.orm.Projection projection) {
return _roleLocalService.dynamicQueryCount(dynamicQuery, projection);
}
/**
* Returns the role with the name in the company.
*
*
* 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.
*
*
* @param companyId the primary key of the company
* @param name the role's name
* @return Returns the role with the name or null
if a role
with the name could not be found in the company
*/
@Override
public com.liferay.portal.kernel.model.Role fetchRole(long companyId,
java.lang.String name) {
return _roleLocalService.fetchRole(companyId, name);
}
@Override
public com.liferay.portal.kernel.model.Role fetchRole(long roleId) {
return _roleLocalService.fetchRole(roleId);
}
/**
* Returns the role with the matching UUID and company.
*
* @param uuid the role's UUID
* @param companyId the primary key of the company
* @return the matching role, or null
if a matching role could not be found
*/
@Override
public com.liferay.portal.kernel.model.Role fetchRoleByUuidAndCompanyId(
java.lang.String uuid, long companyId) {
return _roleLocalService.fetchRoleByUuidAndCompanyId(uuid, companyId);
}
@Override
public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
return _roleLocalService.getActionableDynamicQuery();
}
/**
* Returns the default role for the group with the primary key.
*
*
* If the group is a site, then the default role is {@link
* RoleConstants#SITE_MEMBER}. If the group is an organization, then the
* default role is {@link RoleConstants#ORGANIZATION_USER}. If the group is
* a user or user group, then the default role is {@link
* RoleConstants#POWER_USER}. For all other group types, the default role is
* {@link RoleConstants#USER}.
*
*
* @param groupId the primary key of the group
* @return the default role for the group with the primary key
*/
@Override
public com.liferay.portal.kernel.model.Role getDefaultGroupRole(
long groupId)
throws com.liferay.portal.kernel.exception.PortalException {
return _roleLocalService.getDefaultGroupRole(groupId);
}
@Override
public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext) {
return _roleLocalService.getExportActionableDynamicQuery(portletDataContext);
}
/**
* Returns the groupIds of the groups associated with the role.
*
* @param roleId the roleId of the role
* @return long[] the groupIds of groups associated with the role
*/
@Override
public long[] getGroupPrimaryKeys(long roleId) {
return _roleLocalService.getGroupPrimaryKeys(roleId);
}
@Override
public java.util.List getGroupRelatedRoles(
long groupId)
throws com.liferay.portal.kernel.exception.PortalException {
return _roleLocalService.getGroupRelatedRoles(groupId);
}
@Override
public java.util.List getGroupRoles(
long groupId) {
return _roleLocalService.getGroupRoles(groupId);
}
@Override
public java.util.List getGroupRoles(
long groupId, int start, int end) {
return _roleLocalService.getGroupRoles(groupId, start, end);
}
@Override
public java.util.List getGroupRoles(
long groupId, int start, int end,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator) {
return _roleLocalService.getGroupRoles(groupId, start, end,
orderByComparator);
}
@Override
public int getGroupRolesCount(long groupId) {
return _roleLocalService.getGroupRolesCount(groupId);
}
@Override
public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
return _roleLocalService.getIndexableActionableDynamicQuery();
}
/**
* Returns the OSGi service identifier.
*
* @return the OSGi service identifier
*/
@Override
public java.lang.String getOSGiServiceIdentifier() {
return _roleLocalService.getOSGiServiceIdentifier();
}
@Override
public com.liferay.portal.kernel.model.PersistedModel getPersistedModel(
java.io.Serializable primaryKeyObj)
throws com.liferay.portal.kernel.exception.PortalException {
return _roleLocalService.getPersistedModel(primaryKeyObj);
}
@Override
public java.util.List getResourceBlockRoles(
long resourceBlockId, java.lang.String className,
java.lang.String actionId) {
return _roleLocalService.getResourceBlockRoles(resourceBlockId,
className, actionId);
}
/**
* Returns a map of role names to associated action IDs for the named
* resource in the company within the permission scope.
*
* @param companyId the primary key of the company
* @param name the resource name
* @param scope the permission scope
* @param primKey the primary key of the resource's class
* @return the role names and action IDs
* @see com.liferay.portal.kernel.service.persistence.RoleFinder#findByC_N_S_P(
long, String, int, String)
*/
@Override
public java.util.Map> getResourceRoles(
long companyId, java.lang.String name, int scope,
java.lang.String primKey) {
return _roleLocalService.getResourceRoles(companyId, name, scope,
primKey);
}
/**
* Returns all the roles associated with the action ID in the company within
* the permission scope.
*
* @param companyId the primary key of the company
* @param name the resource name
* @param scope the permission scope
* @param primKey the primary key of the resource's class
* @param actionId the name of the resource action
* @return the roles
* @see com.liferay.portal.kernel.service.persistence.RoleFinder#findByC_N_S_P_A(
long, String, int, String, String)
*/
@Override
public java.util.List getResourceRoles(
long companyId, java.lang.String name, int scope,
java.lang.String primKey, java.lang.String actionId) {
return _roleLocalService.getResourceRoles(companyId, name, scope,
primKey, actionId);
}
/**
* Returns the role with the name in the company.
*
*
* 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.
*
*
* @param companyId the primary key of the company
* @param name the role's name
* @return the role with the name
*/
@Override
public com.liferay.portal.kernel.model.Role getRole(long companyId,
java.lang.String name)
throws com.liferay.portal.kernel.exception.PortalException {
return _roleLocalService.getRole(companyId, name);
}
/**
* Returns the role with the primary key.
*
* @param roleId the primary key of the role
* @return the role
* @throws PortalException if a role with the primary key could not be found
*/
@Override
public com.liferay.portal.kernel.model.Role getRole(long roleId)
throws com.liferay.portal.kernel.exception.PortalException {
return _roleLocalService.getRole(roleId);
}
/**
* Returns the role with the matching UUID and company.
*
* @param uuid the role's UUID
* @param companyId the primary key of the company
* @return the matching role
* @throws PortalException if a matching role could not be found
*/
@Override
public com.liferay.portal.kernel.model.Role getRoleByUuidAndCompanyId(
java.lang.String uuid, long companyId)
throws com.liferay.portal.kernel.exception.PortalException {
return _roleLocalService.getRoleByUuidAndCompanyId(uuid, companyId);
}
/**
* Returns all the roles in the company.
*
* @param companyId the primary key of the company
* @return the roles in the company
*/
@Override
public java.util.List getRoles(
long companyId) {
return _roleLocalService.getRoles(companyId);
}
/**
* Returns all the roles with the types.
*
* @param companyId the primary key of the company
* @param types the role types (optionally null
)
* @return the roles with the types
*/
@Override
public java.util.List getRoles(
long companyId, int[] types) {
return _roleLocalService.getRoles(companyId, types);
}
/**
* Returns all the roles with the primary keys.
*
* @param roleIds the primary keys of the roles
* @return the roles with the primary keys
*/
@Override
public java.util.List getRoles(
long[] roleIds)
throws com.liferay.portal.kernel.exception.PortalException {
return _roleLocalService.getRoles(roleIds);
}
/**
* Returns a range of all the roles.
*
*
* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.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.
*
*
* @param start the lower bound of the range of roles
* @param end the upper bound of the range of roles (not inclusive)
* @return the range of roles
*/
@Override
public java.util.List getRoles(
int start, int end) {
return _roleLocalService.getRoles(start, end);
}
/**
* Returns all the roles of the type and subtype.
*
* @param type the role's type (optionally 0
)
* @param subtype the role's subtype (optionally null
)
* @return the roles of the type and subtype
*/
@Override
public java.util.List getRoles(
int type, java.lang.String subtype) {
return _roleLocalService.getRoles(type, subtype);
}
/**
* Returns the number of roles.
*
* @return the number of roles
*/
@Override
public int getRolesCount() {
return _roleLocalService.getRolesCount();
}
/**
* Returns all the roles of the subtype.
*
* @param subtype the role's subtype (optionally null
)
* @return the roles of the subtype
*/
@Override
public java.util.List getSubtypeRoles(
java.lang.String subtype) {
return _roleLocalService.getSubtypeRoles(subtype);
}
/**
* Returns the number of roles of the subtype.
*
* @param subtype the role's subtype (optionally null
)
* @return the number of roles of the subtype
*/
@Override
public int getSubtypeRolesCount(java.lang.String subtype) {
return _roleLocalService.getSubtypeRolesCount(subtype);
}
/**
* Returns the team role in the company.
*
* @param companyId the primary key of the company
* @param teamId the primary key of the team
* @return the team role in the company
*/
@Override
public com.liferay.portal.kernel.model.Role getTeamRole(long companyId,
long teamId) throws com.liferay.portal.kernel.exception.PortalException {
return _roleLocalService.getTeamRole(companyId, teamId);
}
/**
* Returns the team role map for the group.
*
* @param groupId the primary key of the group
* @return the team role map for the group
*/
@Override
public java.util.Map getTeamRoleMap(
long groupId)
throws com.liferay.portal.kernel.exception.PortalException {
return _roleLocalService.getTeamRoleMap(groupId);
}
/**
* Returns the team roles in the group.
*
* @param groupId the primary key of the group
* @return the team roles in the group
*/
@Override
public java.util.List getTeamRoles(
long groupId)
throws com.liferay.portal.kernel.exception.PortalException {
return _roleLocalService.getTeamRoles(groupId);
}
/**
* Returns the team roles in the group, excluding the specified role IDs.
*
* @param groupId the primary key of the group
* @param excludedRoleIds the primary keys of the roles to exclude
(optionally null
)
* @return the team roles in the group, excluding the specified role IDs
*/
@Override
public java.util.List getTeamRoles(
long groupId, long[] excludedRoleIds)
throws com.liferay.portal.kernel.exception.PortalException {
return _roleLocalService.getTeamRoles(groupId, excludedRoleIds);
}
/**
* Returns all the roles of the type.
*
* @param type the role's type (optionally 0
)
* @return the range of the roles of the type
*/
@Override
public java.util.List getTypeRoles(
int type) {
return _roleLocalService.getTypeRoles(type);
}
/**
* Returns a range of all the roles of the type.
*
* @param type the role's type (optionally 0
)
* @param start the lower bound of the range of roles to return
* @param end the upper bound of the range of roles to return (not
inclusive)
* @return the range of the roles of the type
*/
@Override
public java.util.List getTypeRoles(
int type, int start, int end) {
return _roleLocalService.getTypeRoles(type, start, end);
}
/**
* Returns the number of roles of the type.
*
* @param type the role's type (optionally 0
)
* @return the number of roles of the type
*/
@Override
public int getTypeRolesCount(int type) {
return _roleLocalService.getTypeRolesCount(type);
}
/**
* Returns all the user's roles within the user group.
*
* @param userId the primary key of the user
* @param groupId the primary key of the group
* @return the user's roles within the user group
* @see com.liferay.portal.kernel.service.persistence.RoleFinder#findByUserGroupGroupRole(
long, long)
*/
@Override
public java.util.List getUserGroupGroupRoles(
long userId, long groupId) {
return _roleLocalService.getUserGroupGroupRoles(userId, groupId);
}
@Override
public java.util.List getUserGroupGroupRoles(
long userId, long groupId, int start, int end) {
return _roleLocalService.getUserGroupGroupRoles(userId, groupId, start,
end);
}
@Override
public int getUserGroupGroupRolesCount(long userId, long groupId) {
return _roleLocalService.getUserGroupGroupRolesCount(userId, groupId);
}
/**
* Returns all the user's roles within the user group.
*
* @param userId the primary key of the user
* @param groupId the primary key of the group
* @return the user's roles within the user group
* @see com.liferay.portal.kernel.service.persistence.RoleFinder#findByUserGroupRole(
long, long)
*/
@Override
public java.util.List getUserGroupRoles(
long userId, long groupId) {
return _roleLocalService.getUserGroupRoles(userId, groupId);
}
/**
* Returns the userIds of the users associated with the role.
*
* @param roleId the roleId of the role
* @return long[] the userIds of users associated with the role
*/
@Override
public long[] getUserPrimaryKeys(long roleId) {
return _roleLocalService.getUserPrimaryKeys(roleId);
}
/**
* Returns all the user's roles within the group.
*
* @param userId the primary key of the user
* @param groupId the primary key of the group
* @return the user's roles within the group
* @see com.liferay.portal.kernel.service.persistence.RoleFinder#findByU_G(long,
long)
*/
@Override
public java.util.List getUserRelatedRoles(
long userId, long groupId) {
return _roleLocalService.getUserRelatedRoles(userId, groupId);
}
/**
* Returns the union of all the user's roles within the groups.
*
* @param userId the primary key of the user
* @param groupIds the primary keys of the groups
* @return the union of all the user's roles within the groups
* @see com.liferay.portal.kernel.service.persistence.RoleFinder#findByU_G(long,
long[])
*/
@Override
public java.util.List getUserRelatedRoles(
long userId, long[] groupIds) {
return _roleLocalService.getUserRelatedRoles(userId, groupIds);
}
/**
* Returns the union of all the user's roles within the groups.
*
* @param userId the primary key of the user
* @param groups the groups (optionally null
)
* @return the union of all the user's roles within the groups
* @see com.liferay.portal.kernel.service.persistence.RoleFinder#findByU_G(long,
List)
*/
@Override
public java.util.List getUserRelatedRoles(
long userId,
java.util.List groups) {
return _roleLocalService.getUserRelatedRoles(userId, groups);
}
@Override
public java.util.List getUserRoles(
long userId) {
return _roleLocalService.getUserRoles(userId);
}
@Override
public java.util.List getUserRoles(
long userId, int start, int end) {
return _roleLocalService.getUserRoles(userId, start, end);
}
@Override
public java.util.List getUserRoles(
long userId, int start, int end,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator) {
return _roleLocalService.getUserRoles(userId, start, end,
orderByComparator);
}
@Override
public int getUserRolesCount(long userId) {
return _roleLocalService.getUserRolesCount(userId);
}
@Override
public boolean hasGroupRole(long groupId, long roleId) {
return _roleLocalService.hasGroupRole(groupId, roleId);
}
@Override
public boolean hasGroupRoles(long groupId) {
return _roleLocalService.hasGroupRoles(groupId);
}
/**
* Returns true
if the user is associated with the named
* regular role.
*
* @param userId the primary key of the user
* @param companyId the primary key of the company
* @param name the name of the role
* @param inherited whether to include the user's inherited roles in the
search
* @return true
if the user is associated with the regular
role; false
otherwise
*/
@Override
public boolean hasUserRole(long userId, long companyId,
java.lang.String name, boolean inherited)
throws com.liferay.portal.kernel.exception.PortalException {
return _roleLocalService.hasUserRole(userId, companyId, name, inherited);
}
@Override
public boolean hasUserRole(long userId, long roleId) {
return _roleLocalService.hasUserRole(userId, roleId);
}
@Override
public boolean hasUserRoles(long userId) {
return _roleLocalService.hasUserRoles(userId);
}
/**
* Returns true
if the user has any one of the named regular
* roles.
*
* @param userId the primary key of the user
* @param companyId the primary key of the company
* @param names the names of the roles
* @param inherited whether to include the user's inherited roles in the
search
* @return true
if the user has any one of the regular roles;
false
otherwise
*/
@Override
public boolean hasUserRoles(long userId, long companyId,
java.lang.String[] names, boolean inherited)
throws com.liferay.portal.kernel.exception.PortalException {
return _roleLocalService.hasUserRoles(userId, companyId, names,
inherited);
}
/**
* Returns a role with the name in the company.
*
* @param companyId the primary key of the company
* @param name the role's name (optionally null
)
* @return the role with the name, or null
if a role with the
name could not be found in the company
*/
@Override
public com.liferay.portal.kernel.model.Role loadFetchRole(long companyId,
java.lang.String name) {
return _roleLocalService.loadFetchRole(companyId, name);
}
/**
* Returns a role with the name in the company.
*
* @param companyId the primary key of the company
* @param name the role's name
* @return the role with the name in the company
*/
@Override
public com.liferay.portal.kernel.model.Role loadGetRole(long companyId,
java.lang.String name)
throws com.liferay.portal.kernel.exception.PortalException {
return _roleLocalService.loadGetRole(companyId, name);
}
/**
* Returns an ordered range of all the roles that match the keywords, types,
* and params.
*
*
* 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 {@link
* com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
* result set.
*
*
* @param companyId the primary key of the company
* @param keywords the keywords (space separated), which may occur in the
role's name or description (optionally null
)
* @param types the role types (optionally null
)
* @param params the finder parameters. Can specify values for the
"usersRoles" key. For more information, see {@link
com.liferay.portal.kernel.service.persistence.RoleFinder}
* @param start the lower bound of the range of roles to return
* @param end the upper bound of the range of roles to return (not
inclusive)
* @param obc the comparator to order the roles (optionally
null
)
* @return the ordered range of the matching roles, ordered by
obc
* @see com.liferay.portal.kernel.service.persistence.RoleFinder
*/
@Override
public java.util.List search(
long companyId, java.lang.String keywords, java.lang.Integer[] types,
java.util.LinkedHashMap params,
int start, int end,
com.liferay.portal.kernel.util.OrderByComparator obc) {
return _roleLocalService.search(companyId, keywords, types, params,
start, end, obc);
}
/**
* Returns an ordered range of all the roles that match the keywords and
* types.
*
*
* 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 {@link
* com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
* result set.
*
*
* @param companyId the primary key of the company
* @param keywords the keywords (space separated), which may occur in the
role's name or description (optionally null
)
* @param types the role types (optionally null
)
* @param start the lower bound of the range of roles to return
* @param end the upper bound of the range of roles to return (not
inclusive)
* @param obc the comparator to order the roles (optionally
null
)
* @return the ordered range of the matching roles, ordered by
obc
* @see com.liferay.portal.kernel.service.persistence.RoleFinder
*/
@Override
public java.util.List search(
long companyId, java.lang.String keywords, java.lang.Integer[] types,
int start, int end,
com.liferay.portal.kernel.util.OrderByComparator obc) {
return _roleLocalService.search(companyId, keywords, types, start, end,
obc);
}
/**
* Returns an ordered range of all the roles that match the name,
* description, types, and params.
*
*
* 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 {@link
* com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
* result set.
*
*
* @param companyId the primary key of the company
* @param name the role's name (optionally null
)
* @param description the role's description (optionally null
)
* @param types the role types (optionally null
)
* @param params the finder's parameters. Can specify values for the
"usersRoles" key. For more information, see {@link
com.liferay.portal.kernel.service.persistence.RoleFinder}
* @param start the lower bound of the range of the roles to return
* @param end the upper bound of the range of the roles to return (not
inclusive)
* @param obc the comparator to order the roles (optionally
null
)
* @return the ordered range of the matching roles, ordered by
obc
* @see com.liferay.portal.kernel.service.persistence.RoleFinder
*/
@Override
public java.util.List search(
long companyId, java.lang.String name, java.lang.String description,
java.lang.Integer[] types,
java.util.LinkedHashMap params,
int start, int end,
com.liferay.portal.kernel.util.OrderByComparator obc) {
return _roleLocalService.search(companyId, name, description, types,
params, start, end, obc);
}
/**
* Returns an ordered range of all the roles that match the name,
* description, and types.
*
*
* 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 {@link
* com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
* result set.
*
*
* @param companyId the primary key of the company
* @param name the role's name (optionally null
)
* @param description the role's description (optionally null
)
* @param types the role types (optionally null
)
* @param start the lower bound of the range of the roles to return
* @param end the upper bound of the range of the roles to return (not
inclusive)
* @param obc the comparator to order the roles (optionally
null
)
* @return the ordered range of the matching roles, ordered by
obc
* @see com.liferay.portal.kernel.service.persistence.RoleFinder
*/
@Override
public java.util.List search(
long companyId, java.lang.String name, java.lang.String description,
java.lang.Integer[] types, int start, int end,
com.liferay.portal.kernel.util.OrderByComparator obc) {
return _roleLocalService.search(companyId, name, description, types,
start, end, obc);
}
/**
* Returns the number of roles that match the keywords and types.
*
* @param companyId the primary key of the company
* @param keywords the keywords (space separated), which may occur in the
role's name or description (optionally null
)
* @param types the role types (optionally null
)
* @return the number of matching roles
*/
@Override
public int searchCount(long companyId, java.lang.String keywords,
java.lang.Integer[] types) {
return _roleLocalService.searchCount(companyId, keywords, types);
}
/**
* Returns the number of roles that match the keywords, types and params.
*
* @param companyId the primary key of the company
* @param keywords the keywords (space separated), which may occur in the
role's name or description (optionally null
)
* @param types the role types (optionally null
)
* @param params the finder parameters. For more information, see {@link
com.liferay.portal.kernel.service.persistence.RoleFinder}
* @return the number of matching roles
*/
@Override
public int searchCount(long companyId, java.lang.String keywords,
java.lang.Integer[] types,
java.util.LinkedHashMap params) {
return _roleLocalService.searchCount(companyId, keywords, types, params);
}
/**
* Returns the number of roles that match the name, description, and types.
*
* @param companyId the primary key of the company
* @param name the role's name (optionally null
)
* @param description the role's description (optionally null
)
* @param types the role types (optionally null
)
* @return the number of matching roles
*/
@Override
public int searchCount(long companyId, java.lang.String name,
java.lang.String description, java.lang.Integer[] types) {
return _roleLocalService.searchCount(companyId, name, description, types);
}
/**
* Returns the number of roles that match the name, description, types, and
* params.
*
* @param companyId the primary key of the company
* @param name the role's name (optionally null
)
* @param description the role's description (optionally null
)
* @param types the role types (optionally null
)
* @param params the finder parameters. Can specify values for the
"usersRoles" key. For more information, see {@link
com.liferay.portal.kernel.service.persistence.RoleFinder}
* @return the number of matching roles
*/
@Override
public int searchCount(long companyId, java.lang.String name,
java.lang.String description, java.lang.Integer[] types,
java.util.LinkedHashMap params) {
return _roleLocalService.searchCount(companyId, name, description,
types, params);
}
@Override
public void setGroupRoles(long groupId, long[] roleIds) {
_roleLocalService.setGroupRoles(groupId, roleIds);
}
/**
* @throws PortalException
*/
@Override
public void setUserRoles(long userId, long[] roleIds)
throws com.liferay.portal.kernel.exception.PortalException {
_roleLocalService.setUserRoles(userId, roleIds);
}
/**
* Removes the matching roles associated with the user. The user is
* reindexed after the roles are removed.
*
* @param userId the primary key of the user
* @param roleIds the primary keys of the roles
*/
@Override
public void unsetUserRoles(long userId, long[] roleIds)
throws com.liferay.portal.kernel.exception.PortalException {
_roleLocalService.unsetUserRoles(userId, roleIds);
}
/**
* Updates the role in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
*
* @param role the role
* @return the role that was updated
*/
@Override
public com.liferay.portal.kernel.model.Role updateRole(
com.liferay.portal.kernel.model.Role role) {
return _roleLocalService.updateRole(role);
}
/**
* Updates the role with the primary key.
*
* @param roleId the primary key of the role
* @param name the role's new name
* @param titleMap the new localized titles (optionally null
)
to replace those existing for the role
* @param descriptionMap the new localized descriptions (optionally
null
) to replace those existing for the role
* @param subtype the role's new subtype (optionally null
)
* @param serviceContext the service context to be applied (optionally
null
). Can set expando bridge attributes for the
role.
* @return the role with the primary key
*/
@Override
public com.liferay.portal.kernel.model.Role updateRole(long roleId,
java.lang.String name,
java.util.Map titleMap,
java.util.Map descriptionMap,
java.lang.String subtype,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException {
return _roleLocalService.updateRole(roleId, name, titleMap,
descriptionMap, subtype, serviceContext);
}
@Override
public RoleLocalService getWrappedService() {
return _roleLocalService;
}
@Override
public void setWrappedService(RoleLocalService roleLocalService) {
_roleLocalService = roleLocalService;
}
private RoleLocalService _roleLocalService;
}