001 /** 002 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.service; 016 017 import com.liferay.portal.kernel.exception.PortalException; 018 import com.liferay.portal.kernel.exception.SystemException; 019 import com.liferay.portal.kernel.transaction.Isolation; 020 import com.liferay.portal.kernel.transaction.Propagation; 021 import com.liferay.portal.kernel.transaction.Transactional; 022 023 /** 024 * The interface for the user group local service. 025 * 026 * <p> 027 * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM. 028 * </p> 029 * 030 * @author Brian Wing Shun Chan 031 * @see UserGroupLocalServiceUtil 032 * @see com.liferay.portal.service.base.UserGroupLocalServiceBaseImpl 033 * @see com.liferay.portal.service.impl.UserGroupLocalServiceImpl 034 * @generated 035 */ 036 @Transactional(isolation = Isolation.PORTAL, rollbackFor = { 037 PortalException.class, SystemException.class}) 038 public interface UserGroupLocalService extends BaseLocalService, 039 PersistedModelLocalService { 040 /* 041 * NOTE FOR DEVELOPERS: 042 * 043 * Never modify or reference this interface directly. Always use {@link UserGroupLocalServiceUtil} to access the user group local service. Add custom service methods to {@link com.liferay.portal.service.impl.UserGroupLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. 044 */ 045 046 /** 047 * Adds the user group to the database. Also notifies the appropriate model listeners. 048 * 049 * @param userGroup the user group 050 * @return the user group that was added 051 * @throws SystemException if a system exception occurred 052 */ 053 public com.liferay.portal.model.UserGroup addUserGroup( 054 com.liferay.portal.model.UserGroup userGroup) 055 throws com.liferay.portal.kernel.exception.SystemException; 056 057 /** 058 * Creates a new user group with the primary key. Does not add the user group to the database. 059 * 060 * @param userGroupId the primary key for the new user group 061 * @return the new user group 062 */ 063 public com.liferay.portal.model.UserGroup createUserGroup(long userGroupId); 064 065 /** 066 * Deletes the user group with the primary key from the database. Also notifies the appropriate model listeners. 067 * 068 * @param userGroupId the primary key of the user group 069 * @return the user group that was removed 070 * @throws PortalException if a user group with the primary key could not be found 071 * @throws SystemException if a system exception occurred 072 */ 073 public com.liferay.portal.model.UserGroup deleteUserGroup(long userGroupId) 074 throws com.liferay.portal.kernel.exception.PortalException, 075 com.liferay.portal.kernel.exception.SystemException; 076 077 /** 078 * Deletes the user group from the database. Also notifies the appropriate model listeners. 079 * 080 * @param userGroup the user group 081 * @return the user group that was removed 082 * @throws PortalException 083 * @throws SystemException if a system exception occurred 084 */ 085 public com.liferay.portal.model.UserGroup deleteUserGroup( 086 com.liferay.portal.model.UserGroup userGroup) 087 throws com.liferay.portal.kernel.exception.PortalException, 088 com.liferay.portal.kernel.exception.SystemException; 089 090 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery(); 091 092 /** 093 * Performs a dynamic query on the database and returns the matching rows. 094 * 095 * @param dynamicQuery the dynamic query 096 * @return the matching rows 097 * @throws SystemException if a system exception occurred 098 */ 099 @SuppressWarnings("rawtypes") 100 public java.util.List dynamicQuery( 101 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 102 throws com.liferay.portal.kernel.exception.SystemException; 103 104 /** 105 * Performs a dynamic query on the database and returns a range of the matching rows. 106 * 107 * <p> 108 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 109 * </p> 110 * 111 * @param dynamicQuery the dynamic query 112 * @param start the lower bound of the range of model instances 113 * @param end the upper bound of the range of model instances (not inclusive) 114 * @return the range of matching rows 115 * @throws SystemException if a system exception occurred 116 */ 117 @SuppressWarnings("rawtypes") 118 public java.util.List dynamicQuery( 119 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 120 int end) throws com.liferay.portal.kernel.exception.SystemException; 121 122 /** 123 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 124 * 125 * <p> 126 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 127 * </p> 128 * 129 * @param dynamicQuery the dynamic query 130 * @param start the lower bound of the range of model instances 131 * @param end the upper bound of the range of model instances (not inclusive) 132 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 133 * @return the ordered range of matching rows 134 * @throws SystemException if a system exception occurred 135 */ 136 @SuppressWarnings("rawtypes") 137 public java.util.List dynamicQuery( 138 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 139 int end, 140 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 141 throws com.liferay.portal.kernel.exception.SystemException; 142 143 /** 144 * Returns the number of rows that match the dynamic query. 145 * 146 * @param dynamicQuery the dynamic query 147 * @return the number of rows that match the dynamic query 148 * @throws SystemException if a system exception occurred 149 */ 150 public long dynamicQueryCount( 151 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 152 throws com.liferay.portal.kernel.exception.SystemException; 153 154 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 155 public com.liferay.portal.model.UserGroup fetchUserGroup(long userGroupId) 156 throws com.liferay.portal.kernel.exception.SystemException; 157 158 /** 159 * Returns the user group with the primary key. 160 * 161 * @param userGroupId the primary key of the user group 162 * @return the user group 163 * @throws PortalException if a user group with the primary key could not be found 164 * @throws SystemException if a system exception occurred 165 */ 166 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 167 public com.liferay.portal.model.UserGroup getUserGroup(long userGroupId) 168 throws com.liferay.portal.kernel.exception.PortalException, 169 com.liferay.portal.kernel.exception.SystemException; 170 171 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 172 public com.liferay.portal.model.PersistedModel getPersistedModel( 173 java.io.Serializable primaryKeyObj) 174 throws com.liferay.portal.kernel.exception.PortalException, 175 com.liferay.portal.kernel.exception.SystemException; 176 177 /** 178 * Returns a range of all the user groups. 179 * 180 * <p> 181 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 182 * </p> 183 * 184 * @param start the lower bound of the range of user groups 185 * @param end the upper bound of the range of user groups (not inclusive) 186 * @return the range of user groups 187 * @throws SystemException if a system exception occurred 188 */ 189 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 190 public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups( 191 int start, int end) 192 throws com.liferay.portal.kernel.exception.SystemException; 193 194 /** 195 * Returns the number of user groups. 196 * 197 * @return the number of user groups 198 * @throws SystemException if a system exception occurred 199 */ 200 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 201 public int getUserGroupsCount() 202 throws com.liferay.portal.kernel.exception.SystemException; 203 204 /** 205 * Updates the user group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 206 * 207 * @param userGroup the user group 208 * @return the user group that was updated 209 * @throws SystemException if a system exception occurred 210 */ 211 public com.liferay.portal.model.UserGroup updateUserGroup( 212 com.liferay.portal.model.UserGroup userGroup) 213 throws com.liferay.portal.kernel.exception.SystemException; 214 215 /** 216 * @throws SystemException if a system exception occurred 217 */ 218 public void addGroupUserGroup(long groupId, long userGroupId) 219 throws com.liferay.portal.kernel.exception.SystemException; 220 221 /** 222 * @throws SystemException if a system exception occurred 223 */ 224 public void addGroupUserGroup(long groupId, 225 com.liferay.portal.model.UserGroup userGroup) 226 throws com.liferay.portal.kernel.exception.SystemException; 227 228 /** 229 * @throws SystemException if a system exception occurred 230 */ 231 public void addGroupUserGroups(long groupId, long[] userGroupIds) 232 throws com.liferay.portal.kernel.exception.SystemException; 233 234 /** 235 * @throws SystemException if a system exception occurred 236 */ 237 public void addGroupUserGroups(long groupId, 238 java.util.List<com.liferay.portal.model.UserGroup> UserGroups) 239 throws com.liferay.portal.kernel.exception.SystemException; 240 241 /** 242 * @throws SystemException if a system exception occurred 243 */ 244 public void clearGroupUserGroups(long groupId) 245 throws com.liferay.portal.kernel.exception.SystemException; 246 247 /** 248 * @throws SystemException if a system exception occurred 249 */ 250 public void deleteGroupUserGroup(long groupId, long userGroupId) 251 throws com.liferay.portal.kernel.exception.SystemException; 252 253 /** 254 * @throws SystemException if a system exception occurred 255 */ 256 public void deleteGroupUserGroup(long groupId, 257 com.liferay.portal.model.UserGroup userGroup) 258 throws com.liferay.portal.kernel.exception.SystemException; 259 260 /** 261 * @throws SystemException if a system exception occurred 262 */ 263 public void deleteGroupUserGroups(long groupId, long[] userGroupIds) 264 throws com.liferay.portal.kernel.exception.SystemException; 265 266 /** 267 * @throws SystemException if a system exception occurred 268 */ 269 public void deleteGroupUserGroups(long groupId, 270 java.util.List<com.liferay.portal.model.UserGroup> UserGroups) 271 throws com.liferay.portal.kernel.exception.SystemException; 272 273 /** 274 * @throws SystemException if a system exception occurred 275 */ 276 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 277 public java.util.List<com.liferay.portal.model.UserGroup> getGroupUserGroups( 278 long groupId) 279 throws com.liferay.portal.kernel.exception.SystemException; 280 281 /** 282 * @throws SystemException if a system exception occurred 283 */ 284 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 285 public java.util.List<com.liferay.portal.model.UserGroup> getGroupUserGroups( 286 long groupId, int start, int end) 287 throws com.liferay.portal.kernel.exception.SystemException; 288 289 /** 290 * @throws SystemException if a system exception occurred 291 */ 292 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 293 public java.util.List<com.liferay.portal.model.UserGroup> getGroupUserGroups( 294 long groupId, int start, int end, 295 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 296 throws com.liferay.portal.kernel.exception.SystemException; 297 298 /** 299 * @throws SystemException if a system exception occurred 300 */ 301 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 302 public int getGroupUserGroupsCount(long groupId) 303 throws com.liferay.portal.kernel.exception.SystemException; 304 305 /** 306 * @throws SystemException if a system exception occurred 307 */ 308 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 309 public boolean hasGroupUserGroup(long groupId, long userGroupId) 310 throws com.liferay.portal.kernel.exception.SystemException; 311 312 /** 313 * @throws SystemException if a system exception occurred 314 */ 315 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 316 public boolean hasGroupUserGroups(long groupId) 317 throws com.liferay.portal.kernel.exception.SystemException; 318 319 /** 320 * @throws SystemException if a system exception occurred 321 */ 322 public void setGroupUserGroups(long groupId, long[] userGroupIds) 323 throws com.liferay.portal.kernel.exception.SystemException; 324 325 /** 326 * @throws SystemException if a system exception occurred 327 */ 328 public void addTeamUserGroup(long teamId, long userGroupId) 329 throws com.liferay.portal.kernel.exception.SystemException; 330 331 /** 332 * @throws SystemException if a system exception occurred 333 */ 334 public void addTeamUserGroup(long teamId, 335 com.liferay.portal.model.UserGroup userGroup) 336 throws com.liferay.portal.kernel.exception.SystemException; 337 338 /** 339 * @throws SystemException if a system exception occurred 340 */ 341 public void addTeamUserGroups(long teamId, long[] userGroupIds) 342 throws com.liferay.portal.kernel.exception.SystemException; 343 344 /** 345 * @throws SystemException if a system exception occurred 346 */ 347 public void addTeamUserGroups(long teamId, 348 java.util.List<com.liferay.portal.model.UserGroup> UserGroups) 349 throws com.liferay.portal.kernel.exception.SystemException; 350 351 /** 352 * @throws SystemException if a system exception occurred 353 */ 354 public void clearTeamUserGroups(long teamId) 355 throws com.liferay.portal.kernel.exception.SystemException; 356 357 /** 358 * @throws SystemException if a system exception occurred 359 */ 360 public void deleteTeamUserGroup(long teamId, long userGroupId) 361 throws com.liferay.portal.kernel.exception.SystemException; 362 363 /** 364 * @throws SystemException if a system exception occurred 365 */ 366 public void deleteTeamUserGroup(long teamId, 367 com.liferay.portal.model.UserGroup userGroup) 368 throws com.liferay.portal.kernel.exception.SystemException; 369 370 /** 371 * @throws SystemException if a system exception occurred 372 */ 373 public void deleteTeamUserGroups(long teamId, long[] userGroupIds) 374 throws com.liferay.portal.kernel.exception.SystemException; 375 376 /** 377 * @throws SystemException if a system exception occurred 378 */ 379 public void deleteTeamUserGroups(long teamId, 380 java.util.List<com.liferay.portal.model.UserGroup> UserGroups) 381 throws com.liferay.portal.kernel.exception.SystemException; 382 383 /** 384 * @throws SystemException if a system exception occurred 385 */ 386 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 387 public java.util.List<com.liferay.portal.model.UserGroup> getTeamUserGroups( 388 long teamId) throws com.liferay.portal.kernel.exception.SystemException; 389 390 /** 391 * @throws SystemException if a system exception occurred 392 */ 393 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 394 public java.util.List<com.liferay.portal.model.UserGroup> getTeamUserGroups( 395 long teamId, int start, int end) 396 throws com.liferay.portal.kernel.exception.SystemException; 397 398 /** 399 * @throws SystemException if a system exception occurred 400 */ 401 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 402 public java.util.List<com.liferay.portal.model.UserGroup> getTeamUserGroups( 403 long teamId, int start, int end, 404 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 405 throws com.liferay.portal.kernel.exception.SystemException; 406 407 /** 408 * @throws SystemException if a system exception occurred 409 */ 410 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 411 public int getTeamUserGroupsCount(long teamId) 412 throws com.liferay.portal.kernel.exception.SystemException; 413 414 /** 415 * @throws SystemException if a system exception occurred 416 */ 417 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 418 public boolean hasTeamUserGroup(long teamId, long userGroupId) 419 throws com.liferay.portal.kernel.exception.SystemException; 420 421 /** 422 * @throws SystemException if a system exception occurred 423 */ 424 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 425 public boolean hasTeamUserGroups(long teamId) 426 throws com.liferay.portal.kernel.exception.SystemException; 427 428 /** 429 * @throws SystemException if a system exception occurred 430 */ 431 public void setTeamUserGroups(long teamId, long[] userGroupIds) 432 throws com.liferay.portal.kernel.exception.SystemException; 433 434 /** 435 * @throws SystemException if a system exception occurred 436 */ 437 public void addUserUserGroup(long userId, long userGroupId) 438 throws com.liferay.portal.kernel.exception.SystemException; 439 440 /** 441 * @throws SystemException if a system exception occurred 442 */ 443 public void addUserUserGroup(long userId, 444 com.liferay.portal.model.UserGroup userGroup) 445 throws com.liferay.portal.kernel.exception.SystemException; 446 447 /** 448 * @throws SystemException if a system exception occurred 449 */ 450 public void addUserUserGroups(long userId, long[] userGroupIds) 451 throws com.liferay.portal.kernel.exception.SystemException; 452 453 /** 454 * @throws SystemException if a system exception occurred 455 */ 456 public void addUserUserGroups(long userId, 457 java.util.List<com.liferay.portal.model.UserGroup> UserGroups) 458 throws com.liferay.portal.kernel.exception.SystemException; 459 460 /** 461 * @throws SystemException if a system exception occurred 462 */ 463 public void clearUserUserGroups(long userId) 464 throws com.liferay.portal.kernel.exception.SystemException; 465 466 /** 467 * @throws SystemException if a system exception occurred 468 */ 469 public void deleteUserUserGroup(long userId, long userGroupId) 470 throws com.liferay.portal.kernel.exception.SystemException; 471 472 /** 473 * @throws SystemException if a system exception occurred 474 */ 475 public void deleteUserUserGroup(long userId, 476 com.liferay.portal.model.UserGroup userGroup) 477 throws com.liferay.portal.kernel.exception.SystemException; 478 479 /** 480 * @throws SystemException if a system exception occurred 481 */ 482 public void deleteUserUserGroups(long userId, long[] userGroupIds) 483 throws com.liferay.portal.kernel.exception.SystemException; 484 485 /** 486 * @throws SystemException if a system exception occurred 487 */ 488 public void deleteUserUserGroups(long userId, 489 java.util.List<com.liferay.portal.model.UserGroup> UserGroups) 490 throws com.liferay.portal.kernel.exception.SystemException; 491 492 /** 493 * @throws SystemException if a system exception occurred 494 */ 495 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 496 public java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups( 497 long userId) throws com.liferay.portal.kernel.exception.SystemException; 498 499 /** 500 * @throws SystemException if a system exception occurred 501 */ 502 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 503 public java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups( 504 long userId, int start, int end) 505 throws com.liferay.portal.kernel.exception.SystemException; 506 507 /** 508 * @throws SystemException if a system exception occurred 509 */ 510 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 511 public java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups( 512 long userId, int start, int end, 513 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 514 throws com.liferay.portal.kernel.exception.SystemException; 515 516 /** 517 * @throws SystemException if a system exception occurred 518 */ 519 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 520 public int getUserUserGroupsCount(long userId) 521 throws com.liferay.portal.kernel.exception.SystemException; 522 523 /** 524 * @throws SystemException if a system exception occurred 525 */ 526 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 527 public boolean hasUserUserGroup(long userId, long userGroupId) 528 throws com.liferay.portal.kernel.exception.SystemException; 529 530 /** 531 * @throws SystemException if a system exception occurred 532 */ 533 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 534 public boolean hasUserUserGroups(long userId) 535 throws com.liferay.portal.kernel.exception.SystemException; 536 537 /** 538 * @throws PortalException 539 * @throws SystemException if a system exception occurred 540 */ 541 public void setUserUserGroups(long userId, long[] userGroupIds) 542 throws com.liferay.portal.kernel.exception.PortalException, 543 com.liferay.portal.kernel.exception.SystemException; 544 545 /** 546 * Returns the Spring bean ID for this bean. 547 * 548 * @return the Spring bean ID for this bean 549 */ 550 public java.lang.String getBeanIdentifier(); 551 552 /** 553 * Sets the Spring bean ID for this bean. 554 * 555 * @param beanIdentifier the Spring bean ID for this bean 556 */ 557 public void setBeanIdentifier(java.lang.String beanIdentifier); 558 559 /** 560 * Adds a user group. 561 * 562 * <p> 563 * This method handles the creation and bookkeeping of the user group, 564 * including its resources, metadata, and internal data structures. It is 565 * not necessary to make subsequent calls to setup default groups and 566 * resources for the user group. 567 * </p> 568 * 569 * @param userId the primary key of the user 570 * @param companyId the primary key of the user group's company 571 * @param name the user group's name 572 * @param description the user group's description 573 * @return the user group 574 * @throws PortalException if the user group's information was invalid 575 * @throws SystemException if a system exception occurred 576 * @deprecated As of 6.2.0, replaced by {@link #addUserGroup(long, long, 577 String, String, ServiceContext)} 578 */ 579 public com.liferay.portal.model.UserGroup addUserGroup(long userId, 580 long companyId, java.lang.String name, java.lang.String description) 581 throws com.liferay.portal.kernel.exception.PortalException, 582 com.liferay.portal.kernel.exception.SystemException; 583 584 /** 585 * Adds a user group. 586 * 587 * <p> 588 * This method handles the creation and bookkeeping of the user group, 589 * including its resources, metadata, and internal data structures. It is 590 * not necessary to make subsequent calls to setup default groups and 591 * resources for the user group. 592 * </p> 593 * 594 * @param userId the primary key of the user 595 * @param companyId the primary key of the user group's company 596 * @param name the user group's name 597 * @param description the user group's description 598 * @param serviceContext the service context to be applied (optionally 599 <code>null</code>). Can set expando bridge attributes for the 600 user group. 601 * @return the user group 602 * @throws PortalException if the user group's information was invalid 603 * @throws SystemException if a system exception occurred 604 */ 605 public com.liferay.portal.model.UserGroup addUserGroup(long userId, 606 long companyId, java.lang.String name, java.lang.String description, 607 com.liferay.portal.service.ServiceContext serviceContext) 608 throws com.liferay.portal.kernel.exception.PortalException, 609 com.liferay.portal.kernel.exception.SystemException; 610 611 /** 612 * Copies the user group's layout to the user. 613 * 614 * @param userGroupId the primary key of the user group 615 * @param userId the primary key of the user 616 * @throws PortalException if a user with the primary key could not be 617 found or if a portal exception occurred 618 * @throws SystemException if a system exception occurred 619 * @deprecated As of 6.2.0 620 */ 621 public void copyUserGroupLayouts(long userGroupId, long userId) 622 throws com.liferay.portal.kernel.exception.PortalException, 623 com.liferay.portal.kernel.exception.SystemException; 624 625 /** 626 * Copies the user group's layouts to the users who are not already members 627 * of the user group. 628 * 629 * @param userGroupId the primary key of the user group 630 * @param userIds the primary keys of the users 631 * @throws PortalException if any one of the users could not be found or 632 if a portal exception occurred 633 * @throws SystemException if a system exception occurred 634 * @deprecated As of 6.1.0 635 */ 636 public void copyUserGroupLayouts(long userGroupId, long[] userIds) 637 throws com.liferay.portal.kernel.exception.PortalException, 638 com.liferay.portal.kernel.exception.SystemException; 639 640 /** 641 * Copies the user groups' layouts to the user. 642 * 643 * @param userGroupIds the primary keys of the user groups 644 * @param userId the primary key of the user 645 * @throws PortalException if a user with the primary key could not be 646 found or if a portal exception occurred 647 * @throws SystemException if a system exception occurred 648 * @deprecated As of 6.1.0 649 */ 650 public void copyUserGroupLayouts(long[] userGroupIds, long userId) 651 throws com.liferay.portal.kernel.exception.PortalException, 652 com.liferay.portal.kernel.exception.SystemException; 653 654 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 655 public com.liferay.portal.model.UserGroup fetchUserGroup(long companyId, 656 java.lang.String name) 657 throws com.liferay.portal.kernel.exception.SystemException; 658 659 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 660 public com.liferay.portal.model.UserGroup fetchUserGroupByUuidAndCompanyId( 661 java.lang.String uuid, long companyId) 662 throws com.liferay.portal.kernel.exception.SystemException; 663 664 /** 665 * Returns the user group with the name. 666 * 667 * @param companyId the primary key of the user group's company 668 * @param name the user group's name 669 * @return Returns the user group with the name 670 * @throws PortalException if a user group with the name could not be found 671 * @throws SystemException if a system exception occurred 672 */ 673 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 674 public com.liferay.portal.model.UserGroup getUserGroup(long companyId, 675 java.lang.String name) 676 throws com.liferay.portal.kernel.exception.PortalException, 677 com.liferay.portal.kernel.exception.SystemException; 678 679 /** 680 * Returns all the user groups belonging to the company. 681 * 682 * @param companyId the primary key of the user groups' company 683 * @return the user groups belonging to the company 684 * @throws SystemException if a system exception occurred 685 */ 686 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 687 public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups( 688 long companyId) 689 throws com.liferay.portal.kernel.exception.SystemException; 690 691 /** 692 * Returns all the user groups with the primary keys. 693 * 694 * @param userGroupIds the primary keys of the user groups 695 * @return the user groups with the primary keys 696 * @throws PortalException if any one of the user groups could not be found 697 * @throws SystemException if a system exception occurred 698 */ 699 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 700 public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups( 701 long[] userGroupIds) 702 throws com.liferay.portal.kernel.exception.PortalException, 703 com.liferay.portal.kernel.exception.SystemException; 704 705 /** 706 * Returns an ordered range of all the user groups that match the keywords. 707 * 708 * <p> 709 * Useful when paginating results. Returns a maximum of <code>end - 710 * start</code> instances. <code>start</code> and <code>end</code> are not 711 * primary keys, they are indexes in the result set. Thus, <code>0</code> 712 * refers to the first result in the set. Setting both <code>start</code> 713 * and <code>end</code> to {@link 714 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 715 * result set. 716 * </p> 717 * 718 * @param companyId the primary key of the user group's company 719 * @param keywords the keywords (space separated), which may occur in the 720 user group's name or description (optionally <code>null</code>) 721 * @param params the finder params (optionally <code>null</code>). For more 722 information see {@link 723 com.liferay.portal.service.persistence.UserGroupFinder} 724 * @param start the lower bound of the range of user groups to return 725 * @param end the upper bound of the range of user groups to return (not 726 inclusive) 727 * @param obc the comparator to order the user groups (optionally 728 <code>null</code>) 729 * @return the matching user groups ordered by comparator <code>obc</code> 730 * @throws SystemException if a system exception occurred 731 * @see com.liferay.portal.service.persistence.UserGroupFinder 732 */ 733 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 734 public java.util.List<com.liferay.portal.model.UserGroup> search( 735 long companyId, java.lang.String keywords, 736 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 737 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc) 738 throws com.liferay.portal.kernel.exception.SystemException; 739 740 /** 741 * Returns an ordered range of all the user groups that match the keywords, 742 * using the indexer. It is preferable to use this method instead of the 743 * non-indexed version whenever possible for performance reasons. 744 * 745 * <p> 746 * Useful when paginating results. Returns a maximum of <code>end - 747 * start</code> instances. <code>start</code> and <code>end</code> are not 748 * primary keys, they are indexes in the result set. Thus, <code>0</code> 749 * refers to the first result in the set. Setting both <code>start</code> 750 * and <code>end</code> to {@link 751 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 752 * result set. 753 * </p> 754 * 755 * @param companyId the primary key of the user group's company 756 * @param keywords the keywords (space separated), which may occur in the 757 user group's name or description (optionally <code>null</code>) 758 * @param params the finder params (optionally <code>null</code>). For more 759 information see {@link 760 com.liferay.portlet.usergroupsadmin.util.UserGroupIndexer} 761 * @param start the lower bound of the range of user groups to return 762 * @param end the upper bound of the range of user groups to return (not 763 inclusive) 764 * @param sort the field and direction by which to sort (optionally 765 <code>null</code>) 766 * @return the matching user groups ordered by sort 767 * @throws SystemException if a system exception occurred 768 * @see com.liferay.portlet.usergroupsadmin.util.UserGroupIndexer 769 */ 770 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 771 public com.liferay.portal.kernel.search.Hits search(long companyId, 772 java.lang.String keywords, 773 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 774 int start, int end, com.liferay.portal.kernel.search.Sort sort) 775 throws com.liferay.portal.kernel.exception.SystemException; 776 777 /** 778 * Returns an ordered range of all the user groups that match the name and 779 * description. It is preferable to use this method instead of the 780 * non-indexed version whenever possible for performance reasons. 781 * 782 * <p> 783 * Useful when paginating results. Returns a maximum of <code>end - 784 * start</code> instances. <code>start</code> and <code>end</code> are not 785 * primary keys, they are indexes in the result set. Thus, <code>0</code> 786 * refers to the first result in the set. Setting both <code>start</code> 787 * and <code>end</code> to {@link 788 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 789 * result set. 790 * </p> 791 * 792 * @param companyId the primary key of the user group's company 793 * @param name the user group's name (optionally <code>null</code>) 794 * @param description the user group's description (optionally 795 <code>null</code>) 796 * @param params the finder params (optionally <code>null</code>). For more 797 information see {@link 798 com.liferay.portlet.usergroupsadmin.util.UserGroupIndexer} 799 * @param andSearch whether every field must match its keywords or just one 800 field 801 * @param start the lower bound of the range of user groups to return 802 * @param end the upper bound of the range of user groups to return (not 803 inclusive) 804 * @param sort the field and direction by which to sort (optionally 805 <code>null</code>) 806 * @return the matching user groups ordered by sort 807 * @throws SystemException if a system exception occurred 808 * @see com.liferay.portal.service.persistence.UserGroupFinder 809 */ 810 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 811 public com.liferay.portal.kernel.search.Hits search(long companyId, 812 java.lang.String name, java.lang.String description, 813 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 814 boolean andSearch, int start, int end, 815 com.liferay.portal.kernel.search.Sort sort) 816 throws com.liferay.portal.kernel.exception.SystemException; 817 818 /** 819 * Returns the number of user groups that match the keywords 820 * 821 * @param companyId the primary key of the user group's company 822 * @param keywords the keywords (space separated), which may occur in the 823 user group's name or description (optionally <code>null</code>) 824 * @param params the finder params (optionally <code>null</code>). For more 825 information see {@link 826 com.liferay.portal.service.persistence.UserGroupFinder} 827 * @return the number of matching user groups 828 * @throws SystemException if a system exception occurred 829 * @see com.liferay.portal.service.persistence.UserGroupFinder 830 */ 831 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 832 public int searchCount(long companyId, java.lang.String keywords, 833 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) 834 throws com.liferay.portal.kernel.exception.SystemException; 835 836 /** 837 * Removes the user groups from the group. 838 * 839 * @param groupId the primary key of the group 840 * @param userGroupIds the primary keys of the user groups 841 * @throws SystemException if a system exception occurred 842 */ 843 public void unsetGroupUserGroups(long groupId, long[] userGroupIds) 844 throws com.liferay.portal.kernel.exception.SystemException; 845 846 /** 847 * Removes the user groups from the team. 848 * 849 * @param teamId the primary key of the team 850 * @param userGroupIds the primary keys of the user groups 851 * @throws SystemException if a system exception occurred 852 */ 853 public void unsetTeamUserGroups(long teamId, long[] userGroupIds) 854 throws com.liferay.portal.kernel.exception.SystemException; 855 856 /** 857 * Updates the user group. 858 * 859 * @param companyId the primary key of the user group's company 860 * @param userGroupId the primary key of the user group 861 * @param name the user group's name 862 * @param description the user group's description 863 * @return the user group 864 * @throws PortalException if a user group with the primary key could 865 not be found or if the new information was invalid 866 * @throws SystemException if a system exception occurred 867 * @deprecated As of 6.2.0, replaced by {@link #updateUserGroup(long, long, 868 String, String, ServiceContext)} 869 */ 870 public com.liferay.portal.model.UserGroup updateUserGroup(long companyId, 871 long userGroupId, java.lang.String name, java.lang.String description) 872 throws com.liferay.portal.kernel.exception.PortalException, 873 com.liferay.portal.kernel.exception.SystemException; 874 875 /** 876 * Updates the user group. 877 * 878 * @param companyId the primary key of the user group's company 879 * @param userGroupId the primary key of the user group 880 * @param name the user group's name 881 * @param description the user group's description 882 * @param serviceContext the service context to be applied (optionally 883 <code>null</code>). Can set expando bridge attributes for the 884 user group. 885 * @return the user group 886 * @throws PortalException if a user group with the primary key could not be 887 found or if the new information was invalid 888 * @throws SystemException if a system exception occurred 889 */ 890 public com.liferay.portal.model.UserGroup updateUserGroup(long companyId, 891 long userGroupId, java.lang.String name, java.lang.String description, 892 com.liferay.portal.service.ServiceContext serviceContext) 893 throws com.liferay.portal.kernel.exception.PortalException, 894 com.liferay.portal.kernel.exception.SystemException; 895 }