001 /** 002 * Copyright (c) 2000-2013 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 /** 018 * Provides a wrapper for {@link RoleLocalService}. 019 * 020 * @author Brian Wing Shun Chan 021 * @see RoleLocalService 022 * @generated 023 */ 024 public class RoleLocalServiceWrapper implements RoleLocalService, 025 ServiceWrapper<RoleLocalService> { 026 public RoleLocalServiceWrapper(RoleLocalService roleLocalService) { 027 _roleLocalService = roleLocalService; 028 } 029 030 /** 031 * Adds the role to the database. Also notifies the appropriate model listeners. 032 * 033 * @param role the role 034 * @return the role that was added 035 * @throws SystemException if a system exception occurred 036 */ 037 @Override 038 public com.liferay.portal.model.Role addRole( 039 com.liferay.portal.model.Role role) 040 throws com.liferay.portal.kernel.exception.SystemException { 041 return _roleLocalService.addRole(role); 042 } 043 044 /** 045 * Creates a new role with the primary key. Does not add the role to the database. 046 * 047 * @param roleId the primary key for the new role 048 * @return the new role 049 */ 050 @Override 051 public com.liferay.portal.model.Role createRole(long roleId) { 052 return _roleLocalService.createRole(roleId); 053 } 054 055 /** 056 * Deletes the role with the primary key from the database. Also notifies the appropriate model listeners. 057 * 058 * @param roleId the primary key of the role 059 * @return the role that was removed 060 * @throws PortalException if a role with the primary key could not be found 061 * @throws SystemException if a system exception occurred 062 */ 063 @Override 064 public com.liferay.portal.model.Role deleteRole(long roleId) 065 throws com.liferay.portal.kernel.exception.PortalException, 066 com.liferay.portal.kernel.exception.SystemException { 067 return _roleLocalService.deleteRole(roleId); 068 } 069 070 /** 071 * Deletes the role from the database. Also notifies the appropriate model listeners. 072 * 073 * @param role the role 074 * @return the role that was removed 075 * @throws PortalException 076 * @throws SystemException if a system exception occurred 077 */ 078 @Override 079 public com.liferay.portal.model.Role deleteRole( 080 com.liferay.portal.model.Role role) 081 throws com.liferay.portal.kernel.exception.PortalException, 082 com.liferay.portal.kernel.exception.SystemException { 083 return _roleLocalService.deleteRole(role); 084 } 085 086 @Override 087 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 088 return _roleLocalService.dynamicQuery(); 089 } 090 091 /** 092 * Performs a dynamic query on the database and returns the matching rows. 093 * 094 * @param dynamicQuery the dynamic query 095 * @return the matching rows 096 * @throws SystemException if a system exception occurred 097 */ 098 @Override 099 @SuppressWarnings("rawtypes") 100 public java.util.List dynamicQuery( 101 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 102 throws com.liferay.portal.kernel.exception.SystemException { 103 return _roleLocalService.dynamicQuery(dynamicQuery); 104 } 105 106 /** 107 * Performs a dynamic query on the database and returns a range of the matching rows. 108 * 109 * <p> 110 * 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. 111 * </p> 112 * 113 * @param dynamicQuery the dynamic query 114 * @param start the lower bound of the range of model instances 115 * @param end the upper bound of the range of model instances (not inclusive) 116 * @return the range of matching rows 117 * @throws SystemException if a system exception occurred 118 */ 119 @Override 120 @SuppressWarnings("rawtypes") 121 public java.util.List dynamicQuery( 122 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 123 int end) throws com.liferay.portal.kernel.exception.SystemException { 124 return _roleLocalService.dynamicQuery(dynamicQuery, start, end); 125 } 126 127 /** 128 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 129 * 130 * <p> 131 * 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. 132 * </p> 133 * 134 * @param dynamicQuery the dynamic query 135 * @param start the lower bound of the range of model instances 136 * @param end the upper bound of the range of model instances (not inclusive) 137 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 138 * @return the ordered range of matching rows 139 * @throws SystemException if a system exception occurred 140 */ 141 @Override 142 @SuppressWarnings("rawtypes") 143 public java.util.List dynamicQuery( 144 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 145 int end, 146 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 147 throws com.liferay.portal.kernel.exception.SystemException { 148 return _roleLocalService.dynamicQuery(dynamicQuery, start, end, 149 orderByComparator); 150 } 151 152 /** 153 * Returns the number of rows that match the dynamic query. 154 * 155 * @param dynamicQuery the dynamic query 156 * @return the number of rows that match the dynamic query 157 * @throws SystemException if a system exception occurred 158 */ 159 @Override 160 public long dynamicQueryCount( 161 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 162 throws com.liferay.portal.kernel.exception.SystemException { 163 return _roleLocalService.dynamicQueryCount(dynamicQuery); 164 } 165 166 /** 167 * Returns the number of rows that match the dynamic query. 168 * 169 * @param dynamicQuery the dynamic query 170 * @param projection the projection to apply to the query 171 * @return the number of rows that match the dynamic query 172 * @throws SystemException if a system exception occurred 173 */ 174 @Override 175 public long dynamicQueryCount( 176 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 177 com.liferay.portal.kernel.dao.orm.Projection projection) 178 throws com.liferay.portal.kernel.exception.SystemException { 179 return _roleLocalService.dynamicQueryCount(dynamicQuery, projection); 180 } 181 182 @Override 183 public com.liferay.portal.model.Role fetchRole(long roleId) 184 throws com.liferay.portal.kernel.exception.SystemException { 185 return _roleLocalService.fetchRole(roleId); 186 } 187 188 /** 189 * Returns the role with the matching UUID and company. 190 * 191 * @param uuid the role's UUID 192 * @param companyId the primary key of the company 193 * @return the matching role, or <code>null</code> if a matching role could not be found 194 * @throws SystemException if a system exception occurred 195 */ 196 @Override 197 public com.liferay.portal.model.Role fetchRoleByUuidAndCompanyId( 198 java.lang.String uuid, long companyId) 199 throws com.liferay.portal.kernel.exception.SystemException { 200 return _roleLocalService.fetchRoleByUuidAndCompanyId(uuid, companyId); 201 } 202 203 /** 204 * Returns the role with the primary key. 205 * 206 * @param roleId the primary key of the role 207 * @return the role 208 * @throws PortalException if a role with the primary key could not be found 209 * @throws SystemException if a system exception occurred 210 */ 211 @Override 212 public com.liferay.portal.model.Role getRole(long roleId) 213 throws com.liferay.portal.kernel.exception.PortalException, 214 com.liferay.portal.kernel.exception.SystemException { 215 return _roleLocalService.getRole(roleId); 216 } 217 218 @Override 219 public com.liferay.portal.model.PersistedModel getPersistedModel( 220 java.io.Serializable primaryKeyObj) 221 throws com.liferay.portal.kernel.exception.PortalException, 222 com.liferay.portal.kernel.exception.SystemException { 223 return _roleLocalService.getPersistedModel(primaryKeyObj); 224 } 225 226 /** 227 * Returns the role with the matching UUID and company. 228 * 229 * @param uuid the role's UUID 230 * @param companyId the primary key of the company 231 * @return the matching role 232 * @throws PortalException if a matching role could not be found 233 * @throws SystemException if a system exception occurred 234 */ 235 @Override 236 public com.liferay.portal.model.Role getRoleByUuidAndCompanyId( 237 java.lang.String uuid, long companyId) 238 throws com.liferay.portal.kernel.exception.PortalException, 239 com.liferay.portal.kernel.exception.SystemException { 240 return _roleLocalService.getRoleByUuidAndCompanyId(uuid, companyId); 241 } 242 243 /** 244 * Returns a range of all the roles. 245 * 246 * <p> 247 * 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. 248 * </p> 249 * 250 * @param start the lower bound of the range of roles 251 * @param end the upper bound of the range of roles (not inclusive) 252 * @return the range of roles 253 * @throws SystemException if a system exception occurred 254 */ 255 @Override 256 public java.util.List<com.liferay.portal.model.Role> getRoles(int start, 257 int end) throws com.liferay.portal.kernel.exception.SystemException { 258 return _roleLocalService.getRoles(start, end); 259 } 260 261 /** 262 * Returns the number of roles. 263 * 264 * @return the number of roles 265 * @throws SystemException if a system exception occurred 266 */ 267 @Override 268 public int getRolesCount() 269 throws com.liferay.portal.kernel.exception.SystemException { 270 return _roleLocalService.getRolesCount(); 271 } 272 273 /** 274 * Updates the role in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 275 * 276 * @param role the role 277 * @return the role that was updated 278 * @throws SystemException if a system exception occurred 279 */ 280 @Override 281 public com.liferay.portal.model.Role updateRole( 282 com.liferay.portal.model.Role role) 283 throws com.liferay.portal.kernel.exception.SystemException { 284 return _roleLocalService.updateRole(role); 285 } 286 287 /** 288 * @throws SystemException if a system exception occurred 289 */ 290 @Override 291 public void addGroupRole(long groupId, long roleId) 292 throws com.liferay.portal.kernel.exception.SystemException { 293 _roleLocalService.addGroupRole(groupId, roleId); 294 } 295 296 /** 297 * @throws SystemException if a system exception occurred 298 */ 299 @Override 300 public void addGroupRole(long groupId, com.liferay.portal.model.Role role) 301 throws com.liferay.portal.kernel.exception.SystemException { 302 _roleLocalService.addGroupRole(groupId, role); 303 } 304 305 /** 306 * @throws SystemException if a system exception occurred 307 */ 308 @Override 309 public void addGroupRoles(long groupId, long[] roleIds) 310 throws com.liferay.portal.kernel.exception.SystemException { 311 _roleLocalService.addGroupRoles(groupId, roleIds); 312 } 313 314 /** 315 * @throws SystemException if a system exception occurred 316 */ 317 @Override 318 public void addGroupRoles(long groupId, 319 java.util.List<com.liferay.portal.model.Role> Roles) 320 throws com.liferay.portal.kernel.exception.SystemException { 321 _roleLocalService.addGroupRoles(groupId, Roles); 322 } 323 324 /** 325 * @throws SystemException if a system exception occurred 326 */ 327 @Override 328 public void clearGroupRoles(long groupId) 329 throws com.liferay.portal.kernel.exception.SystemException { 330 _roleLocalService.clearGroupRoles(groupId); 331 } 332 333 /** 334 * @throws SystemException if a system exception occurred 335 */ 336 @Override 337 public void deleteGroupRole(long groupId, long roleId) 338 throws com.liferay.portal.kernel.exception.SystemException { 339 _roleLocalService.deleteGroupRole(groupId, roleId); 340 } 341 342 /** 343 * @throws SystemException if a system exception occurred 344 */ 345 @Override 346 public void deleteGroupRole(long groupId, com.liferay.portal.model.Role role) 347 throws com.liferay.portal.kernel.exception.SystemException { 348 _roleLocalService.deleteGroupRole(groupId, role); 349 } 350 351 /** 352 * @throws SystemException if a system exception occurred 353 */ 354 @Override 355 public void deleteGroupRoles(long groupId, long[] roleIds) 356 throws com.liferay.portal.kernel.exception.SystemException { 357 _roleLocalService.deleteGroupRoles(groupId, roleIds); 358 } 359 360 /** 361 * @throws SystemException if a system exception occurred 362 */ 363 @Override 364 public void deleteGroupRoles(long groupId, 365 java.util.List<com.liferay.portal.model.Role> Roles) 366 throws com.liferay.portal.kernel.exception.SystemException { 367 _roleLocalService.deleteGroupRoles(groupId, Roles); 368 } 369 370 /** 371 * @throws SystemException if a system exception occurred 372 */ 373 @Override 374 public java.util.List<com.liferay.portal.model.Role> getGroupRoles( 375 long groupId) 376 throws com.liferay.portal.kernel.exception.SystemException { 377 return _roleLocalService.getGroupRoles(groupId); 378 } 379 380 /** 381 * @throws SystemException if a system exception occurred 382 */ 383 @Override 384 public java.util.List<com.liferay.portal.model.Role> getGroupRoles( 385 long groupId, int start, int end) 386 throws com.liferay.portal.kernel.exception.SystemException { 387 return _roleLocalService.getGroupRoles(groupId, start, end); 388 } 389 390 /** 391 * @throws SystemException if a system exception occurred 392 */ 393 @Override 394 public java.util.List<com.liferay.portal.model.Role> getGroupRoles( 395 long groupId, int start, int end, 396 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 397 throws com.liferay.portal.kernel.exception.SystemException { 398 return _roleLocalService.getGroupRoles(groupId, start, end, 399 orderByComparator); 400 } 401 402 /** 403 * @throws SystemException if a system exception occurred 404 */ 405 @Override 406 public int getGroupRolesCount(long groupId) 407 throws com.liferay.portal.kernel.exception.SystemException { 408 return _roleLocalService.getGroupRolesCount(groupId); 409 } 410 411 /** 412 * @throws SystemException if a system exception occurred 413 */ 414 @Override 415 public boolean hasGroupRole(long groupId, long roleId) 416 throws com.liferay.portal.kernel.exception.SystemException { 417 return _roleLocalService.hasGroupRole(groupId, roleId); 418 } 419 420 /** 421 * @throws SystemException if a system exception occurred 422 */ 423 @Override 424 public boolean hasGroupRoles(long groupId) 425 throws com.liferay.portal.kernel.exception.SystemException { 426 return _roleLocalService.hasGroupRoles(groupId); 427 } 428 429 /** 430 * @throws SystemException if a system exception occurred 431 */ 432 @Override 433 public void setGroupRoles(long groupId, long[] roleIds) 434 throws com.liferay.portal.kernel.exception.SystemException { 435 _roleLocalService.setGroupRoles(groupId, roleIds); 436 } 437 438 /** 439 * @throws SystemException if a system exception occurred 440 */ 441 @Override 442 public void addUserRole(long userId, long roleId) 443 throws com.liferay.portal.kernel.exception.SystemException { 444 _roleLocalService.addUserRole(userId, roleId); 445 } 446 447 /** 448 * @throws SystemException if a system exception occurred 449 */ 450 @Override 451 public void addUserRole(long userId, com.liferay.portal.model.Role role) 452 throws com.liferay.portal.kernel.exception.SystemException { 453 _roleLocalService.addUserRole(userId, role); 454 } 455 456 /** 457 * @throws PortalException 458 * @throws SystemException if a system exception occurred 459 */ 460 @Override 461 public void addUserRoles(long userId, long[] roleIds) 462 throws com.liferay.portal.kernel.exception.PortalException, 463 com.liferay.portal.kernel.exception.SystemException { 464 _roleLocalService.addUserRoles(userId, roleIds); 465 } 466 467 /** 468 * @throws PortalException 469 * @throws SystemException if a system exception occurred 470 */ 471 @Override 472 public void addUserRoles(long userId, 473 java.util.List<com.liferay.portal.model.Role> Roles) 474 throws com.liferay.portal.kernel.exception.PortalException, 475 com.liferay.portal.kernel.exception.SystemException { 476 _roleLocalService.addUserRoles(userId, Roles); 477 } 478 479 /** 480 * @throws SystemException if a system exception occurred 481 */ 482 @Override 483 public void clearUserRoles(long userId) 484 throws com.liferay.portal.kernel.exception.SystemException { 485 _roleLocalService.clearUserRoles(userId); 486 } 487 488 /** 489 * @throws SystemException if a system exception occurred 490 */ 491 @Override 492 public void deleteUserRole(long userId, long roleId) 493 throws com.liferay.portal.kernel.exception.SystemException { 494 _roleLocalService.deleteUserRole(userId, roleId); 495 } 496 497 /** 498 * @throws SystemException if a system exception occurred 499 */ 500 @Override 501 public void deleteUserRole(long userId, com.liferay.portal.model.Role role) 502 throws com.liferay.portal.kernel.exception.SystemException { 503 _roleLocalService.deleteUserRole(userId, role); 504 } 505 506 /** 507 * @throws SystemException if a system exception occurred 508 */ 509 @Override 510 public void deleteUserRoles(long userId, long[] roleIds) 511 throws com.liferay.portal.kernel.exception.SystemException { 512 _roleLocalService.deleteUserRoles(userId, roleIds); 513 } 514 515 /** 516 * @throws SystemException if a system exception occurred 517 */ 518 @Override 519 public void deleteUserRoles(long userId, 520 java.util.List<com.liferay.portal.model.Role> Roles) 521 throws com.liferay.portal.kernel.exception.SystemException { 522 _roleLocalService.deleteUserRoles(userId, Roles); 523 } 524 525 /** 526 * @throws SystemException if a system exception occurred 527 */ 528 @Override 529 public java.util.List<com.liferay.portal.model.Role> getUserRoles( 530 long userId) throws com.liferay.portal.kernel.exception.SystemException { 531 return _roleLocalService.getUserRoles(userId); 532 } 533 534 /** 535 * @throws SystemException if a system exception occurred 536 */ 537 @Override 538 public java.util.List<com.liferay.portal.model.Role> getUserRoles( 539 long userId, int start, int end) 540 throws com.liferay.portal.kernel.exception.SystemException { 541 return _roleLocalService.getUserRoles(userId, start, end); 542 } 543 544 /** 545 * @throws SystemException if a system exception occurred 546 */ 547 @Override 548 public java.util.List<com.liferay.portal.model.Role> getUserRoles( 549 long userId, int start, int end, 550 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 551 throws com.liferay.portal.kernel.exception.SystemException { 552 return _roleLocalService.getUserRoles(userId, start, end, 553 orderByComparator); 554 } 555 556 /** 557 * @throws SystemException if a system exception occurred 558 */ 559 @Override 560 public int getUserRolesCount(long userId) 561 throws com.liferay.portal.kernel.exception.SystemException { 562 return _roleLocalService.getUserRolesCount(userId); 563 } 564 565 /** 566 * @throws SystemException if a system exception occurred 567 */ 568 @Override 569 public boolean hasUserRole(long userId, long roleId) 570 throws com.liferay.portal.kernel.exception.SystemException { 571 return _roleLocalService.hasUserRole(userId, roleId); 572 } 573 574 /** 575 * @throws SystemException if a system exception occurred 576 */ 577 @Override 578 public boolean hasUserRoles(long userId) 579 throws com.liferay.portal.kernel.exception.SystemException { 580 return _roleLocalService.hasUserRoles(userId); 581 } 582 583 /** 584 * @throws PortalException 585 * @throws SystemException if a system exception occurred 586 */ 587 @Override 588 public void setUserRoles(long userId, long[] roleIds) 589 throws com.liferay.portal.kernel.exception.PortalException, 590 com.liferay.portal.kernel.exception.SystemException { 591 _roleLocalService.setUserRoles(userId, roleIds); 592 } 593 594 /** 595 * Returns the Spring bean ID for this bean. 596 * 597 * @return the Spring bean ID for this bean 598 */ 599 @Override 600 public java.lang.String getBeanIdentifier() { 601 return _roleLocalService.getBeanIdentifier(); 602 } 603 604 /** 605 * Sets the Spring bean ID for this bean. 606 * 607 * @param beanIdentifier the Spring bean ID for this bean 608 */ 609 @Override 610 public void setBeanIdentifier(java.lang.String beanIdentifier) { 611 _roleLocalService.setBeanIdentifier(beanIdentifier); 612 } 613 614 /** 615 * Adds a role. The user is reindexed after role is added. 616 * 617 * @param userId the primary key of the user 618 * @param companyId the primary key of the company 619 * @param name the role's name 620 * @param titleMap the role's localized titles (optionally 621 <code>null</code>) 622 * @param descriptionMap the role's localized descriptions (optionally 623 <code>null</code>) 624 * @param type the role's type (optionally <code>0</code>) 625 * @return the role 626 * @throws PortalException if the class name or the role name were 627 invalid, if the role is a duplicate, or if a user with the 628 primary key could not be found 629 * @throws SystemException if a system exception occurred 630 * @deprecated As of 6.2.0, replaced by {@link #addRole(long, String, long, 631 String, Map, Map, int, String, ServiceContext)} 632 */ 633 @Override 634 public com.liferay.portal.model.Role addRole(long userId, long companyId, 635 java.lang.String name, 636 java.util.Map<java.util.Locale, java.lang.String> titleMap, 637 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 638 int type) 639 throws com.liferay.portal.kernel.exception.PortalException, 640 com.liferay.portal.kernel.exception.SystemException { 641 return _roleLocalService.addRole(userId, companyId, name, titleMap, 642 descriptionMap, type); 643 } 644 645 /** 646 * Adds a role with additional parameters. The user is reindexed after role 647 * is added. 648 * 649 * @param userId the primary key of the user 650 * @param companyId the primary key of the company 651 * @param name the role's name 652 * @param titleMap the role's localized titles (optionally 653 <code>null</code>) 654 * @param descriptionMap the role's localized descriptions (optionally 655 <code>null</code>) 656 * @param type the role's type (optionally <code>0</code>) 657 * @param className the name of the class for which the role is created 658 (optionally <code>null</code>) 659 * @param classPK the primary key of the class for which the role is 660 created (optionally <code>0</code>) 661 * @return the role 662 * @throws PortalException if the class name or the role name were 663 invalid, if the role is a duplicate, or if a user with the 664 primary key could not be found 665 * @throws SystemException if a system exception occurred 666 * @deprecated As of 6.2.0, replaced by {@link #addRole(long, String, long, 667 String, Map, Map, int, String, ServiceContext)} 668 */ 669 @Override 670 public com.liferay.portal.model.Role addRole(long userId, long companyId, 671 java.lang.String name, 672 java.util.Map<java.util.Locale, java.lang.String> titleMap, 673 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 674 int type, java.lang.String className, long classPK) 675 throws com.liferay.portal.kernel.exception.PortalException, 676 com.liferay.portal.kernel.exception.SystemException { 677 return _roleLocalService.addRole(userId, companyId, name, titleMap, 678 descriptionMap, type, className, classPK); 679 } 680 681 /** 682 * Adds a role with additional parameters. The user is reindexed after role 683 * is added. 684 * 685 * @param userId the primary key of the user 686 * @param className the name of the class for which the role is created 687 (optionally <code>null</code>) 688 * @param classPK the primary key of the class for which the role is 689 created (optionally <code>0</code>) 690 * @param name the role's name 691 * @param titleMap the role's localized titles (optionally 692 <code>null</code>) 693 * @param descriptionMap the role's localized descriptions (optionally 694 <code>null</code>) 695 * @param type the role's type (optionally <code>0</code>) 696 * @param subtype the role's subtype (optionally <code>null</code>) 697 * @param serviceContext the service context to be applied (optionally 698 <code>null</code>). Can set expando bridge attributes for the 699 role. 700 * @return the role 701 * @throws PortalException if the class name or the role name were invalid, 702 if the role is a duplicate, or if a user with the primary key 703 could not be found 704 * @throws SystemException if a system exception occurred 705 */ 706 @Override 707 public com.liferay.portal.model.Role addRole(long userId, 708 java.lang.String className, long classPK, java.lang.String name, 709 java.util.Map<java.util.Locale, java.lang.String> titleMap, 710 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 711 int type, java.lang.String subtype, 712 com.liferay.portal.service.ServiceContext serviceContext) 713 throws com.liferay.portal.kernel.exception.PortalException, 714 com.liferay.portal.kernel.exception.SystemException { 715 return _roleLocalService.addRole(userId, className, classPK, name, 716 titleMap, descriptionMap, type, subtype, serviceContext); 717 } 718 719 /** 720 * Checks to ensure that the system roles map has appropriate default roles 721 * in each company. 722 * 723 * @throws PortalException if the current user did not have permission to 724 set applicable permissions on a role 725 * @throws SystemException if a system exception occurred 726 */ 727 @Override 728 public void checkSystemRoles() 729 throws com.liferay.portal.kernel.exception.PortalException, 730 com.liferay.portal.kernel.exception.SystemException { 731 _roleLocalService.checkSystemRoles(); 732 } 733 734 /** 735 * Checks to ensure that the system roles map has appropriate default roles 736 * in the company. 737 * 738 * @param companyId the primary key of the company 739 * @throws PortalException if the current user did not have permission to 740 set applicable permissions on a role 741 * @throws SystemException if a system exception occurred 742 */ 743 @Override 744 public void checkSystemRoles(long companyId) 745 throws com.liferay.portal.kernel.exception.PortalException, 746 com.liferay.portal.kernel.exception.SystemException { 747 _roleLocalService.checkSystemRoles(companyId); 748 } 749 750 /** 751 * Returns the role with the name in the company. 752 * 753 * <p> 754 * The method searches the system roles map first for default roles. If a 755 * role with the name is not found, then the method will query the database. 756 * </p> 757 * 758 * @param companyId the primary key of the company 759 * @param name the role's name 760 * @return Returns the role with the name or <code>null</code> if a role 761 with the name could not be found in the company 762 * @throws SystemException if a system exception occurred 763 */ 764 @Override 765 public com.liferay.portal.model.Role fetchRole(long companyId, 766 java.lang.String name) 767 throws com.liferay.portal.kernel.exception.SystemException { 768 return _roleLocalService.fetchRole(companyId, name); 769 } 770 771 /** 772 * Returns the default role for the group with the primary key. 773 * 774 * <p> 775 * If the group is a site, then the default role is {@link 776 * com.liferay.portal.model.RoleConstants#SITE_MEMBER}. If the group is an 777 * organization, then the default role is {@link 778 * com.liferay.portal.model.RoleConstants#ORGANIZATION_USER}. If the group 779 * is a user or user group, then the default role is {@link 780 * com.liferay.portal.model.RoleConstants#POWER_USER}. For all other group 781 * types, the default role is {@link 782 * com.liferay.portal.model.RoleConstants#USER}. 783 * </p> 784 * 785 * @param groupId the primary key of the group 786 * @return the default role for the group with the primary key 787 * @throws PortalException if a group with the primary key could not be 788 found, or if a default role could not be found for the group 789 * @throws SystemException if a system exception occurred 790 */ 791 @Override 792 public com.liferay.portal.model.Role getDefaultGroupRole(long groupId) 793 throws com.liferay.portal.kernel.exception.PortalException, 794 com.liferay.portal.kernel.exception.SystemException { 795 return _roleLocalService.getDefaultGroupRole(groupId); 796 } 797 798 @Override 799 public java.util.List<com.liferay.portal.model.Role> getGroupRelatedRoles( 800 long groupId) 801 throws com.liferay.portal.kernel.exception.PortalException, 802 com.liferay.portal.kernel.exception.SystemException { 803 return _roleLocalService.getGroupRelatedRoles(groupId); 804 } 805 806 @Override 807 public java.util.List<com.liferay.portal.model.Role> getResourceBlockRoles( 808 long resourceBlockId, java.lang.String className, 809 java.lang.String actionId) 810 throws com.liferay.portal.kernel.exception.SystemException { 811 return _roleLocalService.getResourceBlockRoles(resourceBlockId, 812 className, actionId); 813 } 814 815 /** 816 * Returns a map of role names to associated action IDs for the named 817 * resource in the company within the permission scope. 818 * 819 * @param companyId the primary key of the company 820 * @param name the resource name 821 * @param scope the permission scope 822 * @param primKey the primary key of the resource's class 823 * @return the role names and action IDs 824 * @throws SystemException if a system exception occurred 825 * @see com.liferay.portal.service.persistence.RoleFinder#findByC_N_S_P( 826 long, String, int, String) 827 */ 828 @Override 829 public java.util.Map<java.lang.String, java.util.List<java.lang.String>> getResourceRoles( 830 long companyId, java.lang.String name, int scope, 831 java.lang.String primKey) 832 throws com.liferay.portal.kernel.exception.SystemException { 833 return _roleLocalService.getResourceRoles(companyId, name, scope, 834 primKey); 835 } 836 837 /** 838 * Returns all the roles associated with the action ID in the company within 839 * the permission scope. 840 * 841 * @param companyId the primary key of the company 842 * @param name the resource name 843 * @param scope the permission scope 844 * @param primKey the primary key of the resource's class 845 * @param actionId the name of the resource action 846 * @return the roles 847 * @throws SystemException if a system exception occurred 848 * @see com.liferay.portal.service.persistence.RoleFinder#findByC_N_S_P_A( 849 long, String, int, String, String) 850 */ 851 @Override 852 public java.util.List<com.liferay.portal.model.Role> getResourceRoles( 853 long companyId, java.lang.String name, int scope, 854 java.lang.String primKey, java.lang.String actionId) 855 throws com.liferay.portal.kernel.exception.SystemException { 856 return _roleLocalService.getResourceRoles(companyId, name, scope, 857 primKey, actionId); 858 } 859 860 /** 861 * Returns the role with the name in the company. 862 * 863 * <p> 864 * The method searches the system roles map first for default roles. If a 865 * role with the name is not found, then the method will query the database. 866 * </p> 867 * 868 * @param companyId the primary key of the company 869 * @param name the role's name 870 * @return the role with the name 871 * @throws PortalException if a role with the name could not be found in the 872 company 873 * @throws SystemException if a system exception occurred 874 */ 875 @Override 876 public com.liferay.portal.model.Role getRole(long companyId, 877 java.lang.String name) 878 throws com.liferay.portal.kernel.exception.PortalException, 879 com.liferay.portal.kernel.exception.SystemException { 880 return _roleLocalService.getRole(companyId, name); 881 } 882 883 /** 884 * Returns all the roles of the type and subtype. 885 * 886 * @param type the role's type (optionally <code>0</code>) 887 * @param subtype the role's subtype (optionally <code>null</code>) 888 * @return the roles of the type and subtype 889 * @throws SystemException if a system exception occurred 890 */ 891 @Override 892 public java.util.List<com.liferay.portal.model.Role> getRoles(int type, 893 java.lang.String subtype) 894 throws com.liferay.portal.kernel.exception.SystemException { 895 return _roleLocalService.getRoles(type, subtype); 896 } 897 898 /** 899 * Returns all the roles in the company. 900 * 901 * @param companyId the primary key of the company 902 * @return the roles in the company 903 * @throws SystemException if a system exception occurred 904 */ 905 @Override 906 public java.util.List<com.liferay.portal.model.Role> getRoles( 907 long companyId) 908 throws com.liferay.portal.kernel.exception.SystemException { 909 return _roleLocalService.getRoles(companyId); 910 } 911 912 /** 913 * Returns all the roles with the types. 914 * 915 * @param companyId the primary key of the company 916 * @param types the role types (optionally <code>null</code>) 917 * @return the roles with the types 918 * @throws SystemException if a system exception occurred 919 */ 920 @Override 921 public java.util.List<com.liferay.portal.model.Role> getRoles( 922 long companyId, int[] types) 923 throws com.liferay.portal.kernel.exception.SystemException { 924 return _roleLocalService.getRoles(companyId, types); 925 } 926 927 /** 928 * Returns all the roles with the primary keys. 929 * 930 * @param roleIds the primary keys of the roles 931 * @return the roles with the primary keys 932 * @throws PortalException if any one of the roles with the primary keys 933 could not be found 934 * @throws SystemException if a system exception occurred 935 */ 936 @Override 937 public java.util.List<com.liferay.portal.model.Role> getRoles( 938 long[] roleIds) 939 throws com.liferay.portal.kernel.exception.PortalException, 940 com.liferay.portal.kernel.exception.SystemException { 941 return _roleLocalService.getRoles(roleIds); 942 } 943 944 /** 945 * Returns all the roles of the subtype. 946 * 947 * @param subtype the role's subtype (optionally <code>null</code>) 948 * @return the roles of the subtype 949 * @throws SystemException if a system exception occurred 950 */ 951 @Override 952 public java.util.List<com.liferay.portal.model.Role> getSubtypeRoles( 953 java.lang.String subtype) 954 throws com.liferay.portal.kernel.exception.SystemException { 955 return _roleLocalService.getSubtypeRoles(subtype); 956 } 957 958 /** 959 * Returns the number of roles of the subtype. 960 * 961 * @param subtype the role's subtype (optionally <code>null</code>) 962 * @return the number of roles of the subtype 963 * @throws SystemException if a system exception occurred 964 */ 965 @Override 966 public int getSubtypeRolesCount(java.lang.String subtype) 967 throws com.liferay.portal.kernel.exception.SystemException { 968 return _roleLocalService.getSubtypeRolesCount(subtype); 969 } 970 971 /** 972 * Returns the team role in the company. 973 * 974 * @param companyId the primary key of the company 975 * @param teamId the primary key of the team 976 * @return the team role in the company 977 * @throws PortalException if a role could not be found in the team and 978 company 979 * @throws SystemException if a system exception occurred 980 */ 981 @Override 982 public com.liferay.portal.model.Role getTeamRole(long companyId, long teamId) 983 throws com.liferay.portal.kernel.exception.PortalException, 984 com.liferay.portal.kernel.exception.SystemException { 985 return _roleLocalService.getTeamRole(companyId, teamId); 986 } 987 988 /** 989 * Returns the team role map for the group. 990 * 991 * @param groupId the primary key of the group 992 * @return the team role map for the group 993 * @throws PortalException if a group with the primary key could not be 994 found, if a role could not be found in one of the group's teams, 995 or if a portal exception occurred 996 * @throws SystemException if a system exception occurred 997 */ 998 @Override 999 public java.util.Map<com.liferay.portal.model.Team, com.liferay.portal.model.Role> getTeamRoleMap( 1000 long groupId) 1001 throws com.liferay.portal.kernel.exception.PortalException, 1002 com.liferay.portal.kernel.exception.SystemException { 1003 return _roleLocalService.getTeamRoleMap(groupId); 1004 } 1005 1006 /** 1007 * Returns the team roles in the group. 1008 * 1009 * @param groupId the primary key of the group 1010 * @return the team roles in the group 1011 * @throws PortalException if a group with the primary key could not be 1012 found, if a role could not be found in one of the group's teams, 1013 or if a portal exception occurred 1014 * @throws SystemException if a system exception occurred 1015 */ 1016 @Override 1017 public java.util.List<com.liferay.portal.model.Role> getTeamRoles( 1018 long groupId) 1019 throws com.liferay.portal.kernel.exception.PortalException, 1020 com.liferay.portal.kernel.exception.SystemException { 1021 return _roleLocalService.getTeamRoles(groupId); 1022 } 1023 1024 /** 1025 * Returns the team roles in the group, excluding the specified role IDs. 1026 * 1027 * @param groupId the primary key of the group 1028 * @param excludedRoleIds the primary keys of the roles to exclude 1029 (optionally <code>null</code>) 1030 * @return the team roles in the group, excluding the specified role IDs 1031 * @throws PortalException if a group with the primary key could not be 1032 found, if a role could not be found in one of the group's teams, 1033 or if a portal exception occurred 1034 * @throws SystemException if a system exception occurred 1035 */ 1036 @Override 1037 public java.util.List<com.liferay.portal.model.Role> getTeamRoles( 1038 long groupId, long[] excludedRoleIds) 1039 throws com.liferay.portal.kernel.exception.PortalException, 1040 com.liferay.portal.kernel.exception.SystemException { 1041 return _roleLocalService.getTeamRoles(groupId, excludedRoleIds); 1042 } 1043 1044 /** 1045 * Returns all the roles of the type. 1046 * 1047 * @param type the role's type (optionally <code>0</code>) 1048 * @return the range of the roles of the type 1049 * @throws SystemException if a system exception occurred 1050 */ 1051 @Override 1052 public java.util.List<com.liferay.portal.model.Role> getTypeRoles(int type) 1053 throws com.liferay.portal.kernel.exception.SystemException { 1054 return _roleLocalService.getTypeRoles(type); 1055 } 1056 1057 /** 1058 * Returns a range of all the roles of the type. 1059 * 1060 * @param type the role's type (optionally <code>0</code>) 1061 * @param start the lower bound of the range of roles to return 1062 * @param end the upper bound of the range of roles to return (not 1063 inclusive) 1064 * @return the range of the roles of the type 1065 * @throws SystemException if a system exception occurred 1066 */ 1067 @Override 1068 public java.util.List<com.liferay.portal.model.Role> getTypeRoles( 1069 int type, int start, int end) 1070 throws com.liferay.portal.kernel.exception.SystemException { 1071 return _roleLocalService.getTypeRoles(type, start, end); 1072 } 1073 1074 /** 1075 * Returns the number of roles of the type. 1076 * 1077 * @param type the role's type (optionally <code>0</code>) 1078 * @return the number of roles of the type 1079 * @throws SystemException if a system exception occurred 1080 */ 1081 @Override 1082 public int getTypeRolesCount(int type) 1083 throws com.liferay.portal.kernel.exception.SystemException { 1084 return _roleLocalService.getTypeRolesCount(type); 1085 } 1086 1087 /** 1088 * Returns all the user's roles within the user group. 1089 * 1090 * @param userId the primary key of the user 1091 * @param groupId the primary key of the group 1092 * @return the user's roles within the user group 1093 * @throws SystemException if a system exception occurred 1094 * @see com.liferay.portal.service.persistence.RoleFinder#findByUserGroupGroupRole( 1095 long, long) 1096 */ 1097 @Override 1098 public java.util.List<com.liferay.portal.model.Role> getUserGroupGroupRoles( 1099 long userId, long groupId) 1100 throws com.liferay.portal.kernel.exception.SystemException { 1101 return _roleLocalService.getUserGroupGroupRoles(userId, groupId); 1102 } 1103 1104 /** 1105 * Returns all the user's roles within the user group. 1106 * 1107 * @param userId the primary key of the user 1108 * @param groupId the primary key of the group 1109 * @return the user's roles within the user group 1110 * @throws SystemException if a system exception occurred 1111 * @see com.liferay.portal.service.persistence.RoleFinder#findByUserGroupRole( 1112 long, long) 1113 */ 1114 @Override 1115 public java.util.List<com.liferay.portal.model.Role> getUserGroupRoles( 1116 long userId, long groupId) 1117 throws com.liferay.portal.kernel.exception.SystemException { 1118 return _roleLocalService.getUserGroupRoles(userId, groupId); 1119 } 1120 1121 /** 1122 * Returns the union of all the user's roles within the groups. 1123 * 1124 * @param userId the primary key of the user 1125 * @param groups the groups (optionally <code>null</code>) 1126 * @return the union of all the user's roles within the groups 1127 * @throws SystemException if a system exception occurred 1128 * @see com.liferay.portal.service.persistence.RoleFinder#findByU_G( 1129 long, List) 1130 */ 1131 @Override 1132 public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles( 1133 long userId, java.util.List<com.liferay.portal.model.Group> groups) 1134 throws com.liferay.portal.kernel.exception.SystemException { 1135 return _roleLocalService.getUserRelatedRoles(userId, groups); 1136 } 1137 1138 /** 1139 * Returns all the user's roles within the group. 1140 * 1141 * @param userId the primary key of the user 1142 * @param groupId the primary key of the group 1143 * @return the user's roles within the group 1144 * @throws SystemException if a system exception occurred 1145 * @see com.liferay.portal.service.persistence.RoleFinder#findByU_G( 1146 long, long) 1147 */ 1148 @Override 1149 public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles( 1150 long userId, long groupId) 1151 throws com.liferay.portal.kernel.exception.SystemException { 1152 return _roleLocalService.getUserRelatedRoles(userId, groupId); 1153 } 1154 1155 /** 1156 * Returns the union of all the user's roles within the groups. 1157 * 1158 * @param userId the primary key of the user 1159 * @param groupIds the primary keys of the groups 1160 * @return the union of all the user's roles within the groups 1161 * @throws SystemException if a system exception occurred 1162 * @see com.liferay.portal.service.persistence.RoleFinder#findByU_G( 1163 long, long[]) 1164 */ 1165 @Override 1166 public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles( 1167 long userId, long[] groupIds) 1168 throws com.liferay.portal.kernel.exception.SystemException { 1169 return _roleLocalService.getUserRelatedRoles(userId, groupIds); 1170 } 1171 1172 /** 1173 * Returns <code>true</code> if the user is associated with the named 1174 * regular role. 1175 * 1176 * @param userId the primary key of the user 1177 * @param companyId the primary key of the company 1178 * @param name the name of the role 1179 * @param inherited whether to include the user's inherited roles in the 1180 search 1181 * @return <code>true</code> if the user is associated with the regular 1182 role; <code>false</code> otherwise 1183 * @throws PortalException if a default user for the company could not be 1184 found 1185 * @throws SystemException if a system exception occurred 1186 */ 1187 @Override 1188 public boolean hasUserRole(long userId, long companyId, 1189 java.lang.String name, boolean inherited) 1190 throws com.liferay.portal.kernel.exception.PortalException, 1191 com.liferay.portal.kernel.exception.SystemException { 1192 return _roleLocalService.hasUserRole(userId, companyId, name, inherited); 1193 } 1194 1195 /** 1196 * Returns <code>true</code> if the user has any one of the named regular 1197 * roles. 1198 * 1199 * @param userId the primary key of the user 1200 * @param companyId the primary key of the company 1201 * @param names the names of the roles 1202 * @param inherited whether to include the user's inherited roles in the 1203 search 1204 * @return <code>true</code> if the user has any one of the regular roles; 1205 <code>false</code> otherwise 1206 * @throws PortalException if any one of the roles with the names could not 1207 be found in the company or if the default user for the company 1208 could not be found 1209 * @throws SystemException if a system exception occurred 1210 */ 1211 @Override 1212 public boolean hasUserRoles(long userId, long companyId, 1213 java.lang.String[] names, boolean inherited) 1214 throws com.liferay.portal.kernel.exception.PortalException, 1215 com.liferay.portal.kernel.exception.SystemException { 1216 return _roleLocalService.hasUserRoles(userId, companyId, names, 1217 inherited); 1218 } 1219 1220 /** 1221 * Returns a role with the name in the company. 1222 * 1223 * @param companyId the primary key of the company 1224 * @param name the role's name (optionally <code>null</code>) 1225 * @return the role with the name, or <code>null</code> if a role with the 1226 name could not be found in the company 1227 * @throws SystemException if a system exception occurred 1228 */ 1229 @Override 1230 public com.liferay.portal.model.Role loadFetchRole(long companyId, 1231 java.lang.String name) 1232 throws com.liferay.portal.kernel.exception.SystemException { 1233 return _roleLocalService.loadFetchRole(companyId, name); 1234 } 1235 1236 /** 1237 * Returns a role with the name in the company. 1238 * 1239 * @param companyId the primary key of the company 1240 * @param name the role's name 1241 * @return the role with the name in the company 1242 * @throws PortalException if a role with the name could not be found in the 1243 company 1244 * @throws SystemException if a system exception occurred 1245 */ 1246 @Override 1247 public com.liferay.portal.model.Role loadGetRole(long companyId, 1248 java.lang.String name) 1249 throws com.liferay.portal.kernel.exception.PortalException, 1250 com.liferay.portal.kernel.exception.SystemException { 1251 return _roleLocalService.loadGetRole(companyId, name); 1252 } 1253 1254 /** 1255 * Returns an ordered range of all the roles that match the keywords and 1256 * types. 1257 * 1258 * <p> 1259 * Useful when paginating results. Returns a maximum of <code>end - 1260 * start</code> instances. <code>start</code> and <code>end</code> are not 1261 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1262 * refers to the first result in the set. Setting both <code>start</code> 1263 * and <code>end</code> to {@link 1264 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1265 * result set. 1266 * </p> 1267 * 1268 * @param companyId the primary key of the company 1269 * @param keywords the keywords (space separated), which may occur in the 1270 role's name or description (optionally <code>null</code>) 1271 * @param types the role types (optionally <code>null</code>) 1272 * @param start the lower bound of the range of roles to return 1273 * @param end the upper bound of the range of roles to return (not 1274 inclusive) 1275 * @param obc the comparator to order the roles (optionally 1276 <code>null</code>) 1277 * @return the ordered range of the matching roles, ordered by 1278 <code>obc</code> 1279 * @throws SystemException if a system exception occurred 1280 * @see com.liferay.portal.service.persistence.RoleFinder 1281 */ 1282 @Override 1283 public java.util.List<com.liferay.portal.model.Role> search( 1284 long companyId, java.lang.String keywords, java.lang.Integer[] types, 1285 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc) 1286 throws com.liferay.portal.kernel.exception.SystemException { 1287 return _roleLocalService.search(companyId, keywords, types, start, end, 1288 obc); 1289 } 1290 1291 /** 1292 * Returns an ordered range of all the roles that match the keywords, types, 1293 * and params. 1294 * 1295 * <p> 1296 * Useful when paginating results. Returns a maximum of <code>end - 1297 * start</code> instances. <code>start</code> and <code>end</code> are not 1298 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1299 * refers to the first result in the set. Setting both <code>start</code> 1300 * and <code>end</code> to {@link 1301 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1302 * result set. 1303 * </p> 1304 * 1305 * @param companyId the primary key of the company 1306 * @param keywords the keywords (space separated), which may occur in the 1307 role's name or description (optionally <code>null</code>) 1308 * @param types the role types (optionally <code>null</code>) 1309 * @param params the finder parameters. Can specify values for the 1310 "usersRoles" key. For more information, see {@link 1311 com.liferay.portal.service.persistence.RoleFinder} 1312 * @param start the lower bound of the range of roles to return 1313 * @param end the upper bound of the range of roles to return (not 1314 inclusive) 1315 * @param obc the comparator to order the roles (optionally 1316 <code>null</code>) 1317 * @return the ordered range of the matching roles, ordered by 1318 <code>obc</code> 1319 * @throws SystemException if a system exception occurred 1320 * @see com.liferay.portal.service.persistence.RoleFinder 1321 */ 1322 @Override 1323 public java.util.List<com.liferay.portal.model.Role> search( 1324 long companyId, java.lang.String keywords, java.lang.Integer[] types, 1325 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1326 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc) 1327 throws com.liferay.portal.kernel.exception.SystemException { 1328 return _roleLocalService.search(companyId, keywords, types, params, 1329 start, end, obc); 1330 } 1331 1332 /** 1333 * Returns an ordered range of all the roles that match the name, 1334 * description, and types. 1335 * 1336 * <p> 1337 * Useful when paginating results. Returns a maximum of <code>end - 1338 * start</code> instances. <code>start</code> and <code>end</code> are not 1339 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1340 * refers to the first result in the set. Setting both <code>start</code> 1341 * and <code>end</code> to {@link 1342 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1343 * result set. 1344 * </p> 1345 * 1346 * @param companyId the primary key of the company 1347 * @param name the role's name (optionally <code>null</code>) 1348 * @param description the role's description (optionally <code>null</code>) 1349 * @param types the role types (optionally <code>null</code>) 1350 * @param start the lower bound of the range of the roles to return 1351 * @param end the upper bound of the range of the roles to return (not 1352 inclusive) 1353 * @param obc the comparator to order the roles (optionally 1354 <code>null</code>) 1355 * @return the ordered range of the matching roles, ordered by 1356 <code>obc</code> 1357 * @throws SystemException if a system exception occurred 1358 * @see com.liferay.portal.service.persistence.RoleFinder 1359 */ 1360 @Override 1361 public java.util.List<com.liferay.portal.model.Role> search( 1362 long companyId, java.lang.String name, java.lang.String description, 1363 java.lang.Integer[] types, int start, int end, 1364 com.liferay.portal.kernel.util.OrderByComparator obc) 1365 throws com.liferay.portal.kernel.exception.SystemException { 1366 return _roleLocalService.search(companyId, name, description, types, 1367 start, end, obc); 1368 } 1369 1370 /** 1371 * Returns an ordered range of all the roles that match the name, 1372 * description, types, and params. 1373 * 1374 * <p> 1375 * Useful when paginating results. Returns a maximum of <code>end - 1376 * start</code> instances. <code>start</code> and <code>end</code> are not 1377 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1378 * refers to the first result in the set. Setting both <code>start</code> 1379 * and <code>end</code> to {@link 1380 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1381 * result set. 1382 * </p> 1383 * 1384 * @param companyId the primary key of the company 1385 * @param name the role's name (optionally <code>null</code>) 1386 * @param description the role's description (optionally <code>null</code>) 1387 * @param types the role types (optionally <code>null</code>) 1388 * @param params the finder's parameters. Can specify values for the 1389 "usersRoles" key. For more information, see {@link 1390 com.liferay.portal.service.persistence.RoleFinder} 1391 * @param start the lower bound of the range of the roles to return 1392 * @param end the upper bound of the range of the roles to return (not 1393 inclusive) 1394 * @param obc the comparator to order the roles (optionally 1395 <code>null</code>) 1396 * @return the ordered range of the matching roles, ordered by 1397 <code>obc</code> 1398 * @throws SystemException if a system exception occurred 1399 * @see com.liferay.portal.service.persistence.RoleFinder 1400 */ 1401 @Override 1402 public java.util.List<com.liferay.portal.model.Role> search( 1403 long companyId, java.lang.String name, java.lang.String description, 1404 java.lang.Integer[] types, 1405 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1406 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc) 1407 throws com.liferay.portal.kernel.exception.SystemException { 1408 return _roleLocalService.search(companyId, name, description, types, 1409 params, start, end, obc); 1410 } 1411 1412 /** 1413 * Returns the number of roles that match the keywords and types. 1414 * 1415 * @param companyId the primary key of the company 1416 * @param keywords the keywords (space separated), which may occur in the 1417 role's name or description (optionally <code>null</code>) 1418 * @param types the role types (optionally <code>null</code>) 1419 * @return the number of matching roles 1420 * @throws SystemException if a system exception occurred 1421 */ 1422 @Override 1423 public int searchCount(long companyId, java.lang.String keywords, 1424 java.lang.Integer[] types) 1425 throws com.liferay.portal.kernel.exception.SystemException { 1426 return _roleLocalService.searchCount(companyId, keywords, types); 1427 } 1428 1429 /** 1430 * Returns the number of roles that match the keywords, types and params. 1431 * 1432 * @param companyId the primary key of the company 1433 * @param keywords the keywords (space separated), which may occur in the 1434 role's name or description (optionally <code>null</code>) 1435 * @param types the role types (optionally <code>null</code>) 1436 * @param params the finder parameters. For more information, see {@link 1437 com.liferay.portal.service.persistence.RoleFinder} 1438 * @return the number of matching roles 1439 * @throws SystemException if a system exception occurred 1440 */ 1441 @Override 1442 public int searchCount(long companyId, java.lang.String keywords, 1443 java.lang.Integer[] types, 1444 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) 1445 throws com.liferay.portal.kernel.exception.SystemException { 1446 return _roleLocalService.searchCount(companyId, keywords, types, params); 1447 } 1448 1449 /** 1450 * Returns the number of roles that match the name, description, and types. 1451 * 1452 * @param companyId the primary key of the company 1453 * @param name the role's name (optionally <code>null</code>) 1454 * @param description the role's description (optionally <code>null</code>) 1455 * @param types the role types (optionally <code>null</code>) 1456 * @return the number of matching roles 1457 * @throws SystemException if a system exception occurred 1458 */ 1459 @Override 1460 public int searchCount(long companyId, java.lang.String name, 1461 java.lang.String description, java.lang.Integer[] types) 1462 throws com.liferay.portal.kernel.exception.SystemException { 1463 return _roleLocalService.searchCount(companyId, name, description, types); 1464 } 1465 1466 /** 1467 * Returns the number of roles that match the name, description, types, and 1468 * params. 1469 * 1470 * @param companyId the primary key of the company 1471 * @param name the role's name (optionally <code>null</code>) 1472 * @param description the role's description (optionally <code>null</code>) 1473 * @param types the role types (optionally <code>null</code>) 1474 * @param params the finder parameters. Can specify values for the 1475 "usersRoles" key. For more information, see {@link 1476 com.liferay.portal.service.persistence.RoleFinder} 1477 * @return the number of matching roles 1478 * @throws SystemException if a system exception occurred 1479 */ 1480 @Override 1481 public int searchCount(long companyId, java.lang.String name, 1482 java.lang.String description, java.lang.Integer[] types, 1483 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) 1484 throws com.liferay.portal.kernel.exception.SystemException { 1485 return _roleLocalService.searchCount(companyId, name, description, 1486 types, params); 1487 } 1488 1489 /** 1490 * Removes the matching roles associated with the user. The user is 1491 * reindexed after the roles are removed. 1492 * 1493 * @param userId the primary key of the user 1494 * @param roleIds the primary keys of the roles 1495 * @throws PortalException if a user with the primary key could not be found 1496 or if a role with any one of the primary keys could not be found 1497 * @throws SystemException if a system exception occurred 1498 */ 1499 @Override 1500 public void unsetUserRoles(long userId, long[] roleIds) 1501 throws com.liferay.portal.kernel.exception.PortalException, 1502 com.liferay.portal.kernel.exception.SystemException { 1503 _roleLocalService.unsetUserRoles(userId, roleIds); 1504 } 1505 1506 /** 1507 * Updates the role with the primary key. 1508 * 1509 * @param roleId the primary key of the role 1510 * @param name the role's new name 1511 * @param titleMap the new localized titles (optionally <code>null</code>) 1512 to replace those existing for the role 1513 * @param descriptionMap the new localized descriptions (optionally 1514 <code>null</code>) to replace those existing for the role 1515 * @param subtype the role's new subtype (optionally <code>null</code>) 1516 * @param serviceContext the service context to be applied (optionally 1517 <code>null</code>). Can set expando bridge attributes for the 1518 role. 1519 * @return the role with the primary key 1520 * @throws PortalException if a role with the primary could not be found or 1521 if the role's name was invalid 1522 * @throws SystemException if a system exception occurred 1523 */ 1524 @Override 1525 public com.liferay.portal.model.Role updateRole(long roleId, 1526 java.lang.String name, 1527 java.util.Map<java.util.Locale, java.lang.String> titleMap, 1528 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 1529 java.lang.String subtype, 1530 com.liferay.portal.service.ServiceContext serviceContext) 1531 throws com.liferay.portal.kernel.exception.PortalException, 1532 com.liferay.portal.kernel.exception.SystemException { 1533 return _roleLocalService.updateRole(roleId, name, titleMap, 1534 descriptionMap, subtype, serviceContext); 1535 } 1536 1537 /** 1538 * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} 1539 */ 1540 public RoleLocalService getWrappedRoleLocalService() { 1541 return _roleLocalService; 1542 } 1543 1544 /** 1545 * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} 1546 */ 1547 public void setWrappedRoleLocalService(RoleLocalService roleLocalService) { 1548 _roleLocalService = roleLocalService; 1549 } 1550 1551 @Override 1552 public RoleLocalService getWrappedService() { 1553 return _roleLocalService; 1554 } 1555 1556 @Override 1557 public void setWrappedService(RoleLocalService roleLocalService) { 1558 _roleLocalService = roleLocalService; 1559 } 1560 1561 private RoleLocalService _roleLocalService; 1562 }