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