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 UserGroupLocalService}. 020 * </p> 021 * 022 * @author Brian Wing Shun Chan 023 * @see UserGroupLocalService 024 * @generated 025 */ 026 public class UserGroupLocalServiceWrapper implements UserGroupLocalService, 027 ServiceWrapper<UserGroupLocalService> { 028 public UserGroupLocalServiceWrapper( 029 UserGroupLocalService userGroupLocalService) { 030 _userGroupLocalService = userGroupLocalService; 031 } 032 033 /** 034 * Adds the user group to the database. Also notifies the appropriate model listeners. 035 * 036 * @param userGroup the user group 037 * @return the user group that was added 038 * @throws SystemException if a system exception occurred 039 */ 040 public com.liferay.portal.model.UserGroup addUserGroup( 041 com.liferay.portal.model.UserGroup userGroup) 042 throws com.liferay.portal.kernel.exception.SystemException { 043 return _userGroupLocalService.addUserGroup(userGroup); 044 } 045 046 /** 047 * Creates a new user group with the primary key. Does not add the user group to the database. 048 * 049 * @param userGroupId the primary key for the new user group 050 * @return the new user group 051 */ 052 public com.liferay.portal.model.UserGroup createUserGroup(long userGroupId) { 053 return _userGroupLocalService.createUserGroup(userGroupId); 054 } 055 056 /** 057 * Deletes the user group with the primary key from the database. Also notifies the appropriate model listeners. 058 * 059 * @param userGroupId the primary key of the user group 060 * @return the user group that was removed 061 * @throws PortalException if a user group with the primary key could not be found 062 * @throws SystemException if a system exception occurred 063 */ 064 public com.liferay.portal.model.UserGroup deleteUserGroup(long userGroupId) 065 throws com.liferay.portal.kernel.exception.PortalException, 066 com.liferay.portal.kernel.exception.SystemException { 067 return _userGroupLocalService.deleteUserGroup(userGroupId); 068 } 069 070 /** 071 * Deletes the user group from the database. Also notifies the appropriate model listeners. 072 * 073 * @param userGroup the user group 074 * @return the user group that was removed 075 * @throws PortalException 076 * @throws SystemException if a system exception occurred 077 */ 078 public com.liferay.portal.model.UserGroup deleteUserGroup( 079 com.liferay.portal.model.UserGroup userGroup) 080 throws com.liferay.portal.kernel.exception.PortalException, 081 com.liferay.portal.kernel.exception.SystemException { 082 return _userGroupLocalService.deleteUserGroup(userGroup); 083 } 084 085 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 086 return _userGroupLocalService.dynamicQuery(); 087 } 088 089 /** 090 * Performs a dynamic query on the database and returns the matching rows. 091 * 092 * @param dynamicQuery the dynamic query 093 * @return the matching rows 094 * @throws SystemException if a system exception occurred 095 */ 096 @SuppressWarnings("rawtypes") 097 public java.util.List dynamicQuery( 098 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 099 throws com.liferay.portal.kernel.exception.SystemException { 100 return _userGroupLocalService.dynamicQuery(dynamicQuery); 101 } 102 103 /** 104 * Performs a dynamic query on the database and returns a range of the matching rows. 105 * 106 * <p> 107 * 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. 108 * </p> 109 * 110 * @param dynamicQuery the dynamic query 111 * @param start the lower bound of the range of model instances 112 * @param end the upper bound of the range of model instances (not inclusive) 113 * @return the range of matching rows 114 * @throws SystemException if a system exception occurred 115 */ 116 @SuppressWarnings("rawtypes") 117 public java.util.List dynamicQuery( 118 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 119 int end) throws com.liferay.portal.kernel.exception.SystemException { 120 return _userGroupLocalService.dynamicQuery(dynamicQuery, start, end); 121 } 122 123 /** 124 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 125 * 126 * <p> 127 * 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. 128 * </p> 129 * 130 * @param dynamicQuery the dynamic query 131 * @param start the lower bound of the range of model instances 132 * @param end the upper bound of the range of model instances (not inclusive) 133 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 134 * @return the ordered range of matching rows 135 * @throws SystemException if a system exception occurred 136 */ 137 @SuppressWarnings("rawtypes") 138 public java.util.List dynamicQuery( 139 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 140 int end, 141 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 142 throws com.liferay.portal.kernel.exception.SystemException { 143 return _userGroupLocalService.dynamicQuery(dynamicQuery, start, end, 144 orderByComparator); 145 } 146 147 /** 148 * Returns the number of rows that match the dynamic query. 149 * 150 * @param dynamicQuery the dynamic query 151 * @return the number of rows that match the dynamic query 152 * @throws SystemException if a system exception occurred 153 */ 154 public long dynamicQueryCount( 155 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 156 throws com.liferay.portal.kernel.exception.SystemException { 157 return _userGroupLocalService.dynamicQueryCount(dynamicQuery); 158 } 159 160 public com.liferay.portal.model.UserGroup fetchUserGroup(long userGroupId) 161 throws com.liferay.portal.kernel.exception.SystemException { 162 return _userGroupLocalService.fetchUserGroup(userGroupId); 163 } 164 165 /** 166 * Returns the user group with the primary key. 167 * 168 * @param userGroupId the primary key of the user group 169 * @return the user group 170 * @throws PortalException if a user group with the primary key could not be found 171 * @throws SystemException if a system exception occurred 172 */ 173 public com.liferay.portal.model.UserGroup getUserGroup(long userGroupId) 174 throws com.liferay.portal.kernel.exception.PortalException, 175 com.liferay.portal.kernel.exception.SystemException { 176 return _userGroupLocalService.getUserGroup(userGroupId); 177 } 178 179 public com.liferay.portal.model.PersistedModel getPersistedModel( 180 java.io.Serializable primaryKeyObj) 181 throws com.liferay.portal.kernel.exception.PortalException, 182 com.liferay.portal.kernel.exception.SystemException { 183 return _userGroupLocalService.getPersistedModel(primaryKeyObj); 184 } 185 186 /** 187 * Returns a range of all the user groups. 188 * 189 * <p> 190 * 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. 191 * </p> 192 * 193 * @param start the lower bound of the range of user groups 194 * @param end the upper bound of the range of user groups (not inclusive) 195 * @return the range of user groups 196 * @throws SystemException if a system exception occurred 197 */ 198 public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups( 199 int start, int end) 200 throws com.liferay.portal.kernel.exception.SystemException { 201 return _userGroupLocalService.getUserGroups(start, end); 202 } 203 204 /** 205 * Returns the number of user groups. 206 * 207 * @return the number of user groups 208 * @throws SystemException if a system exception occurred 209 */ 210 public int getUserGroupsCount() 211 throws com.liferay.portal.kernel.exception.SystemException { 212 return _userGroupLocalService.getUserGroupsCount(); 213 } 214 215 /** 216 * Updates the user group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 217 * 218 * @param userGroup the user group 219 * @return the user group that was updated 220 * @throws SystemException if a system exception occurred 221 */ 222 public com.liferay.portal.model.UserGroup updateUserGroup( 223 com.liferay.portal.model.UserGroup userGroup) 224 throws com.liferay.portal.kernel.exception.SystemException { 225 return _userGroupLocalService.updateUserGroup(userGroup); 226 } 227 228 /** 229 * Updates the user group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 230 * 231 * @param userGroup the user group 232 * @param merge whether to merge the user group with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation. 233 * @return the user group that was updated 234 * @throws SystemException if a system exception occurred 235 */ 236 public com.liferay.portal.model.UserGroup updateUserGroup( 237 com.liferay.portal.model.UserGroup userGroup, boolean merge) 238 throws com.liferay.portal.kernel.exception.SystemException { 239 return _userGroupLocalService.updateUserGroup(userGroup, merge); 240 } 241 242 /** 243 * Returns the Spring bean ID for this bean. 244 * 245 * @return the Spring bean ID for this bean 246 */ 247 public java.lang.String getBeanIdentifier() { 248 return _userGroupLocalService.getBeanIdentifier(); 249 } 250 251 /** 252 * Sets the Spring bean ID for this bean. 253 * 254 * @param beanIdentifier the Spring bean ID for this bean 255 */ 256 public void setBeanIdentifier(java.lang.String beanIdentifier) { 257 _userGroupLocalService.setBeanIdentifier(beanIdentifier); 258 } 259 260 /** 261 * Adds the user groups to the group. 262 * 263 * @param groupId the primary key of the group 264 * @param userGroupIds the primary keys of the user groups 265 * @throws SystemException if a system exception occurred 266 */ 267 public void addGroupUserGroups(long groupId, long[] userGroupIds) 268 throws com.liferay.portal.kernel.exception.SystemException { 269 _userGroupLocalService.addGroupUserGroups(groupId, userGroupIds); 270 } 271 272 /** 273 * Adds the user groups to the team. 274 * 275 * @param teamId the primary key of the team 276 * @param userGroupIds the primary keys of the user groups 277 * @throws SystemException if a system exception occurred 278 */ 279 public void addTeamUserGroups(long teamId, long[] userGroupIds) 280 throws com.liferay.portal.kernel.exception.SystemException { 281 _userGroupLocalService.addTeamUserGroups(teamId, userGroupIds); 282 } 283 284 /** 285 * Adds a user group. 286 * 287 * <p> 288 * This method handles the creation and bookkeeping of the user group, 289 * including its resources, metadata, and internal data structures. It is 290 * not necessary to make subsequent calls to setup default groups and 291 * resources for the user group. 292 * </p> 293 * 294 * @param userId the primary key of the user 295 * @param companyId the primary key of the user group's company 296 * @param name the user group's name 297 * @param description the user group's description 298 * @return the user group 299 * @throws PortalException if the user group's information was invalid 300 * @throws SystemException if a system exception occurred 301 */ 302 public com.liferay.portal.model.UserGroup addUserGroup(long userId, 303 long companyId, java.lang.String name, java.lang.String description) 304 throws com.liferay.portal.kernel.exception.PortalException, 305 com.liferay.portal.kernel.exception.SystemException { 306 return _userGroupLocalService.addUserGroup(userId, companyId, name, 307 description); 308 } 309 310 /** 311 * Clears all associations between the user and its user groups and clears 312 * the permissions cache. 313 * 314 * <p> 315 * This method is called from {@link #deleteUserGroup(UserGroup)}. 316 * </p> 317 * 318 * @param userId the primary key of the user 319 * @throws SystemException if a system exception occurred 320 */ 321 public void clearUserUserGroups(long userId) 322 throws com.liferay.portal.kernel.exception.SystemException { 323 _userGroupLocalService.clearUserUserGroups(userId); 324 } 325 326 /** 327 * Copies the user group's layouts to the users who are not already members 328 * of the user group. 329 * 330 * @param userGroupId the primary key of the user group 331 * @param userIds the primary keys of the users 332 * @throws PortalException if any one of the users could not be found or 333 if a portal exception occurred 334 * @throws SystemException if a system exception occurred 335 * @deprecated 336 */ 337 public void copyUserGroupLayouts(long userGroupId, long[] userIds) 338 throws com.liferay.portal.kernel.exception.PortalException, 339 com.liferay.portal.kernel.exception.SystemException { 340 _userGroupLocalService.copyUserGroupLayouts(userGroupId, userIds); 341 } 342 343 /** 344 * Copies the user groups' layouts to the user. 345 * 346 * @param userGroupIds the primary keys of the user groups 347 * @param userId the primary key of the user 348 * @throws PortalException if a user with the primary key could not be 349 found or if a portal exception occurred 350 * @throws SystemException if a system exception occurred 351 * @deprecated 352 */ 353 public void copyUserGroupLayouts(long[] userGroupIds, long userId) 354 throws com.liferay.portal.kernel.exception.PortalException, 355 com.liferay.portal.kernel.exception.SystemException { 356 _userGroupLocalService.copyUserGroupLayouts(userGroupIds, userId); 357 } 358 359 /** 360 * Copies the user group's layout to the user. 361 * 362 * @param userGroupId the primary key of the user group 363 * @param userId the primary key of the user 364 * @throws PortalException if a user with the primary key could not be 365 found or if a portal exception occurred 366 * @throws SystemException if a system exception occurred 367 * @deprecated 368 */ 369 public void copyUserGroupLayouts(long userGroupId, long userId) 370 throws com.liferay.portal.kernel.exception.PortalException, 371 com.liferay.portal.kernel.exception.SystemException { 372 _userGroupLocalService.copyUserGroupLayouts(userGroupId, userId); 373 } 374 375 /** 376 * Returns the user group with the name. 377 * 378 * @param companyId the primary key of the user group's company 379 * @param name the user group's name 380 * @return Returns the user group with the name 381 * @throws PortalException if a user group with the name could not be found 382 * @throws SystemException if a system exception occurred 383 */ 384 public com.liferay.portal.model.UserGroup getUserGroup(long companyId, 385 java.lang.String name) 386 throws com.liferay.portal.kernel.exception.PortalException, 387 com.liferay.portal.kernel.exception.SystemException { 388 return _userGroupLocalService.getUserGroup(companyId, name); 389 } 390 391 /** 392 * Returns all the user groups belonging to the company. 393 * 394 * @param companyId the primary key of the user groups' company 395 * @return the user groups belonging to the company 396 * @throws SystemException if a system exception occurred 397 */ 398 public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups( 399 long companyId) 400 throws com.liferay.portal.kernel.exception.SystemException { 401 return _userGroupLocalService.getUserGroups(companyId); 402 } 403 404 /** 405 * Returns all the user groups with the primary keys. 406 * 407 * @param userGroupIds the primary keys of the user groups 408 * @return the user groups with the primary keys 409 * @throws PortalException if any one of the user groups could not be found 410 * @throws SystemException if a system exception occurred 411 */ 412 public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups( 413 long[] userGroupIds) 414 throws com.liferay.portal.kernel.exception.PortalException, 415 com.liferay.portal.kernel.exception.SystemException { 416 return _userGroupLocalService.getUserGroups(userGroupIds); 417 } 418 419 /** 420 * Returns all the user groups to which the user belongs. 421 * 422 * @param userId the primary key of the user 423 * @return the user groups to which the user belongs 424 * @throws SystemException if a system exception occurred 425 */ 426 public java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups( 427 long userId) throws com.liferay.portal.kernel.exception.SystemException { 428 return _userGroupLocalService.getUserUserGroups(userId); 429 } 430 431 /** 432 * Returns <code>true</code> if the user group is associated with the group. 433 * 434 * @param groupId the primary key of the group 435 * @param userGroupId the primary key of the user group 436 * @return <code>true</code> if the user group belongs to the group; 437 <code>false</code> otherwise 438 * @throws SystemException if a system exception occurred 439 */ 440 public boolean hasGroupUserGroup(long groupId, long userGroupId) 441 throws com.liferay.portal.kernel.exception.SystemException { 442 return _userGroupLocalService.hasGroupUserGroup(groupId, userGroupId); 443 } 444 445 /** 446 * Returns <code>true</code> if the user group belongs to the team. 447 * 448 * @param teamId the primary key of the team 449 * @param userGroupId the primary key of the user group 450 * @return <code>true</code> if the user group belongs to the team; 451 <code>false</code> otherwise 452 * @throws SystemException if a system exception occurred 453 */ 454 public boolean hasTeamUserGroup(long teamId, long userGroupId) 455 throws com.liferay.portal.kernel.exception.SystemException { 456 return _userGroupLocalService.hasTeamUserGroup(teamId, userGroupId); 457 } 458 459 public java.util.List<com.liferay.portal.model.UserGroup> search( 460 long companyId, java.lang.String keywords, 461 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 462 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc) 463 throws com.liferay.portal.kernel.exception.SystemException { 464 return _userGroupLocalService.search(companyId, keywords, params, 465 start, end, obc); 466 } 467 468 /** 469 * Returns an ordered range of all the user groups that match the name and 470 * description. 471 * 472 * <p> 473 * Useful when paginating results. Returns a maximum of <code>end - 474 * start</code> instances. <code>start</code> and <code>end</code> are not 475 * primary keys, they are indexes in the result set. Thus, <code>0</code> 476 * refers to the first result in the set. Setting both <code>start</code> 477 * and <code>end</code> to {@link 478 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 479 * result set. 480 * </p> 481 * 482 * @param companyId the primary key of the user group's company 483 * @param name the user group's name (optionally <code>null</code>) 484 * @param description the user group's description (optionally 485 <code>null</code>) 486 * @param params the finder params (optionally <code>null</code>). For more 487 information see {@link 488 com.liferay.portal.service.persistence.UserGroupFinder} 489 * @param start the lower bound of the range of user groups to return 490 * @param end the upper bound of the range of user groups to return (not 491 inclusive) 492 * @param obc the comparator to order the user groups (optionally 493 <code>null</code>) 494 * @return the matching user groups ordered by comparator <code>obc</code> 495 * @throws SystemException if a system exception occurred 496 * @see com.liferay.portal.service.persistence.UserGroupFinder 497 */ 498 public java.util.List<com.liferay.portal.model.UserGroup> search( 499 long companyId, java.lang.String name, java.lang.String description, 500 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 501 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc) 502 throws com.liferay.portal.kernel.exception.SystemException { 503 return _userGroupLocalService.search(companyId, name, description, 504 params, start, end, obc); 505 } 506 507 public int searchCount(long companyId, java.lang.String keywords, 508 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) 509 throws com.liferay.portal.kernel.exception.SystemException { 510 return _userGroupLocalService.searchCount(companyId, keywords, params); 511 } 512 513 /** 514 * Returns the number of user groups that match the name and description. 515 * 516 * @param companyId the primary key of the user group's company 517 * @param name the user group's name (optionally <code>null</code>) 518 * @param description the user group's description (optionally 519 <code>null</code>) 520 * @param params the finder params (optionally <code>null</code>). For more 521 information see {@link 522 com.liferay.portal.service.persistence.UserGroupFinder} 523 * @return the number of matching user groups 524 * @throws SystemException if a system exception occurred 525 * @see com.liferay.portal.service.persistence.UserGroupFinder 526 */ 527 public int searchCount(long companyId, java.lang.String name, 528 java.lang.String description, 529 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) 530 throws com.liferay.portal.kernel.exception.SystemException { 531 return _userGroupLocalService.searchCount(companyId, name, description, 532 params); 533 } 534 535 /** 536 * Sets the user groups associated with the user copying the user group 537 * layouts and removing and adding user group associations for the user as 538 * necessary. 539 * 540 * @param userId the primary key of the user 541 * @param userGroupIds the primary keys of the user groups 542 * @throws PortalException if a portal exception occurred 543 * @throws SystemException if a system exception occurred 544 */ 545 public void setUserUserGroups(long userId, long[] userGroupIds) 546 throws com.liferay.portal.kernel.exception.PortalException, 547 com.liferay.portal.kernel.exception.SystemException { 548 _userGroupLocalService.setUserUserGroups(userId, userGroupIds); 549 } 550 551 /** 552 * Removes the user groups from the group. 553 * 554 * @param groupId the primary key of the group 555 * @param userGroupIds the primary keys of the user groups 556 * @throws SystemException if a system exception occurred 557 */ 558 public void unsetGroupUserGroups(long groupId, long[] userGroupIds) 559 throws com.liferay.portal.kernel.exception.SystemException { 560 _userGroupLocalService.unsetGroupUserGroups(groupId, userGroupIds); 561 } 562 563 /** 564 * Removes the user groups from the team. 565 * 566 * @param teamId the primary key of the team 567 * @param userGroupIds the primary keys of the user groups 568 * @throws SystemException if a system exception occurred 569 */ 570 public void unsetTeamUserGroups(long teamId, long[] userGroupIds) 571 throws com.liferay.portal.kernel.exception.SystemException { 572 _userGroupLocalService.unsetTeamUserGroups(teamId, userGroupIds); 573 } 574 575 /** 576 * Updates the user group. 577 * 578 * @param companyId the primary key of the user group's company 579 * @param userGroupId the primary key of the user group 580 * @param name the user group's name 581 * @param description the user group's description 582 * @return the user group 583 * @throws PortalException if a user group with the primary key could not be 584 found or if the new information was invalid 585 * @throws SystemException if a system exception occurred 586 */ 587 public com.liferay.portal.model.UserGroup updateUserGroup(long companyId, 588 long userGroupId, java.lang.String name, java.lang.String description) 589 throws com.liferay.portal.kernel.exception.PortalException, 590 com.liferay.portal.kernel.exception.SystemException { 591 return _userGroupLocalService.updateUserGroup(companyId, userGroupId, 592 name, description); 593 } 594 595 /** 596 * @deprecated Renamed to {@link #getWrappedService} 597 */ 598 public UserGroupLocalService getWrappedUserGroupLocalService() { 599 return _userGroupLocalService; 600 } 601 602 /** 603 * @deprecated Renamed to {@link #setWrappedService} 604 */ 605 public void setWrappedUserGroupLocalService( 606 UserGroupLocalService userGroupLocalService) { 607 _userGroupLocalService = userGroupLocalService; 608 } 609 610 public UserGroupLocalService getWrappedService() { 611 return _userGroupLocalService; 612 } 613 614 public void setWrappedService(UserGroupLocalService userGroupLocalService) { 615 _userGroupLocalService = userGroupLocalService; 616 } 617 618 private UserGroupLocalService _userGroupLocalService; 619 }