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