001 /** 002 * Copyright (c) 2000-present Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.service; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 /** 020 * Provides a wrapper for {@link RoleLocalService}. 021 * 022 * @author Brian Wing Shun Chan 023 * @see RoleLocalService 024 * @generated 025 */ 026 @ProviderType 027 public class RoleLocalServiceWrapper implements RoleLocalService, 028 ServiceWrapper<RoleLocalService> { 029 public RoleLocalServiceWrapper(RoleLocalService roleLocalService) { 030 _roleLocalService = roleLocalService; 031 } 032 033 @Override 034 public void addGroupRole(long groupId, com.liferay.portal.model.Role role) { 035 _roleLocalService.addGroupRole(groupId, role); 036 } 037 038 @Override 039 public void addGroupRole(long groupId, long roleId) { 040 _roleLocalService.addGroupRole(groupId, roleId); 041 } 042 043 @Override 044 public void addGroupRoles(long groupId, 045 java.util.List<com.liferay.portal.model.Role> Roles) { 046 _roleLocalService.addGroupRoles(groupId, Roles); 047 } 048 049 @Override 050 public void addGroupRoles(long groupId, long[] roleIds) { 051 _roleLocalService.addGroupRoles(groupId, roleIds); 052 } 053 054 /** 055 * Adds the role to the database. Also notifies the appropriate model listeners. 056 * 057 * @param role the role 058 * @return the role that was added 059 */ 060 @Override 061 public com.liferay.portal.model.Role addRole( 062 com.liferay.portal.model.Role role) { 063 return _roleLocalService.addRole(role); 064 } 065 066 /** 067 * Adds a role with additional parameters. The user is reindexed after role 068 * is added. 069 * 070 * @param userId the primary key of the user 071 * @param className the name of the class for which the role is created 072 (optionally <code>null</code>) 073 * @param classPK the primary key of the class for which the role is 074 created (optionally <code>0</code>) 075 * @param name the role's name 076 * @param titleMap the role's localized titles (optionally 077 <code>null</code>) 078 * @param descriptionMap the role's localized descriptions (optionally 079 <code>null</code>) 080 * @param type the role's type (optionally <code>0</code>) 081 * @param subtype the role's subtype (optionally <code>null</code>) 082 * @param serviceContext the service context to be applied (optionally 083 <code>null</code>). Can set expando bridge attributes for the 084 role. 085 * @return the role 086 */ 087 @Override 088 public com.liferay.portal.model.Role addRole(long userId, 089 java.lang.String className, long classPK, java.lang.String name, 090 java.util.Map<java.util.Locale, java.lang.String> titleMap, 091 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 092 int type, java.lang.String subtype, 093 com.liferay.portal.service.ServiceContext serviceContext) 094 throws com.liferay.portal.kernel.exception.PortalException { 095 return _roleLocalService.addRole(userId, className, classPK, name, 096 titleMap, descriptionMap, type, subtype, serviceContext); 097 } 098 099 @Override 100 public void addUserRole(long userId, com.liferay.portal.model.Role role) { 101 _roleLocalService.addUserRole(userId, role); 102 } 103 104 @Override 105 public void addUserRole(long userId, long roleId) { 106 _roleLocalService.addUserRole(userId, roleId); 107 } 108 109 /** 110 * @throws PortalException 111 */ 112 @Override 113 public void addUserRoles(long userId, 114 java.util.List<com.liferay.portal.model.Role> Roles) 115 throws com.liferay.portal.kernel.exception.PortalException { 116 _roleLocalService.addUserRoles(userId, Roles); 117 } 118 119 /** 120 * @throws PortalException 121 */ 122 @Override 123 public void addUserRoles(long userId, long[] roleIds) 124 throws com.liferay.portal.kernel.exception.PortalException { 125 _roleLocalService.addUserRoles(userId, roleIds); 126 } 127 128 /** 129 * Checks to ensure that the system roles map has appropriate default roles 130 * in each company. 131 */ 132 @Override 133 public void checkSystemRoles() 134 throws com.liferay.portal.kernel.exception.PortalException { 135 _roleLocalService.checkSystemRoles(); 136 } 137 138 /** 139 * Checks to ensure that the system roles map has appropriate default roles 140 * in the company. 141 * 142 * @param companyId the primary key of the company 143 */ 144 @Override 145 public void checkSystemRoles(long companyId) 146 throws com.liferay.portal.kernel.exception.PortalException { 147 _roleLocalService.checkSystemRoles(companyId); 148 } 149 150 @Override 151 public void clearGroupRoles(long groupId) { 152 _roleLocalService.clearGroupRoles(groupId); 153 } 154 155 @Override 156 public void clearUserRoles(long userId) { 157 _roleLocalService.clearUserRoles(userId); 158 } 159 160 /** 161 * Creates a new role with the primary key. Does not add the role to the database. 162 * 163 * @param roleId the primary key for the new role 164 * @return the new role 165 */ 166 @Override 167 public com.liferay.portal.model.Role createRole(long roleId) { 168 return _roleLocalService.createRole(roleId); 169 } 170 171 @Override 172 public void deleteGroupRole(long groupId, com.liferay.portal.model.Role role) { 173 _roleLocalService.deleteGroupRole(groupId, role); 174 } 175 176 @Override 177 public void deleteGroupRole(long groupId, long roleId) { 178 _roleLocalService.deleteGroupRole(groupId, roleId); 179 } 180 181 @Override 182 public void deleteGroupRoles(long groupId, 183 java.util.List<com.liferay.portal.model.Role> Roles) { 184 _roleLocalService.deleteGroupRoles(groupId, Roles); 185 } 186 187 @Override 188 public void deleteGroupRoles(long groupId, long[] roleIds) { 189 _roleLocalService.deleteGroupRoles(groupId, roleIds); 190 } 191 192 /** 193 * @throws PortalException 194 */ 195 @Override 196 public com.liferay.portal.model.PersistedModel deletePersistedModel( 197 com.liferay.portal.model.PersistedModel persistedModel) 198 throws com.liferay.portal.kernel.exception.PortalException { 199 return _roleLocalService.deletePersistedModel(persistedModel); 200 } 201 202 /** 203 * Deletes the role from the database. Also notifies the appropriate model listeners. 204 * 205 * @param role the role 206 * @return the role that was removed 207 * @throws PortalException 208 */ 209 @Override 210 public com.liferay.portal.model.Role deleteRole( 211 com.liferay.portal.model.Role role) 212 throws com.liferay.portal.kernel.exception.PortalException { 213 return _roleLocalService.deleteRole(role); 214 } 215 216 /** 217 * Deletes the role with the primary key from the database. Also notifies the appropriate model listeners. 218 * 219 * @param roleId the primary key of the role 220 * @return the role that was removed 221 * @throws PortalException if a role with the primary key could not be found 222 */ 223 @Override 224 public com.liferay.portal.model.Role deleteRole(long roleId) 225 throws com.liferay.portal.kernel.exception.PortalException { 226 return _roleLocalService.deleteRole(roleId); 227 } 228 229 @Override 230 public void deleteUserRole(long userId, com.liferay.portal.model.Role role) { 231 _roleLocalService.deleteUserRole(userId, role); 232 } 233 234 @Override 235 public void deleteUserRole(long userId, long roleId) { 236 _roleLocalService.deleteUserRole(userId, roleId); 237 } 238 239 @Override 240 public void deleteUserRoles(long userId, 241 java.util.List<com.liferay.portal.model.Role> Roles) { 242 _roleLocalService.deleteUserRoles(userId, Roles); 243 } 244 245 @Override 246 public void deleteUserRoles(long userId, long[] roleIds) { 247 _roleLocalService.deleteUserRoles(userId, roleIds); 248 } 249 250 @Override 251 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 252 return _roleLocalService.dynamicQuery(); 253 } 254 255 /** 256 * Performs a dynamic query on the database and returns the matching rows. 257 * 258 * @param dynamicQuery the dynamic query 259 * @return the matching rows 260 */ 261 @Override 262 public <T> java.util.List<T> dynamicQuery( 263 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 264 return _roleLocalService.dynamicQuery(dynamicQuery); 265 } 266 267 /** 268 * Performs a dynamic query on the database and returns a range of the matching rows. 269 * 270 * <p> 271 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> 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 <code>orderByComparator</code> 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. 272 * </p> 273 * 274 * @param dynamicQuery the dynamic query 275 * @param start the lower bound of the range of model instances 276 * @param end the upper bound of the range of model instances (not inclusive) 277 * @return the range of matching rows 278 */ 279 @Override 280 public <T> java.util.List<T> dynamicQuery( 281 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 282 int end) { 283 return _roleLocalService.dynamicQuery(dynamicQuery, start, end); 284 } 285 286 /** 287 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 288 * 289 * <p> 290 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> 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 <code>orderByComparator</code> 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. 291 * </p> 292 * 293 * @param dynamicQuery the dynamic query 294 * @param start the lower bound of the range of model instances 295 * @param end the upper bound of the range of model instances (not inclusive) 296 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 297 * @return the ordered range of matching rows 298 */ 299 @Override 300 public <T> java.util.List<T> dynamicQuery( 301 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 302 int end, 303 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 304 return _roleLocalService.dynamicQuery(dynamicQuery, start, end, 305 orderByComparator); 306 } 307 308 /** 309 * Returns the number of rows matching the dynamic query. 310 * 311 * @param dynamicQuery the dynamic query 312 * @return the number of rows matching the dynamic query 313 */ 314 @Override 315 public long dynamicQueryCount( 316 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 317 return _roleLocalService.dynamicQueryCount(dynamicQuery); 318 } 319 320 /** 321 * Returns the number of rows matching the dynamic query. 322 * 323 * @param dynamicQuery the dynamic query 324 * @param projection the projection to apply to the query 325 * @return the number of rows matching the dynamic query 326 */ 327 @Override 328 public long dynamicQueryCount( 329 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 330 com.liferay.portal.kernel.dao.orm.Projection projection) { 331 return _roleLocalService.dynamicQueryCount(dynamicQuery, projection); 332 } 333 334 /** 335 * Returns the role with the name in the company. 336 * 337 * <p> 338 * The method searches the system roles map first for default roles. If a 339 * role with the name is not found, then the method will query the database. 340 * </p> 341 * 342 * @param companyId the primary key of the company 343 * @param name the role's name 344 * @return Returns the role with the name or <code>null</code> if a role 345 with the name could not be found in the company 346 */ 347 @Override 348 public com.liferay.portal.model.Role fetchRole(long companyId, 349 java.lang.String name) { 350 return _roleLocalService.fetchRole(companyId, name); 351 } 352 353 @Override 354 public com.liferay.portal.model.Role fetchRole(long roleId) { 355 return _roleLocalService.fetchRole(roleId); 356 } 357 358 /** 359 * Returns the role with the matching UUID and company. 360 * 361 * @param uuid the role's UUID 362 * @param companyId the primary key of the company 363 * @return the matching role, or <code>null</code> if a matching role could not be found 364 */ 365 @Override 366 public com.liferay.portal.model.Role fetchRoleByUuidAndCompanyId( 367 java.lang.String uuid, long companyId) { 368 return _roleLocalService.fetchRoleByUuidAndCompanyId(uuid, companyId); 369 } 370 371 @Override 372 public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 373 return _roleLocalService.getActionableDynamicQuery(); 374 } 375 376 /** 377 * Returns the default role for the group with the primary key. 378 * 379 * <p> 380 * If the group is a site, then the default role is {@link 381 * RoleConstants#SITE_MEMBER}. If the group is an organization, then the 382 * default role is {@link RoleConstants#ORGANIZATION_USER}. If the group is 383 * a user or user group, then the default role is {@link 384 * RoleConstants#POWER_USER}. For all other group types, the default role is 385 * {@link RoleConstants#USER}. 386 * </p> 387 * 388 * @param groupId the primary key of the group 389 * @return the default role for the group with the primary key 390 */ 391 @Override 392 public com.liferay.portal.model.Role getDefaultGroupRole(long groupId) 393 throws com.liferay.portal.kernel.exception.PortalException { 394 return _roleLocalService.getDefaultGroupRole(groupId); 395 } 396 397 @Override 398 public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 399 com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext) { 400 return _roleLocalService.getExportActionableDynamicQuery(portletDataContext); 401 } 402 403 /** 404 * Returns the groupIds of the groups associated with the role. 405 * 406 * @param roleId the roleId of the role 407 * @return long[] the groupIds of groups associated with the role 408 */ 409 @Override 410 public long[] getGroupPrimaryKeys(long roleId) { 411 return _roleLocalService.getGroupPrimaryKeys(roleId); 412 } 413 414 @Override 415 public java.util.List<com.liferay.portal.model.Role> getGroupRelatedRoles( 416 long groupId) 417 throws com.liferay.portal.kernel.exception.PortalException { 418 return _roleLocalService.getGroupRelatedRoles(groupId); 419 } 420 421 @Override 422 public java.util.List<com.liferay.portal.model.Role> getGroupRoles( 423 long groupId) { 424 return _roleLocalService.getGroupRoles(groupId); 425 } 426 427 @Override 428 public java.util.List<com.liferay.portal.model.Role> getGroupRoles( 429 long groupId, int start, int end) { 430 return _roleLocalService.getGroupRoles(groupId, start, end); 431 } 432 433 @Override 434 public java.util.List<com.liferay.portal.model.Role> getGroupRoles( 435 long groupId, int start, int end, 436 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Role> orderByComparator) { 437 return _roleLocalService.getGroupRoles(groupId, start, end, 438 orderByComparator); 439 } 440 441 @Override 442 public int getGroupRolesCount(long groupId) { 443 return _roleLocalService.getGroupRolesCount(groupId); 444 } 445 446 @Override 447 public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { 448 return _roleLocalService.getIndexableActionableDynamicQuery(); 449 } 450 451 /** 452 * Returns the OSGi service identifier. 453 * 454 * @return the OSGi service identifier 455 */ 456 @Override 457 public java.lang.String getOSGiServiceIdentifier() { 458 return _roleLocalService.getOSGiServiceIdentifier(); 459 } 460 461 @Override 462 public com.liferay.portal.model.PersistedModel getPersistedModel( 463 java.io.Serializable primaryKeyObj) 464 throws com.liferay.portal.kernel.exception.PortalException { 465 return _roleLocalService.getPersistedModel(primaryKeyObj); 466 } 467 468 @Override 469 public java.util.List<com.liferay.portal.model.Role> getResourceBlockRoles( 470 long resourceBlockId, java.lang.String className, 471 java.lang.String actionId) { 472 return _roleLocalService.getResourceBlockRoles(resourceBlockId, 473 className, actionId); 474 } 475 476 /** 477 * Returns a map of role names to associated action IDs for the named 478 * resource in the company within the permission scope. 479 * 480 * @param companyId the primary key of the company 481 * @param name the resource name 482 * @param scope the permission scope 483 * @param primKey the primary key of the resource's class 484 * @return the role names and action IDs 485 * @see com.liferay.portal.service.persistence.RoleFinder#findByC_N_S_P( 486 long, String, int, String) 487 */ 488 @Override 489 public java.util.Map<java.lang.String, java.util.List<java.lang.String>> getResourceRoles( 490 long companyId, java.lang.String name, int scope, 491 java.lang.String primKey) { 492 return _roleLocalService.getResourceRoles(companyId, name, scope, 493 primKey); 494 } 495 496 /** 497 * Returns all the roles associated with the action ID in the company within 498 * the permission scope. 499 * 500 * @param companyId the primary key of the company 501 * @param name the resource name 502 * @param scope the permission scope 503 * @param primKey the primary key of the resource's class 504 * @param actionId the name of the resource action 505 * @return the roles 506 * @see com.liferay.portal.service.persistence.RoleFinder#findByC_N_S_P_A( 507 long, String, int, String, String) 508 */ 509 @Override 510 public java.util.List<com.liferay.portal.model.Role> getResourceRoles( 511 long companyId, java.lang.String name, int scope, 512 java.lang.String primKey, java.lang.String actionId) { 513 return _roleLocalService.getResourceRoles(companyId, name, scope, 514 primKey, actionId); 515 } 516 517 /** 518 * Returns the role with the name in the company. 519 * 520 * <p> 521 * The method searches the system roles map first for default roles. If a 522 * role with the name is not found, then the method will query the database. 523 * </p> 524 * 525 * @param companyId the primary key of the company 526 * @param name the role's name 527 * @return the role with the name 528 */ 529 @Override 530 public com.liferay.portal.model.Role getRole(long companyId, 531 java.lang.String name) 532 throws com.liferay.portal.kernel.exception.PortalException { 533 return _roleLocalService.getRole(companyId, name); 534 } 535 536 /** 537 * Returns the role with the primary key. 538 * 539 * @param roleId the primary key of the role 540 * @return the role 541 * @throws PortalException if a role with the primary key could not be found 542 */ 543 @Override 544 public com.liferay.portal.model.Role getRole(long roleId) 545 throws com.liferay.portal.kernel.exception.PortalException { 546 return _roleLocalService.getRole(roleId); 547 } 548 549 /** 550 * Returns the role with the matching UUID and company. 551 * 552 * @param uuid the role's UUID 553 * @param companyId the primary key of the company 554 * @return the matching role 555 * @throws PortalException if a matching role could not be found 556 */ 557 @Override 558 public com.liferay.portal.model.Role getRoleByUuidAndCompanyId( 559 java.lang.String uuid, long companyId) 560 throws com.liferay.portal.kernel.exception.PortalException { 561 return _roleLocalService.getRoleByUuidAndCompanyId(uuid, companyId); 562 } 563 564 /** 565 * Returns all the roles in the company. 566 * 567 * @param companyId the primary key of the company 568 * @return the roles in the company 569 */ 570 @Override 571 public java.util.List<com.liferay.portal.model.Role> getRoles( 572 long companyId) { 573 return _roleLocalService.getRoles(companyId); 574 } 575 576 /** 577 * Returns all the roles with the types. 578 * 579 * @param companyId the primary key of the company 580 * @param types the role types (optionally <code>null</code>) 581 * @return the roles with the types 582 */ 583 @Override 584 public java.util.List<com.liferay.portal.model.Role> getRoles( 585 long companyId, int[] types) { 586 return _roleLocalService.getRoles(companyId, types); 587 } 588 589 /** 590 * Returns all the roles with the primary keys. 591 * 592 * @param roleIds the primary keys of the roles 593 * @return the roles with the primary keys 594 */ 595 @Override 596 public java.util.List<com.liferay.portal.model.Role> getRoles( 597 long[] roleIds) 598 throws com.liferay.portal.kernel.exception.PortalException { 599 return _roleLocalService.getRoles(roleIds); 600 } 601 602 /** 603 * Returns a range of all the roles. 604 * 605 * <p> 606 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> 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 <code>orderByComparator</code> 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. 607 * </p> 608 * 609 * @param start the lower bound of the range of roles 610 * @param end the upper bound of the range of roles (not inclusive) 611 * @return the range of roles 612 */ 613 @Override 614 public java.util.List<com.liferay.portal.model.Role> getRoles(int start, 615 int end) { 616 return _roleLocalService.getRoles(start, end); 617 } 618 619 /** 620 * Returns all the roles of the type and subtype. 621 * 622 * @param type the role's type (optionally <code>0</code>) 623 * @param subtype the role's subtype (optionally <code>null</code>) 624 * @return the roles of the type and subtype 625 */ 626 @Override 627 public java.util.List<com.liferay.portal.model.Role> getRoles(int type, 628 java.lang.String subtype) { 629 return _roleLocalService.getRoles(type, subtype); 630 } 631 632 /** 633 * Returns the number of roles. 634 * 635 * @return the number of roles 636 */ 637 @Override 638 public int getRolesCount() { 639 return _roleLocalService.getRolesCount(); 640 } 641 642 /** 643 * Returns all the roles of the subtype. 644 * 645 * @param subtype the role's subtype (optionally <code>null</code>) 646 * @return the roles of the subtype 647 */ 648 @Override 649 public java.util.List<com.liferay.portal.model.Role> getSubtypeRoles( 650 java.lang.String subtype) { 651 return _roleLocalService.getSubtypeRoles(subtype); 652 } 653 654 /** 655 * Returns the number of roles of the subtype. 656 * 657 * @param subtype the role's subtype (optionally <code>null</code>) 658 * @return the number of roles of the subtype 659 */ 660 @Override 661 public int getSubtypeRolesCount(java.lang.String subtype) { 662 return _roleLocalService.getSubtypeRolesCount(subtype); 663 } 664 665 /** 666 * Returns the team role in the company. 667 * 668 * @param companyId the primary key of the company 669 * @param teamId the primary key of the team 670 * @return the team role in the company 671 */ 672 @Override 673 public com.liferay.portal.model.Role getTeamRole(long companyId, long teamId) 674 throws com.liferay.portal.kernel.exception.PortalException { 675 return _roleLocalService.getTeamRole(companyId, teamId); 676 } 677 678 /** 679 * Returns the team role map for the group. 680 * 681 * @param groupId the primary key of the group 682 * @return the team role map for the group 683 */ 684 @Override 685 public java.util.Map<com.liferay.portal.model.Team, com.liferay.portal.model.Role> getTeamRoleMap( 686 long groupId) 687 throws com.liferay.portal.kernel.exception.PortalException { 688 return _roleLocalService.getTeamRoleMap(groupId); 689 } 690 691 /** 692 * Returns the team roles in the group. 693 * 694 * @param groupId the primary key of the group 695 * @return the team roles in the group 696 */ 697 @Override 698 public java.util.List<com.liferay.portal.model.Role> getTeamRoles( 699 long groupId) 700 throws com.liferay.portal.kernel.exception.PortalException { 701 return _roleLocalService.getTeamRoles(groupId); 702 } 703 704 /** 705 * Returns the team roles in the group, excluding the specified role IDs. 706 * 707 * @param groupId the primary key of the group 708 * @param excludedRoleIds the primary keys of the roles to exclude 709 (optionally <code>null</code>) 710 * @return the team roles in the group, excluding the specified role IDs 711 */ 712 @Override 713 public java.util.List<com.liferay.portal.model.Role> getTeamRoles( 714 long groupId, long[] excludedRoleIds) 715 throws com.liferay.portal.kernel.exception.PortalException { 716 return _roleLocalService.getTeamRoles(groupId, excludedRoleIds); 717 } 718 719 /** 720 * Returns all the roles of the type. 721 * 722 * @param type the role's type (optionally <code>0</code>) 723 * @return the range of the roles of the type 724 */ 725 @Override 726 public java.util.List<com.liferay.portal.model.Role> getTypeRoles(int type) { 727 return _roleLocalService.getTypeRoles(type); 728 } 729 730 /** 731 * Returns a range of all the roles of the type. 732 * 733 * @param type the role's type (optionally <code>0</code>) 734 * @param start the lower bound of the range of roles to return 735 * @param end the upper bound of the range of roles to return (not 736 inclusive) 737 * @return the range of the roles of the type 738 */ 739 @Override 740 public java.util.List<com.liferay.portal.model.Role> getTypeRoles( 741 int type, int start, int end) { 742 return _roleLocalService.getTypeRoles(type, start, end); 743 } 744 745 /** 746 * Returns the number of roles of the type. 747 * 748 * @param type the role's type (optionally <code>0</code>) 749 * @return the number of roles of the type 750 */ 751 @Override 752 public int getTypeRolesCount(int type) { 753 return _roleLocalService.getTypeRolesCount(type); 754 } 755 756 /** 757 * Returns all the user's roles within the user group. 758 * 759 * @param userId the primary key of the user 760 * @param groupId the primary key of the group 761 * @return the user's roles within the user group 762 * @see com.liferay.portal.service.persistence.RoleFinder#findByUserGroupGroupRole( 763 long, long) 764 */ 765 @Override 766 public java.util.List<com.liferay.portal.model.Role> getUserGroupGroupRoles( 767 long userId, long groupId) { 768 return _roleLocalService.getUserGroupGroupRoles(userId, groupId); 769 } 770 771 @Override 772 public java.util.List<com.liferay.portal.model.Role> getUserGroupGroupRoles( 773 long userId, long groupId, int start, int end) { 774 return _roleLocalService.getUserGroupGroupRoles(userId, groupId, start, 775 end); 776 } 777 778 @Override 779 public int getUserGroupGroupRolesCount(long userId, long groupId) { 780 return _roleLocalService.getUserGroupGroupRolesCount(userId, groupId); 781 } 782 783 /** 784 * Returns all the user's roles within the user group. 785 * 786 * @param userId the primary key of the user 787 * @param groupId the primary key of the group 788 * @return the user's roles within the user group 789 * @see com.liferay.portal.service.persistence.RoleFinder#findByUserGroupRole( 790 long, long) 791 */ 792 @Override 793 public java.util.List<com.liferay.portal.model.Role> getUserGroupRoles( 794 long userId, long groupId) { 795 return _roleLocalService.getUserGroupRoles(userId, groupId); 796 } 797 798 /** 799 * Returns the userIds of the users associated with the role. 800 * 801 * @param roleId the roleId of the role 802 * @return long[] the userIds of users associated with the role 803 */ 804 @Override 805 public long[] getUserPrimaryKeys(long roleId) { 806 return _roleLocalService.getUserPrimaryKeys(roleId); 807 } 808 809 /** 810 * Returns all the user's roles within the group. 811 * 812 * @param userId the primary key of the user 813 * @param groupId the primary key of the group 814 * @return the user's roles within the group 815 * @see com.liferay.portal.service.persistence.RoleFinder#findByU_G(long, 816 long) 817 */ 818 @Override 819 public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles( 820 long userId, long groupId) { 821 return _roleLocalService.getUserRelatedRoles(userId, groupId); 822 } 823 824 /** 825 * Returns the union of all the user's roles within the groups. 826 * 827 * @param userId the primary key of the user 828 * @param groupIds the primary keys of the groups 829 * @return the union of all the user's roles within the groups 830 * @see com.liferay.portal.service.persistence.RoleFinder#findByU_G(long, 831 long[]) 832 */ 833 @Override 834 public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles( 835 long userId, long[] groupIds) { 836 return _roleLocalService.getUserRelatedRoles(userId, groupIds); 837 } 838 839 /** 840 * Returns the union of all the user's roles within the groups. 841 * 842 * @param userId the primary key of the user 843 * @param groups the groups (optionally <code>null</code>) 844 * @return the union of all the user's roles within the groups 845 * @see com.liferay.portal.service.persistence.RoleFinder#findByU_G(long, 846 List) 847 */ 848 @Override 849 public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles( 850 long userId, java.util.List<com.liferay.portal.model.Group> groups) { 851 return _roleLocalService.getUserRelatedRoles(userId, groups); 852 } 853 854 @Override 855 public java.util.List<com.liferay.portal.model.Role> getUserRoles( 856 long userId) { 857 return _roleLocalService.getUserRoles(userId); 858 } 859 860 @Override 861 public java.util.List<com.liferay.portal.model.Role> getUserRoles( 862 long userId, int start, int end) { 863 return _roleLocalService.getUserRoles(userId, start, end); 864 } 865 866 @Override 867 public java.util.List<com.liferay.portal.model.Role> getUserRoles( 868 long userId, int start, int end, 869 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Role> orderByComparator) { 870 return _roleLocalService.getUserRoles(userId, start, end, 871 orderByComparator); 872 } 873 874 @Override 875 public int getUserRolesCount(long userId) { 876 return _roleLocalService.getUserRolesCount(userId); 877 } 878 879 @Override 880 public boolean hasGroupRole(long groupId, long roleId) { 881 return _roleLocalService.hasGroupRole(groupId, roleId); 882 } 883 884 @Override 885 public boolean hasGroupRoles(long groupId) { 886 return _roleLocalService.hasGroupRoles(groupId); 887 } 888 889 /** 890 * Returns <code>true</code> if the user is associated with the named 891 * regular role. 892 * 893 * @param userId the primary key of the user 894 * @param companyId the primary key of the company 895 * @param name the name of the role 896 * @param inherited whether to include the user's inherited roles in the 897 search 898 * @return <code>true</code> if the user is associated with the regular 899 role; <code>false</code> otherwise 900 */ 901 @Override 902 public boolean hasUserRole(long userId, long companyId, 903 java.lang.String name, boolean inherited) 904 throws com.liferay.portal.kernel.exception.PortalException { 905 return _roleLocalService.hasUserRole(userId, companyId, name, inherited); 906 } 907 908 @Override 909 public boolean hasUserRole(long userId, long roleId) { 910 return _roleLocalService.hasUserRole(userId, roleId); 911 } 912 913 @Override 914 public boolean hasUserRoles(long userId) { 915 return _roleLocalService.hasUserRoles(userId); 916 } 917 918 /** 919 * Returns <code>true</code> if the user has any one of the named regular 920 * roles. 921 * 922 * @param userId the primary key of the user 923 * @param companyId the primary key of the company 924 * @param names the names of the roles 925 * @param inherited whether to include the user's inherited roles in the 926 search 927 * @return <code>true</code> if the user has any one of the regular roles; 928 <code>false</code> otherwise 929 */ 930 @Override 931 public boolean hasUserRoles(long userId, long companyId, 932 java.lang.String[] names, boolean inherited) 933 throws com.liferay.portal.kernel.exception.PortalException { 934 return _roleLocalService.hasUserRoles(userId, companyId, names, 935 inherited); 936 } 937 938 /** 939 * Returns a role with the name in the company. 940 * 941 * @param companyId the primary key of the company 942 * @param name the role's name (optionally <code>null</code>) 943 * @return the role with the name, or <code>null</code> if a role with the 944 name could not be found in the company 945 */ 946 @Override 947 public com.liferay.portal.model.Role loadFetchRole(long companyId, 948 java.lang.String name) { 949 return _roleLocalService.loadFetchRole(companyId, name); 950 } 951 952 /** 953 * Returns a role with the name in the company. 954 * 955 * @param companyId the primary key of the company 956 * @param name the role's name 957 * @return the role with the name in the company 958 */ 959 @Override 960 public com.liferay.portal.model.Role loadGetRole(long companyId, 961 java.lang.String name) 962 throws com.liferay.portal.kernel.exception.PortalException { 963 return _roleLocalService.loadGetRole(companyId, name); 964 } 965 966 /** 967 * Returns an ordered range of all the roles that match the keywords, types, 968 * and params. 969 * 970 * <p> 971 * Useful when paginating results. Returns a maximum of <code>end - 972 * start</code> instances. <code>start</code> and <code>end</code> are not 973 * primary keys, they are indexes in the result set. Thus, <code>0</code> 974 * refers to the first result in the set. Setting both <code>start</code> 975 * and <code>end</code> to {@link 976 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 977 * result set. 978 * </p> 979 * 980 * @param companyId the primary key of the company 981 * @param keywords the keywords (space separated), which may occur in the 982 role's name or description (optionally <code>null</code>) 983 * @param types the role types (optionally <code>null</code>) 984 * @param params the finder parameters. Can specify values for the 985 "usersRoles" key. For more information, see {@link 986 com.liferay.portal.service.persistence.RoleFinder} 987 * @param start the lower bound of the range of roles to return 988 * @param end the upper bound of the range of roles to return (not 989 inclusive) 990 * @param obc the comparator to order the roles (optionally 991 <code>null</code>) 992 * @return the ordered range of the matching roles, ordered by 993 <code>obc</code> 994 * @see com.liferay.portal.service.persistence.RoleFinder 995 */ 996 @Override 997 public java.util.List<com.liferay.portal.model.Role> search( 998 long companyId, java.lang.String keywords, java.lang.Integer[] types, 999 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1000 int start, int end, 1001 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Role> obc) { 1002 return _roleLocalService.search(companyId, keywords, types, params, 1003 start, end, obc); 1004 } 1005 1006 /** 1007 * Returns an ordered range of all the roles that match the keywords and 1008 * types. 1009 * 1010 * <p> 1011 * Useful when paginating results. Returns a maximum of <code>end - 1012 * start</code> instances. <code>start</code> and <code>end</code> are not 1013 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1014 * refers to the first result in the set. Setting both <code>start</code> 1015 * and <code>end</code> to {@link 1016 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1017 * result set. 1018 * </p> 1019 * 1020 * @param companyId the primary key of the company 1021 * @param keywords the keywords (space separated), which may occur in the 1022 role's name or description (optionally <code>null</code>) 1023 * @param types the role types (optionally <code>null</code>) 1024 * @param start the lower bound of the range of roles to return 1025 * @param end the upper bound of the range of roles to return (not 1026 inclusive) 1027 * @param obc the comparator to order the roles (optionally 1028 <code>null</code>) 1029 * @return the ordered range of the matching roles, ordered by 1030 <code>obc</code> 1031 * @see com.liferay.portal.service.persistence.RoleFinder 1032 */ 1033 @Override 1034 public java.util.List<com.liferay.portal.model.Role> search( 1035 long companyId, java.lang.String keywords, java.lang.Integer[] types, 1036 int start, int end, 1037 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Role> obc) { 1038 return _roleLocalService.search(companyId, keywords, types, start, end, 1039 obc); 1040 } 1041 1042 /** 1043 * Returns an ordered range of all the roles that match the name, 1044 * description, types, and params. 1045 * 1046 * <p> 1047 * Useful when paginating results. Returns a maximum of <code>end - 1048 * start</code> instances. <code>start</code> and <code>end</code> are not 1049 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1050 * refers to the first result in the set. Setting both <code>start</code> 1051 * and <code>end</code> to {@link 1052 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1053 * result set. 1054 * </p> 1055 * 1056 * @param companyId the primary key of the company 1057 * @param name the role's name (optionally <code>null</code>) 1058 * @param description the role's description (optionally <code>null</code>) 1059 * @param types the role types (optionally <code>null</code>) 1060 * @param params the finder's parameters. Can specify values for the 1061 "usersRoles" key. For more information, see {@link 1062 com.liferay.portal.service.persistence.RoleFinder} 1063 * @param start the lower bound of the range of the roles to return 1064 * @param end the upper bound of the range of the roles to return (not 1065 inclusive) 1066 * @param obc the comparator to order the roles (optionally 1067 <code>null</code>) 1068 * @return the ordered range of the matching roles, ordered by 1069 <code>obc</code> 1070 * @see com.liferay.portal.service.persistence.RoleFinder 1071 */ 1072 @Override 1073 public java.util.List<com.liferay.portal.model.Role> search( 1074 long companyId, java.lang.String name, java.lang.String description, 1075 java.lang.Integer[] types, 1076 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1077 int start, int end, 1078 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Role> obc) { 1079 return _roleLocalService.search(companyId, name, description, types, 1080 params, start, end, obc); 1081 } 1082 1083 /** 1084 * Returns an ordered range of all the roles that match the name, 1085 * description, and types. 1086 * 1087 * <p> 1088 * Useful when paginating results. Returns a maximum of <code>end - 1089 * start</code> instances. <code>start</code> and <code>end</code> are not 1090 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1091 * refers to the first result in the set. Setting both <code>start</code> 1092 * and <code>end</code> to {@link 1093 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1094 * result set. 1095 * </p> 1096 * 1097 * @param companyId the primary key of the company 1098 * @param name the role's name (optionally <code>null</code>) 1099 * @param description the role's description (optionally <code>null</code>) 1100 * @param types the role types (optionally <code>null</code>) 1101 * @param start the lower bound of the range of the roles to return 1102 * @param end the upper bound of the range of the roles to return (not 1103 inclusive) 1104 * @param obc the comparator to order the roles (optionally 1105 <code>null</code>) 1106 * @return the ordered range of the matching roles, ordered by 1107 <code>obc</code> 1108 * @see com.liferay.portal.service.persistence.RoleFinder 1109 */ 1110 @Override 1111 public java.util.List<com.liferay.portal.model.Role> search( 1112 long companyId, java.lang.String name, java.lang.String description, 1113 java.lang.Integer[] types, int start, int end, 1114 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Role> obc) { 1115 return _roleLocalService.search(companyId, name, description, types, 1116 start, end, obc); 1117 } 1118 1119 /** 1120 * Returns the number of roles that match the keywords and types. 1121 * 1122 * @param companyId the primary key of the company 1123 * @param keywords the keywords (space separated), which may occur in the 1124 role's name or description (optionally <code>null</code>) 1125 * @param types the role types (optionally <code>null</code>) 1126 * @return the number of matching roles 1127 */ 1128 @Override 1129 public int searchCount(long companyId, java.lang.String keywords, 1130 java.lang.Integer[] types) { 1131 return _roleLocalService.searchCount(companyId, keywords, types); 1132 } 1133 1134 /** 1135 * Returns the number of roles that match the keywords, types and params. 1136 * 1137 * @param companyId the primary key of the company 1138 * @param keywords the keywords (space separated), which may occur in the 1139 role's name or description (optionally <code>null</code>) 1140 * @param types the role types (optionally <code>null</code>) 1141 * @param params the finder parameters. For more information, see {@link 1142 com.liferay.portal.service.persistence.RoleFinder} 1143 * @return the number of matching roles 1144 */ 1145 @Override 1146 public int searchCount(long companyId, java.lang.String keywords, 1147 java.lang.Integer[] types, 1148 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) { 1149 return _roleLocalService.searchCount(companyId, keywords, types, params); 1150 } 1151 1152 /** 1153 * Returns the number of roles that match the name, description, and types. 1154 * 1155 * @param companyId the primary key of the company 1156 * @param name the role's name (optionally <code>null</code>) 1157 * @param description the role's description (optionally <code>null</code>) 1158 * @param types the role types (optionally <code>null</code>) 1159 * @return the number of matching roles 1160 */ 1161 @Override 1162 public int searchCount(long companyId, java.lang.String name, 1163 java.lang.String description, java.lang.Integer[] types) { 1164 return _roleLocalService.searchCount(companyId, name, description, types); 1165 } 1166 1167 /** 1168 * Returns the number of roles that match the name, description, types, and 1169 * params. 1170 * 1171 * @param companyId the primary key of the company 1172 * @param name the role's name (optionally <code>null</code>) 1173 * @param description the role's description (optionally <code>null</code>) 1174 * @param types the role types (optionally <code>null</code>) 1175 * @param params the finder parameters. Can specify values for the 1176 "usersRoles" key. For more information, see {@link 1177 com.liferay.portal.service.persistence.RoleFinder} 1178 * @return the number of matching roles 1179 */ 1180 @Override 1181 public int searchCount(long companyId, java.lang.String name, 1182 java.lang.String description, java.lang.Integer[] types, 1183 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) { 1184 return _roleLocalService.searchCount(companyId, name, description, 1185 types, params); 1186 } 1187 1188 @Override 1189 public void setGroupRoles(long groupId, long[] roleIds) { 1190 _roleLocalService.setGroupRoles(groupId, roleIds); 1191 } 1192 1193 /** 1194 * @throws PortalException 1195 */ 1196 @Override 1197 public void setUserRoles(long userId, long[] roleIds) 1198 throws com.liferay.portal.kernel.exception.PortalException { 1199 _roleLocalService.setUserRoles(userId, roleIds); 1200 } 1201 1202 /** 1203 * Removes the matching roles associated with the user. The user is 1204 * reindexed after the roles are removed. 1205 * 1206 * @param userId the primary key of the user 1207 * @param roleIds the primary keys of the roles 1208 */ 1209 @Override 1210 public void unsetUserRoles(long userId, long[] roleIds) 1211 throws com.liferay.portal.kernel.exception.PortalException { 1212 _roleLocalService.unsetUserRoles(userId, roleIds); 1213 } 1214 1215 /** 1216 * Updates the role in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 1217 * 1218 * @param role the role 1219 * @return the role that was updated 1220 */ 1221 @Override 1222 public com.liferay.portal.model.Role updateRole( 1223 com.liferay.portal.model.Role role) { 1224 return _roleLocalService.updateRole(role); 1225 } 1226 1227 /** 1228 * Updates the role with the primary key. 1229 * 1230 * @param roleId the primary key of the role 1231 * @param name the role's new name 1232 * @param titleMap the new localized titles (optionally <code>null</code>) 1233 to replace those existing for the role 1234 * @param descriptionMap the new localized descriptions (optionally 1235 <code>null</code>) to replace those existing for the role 1236 * @param subtype the role's new subtype (optionally <code>null</code>) 1237 * @param serviceContext the service context to be applied (optionally 1238 <code>null</code>). Can set expando bridge attributes for the 1239 role. 1240 * @return the role with the primary key 1241 */ 1242 @Override 1243 public com.liferay.portal.model.Role updateRole(long roleId, 1244 java.lang.String name, 1245 java.util.Map<java.util.Locale, java.lang.String> titleMap, 1246 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 1247 java.lang.String subtype, 1248 com.liferay.portal.service.ServiceContext serviceContext) 1249 throws com.liferay.portal.kernel.exception.PortalException { 1250 return _roleLocalService.updateRole(roleId, name, titleMap, 1251 descriptionMap, subtype, serviceContext); 1252 } 1253 1254 @Override 1255 public RoleLocalService getWrappedService() { 1256 return _roleLocalService; 1257 } 1258 1259 @Override 1260 public void setWrappedService(RoleLocalService roleLocalService) { 1261 _roleLocalService = roleLocalService; 1262 } 1263 1264 private RoleLocalService _roleLocalService; 1265 }