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