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