001 /** 002 * Copyright (c) 2000-2012 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 * <p> 019 * This class is a wrapper for {@link GroupService}. 020 * </p> 021 * 022 * @author Brian Wing Shun Chan 023 * @see GroupService 024 * @generated 025 */ 026 public class GroupServiceWrapper implements GroupService, 027 ServiceWrapper<GroupService> { 028 public GroupServiceWrapper(GroupService groupService) { 029 _groupService = groupService; 030 } 031 032 /** 033 * Returns the Spring bean ID for this bean. 034 * 035 * @return the Spring bean ID for this bean 036 */ 037 public java.lang.String getBeanIdentifier() { 038 return _groupService.getBeanIdentifier(); 039 } 040 041 /** 042 * Sets the Spring bean ID for this bean. 043 * 044 * @param beanIdentifier the Spring bean ID for this bean 045 */ 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 public com.liferay.portal.model.Group addGroup(long parentGroupId, 075 long liveGroupId, java.lang.String name, java.lang.String description, 076 int type, java.lang.String friendlyURL, boolean site, boolean active, 077 com.liferay.portal.service.ServiceContext serviceContext) 078 throws com.liferay.portal.kernel.exception.PortalException, 079 com.liferay.portal.kernel.exception.SystemException { 080 return _groupService.addGroup(parentGroupId, liveGroupId, name, 081 description, type, friendlyURL, site, active, serviceContext); 082 } 083 084 /** 085 * Adds the group using the group default live group ID. 086 * 087 * @param parentGroupId the primary key of the parent group 088 * @param name the entity's name 089 * @param description the group's description (optionally 090 <code>null</code>) 091 * @param type the group's type. For more information see {@link 092 com.liferay.portal.model.GroupConstants} 093 * @param friendlyURL the group's friendlyURL 094 * @param site whether the group is to be associated with a main site 095 * @param active whether the group is active 096 * @param serviceContext the service context to be applied (optionally 097 <code>null</code>). Can set asset category IDs and asset tag 098 names for the group, and can set whether the group is for 099 staging 100 * @return the group 101 * @throws PortalException if the user did not have permission to add 102 the group, if a creator could not be found, if the group's 103 information was invalid, if a layout could not be found, or 104 if a valid friendly URL could not be created for the group 105 * @throws SystemException if a system exception occurred 106 * @deprecated {@link #addGroup(long, long, String, String, int, String, 107 boolean, boolean, ServiceContext)} 108 */ 109 public com.liferay.portal.model.Group addGroup(long parentGroupId, 110 java.lang.String name, java.lang.String description, int type, 111 java.lang.String friendlyURL, boolean site, boolean active, 112 com.liferay.portal.service.ServiceContext serviceContext) 113 throws com.liferay.portal.kernel.exception.PortalException, 114 com.liferay.portal.kernel.exception.SystemException { 115 return _groupService.addGroup(parentGroupId, name, description, type, 116 friendlyURL, site, active, serviceContext); 117 } 118 119 /** 120 * @deprecated {@link #addGroup(long, String, String, int, String, boolean, 121 boolean, ServiceContext)} 122 */ 123 public com.liferay.portal.model.Group addGroup(java.lang.String name, 124 java.lang.String description, int type, java.lang.String friendlyURL, 125 boolean site, boolean active, 126 com.liferay.portal.service.ServiceContext serviceContext) 127 throws com.liferay.portal.kernel.exception.PortalException, 128 com.liferay.portal.kernel.exception.SystemException { 129 return _groupService.addGroup(name, description, type, friendlyURL, 130 site, active, serviceContext); 131 } 132 133 /** 134 * Adds the groups to the role. 135 * 136 * @param roleId the primary key of the role 137 * @param groupIds the primary keys of the groups 138 * @throws PortalException if the user did not have permission to update the 139 role 140 * @throws SystemException if a system exception occurred 141 */ 142 public void addRoleGroups(long roleId, long[] groupIds) 143 throws com.liferay.portal.kernel.exception.PortalException, 144 com.liferay.portal.kernel.exception.SystemException { 145 _groupService.addRoleGroups(roleId, groupIds); 146 } 147 148 /** 149 * Deletes the group. 150 * 151 * <p> 152 * The group is unstaged and its assets and resources including layouts, 153 * membership requests, subscriptions, teams, blogs, bookmarks, calendar 154 * events, image gallery, journals, message boards, polls, shopping related 155 * entities, software catalog, and wikis are also deleted. 156 * </p> 157 * 158 * @param groupId the primary key of the group 159 * @throws PortalException if the user did not have permission to delete the 160 group or its assets or resources, if a group with the primary key 161 could not be found, or if the group was a system group 162 * @throws SystemException if a system exception occurred 163 */ 164 public void deleteGroup(long groupId) 165 throws com.liferay.portal.kernel.exception.PortalException, 166 com.liferay.portal.kernel.exception.SystemException { 167 _groupService.deleteGroup(groupId); 168 } 169 170 /** 171 * Returns the group with the primary key. 172 * 173 * @param groupId the primary key of the group 174 * @return the group with the primary key 175 * @throws PortalException if a group with the primary key could not be 176 found or if the current user did not have permission to view the 177 group 178 * @throws SystemException if a system exception occurred 179 */ 180 public com.liferay.portal.model.Group getGroup(long groupId) 181 throws com.liferay.portal.kernel.exception.PortalException, 182 com.liferay.portal.kernel.exception.SystemException { 183 return _groupService.getGroup(groupId); 184 } 185 186 /** 187 * Returns the group with the name. 188 * 189 * @param companyId the primary key of the company 190 * @param name the group's name 191 * @return the group with the name 192 * @throws PortalException if a matching group could not be found or if the 193 current user did not have permission to view the group 194 * @throws SystemException if a system exception occurred 195 */ 196 public com.liferay.portal.model.Group getGroup(long companyId, 197 java.lang.String name) 198 throws com.liferay.portal.kernel.exception.PortalException, 199 com.liferay.portal.kernel.exception.SystemException { 200 return _groupService.getGroup(companyId, name); 201 } 202 203 /** 204 * Returns a range of all the site groups for which the user has control 205 * panel access. 206 * 207 * @param portlets the portlets to manage 208 * @param max the upper bound of the range of groups to consider (not 209 inclusive) 210 * @return the range of site groups for which the user has control panel 211 access 212 * @throws PortalException if a portal exception occurred 213 * @throws SystemException if a system exception occurred 214 */ 215 public java.util.List<com.liferay.portal.model.Group> getManageableSites( 216 java.util.Collection<com.liferay.portal.model.Portlet> portlets, int max) 217 throws com.liferay.portal.kernel.exception.PortalException, 218 com.liferay.portal.kernel.exception.SystemException { 219 return _groupService.getManageableSites(portlets, max); 220 } 221 222 /** 223 * Returns the groups associated with the organizations. 224 * 225 * @param organizations the organizations 226 * @return the groups associated with the organizations 227 * @throws PortalException if a portal exception occurred 228 * @throws SystemException if a system exception occurred 229 */ 230 public java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups( 231 java.util.List<com.liferay.portal.model.Organization> organizations) 232 throws com.liferay.portal.kernel.exception.PortalException, 233 com.liferay.portal.kernel.exception.SystemException { 234 return _groupService.getOrganizationsGroups(organizations); 235 } 236 237 /** 238 * Returns the group associated with the user. 239 * 240 * @param companyId the primary key of the company 241 * @param userId the primary key of the user 242 * @return the group associated with the user 243 * @throws PortalException if a matching group could not be found or if the 244 current user did not have permission to view the group 245 * @throws SystemException if a system exception occurred 246 */ 247 public com.liferay.portal.model.Group getUserGroup(long companyId, 248 long userId) 249 throws com.liferay.portal.kernel.exception.PortalException, 250 com.liferay.portal.kernel.exception.SystemException { 251 return _groupService.getUserGroup(companyId, userId); 252 } 253 254 /** 255 * Returns the groups associated with the user groups. 256 * 257 * @param userGroups the user groups 258 * @return the groups associated with the user groups 259 * @throws PortalException if any one of the user group's group could not be 260 found 261 * @throws SystemException if a system exception occurred 262 */ 263 public java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups( 264 java.util.List<com.liferay.portal.model.UserGroup> userGroups) 265 throws com.liferay.portal.kernel.exception.PortalException, 266 com.liferay.portal.kernel.exception.SystemException { 267 return _groupService.getUserGroupsGroups(userGroups); 268 } 269 270 /** 271 * Returns the range of all groups associated with the user's organization 272 * groups, including the ancestors of the organization groups, unless portal 273 * property <code>organizations.membership.strict</code> is set to 274 * <code>true</code>. 275 * 276 * <p> 277 * Useful when paginating results. Returns a maximum of <code>end - 278 * start</code> instances. <code>start</code> and <code>end</code> are not 279 * primary keys, they are indexes in the result set. Thus, <code>0</code> 280 * refers to the first result in the set. Setting both <code>start</code> 281 * and <code>end</code> to {@link 282 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 283 * result set. 284 * </p> 285 * 286 * @param userId the primary key of the user 287 * @param start the lower bound of the range of groups to consider 288 * @param end the upper bound of the range of groups to consider (not 289 inclusive) 290 * @return the range of groups associated with the user's organizations 291 * @throws PortalException if a user with the primary key could not be found 292 or if another portal exception occurred 293 * @throws SystemException if a system exception occurred 294 */ 295 public java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups( 296 long userId, int start, int end) 297 throws com.liferay.portal.kernel.exception.PortalException, 298 com.liferay.portal.kernel.exception.SystemException { 299 return _groupService.getUserOrganizationsGroups(userId, start, end); 300 } 301 302 public java.util.List<com.liferay.portal.model.Group> getUserPlaces( 303 long userId, java.lang.String[] classNames, 304 boolean includeControlPanel, int max) 305 throws com.liferay.portal.kernel.exception.PortalException, 306 com.liferay.portal.kernel.exception.SystemException { 307 return _groupService.getUserPlaces(userId, classNames, 308 includeControlPanel, max); 309 } 310 311 /** 312 * Returns the user's group "places" associated with the group 313 * entity class names, including the control panel group if the user is 314 * permitted to view the control panel. 315 * 316 * <p> 317 * <ul> <li> Class name "User" includes the user's layout set 318 * group. </li> <li> Class name "Organization" includes the user's 319 * immediate organization groups and inherited organization groups. </li> 320 * <li> Class name "Group" includes the user's immediate 321 * organization groups and site groups. </li> <li> A <code>classNames</code> 322 * value of <code>null</code> includes the user's layout set group, 323 * organization groups, inherited organization groups, and site groups. 324 * </li> </ul> 325 * </p> 326 * 327 * @param userId the primary key of the user 328 * @param classNames the group entity class names (optionally 329 <code>null</code>). For more information see {@link 330 #getUserPlaces(long, String[], int)} 331 * @param max the maximum number of groups to return 332 * @return the user's group "places" 333 * @throws PortalException if a portal exception occurred 334 * @throws SystemException if a system exception occurred 335 */ 336 public java.util.List<com.liferay.portal.model.Group> getUserPlaces( 337 long userId, java.lang.String[] classNames, int max) 338 throws com.liferay.portal.kernel.exception.PortalException, 339 com.liferay.portal.kernel.exception.SystemException { 340 return _groupService.getUserPlaces(userId, classNames, max); 341 } 342 343 /** 344 * Returns the guest or current user's group "places" associated 345 * with the group entity class names, including the control panel group if 346 * the user is permitted to view the control panel. 347 * 348 * <p> 349 * <ul> <li> Class name "User" includes the user's layout set 350 * group. </li> <li> Class name "Organization" includes the user's 351 * immediate organization groups and inherited organization groups. </li> 352 * <li> Class name "Group" includes the user's immediate 353 * organization groups and site groups. </li> <li> A <code>classNames</code> 354 * value of <code>null</code> includes the user's layout set group, 355 * organization groups, inherited organization groups, and site groups. 356 * </li> </ul> 357 * </p> 358 * 359 * @param classNames the group entity class names (optionally 360 <code>null</code>). For more information see {@link 361 #getUserPlaces(String[], int)} 362 * @param max the maximum number of groups to return 363 * @return the user's group "places" 364 * @throws PortalException if a portal exception occurred 365 * @throws SystemException if a system exception occurred 366 */ 367 public java.util.List<com.liferay.portal.model.Group> getUserPlaces( 368 java.lang.String[] classNames, int max) 369 throws com.liferay.portal.kernel.exception.PortalException, 370 com.liferay.portal.kernel.exception.SystemException { 371 return _groupService.getUserPlaces(classNames, max); 372 } 373 374 /** 375 * Returns the guest or current user's layout set group, organization 376 * groups, inherited organization groups, and site groups. 377 * 378 * @return the user's layout set group, organization groups, and inherited 379 organization groups, and site groups 380 * @throws PortalException if a portal exception occurred 381 * @throws SystemException if a system exception occurred 382 */ 383 public java.util.List<com.liferay.portal.model.Group> getUserSites() 384 throws com.liferay.portal.kernel.exception.PortalException, 385 com.liferay.portal.kernel.exception.SystemException { 386 return _groupService.getUserSites(); 387 } 388 389 /** 390 * Returns <code>true</code> if the user is associated with the group, 391 * including the user's inherited organizations and user groups. System and 392 * staged groups are not included. 393 * 394 * @param userId the primary key of the user 395 * @param groupId the primary key of the group 396 * @return <code>true</code> if the user is associated with the group; 397 <code>false</code> otherwise 398 * @throws PortalException if the current user did not have permission to 399 view the user or group members 400 * @throws SystemException if a system exception occurred 401 */ 402 public boolean hasUserGroup(long userId, long groupId) 403 throws com.liferay.portal.kernel.exception.PortalException, 404 com.liferay.portal.kernel.exception.SystemException { 405 return _groupService.hasUserGroup(userId, groupId); 406 } 407 408 /** 409 * Returns an ordered range of all the site groups and organization groups 410 * that match the name and description, optionally including the user's 411 * inherited organization groups and user groups. System and staged groups 412 * are not included. 413 * 414 * <p> 415 * Useful when paginating results. Returns a maximum of <code>end - 416 * start</code> instances. <code>start</code> and <code>end</code> are not 417 * primary keys, they are indexes in the result set. Thus, <code>0</code> 418 * refers to the first result in the set. Setting both <code>start</code> 419 * and <code>end</code> to {@link 420 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 421 * result set. 422 * </p> 423 * 424 * @param companyId the primary key of the company 425 * @param name the group's name (optionally <code>null</code>) 426 * @param description the group's description (optionally 427 <code>null</code>) 428 * @param params the finder params (optionally <code>null</code>). To 429 include the user's inherited organizations and user groups in the 430 search, add entries having "usersGroups" and 431 "inherit" as keys mapped to the the user's ID. For more 432 information see {@link 433 com.liferay.portal.service.persistence.GroupFinder} 434 * @param start the lower bound of the range of groups to return 435 * @param end the upper bound of the range of groups to return (not 436 inclusive) 437 * @return the matching groups ordered by name 438 * @throws PortalException if a portal exception occurred 439 * @throws SystemException if a system exception occurred 440 */ 441 public java.util.List<com.liferay.portal.model.Group> search( 442 long companyId, java.lang.String name, java.lang.String description, 443 java.lang.String[] params, int start, int end) 444 throws com.liferay.portal.kernel.exception.PortalException, 445 com.liferay.portal.kernel.exception.SystemException { 446 return _groupService.search(companyId, name, description, params, 447 start, end); 448 } 449 450 /** 451 * Returns the number of groups and organization groups that match the name 452 * and description, optionally including the user's inherited organizations 453 * and user groups. System and staged groups are not included. 454 * 455 * @param companyId the primary key of the company 456 * @param name the group's name (optionally <code>null</code>) 457 * @param description the group's description (optionally 458 <code>null</code>) 459 * @param params the finder params (optionally <code>null</code>). To 460 include the user's inherited organizations and user groups in the 461 search, add entries having "usersGroups" and 462 "inherit" as keys mapped to the the user's ID. For more 463 information see {@link 464 com.liferay.portal.service.persistence.GroupFinder} 465 * @return the number of matching groups 466 * @throws SystemException if a system exception occurred 467 */ 468 public int searchCount(long companyId, java.lang.String name, 469 java.lang.String description, java.lang.String[] params) 470 throws com.liferay.portal.kernel.exception.SystemException { 471 return _groupService.searchCount(companyId, name, description, params); 472 } 473 474 /** 475 * Sets the groups associated with the role, removing and adding 476 * associations as necessary. 477 * 478 * @param roleId the primary key of the role 479 * @param groupIds the primary keys of the groups 480 * @throws PortalException if the user did not have permission to update 481 update the role 482 * @throws SystemException if a system exception occurred 483 */ 484 public void setRoleGroups(long roleId, long[] groupIds) 485 throws com.liferay.portal.kernel.exception.PortalException, 486 com.liferay.portal.kernel.exception.SystemException { 487 _groupService.setRoleGroups(roleId, groupIds); 488 } 489 490 /** 491 * Removes the groups from the role. 492 * 493 * @param roleId the primary key of the role 494 * @param groupIds the primary keys of the groups 495 * @throws PortalException if the user did not have permission to update the 496 role 497 * @throws SystemException if a system exception occurred 498 */ 499 public void unsetRoleGroups(long roleId, long[] groupIds) 500 throws com.liferay.portal.kernel.exception.PortalException, 501 com.liferay.portal.kernel.exception.SystemException { 502 _groupService.unsetRoleGroups(roleId, groupIds); 503 } 504 505 /** 506 * Updates the group's friendly URL. 507 * 508 * @param groupId the primary key of the group 509 * @param friendlyURL the group's new friendlyURL (optionally 510 <code>null</code>) 511 * @return the group 512 * @throws PortalException if the user did not have permission to update the 513 group, if a group with the primary key could not be found, or if 514 a valid friendly URL could not be created for the group 515 * @throws SystemException if a system exception occurred 516 */ 517 public com.liferay.portal.model.Group updateFriendlyURL(long groupId, 518 java.lang.String friendlyURL) 519 throws com.liferay.portal.kernel.exception.PortalException, 520 com.liferay.portal.kernel.exception.SystemException { 521 return _groupService.updateFriendlyURL(groupId, friendlyURL); 522 } 523 524 /** 525 * Updates the group. 526 * 527 * @param groupId the primary key of the group 528 * @param parentGroupId the primary key of the parent group 529 * @param name the group's new name 530 * @param description the group's new description (optionally 531 <code>null</code>) 532 * @param type the group's new type. For more information see {@link 533 com.liferay.portal.model.GroupConstants} 534 * @param friendlyURL the group's new friendlyURL (optionally 535 <code>null</code>) 536 * @param active whether the group is active 537 * @param serviceContext the service context to be applied (optionally 538 <code>null</code>). Can set the asset category IDs and asset tag 539 names for the group. 540 * @return the group 541 * @throws PortalException if the user did not have permission to update the 542 group, if a group with the primary key could not be found, if the 543 friendly URL was invalid or could one not be created 544 * @throws SystemException if a system exception occurred 545 */ 546 public com.liferay.portal.model.Group updateGroup(long groupId, 547 long parentGroupId, java.lang.String name, 548 java.lang.String description, int type, java.lang.String friendlyURL, 549 boolean active, com.liferay.portal.service.ServiceContext serviceContext) 550 throws com.liferay.portal.kernel.exception.PortalException, 551 com.liferay.portal.kernel.exception.SystemException { 552 return _groupService.updateGroup(groupId, parentGroupId, name, 553 description, type, friendlyURL, active, serviceContext); 554 } 555 556 /** 557 * Updates the group's type settings. 558 * 559 * @param groupId the primary key of the group 560 * @param typeSettings the group's new type settings (optionally 561 <code>null</code>) 562 * @return the group 563 * @throws PortalException if the user did not have permission to update the 564 group or if a group with the primary key could not be found 565 * @throws SystemException if a system exception occurred 566 */ 567 public com.liferay.portal.model.Group updateGroup(long groupId, 568 java.lang.String typeSettings) 569 throws com.liferay.portal.kernel.exception.PortalException, 570 com.liferay.portal.kernel.exception.SystemException { 571 return _groupService.updateGroup(groupId, typeSettings); 572 } 573 574 /** 575 * @deprecated Renamed to {@link #getWrappedService} 576 */ 577 public GroupService getWrappedGroupService() { 578 return _groupService; 579 } 580 581 /** 582 * @deprecated Renamed to {@link #setWrappedService} 583 */ 584 public void setWrappedGroupService(GroupService groupService) { 585 _groupService = groupService; 586 } 587 588 public GroupService getWrappedService() { 589 return _groupService; 590 } 591 592 public void setWrappedService(GroupService groupService) { 593 _groupService = groupService; 594 } 595 596 private GroupService _groupService; 597 }