001 /** 002 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.service; 016 017 /** 018 * Provides a wrapper for {@link GroupService}. 019 * 020 * @author Brian Wing Shun Chan 021 * @see GroupService 022 * @generated 023 */ 024 public class GroupServiceWrapper implements GroupService, 025 ServiceWrapper<GroupService> { 026 public GroupServiceWrapper(GroupService groupService) { 027 _groupService = groupService; 028 } 029 030 /** 031 * Returns the Spring bean ID for this bean. 032 * 033 * @return the Spring bean ID for this bean 034 */ 035 @Override 036 public java.lang.String getBeanIdentifier() { 037 return _groupService.getBeanIdentifier(); 038 } 039 040 /** 041 * Sets the Spring bean ID for this bean. 042 * 043 * @param beanIdentifier the Spring bean ID for this bean 044 */ 045 @Override 046 public void setBeanIdentifier(java.lang.String beanIdentifier) { 047 _groupService.setBeanIdentifier(beanIdentifier); 048 } 049 050 /** 051 * Adds a group. 052 * 053 * @param parentGroupId the primary key of the parent group 054 * @param liveGroupId the primary key of the live group 055 * @param name the entity's name 056 * @param description the group's description (optionally 057 <code>null</code>) 058 * @param type the group's type. For more information see {@link 059 com.liferay.portal.model.GroupConstants} 060 * @param friendlyURL the group's friendlyURL (optionally 061 <code>null</code>) 062 * @param site whether the group is to be associated with a main site 063 * @param active whether the group is active 064 * @param serviceContext the service context to be applied (optionally 065 <code>null</code>). Can set the asset category IDs and asset tag 066 names for the group, and can set whether the group is for staging 067 * @return the group 068 * @throws PortalException if the user did not have permission to add the 069 group, if a creator could not be found, if the group's 070 information was invalid, if a layout could not be found, or if a 071 valid friendly URL could not be created for the group 072 * @throws SystemException if a system exception occurred 073 */ 074 @Override 075 public com.liferay.portal.model.Group addGroup(long parentGroupId, 076 long liveGroupId, java.lang.String name, java.lang.String description, 077 int type, boolean manualMembership, int membershipRestriction, 078 java.lang.String friendlyURL, boolean site, boolean active, 079 com.liferay.portal.service.ServiceContext serviceContext) 080 throws com.liferay.portal.kernel.exception.PortalException, 081 com.liferay.portal.kernel.exception.SystemException { 082 return _groupService.addGroup(parentGroupId, liveGroupId, name, 083 description, type, manualMembership, membershipRestriction, 084 friendlyURL, site, active, serviceContext); 085 } 086 087 /** 088 * Adds the group using the group default live group ID. 089 * 090 * @param parentGroupId the primary key of the parent group 091 * @param name the entity's name 092 * @param description the group's description (optionally 093 <code>null</code>) 094 * @param type the group's type. For more information see {@link 095 com.liferay.portal.model.GroupConstants} 096 * @param friendlyURL the group's friendlyURL 097 * @param site whether the group is to be associated with a main site 098 * @param active whether the group is active 099 * @param serviceContext the service context to be applied (optionally 100 <code>null</code>). Can set asset category IDs and asset tag 101 names for the group, and can set whether the group is for 102 staging 103 * @return the group 104 * @throws PortalException if the user did not have permission to add 105 the group, if a creator could not be found, if the group's 106 information was invalid, if a layout could not be found, or 107 if a valid friendly URL could not be created for the group 108 * @throws SystemException if a system exception occurred 109 * @deprecated As of 6.2.0, replaced by {@link #addGroup(long, long, String, 110 String, int, boolean, int, String, boolean, boolean, 111 ServiceContext)} 112 */ 113 @Override 114 public com.liferay.portal.model.Group addGroup(long parentGroupId, 115 java.lang.String name, java.lang.String description, int type, 116 java.lang.String friendlyURL, boolean site, boolean active, 117 com.liferay.portal.service.ServiceContext serviceContext) 118 throws com.liferay.portal.kernel.exception.PortalException, 119 com.liferay.portal.kernel.exception.SystemException { 120 return _groupService.addGroup(parentGroupId, name, description, type, 121 friendlyURL, site, active, serviceContext); 122 } 123 124 /** 125 * @deprecated As of 6.2.0, replaced by {@link #addGroup(long, String, 126 String, int, String, boolean, boolean, ServiceContext)} 127 */ 128 @Override 129 public com.liferay.portal.model.Group addGroup(java.lang.String name, 130 java.lang.String description, int type, java.lang.String friendlyURL, 131 boolean site, boolean active, 132 com.liferay.portal.service.ServiceContext serviceContext) 133 throws com.liferay.portal.kernel.exception.PortalException, 134 com.liferay.portal.kernel.exception.SystemException { 135 return _groupService.addGroup(name, description, type, friendlyURL, 136 site, active, serviceContext); 137 } 138 139 /** 140 * Adds the groups to the role. 141 * 142 * @param roleId the primary key of the role 143 * @param groupIds the primary keys of the groups 144 * @throws PortalException if the user did not have permission to update the 145 role 146 * @throws SystemException if a system exception occurred 147 */ 148 @Override 149 public void addRoleGroups(long roleId, long[] groupIds) 150 throws com.liferay.portal.kernel.exception.PortalException, 151 com.liferay.portal.kernel.exception.SystemException { 152 _groupService.addRoleGroups(roleId, groupIds); 153 } 154 155 /** 156 * Checks that the current user is permitted to use the group for Remote 157 * Staging. 158 * 159 * @param groupId the primary key of the group 160 * @throws PortalException if a group with the primary key could not be 161 found, if the current user did not have permission to view the 162 group, or if the group's company was different from the current 163 user's company 164 * @throws SystemException if a system exception occurred 165 */ 166 @Override 167 public void checkRemoteStagingGroup(long groupId) 168 throws com.liferay.portal.kernel.exception.PortalException, 169 com.liferay.portal.kernel.exception.SystemException { 170 _groupService.checkRemoteStagingGroup(groupId); 171 } 172 173 /** 174 * Deletes the group. 175 * 176 * <p> 177 * The group is unstaged and its assets and resources including layouts, 178 * membership requests, subscriptions, teams, blogs, bookmarks, calendar 179 * events, image gallery, journals, message boards, polls, shopping related 180 * entities, software catalog, and wikis are also deleted. 181 * </p> 182 * 183 * @param groupId the primary key of the group 184 * @throws PortalException if the user did not have permission to delete the 185 group or its assets or resources, if a group with the primary key 186 could not be found, or if the group was a system group 187 * @throws SystemException if a system exception occurred 188 */ 189 @Override 190 public void deleteGroup(long groupId) 191 throws com.liferay.portal.kernel.exception.PortalException, 192 com.liferay.portal.kernel.exception.SystemException { 193 _groupService.deleteGroup(groupId); 194 } 195 196 @Override 197 public void disableStaging(long groupId) 198 throws com.liferay.portal.kernel.exception.PortalException, 199 com.liferay.portal.kernel.exception.SystemException { 200 _groupService.disableStaging(groupId); 201 } 202 203 @Override 204 public void enableStaging(long groupId) 205 throws com.liferay.portal.kernel.exception.PortalException, 206 com.liferay.portal.kernel.exception.SystemException { 207 _groupService.enableStaging(groupId); 208 } 209 210 /** 211 * Returns the company group. 212 * 213 * @param companyId the primary key of the company 214 * @return the group associated with the company 215 * @throws PortalException if a matching group could not be found 216 * @throws SystemException if a system exception occurred 217 */ 218 @Override 219 public com.liferay.portal.model.Group getCompanyGroup(long companyId) 220 throws com.liferay.portal.kernel.exception.PortalException, 221 com.liferay.portal.kernel.exception.SystemException { 222 return _groupService.getCompanyGroup(companyId); 223 } 224 225 /** 226 * Returns the group with the primary key. 227 * 228 * @param groupId the primary key of the group 229 * @return the group with the primary key 230 * @throws PortalException if a group with the primary key could not be 231 found or if the current user did not have permission to view the 232 group 233 * @throws SystemException if a system exception occurred 234 */ 235 @Override 236 public com.liferay.portal.model.Group getGroup(long groupId) 237 throws com.liferay.portal.kernel.exception.PortalException, 238 com.liferay.portal.kernel.exception.SystemException { 239 return _groupService.getGroup(groupId); 240 } 241 242 /** 243 * Returns the group with the name. 244 * 245 * @param companyId the primary key of the company 246 * @param name the group's name 247 * @return the group with the name 248 * @throws PortalException if a matching group could not be found or if the 249 current user did not have permission to view the group 250 * @throws SystemException if a system exception occurred 251 */ 252 @Override 253 public com.liferay.portal.model.Group getGroup(long companyId, 254 java.lang.String name) 255 throws com.liferay.portal.kernel.exception.PortalException, 256 com.liferay.portal.kernel.exception.SystemException { 257 return _groupService.getGroup(companyId, name); 258 } 259 260 /** 261 * Returns all the groups that are direct children of the parent group. 262 * 263 * @param companyId the primary key of the company 264 * @param parentGroupId the primary key of the parent group 265 * @param site whether the group is to be associated with a main site 266 * @return the matching groups, or <code>null</code> if no matches were 267 found 268 * @throws PortalException if the user did not have permission to view the 269 group or if a portal exception occurred 270 * @throws SystemException if a system exception occurred 271 */ 272 @Override 273 public java.util.List<com.liferay.portal.model.Group> getGroups( 274 long companyId, long parentGroupId, boolean site) 275 throws com.liferay.portal.kernel.exception.PortalException, 276 com.liferay.portal.kernel.exception.SystemException { 277 return _groupService.getGroups(companyId, parentGroupId, site); 278 } 279 280 /** 281 * Returns a range of all the site groups for which the user has control 282 * panel access. 283 * 284 * @param portlets the portlets to manage 285 * @param max the upper bound of the range of groups to consider (not 286 inclusive) 287 * @return the range of site groups for which the user has Control Panel 288 access 289 * @throws PortalException if a portal exception occurred 290 * @throws SystemException if a system exception occurred 291 */ 292 @Override 293 public java.util.List<com.liferay.portal.model.Group> getManageableSiteGroups( 294 java.util.Collection<com.liferay.portal.model.Portlet> portlets, int max) 295 throws com.liferay.portal.kernel.exception.PortalException, 296 com.liferay.portal.kernel.exception.SystemException { 297 return _groupService.getManageableSiteGroups(portlets, max); 298 } 299 300 /** 301 * Returns a range of all the site groups for which the user has control 302 * panel access. 303 * 304 * @param portlets the portlets to manage 305 * @param max the upper bound of the range of groups to consider (not 306 inclusive) 307 * @return the range of site groups for which the user has Control Panel 308 access 309 * @throws PortalException if a portal exception occurred 310 * @throws SystemException if a system exception occurred 311 * @deprecated As of 6.2.0, replaced by {@link 312 #getManageableSiteGroups(Collection, int)} 313 */ 314 @Override 315 public java.util.List<com.liferay.portal.model.Group> getManageableSites( 316 java.util.Collection<com.liferay.portal.model.Portlet> portlets, int max) 317 throws com.liferay.portal.kernel.exception.PortalException, 318 com.liferay.portal.kernel.exception.SystemException { 319 return _groupService.getManageableSites(portlets, max); 320 } 321 322 /** 323 * Returns the groups associated with the organizations. 324 * 325 * @param organizations the organizations 326 * @return the groups associated with the organizations 327 * @throws PortalException if a portal exception occurred 328 * @throws SystemException if a system exception occurred 329 */ 330 @Override 331 public java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups( 332 java.util.List<com.liferay.portal.model.Organization> organizations) 333 throws com.liferay.portal.kernel.exception.PortalException, 334 com.liferay.portal.kernel.exception.SystemException { 335 return _groupService.getOrganizationsGroups(organizations); 336 } 337 338 /** 339 * Returns the group associated with the user. 340 * 341 * @param companyId the primary key of the company 342 * @param userId the primary key of the user 343 * @return the group associated with the user 344 * @throws PortalException if a matching group could not be found or if the 345 current user did not have permission to view the group 346 * @throws SystemException if a system exception occurred 347 */ 348 @Override 349 public com.liferay.portal.model.Group getUserGroup(long companyId, 350 long userId) 351 throws com.liferay.portal.kernel.exception.PortalException, 352 com.liferay.portal.kernel.exception.SystemException { 353 return _groupService.getUserGroup(companyId, userId); 354 } 355 356 /** 357 * Returns the groups associated with the user groups. 358 * 359 * @param userGroups the user groups 360 * @return the groups associated with the user groups 361 * @throws PortalException if any one of the user group's group could not be 362 found 363 * @throws SystemException if a system exception occurred 364 */ 365 @Override 366 public java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups( 367 java.util.List<com.liferay.portal.model.UserGroup> userGroups) 368 throws com.liferay.portal.kernel.exception.PortalException, 369 com.liferay.portal.kernel.exception.SystemException { 370 return _groupService.getUserGroupsGroups(userGroups); 371 } 372 373 /** 374 * Returns the range of all groups associated with the user's organization 375 * groups, including the ancestors of the organization groups, unless portal 376 * property <code>organizations.membership.strict</code> is set to 377 * <code>true</code>. 378 * 379 * <p> 380 * Useful when paginating results. Returns a maximum of <code>end - 381 * start</code> instances. <code>start</code> and <code>end</code> are not 382 * primary keys, they are indexes in the result set. Thus, <code>0</code> 383 * refers to the first result in the set. Setting both <code>start</code> 384 * and <code>end</code> to {@link 385 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 386 * result set. 387 * </p> 388 * 389 * @param userId the primary key of the user 390 * @param start the lower bound of the range of groups to consider 391 * @param end the upper bound of the range of groups to consider (not 392 inclusive) 393 * @return the range of groups associated with the user's organizations 394 * @throws PortalException if a user with the primary key could not be found 395 or if another portal exception occurred 396 * @throws SystemException if a system exception occurred 397 */ 398 @Override 399 public java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups( 400 long userId, int start, int end) 401 throws com.liferay.portal.kernel.exception.PortalException, 402 com.liferay.portal.kernel.exception.SystemException { 403 return _groupService.getUserOrganizationsGroups(userId, start, end); 404 } 405 406 /** 407 * @deprecated As of 6.2.0, replaced by {@link #getUserSitesGroups(long, 408 String[], boolean, int)} 409 */ 410 @Override 411 public java.util.List<com.liferay.portal.model.Group> getUserPlaces( 412 long userId, java.lang.String[] classNames, 413 boolean includeControlPanel, int max) 414 throws com.liferay.portal.kernel.exception.PortalException, 415 com.liferay.portal.kernel.exception.SystemException { 416 return _groupService.getUserPlaces(userId, classNames, 417 includeControlPanel, max); 418 } 419 420 /** 421 * Returns the user's groups "sites" associated with the group 422 * entity class names, including the Control Panel group if the user is 423 * permitted to view the Control Panel. 424 * 425 * <ul> 426 * <li> 427 * Class name "User" includes the user's layout set 428 * group. 429 * </li> 430 * <li> 431 * Class name "Organization" includes the user's 432 * immediate organization groups and inherited organization groups. 433 * </li> 434 * <li> 435 * Class name "Group" includes the user's immediate 436 * organization groups and site groups. 437 * </li> 438 * <li> 439 * A <code>classNames</code> 440 * value of <code>null</code> includes the user's layout set group, 441 * organization groups, inherited organization groups, and site groups. 442 * </li> 443 * </ul> 444 * 445 * @param userId the primary key of the user 446 * @param classNames the group entity class names (optionally 447 <code>null</code>). For more information see {@link 448 #getUserSitesGroups(long, String[], int)} 449 * @param max the maximum number of groups to return 450 * @return the user's groups "sites" 451 * @throws PortalException if a portal exception occurred 452 * @throws SystemException if a system exception occurred 453 * @deprecated As of 6.2.0, replaced by {@link #getUserSitesGroups(long, 454 String[], int)} 455 */ 456 @Override 457 public java.util.List<com.liferay.portal.model.Group> getUserPlaces( 458 long userId, java.lang.String[] classNames, int max) 459 throws com.liferay.portal.kernel.exception.PortalException, 460 com.liferay.portal.kernel.exception.SystemException { 461 return _groupService.getUserPlaces(userId, classNames, max); 462 } 463 464 /** 465 * @deprecated As of 6.2.0, replaced by {@link #getUserSitesGroups(long, 466 String[], String, boolean, boolean, int, int)} 467 */ 468 @Override 469 public java.util.List<com.liferay.portal.model.Group> getUserPlaces( 470 long userId, java.lang.String[] classNames, java.lang.String name, 471 boolean active, boolean includeControlPanel, int start, int end) 472 throws com.liferay.portal.kernel.exception.PortalException, 473 com.liferay.portal.kernel.exception.SystemException { 474 return _groupService.getUserPlaces(userId, classNames, name, active, 475 includeControlPanel, start, end); 476 } 477 478 /** 479 * Returns the guest or current user's groups "sites" associated 480 * with the group entity class names, including the Control Panel group if 481 * the user is permitted to view the Control Panel. 482 * 483 * <ul> 484 * <li> 485 * Class name "User" includes the user's layout set 486 * group. 487 * </li> 488 * <li> 489 * Class name "Organization" includes the user's 490 * immediate organization groups and inherited organization groups. 491 * </li> 492 * <li> 493 * Class name "Group" includes the user's immediate 494 * organization groups and site groups. 495 * </li> 496 * <li> 497 * A <code>classNames</code> 498 * value of <code>null</code> includes the user's layout set group, 499 * organization groups, inherited organization groups, and site groups. 500 * </li> 501 * </ul> 502 * 503 * @param classNames the group entity class names (optionally 504 <code>null</code>). For more information see {@link 505 #getUserSitesGroups(String[], int)} 506 * @param max the maximum number of groups to return 507 * @return the user's groups "sites" 508 * @throws PortalException if a portal exception occurred 509 * @throws SystemException if a system exception occurred 510 * @deprecated As of 6.2.0, replaced by {@link #getUserSitesGroups( 511 String[], int)} 512 */ 513 @Override 514 public java.util.List<com.liferay.portal.model.Group> getUserPlaces( 515 java.lang.String[] classNames, int max) 516 throws com.liferay.portal.kernel.exception.PortalException, 517 com.liferay.portal.kernel.exception.SystemException { 518 return _groupService.getUserPlaces(classNames, max); 519 } 520 521 /** 522 * Returns the number of the guest or current user's groups 523 * "sites" associated with the group entity class names, including 524 * the Control Panel group if the user is permitted to view the Control 525 * Panel. 526 * 527 * @return the number of user's groups "sites" 528 * @throws PortalException if a portal exception occurred 529 * @throws SystemException if a system exception occurred 530 * @deprecated As of 6.2.0, replaced by {@link #getUserSitesGroupsCount()} 531 */ 532 @Override 533 public int getUserPlacesCount() 534 throws com.liferay.portal.kernel.exception.PortalException, 535 com.liferay.portal.kernel.exception.SystemException { 536 return _groupService.getUserPlacesCount(); 537 } 538 539 /** 540 * Returns the guest or current user's layout set group, organization 541 * groups, inherited organization groups, and site groups. 542 * 543 * @return the user's layout set group, organization groups, and 544 inherited organization groups, and site groups 545 * @throws PortalException if a portal exception occurred 546 * @throws SystemException if a system exception occurred 547 * @deprecated As of 6.2.0, replaced by {@link #getUserSitesGroups} 548 */ 549 @Override 550 public java.util.List<com.liferay.portal.model.Group> getUserSites() 551 throws com.liferay.portal.kernel.exception.PortalException, 552 com.liferay.portal.kernel.exception.SystemException { 553 return _groupService.getUserSites(); 554 } 555 556 @Override 557 public java.util.List<com.liferay.portal.model.Group> getUserSitesGroups() 558 throws com.liferay.portal.kernel.exception.PortalException, 559 com.liferay.portal.kernel.exception.SystemException { 560 return _groupService.getUserSitesGroups(); 561 } 562 563 @Override 564 public java.util.List<com.liferay.portal.model.Group> getUserSitesGroups( 565 long userId, java.lang.String[] classNames, 566 boolean includeControlPanel, int max) 567 throws com.liferay.portal.kernel.exception.PortalException, 568 com.liferay.portal.kernel.exception.SystemException { 569 return _groupService.getUserSitesGroups(userId, classNames, 570 includeControlPanel, max); 571 } 572 573 /** 574 * Returns the user's groups "sites" associated with the group 575 * entity class names, including the Control Panel group if the user is 576 * permitted to view the Control Panel. 577 * 578 * <ul> 579 * <li> 580 * Class name "User" includes the user's layout set 581 * group. 582 * </li> 583 * <li> 584 * Class name "Organization" includes the user's 585 * immediate organization groups and inherited organization groups. 586 * </li> 587 * <li> 588 * Class name "Group" includes the user's immediate 589 * organization groups and site groups. 590 * </li> 591 * <li> 592 * A <code>classNames</code> 593 * value of <code>null</code> includes the user's layout set group, 594 * organization groups, inherited organization groups, and site groups. 595 * </li> 596 * </ul> 597 * 598 * @param userId the primary key of the user 599 * @param classNames the group entity class names (optionally 600 <code>null</code>). For more information see {@link 601 #getUserSitesGroups(long, String[], boolean, int)} 602 * @param max the maximum number of groups to return 603 * @return the user's groups "sites" 604 * @throws PortalException if a portal exception occurred 605 * @throws SystemException if a system exception occurred 606 */ 607 @Override 608 public java.util.List<com.liferay.portal.model.Group> getUserSitesGroups( 609 long userId, java.lang.String[] classNames, int max) 610 throws com.liferay.portal.kernel.exception.PortalException, 611 com.liferay.portal.kernel.exception.SystemException { 612 return _groupService.getUserSitesGroups(userId, classNames, max); 613 } 614 615 @Override 616 public java.util.List<com.liferay.portal.model.Group> getUserSitesGroups( 617 long userId, java.lang.String[] classNames, java.lang.String name, 618 boolean active, boolean includeControlPanel, int start, int end) 619 throws com.liferay.portal.kernel.exception.PortalException, 620 com.liferay.portal.kernel.exception.SystemException { 621 return _groupService.getUserSitesGroups(userId, classNames, name, 622 active, includeControlPanel, start, end); 623 } 624 625 /** 626 * Returns the guest or current user's groups "sites" associated 627 * with the group entity class names, including the Control Panel group if 628 * the user is permitted to view the Control Panel. 629 * 630 * <ul> 631 * <li> 632 * Class name "User" includes the user's layout set 633 * group. 634 * </li> 635 * <li> 636 * Class name "Organization" includes the user's 637 * immediate organization groups and inherited organization groups. 638 * </li> 639 * <li> 640 * Class name "Group" includes the user's immediate 641 * organization groups and site groups. 642 * </li> 643 * <li> 644 * A <code>classNames</code> 645 * value of <code>null</code> includes the user's layout set group, 646 * organization groups, inherited organization groups, and site groups. 647 * </li> 648 * </ul> 649 * 650 * @param classNames the group entity class names (optionally 651 <code>null</code>). For more information see {@link 652 #getUserSitesGroups(long, String[], boolean, int)} 653 * @param max the maximum number of groups to return 654 * @return the user's groups "sites" 655 * @throws PortalException if a portal exception occurred 656 * @throws SystemException if a system exception occurred 657 */ 658 @Override 659 public java.util.List<com.liferay.portal.model.Group> getUserSitesGroups( 660 java.lang.String[] classNames, int max) 661 throws com.liferay.portal.kernel.exception.PortalException, 662 com.liferay.portal.kernel.exception.SystemException { 663 return _groupService.getUserSitesGroups(classNames, max); 664 } 665 666 /** 667 * Returns the number of the guest or current user's groups 668 * "sites" associated with the group entity class names, including 669 * the Control Panel group if the user is permitted to view the Control 670 * Panel. 671 * 672 * @return the number of user's groups "sites" 673 * @throws PortalException if a portal exception occurred 674 * @throws SystemException if a system exception occurred 675 */ 676 @Override 677 public int getUserSitesGroupsCount() 678 throws com.liferay.portal.kernel.exception.PortalException, 679 com.liferay.portal.kernel.exception.SystemException { 680 return _groupService.getUserSitesGroupsCount(); 681 } 682 683 /** 684 * Returns <code>true</code> if the user is associated with the group, 685 * including the user's inherited organizations and user groups. System and 686 * staged groups are not included. 687 * 688 * @param userId the primary key of the user 689 * @param groupId the primary key of the group 690 * @return <code>true</code> if the user is associated with the group; 691 <code>false</code> otherwise 692 * @throws PortalException if the current user did not have permission to 693 view the user or group members 694 * @throws SystemException if a system exception occurred 695 */ 696 @Override 697 public boolean hasUserGroup(long userId, long groupId) 698 throws com.liferay.portal.kernel.exception.PortalException, 699 com.liferay.portal.kernel.exception.SystemException { 700 return _groupService.hasUserGroup(userId, groupId); 701 } 702 703 /** 704 * Returns an ordered range of all the site groups and organization groups 705 * that match the name and description, optionally including the user's 706 * inherited organization groups and user groups. System and staged groups 707 * are not included. 708 * 709 * <p> 710 * Useful when paginating results. Returns a maximum of <code>end - 711 * start</code> instances. <code>start</code> and <code>end</code> are not 712 * primary keys, they are indexes in the result set. Thus, <code>0</code> 713 * refers to the first result in the set. Setting both <code>start</code> 714 * and <code>end</code> to {@link 715 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 716 * result set. 717 * </p> 718 * 719 * @param companyId the primary key of the company 720 * @param name the group's name (optionally <code>null</code>) 721 * @param description the group's description (optionally 722 <code>null</code>) 723 * @param params the finder params (optionally <code>null</code>). To 724 include the user's inherited organizations and user groups in the 725 search, add entries having "usersGroups" and 726 "inherit" as keys mapped to the the user's ID. For more 727 information see {@link 728 com.liferay.portal.service.persistence.GroupFinder} 729 * @param start the lower bound of the range of groups to return 730 * @param end the upper bound of the range of groups to return (not 731 inclusive) 732 * @return the matching groups ordered by name 733 * @throws PortalException if a portal exception occurred 734 * @throws SystemException if a system exception occurred 735 */ 736 @Override 737 public java.util.List<com.liferay.portal.model.Group> search( 738 long companyId, java.lang.String name, java.lang.String description, 739 java.lang.String[] params, int start, int end) 740 throws com.liferay.portal.kernel.exception.PortalException, 741 com.liferay.portal.kernel.exception.SystemException { 742 return _groupService.search(companyId, name, description, params, 743 start, end); 744 } 745 746 /** 747 * Returns the number of groups and organization groups that match the name 748 * and description, optionally including the user's inherited organizations 749 * and user groups. System and staged groups are not included. 750 * 751 * @param companyId the primary key of the company 752 * @param name the group's name (optionally <code>null</code>) 753 * @param description the group's description (optionally 754 <code>null</code>) 755 * @param params the finder params (optionally <code>null</code>). To 756 include the user's inherited organizations and user groups in the 757 search, add entries having "usersGroups" and 758 "inherit" as keys mapped to the the user's ID. For more 759 information see {@link 760 com.liferay.portal.service.persistence.GroupFinder} 761 * @return the number of matching groups 762 * @throws SystemException if a system exception occurred 763 */ 764 @Override 765 public int searchCount(long companyId, java.lang.String name, 766 java.lang.String description, java.lang.String[] params) 767 throws com.liferay.portal.kernel.exception.SystemException { 768 return _groupService.searchCount(companyId, name, description, params); 769 } 770 771 /** 772 * Sets the groups associated with the role, removing and adding 773 * associations as necessary. 774 * 775 * @param roleId the primary key of the role 776 * @param groupIds the primary keys of the groups 777 * @throws PortalException if the user did not have permission to update 778 update the role 779 * @throws SystemException if a system exception occurred 780 */ 781 @Override 782 public void setRoleGroups(long roleId, long[] groupIds) 783 throws com.liferay.portal.kernel.exception.PortalException, 784 com.liferay.portal.kernel.exception.SystemException { 785 _groupService.setRoleGroups(roleId, groupIds); 786 } 787 788 /** 789 * Removes the groups from the role. 790 * 791 * @param roleId the primary key of the role 792 * @param groupIds the primary keys of the groups 793 * @throws PortalException if the user did not have permission to update the 794 role 795 * @throws SystemException if a system exception occurred 796 */ 797 @Override 798 public void unsetRoleGroups(long roleId, long[] groupIds) 799 throws com.liferay.portal.kernel.exception.PortalException, 800 com.liferay.portal.kernel.exception.SystemException { 801 _groupService.unsetRoleGroups(roleId, groupIds); 802 } 803 804 /** 805 * Updates the group's friendly URL. 806 * 807 * @param groupId the primary key of the group 808 * @param friendlyURL the group's new friendlyURL (optionally 809 <code>null</code>) 810 * @return the group 811 * @throws PortalException if the user did not have permission to update the 812 group, if a group with the primary key could not be found, or if 813 a valid friendly URL could not be created for the group 814 * @throws SystemException if a system exception occurred 815 */ 816 @Override 817 public com.liferay.portal.model.Group updateFriendlyURL(long groupId, 818 java.lang.String friendlyURL) 819 throws com.liferay.portal.kernel.exception.PortalException, 820 com.liferay.portal.kernel.exception.SystemException { 821 return _groupService.updateFriendlyURL(groupId, friendlyURL); 822 } 823 824 /** 825 * Updates the group. 826 * 827 * @param groupId the primary key of the group 828 * @param parentGroupId the primary key of the parent group 829 * @param name the group's new name 830 * @param description the group's new description (optionally 831 <code>null</code>) 832 * @param type the group's new type. For more information see {@link 833 com.liferay.portal.model.GroupConstants} 834 * @param friendlyURL the group's new friendlyURL (optionally 835 <code>null</code>) 836 * @param active whether the group is active 837 * @param serviceContext the service context to be applied (optionally 838 <code>null</code>). Can set the asset category IDs and asset tag 839 names for the group. 840 * @return the group 841 * @throws PortalException if the user did not have permission to update the 842 group, if a group with the primary key could not be found, if the 843 friendly URL was invalid or could one not be created 844 * @throws SystemException if a system exception occurred 845 */ 846 @Override 847 public com.liferay.portal.model.Group updateGroup(long groupId, 848 long parentGroupId, java.lang.String name, 849 java.lang.String description, int type, boolean manualMembership, 850 int membershipRestriction, java.lang.String friendlyURL, 851 boolean active, com.liferay.portal.service.ServiceContext serviceContext) 852 throws com.liferay.portal.kernel.exception.PortalException, 853 com.liferay.portal.kernel.exception.SystemException { 854 return _groupService.updateGroup(groupId, parentGroupId, name, 855 description, type, manualMembership, membershipRestriction, 856 friendlyURL, active, serviceContext); 857 } 858 859 /** 860 * Updates the group's type settings. 861 * 862 * @param groupId the primary key of the group 863 * @param typeSettings the group's new type settings (optionally 864 <code>null</code>) 865 * @return the group 866 * @throws PortalException if the user did not have permission to update the 867 group or if a group with the primary key could not be found 868 * @throws SystemException if a system exception occurred 869 */ 870 @Override 871 public com.liferay.portal.model.Group updateGroup(long groupId, 872 java.lang.String typeSettings) 873 throws com.liferay.portal.kernel.exception.PortalException, 874 com.liferay.portal.kernel.exception.SystemException { 875 return _groupService.updateGroup(groupId, typeSettings); 876 } 877 878 @Override 879 public void updateStagedPortlets(long groupId, 880 java.util.Map<java.lang.String, java.lang.String> stagedPortletIds) 881 throws com.liferay.portal.kernel.exception.PortalException, 882 com.liferay.portal.kernel.exception.SystemException { 883 _groupService.updateStagedPortlets(groupId, stagedPortletIds); 884 } 885 886 /** 887 * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} 888 */ 889 public GroupService getWrappedGroupService() { 890 return _groupService; 891 } 892 893 /** 894 * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} 895 */ 896 public void setWrappedGroupService(GroupService groupService) { 897 _groupService = groupService; 898 } 899 900 @Override 901 public GroupService getWrappedService() { 902 return _groupService; 903 } 904 905 @Override 906 public void setWrappedService(GroupService groupService) { 907 _groupService = groupService; 908 } 909 910 private GroupService _groupService; 911 }