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