001 /** 002 * Copyright (c) 2000-2012 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 * Returns the Spring bean ID for this bean. 217 * 218 * @return the Spring bean ID for this bean 219 */ 220 public java.lang.String getBeanIdentifier(); 221 222 /** 223 * Sets the Spring bean ID for this bean. 224 * 225 * @param beanIdentifier the Spring bean ID for this bean 226 */ 227 public void setBeanIdentifier(java.lang.String beanIdentifier); 228 229 /** 230 * Adds the user groups to the group. 231 * 232 * @param groupId the primary key of the group 233 * @param userGroupIds the primary keys of the user groups 234 * @throws SystemException if a system exception occurred 235 */ 236 public void addGroupUserGroups(long groupId, long[] userGroupIds) 237 throws com.liferay.portal.kernel.exception.SystemException; 238 239 /** 240 * Adds the user groups to the team. 241 * 242 * @param teamId the primary key of the team 243 * @param userGroupIds the primary keys of the user groups 244 * @throws SystemException if a system exception occurred 245 */ 246 public void addTeamUserGroups(long teamId, long[] userGroupIds) 247 throws com.liferay.portal.kernel.exception.SystemException; 248 249 /** 250 * Adds a user group. 251 * 252 * <p> 253 * This method handles the creation and bookkeeping of the user group, 254 * including its resources, metadata, and internal data structures. It is 255 * not necessary to make subsequent calls to setup default groups and 256 * resources for the user group. 257 * </p> 258 * 259 * @param userId the primary key of the user 260 * @param companyId the primary key of the user group's company 261 * @param name the user group's name 262 * @param description the user group's description 263 * @return the user group 264 * @throws PortalException if the user group's information was invalid 265 * @throws SystemException if a system exception occurred 266 * @deprecated {@link #addUserGroup(long, long, String, String, 267 ServiceContext)} 268 */ 269 public com.liferay.portal.model.UserGroup addUserGroup(long userId, 270 long companyId, java.lang.String name, java.lang.String description) 271 throws com.liferay.portal.kernel.exception.PortalException, 272 com.liferay.portal.kernel.exception.SystemException; 273 274 /** 275 * Adds a user group. 276 * 277 * <p> 278 * This method handles the creation and bookkeeping of the user group, 279 * including its resources, metadata, and internal data structures. It is 280 * not necessary to make subsequent calls to setup default groups and 281 * resources for the user group. 282 * </p> 283 * 284 * @param userId the primary key of the user 285 * @param companyId the primary key of the user group's company 286 * @param name the user group's name 287 * @param description the user group's description 288 * @param serviceContext the user group's service context (optionally 289 <code>null</code>). Can set expando bridge attributes for the 290 user group. 291 * @return the user group 292 * @throws PortalException if the user group's information was invalid 293 * @throws SystemException if a system exception occurred 294 */ 295 public com.liferay.portal.model.UserGroup addUserGroup(long userId, 296 long companyId, java.lang.String name, java.lang.String description, 297 com.liferay.portal.service.ServiceContext serviceContext) 298 throws com.liferay.portal.kernel.exception.PortalException, 299 com.liferay.portal.kernel.exception.SystemException; 300 301 /** 302 * Removes the user from any forbidden user groups and adds the user to all 303 * mandatory user groups, if the user does not belong to them. 304 * 305 * @param user the user 306 * @throws PortalException if the user cannot be added or removed from any 307 user groups. 308 * @throws SystemException if a system exception occurred 309 * @see com.liferay.portal.events.MembershipPolicyAction 310 */ 311 public void checkMembershipPolicy(com.liferay.portal.model.User user) 312 throws com.liferay.portal.kernel.exception.PortalException, 313 com.liferay.portal.kernel.exception.SystemException; 314 315 /** 316 * Clears all associations between the user and its user groups and clears 317 * the permissions cache. 318 * 319 * <p> 320 * This method is called from {@link #deleteUserGroup(UserGroup)}. 321 * </p> 322 * 323 * @param userId the primary key of the user 324 * @throws SystemException if a system exception occurred 325 */ 326 public void clearUserUserGroups(long userId) 327 throws com.liferay.portal.kernel.exception.SystemException; 328 329 /** 330 * Copies the user group's layouts to the users who are not already members 331 * of the user group. 332 * 333 * @param userGroupId the primary key of the user group 334 * @param userIds the primary keys of the users 335 * @throws PortalException if any one of the users could not be found or 336 if a portal exception occurred 337 * @throws SystemException if a system exception occurred 338 * @deprecated 339 */ 340 public void copyUserGroupLayouts(long userGroupId, long[] userIds) 341 throws com.liferay.portal.kernel.exception.PortalException, 342 com.liferay.portal.kernel.exception.SystemException; 343 344 /** 345 * Copies the user groups' layouts to the user. 346 * 347 * @param userGroupIds the primary keys of the user groups 348 * @param userId the primary key of the user 349 * @throws PortalException if a user with the primary key could not be 350 found or if a portal exception occurred 351 * @throws SystemException if a system exception occurred 352 * @deprecated 353 */ 354 public void copyUserGroupLayouts(long[] userGroupIds, long userId) 355 throws com.liferay.portal.kernel.exception.PortalException, 356 com.liferay.portal.kernel.exception.SystemException; 357 358 /** 359 * Copies the user group's layout to the user. 360 * 361 * @param userGroupId the primary key of the user group 362 * @param userId the primary key of the user 363 * @throws PortalException if a user with the primary key could not be 364 found or if a portal exception occurred 365 * @throws SystemException if a system exception occurred 366 * @deprecated 367 */ 368 public void copyUserGroupLayouts(long userGroupId, long userId) 369 throws com.liferay.portal.kernel.exception.PortalException, 370 com.liferay.portal.kernel.exception.SystemException; 371 372 /** 373 * Returns the user group with the name. 374 * 375 * @param companyId the primary key of the user group's company 376 * @param name the user group's name 377 * @return Returns the user group with the name 378 * @throws PortalException if a user group with the name could not be found 379 * @throws SystemException if a system exception occurred 380 */ 381 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 382 public com.liferay.portal.model.UserGroup getUserGroup(long companyId, 383 java.lang.String name) 384 throws com.liferay.portal.kernel.exception.PortalException, 385 com.liferay.portal.kernel.exception.SystemException; 386 387 /** 388 * Returns all the user groups belonging to the company. 389 * 390 * @param companyId the primary key of the user groups' company 391 * @return the user groups belonging to the company 392 * @throws SystemException if a system exception occurred 393 */ 394 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 395 public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups( 396 long companyId) 397 throws com.liferay.portal.kernel.exception.SystemException; 398 399 /** 400 * Returns all the user groups with the primary keys. 401 * 402 * @param userGroupIds the primary keys of the user groups 403 * @return the user groups with the primary keys 404 * @throws PortalException if any one of the user groups could not be found 405 * @throws SystemException if a system exception occurred 406 */ 407 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 408 public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups( 409 long[] userGroupIds) 410 throws com.liferay.portal.kernel.exception.PortalException, 411 com.liferay.portal.kernel.exception.SystemException; 412 413 /** 414 * Returns all the user groups to which the user belongs. 415 * 416 * @param userId the primary key of the user 417 * @return the user groups to which the user belongs 418 * @throws SystemException if a system exception occurred 419 */ 420 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 421 public java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups( 422 long userId) throws com.liferay.portal.kernel.exception.SystemException; 423 424 /** 425 * Returns <code>true</code> if the user group is associated with the group. 426 * 427 * @param groupId the primary key of the group 428 * @param userGroupId the primary key of the user group 429 * @return <code>true</code> if the user group belongs to the group; 430 <code>false</code> otherwise 431 * @throws SystemException if a system exception occurred 432 */ 433 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 434 public boolean hasGroupUserGroup(long groupId, long userGroupId) 435 throws com.liferay.portal.kernel.exception.SystemException; 436 437 /** 438 * Returns <code>true</code> if the user group belongs to the team. 439 * 440 * @param teamId the primary key of the team 441 * @param userGroupId the primary key of the user group 442 * @return <code>true</code> if the user group belongs to the team; 443 <code>false</code> otherwise 444 * @throws SystemException if a system exception occurred 445 */ 446 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 447 public boolean hasTeamUserGroup(long teamId, long userGroupId) 448 throws com.liferay.portal.kernel.exception.SystemException; 449 450 /** 451 * Returns an ordered range of all the user groups that match the keywords. 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 full 460 * result set. 461 * </p> 462 * 463 * @param companyId the primary key of the user group's company 464 * @param keywords the keywords (space separated), which may occur in the 465 user group's name or description (optionally <code>null</code>) 466 * @param params the finder params (optionally <code>null</code>). For more 467 information see {@link 468 com.liferay.portal.service.persistence.UserGroupFinder} 469 * @param start the lower bound of the range of user groups to return 470 * @param end the upper bound of the range of user groups to return (not 471 inclusive) 472 * @param obc the comparator to order the user groups (optionally 473 <code>null</code>) 474 * @return the matching user groups ordered by comparator <code>obc</code> 475 * @throws SystemException if a system exception occurred 476 * @see com.liferay.portal.service.persistence.UserGroupFinder 477 */ 478 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 479 public java.util.List<com.liferay.portal.model.UserGroup> search( 480 long companyId, java.lang.String keywords, 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 485 /** 486 * Returns an ordered range of all the user groups that match the keywords, 487 * using the indexer. It is preferable to use this method instead of the 488 * non-indexed version whenever possible for performance reasons. 489 * 490 * <p> 491 * Useful when paginating results. Returns a maximum of <code>end - 492 * start</code> instances. <code>start</code> and <code>end</code> are not 493 * primary keys, they are indexes in the result set. Thus, <code>0</code> 494 * refers to the first result in the set. Setting both <code>start</code> 495 * and <code>end</code> to {@link 496 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 497 * result set. 498 * </p> 499 * 500 * @param companyId the primary key of the user group's company 501 * @param keywords the keywords (space separated), which may occur in the 502 user group's name or description (optionally <code>null</code>) 503 * @param params the finder params (optionally <code>null</code>). For more 504 information see {@link 505 com.liferay.portlet.usergroupsadmin.util.UserGroupIndexer} 506 * @param start the lower bound of the range of user groups to return 507 * @param end the upper bound of the range of user groups to return (not 508 inclusive) 509 * @param sort the field and direction by which to sort (optionally 510 <code>null</code>) 511 * @return the matching user groups ordered by sort 512 * @throws SystemException if a system exception occurred 513 * @see com.liferay.portlet.usergroupsadmin.util.UserGroupIndexer 514 */ 515 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 516 public com.liferay.portal.kernel.search.Hits search(long companyId, 517 java.lang.String keywords, 518 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 519 int start, int end, com.liferay.portal.kernel.search.Sort sort) 520 throws com.liferay.portal.kernel.exception.SystemException; 521 522 /** 523 * Returns an ordered range of all the user groups that match the name and 524 * description. It is preferable to use this method instead of the 525 * non-indexed version whenever possible for performance reasons. 526 * 527 * <p> 528 * Useful when paginating results. Returns a maximum of <code>end - 529 * start</code> instances. <code>start</code> and <code>end</code> are not 530 * primary keys, they are indexes in the result set. Thus, <code>0</code> 531 * refers to the first result in the set. Setting both <code>start</code> 532 * and <code>end</code> to {@link 533 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 534 * result set. 535 * </p> 536 * 537 * @param companyId the primary key of the user group's company 538 * @param name the user group's name (optionally <code>null</code>) 539 * @param description the user group's description (optionally 540 <code>null</code>) 541 * @param params the finder params (optionally <code>null</code>). For more 542 information see {@link 543 com.liferay.portlet.usergroupsadmin.util.UserGroupIndexer} 544 * @param andSearch whether every field must match its keywords or just one 545 field 546 * @param start the lower bound of the range of user groups to return 547 * @param end the upper bound of the range of user groups to return (not 548 inclusive) 549 * @param sort the field and direction by which to sort (optionally 550 <code>null</code>) 551 * @return the matching user groups ordered by sort 552 * @throws SystemException if a system exception occurred 553 * @see com.liferay.portal.service.persistence.UserGroupFinder 554 */ 555 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 556 public com.liferay.portal.kernel.search.Hits search(long companyId, 557 java.lang.String name, java.lang.String description, 558 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 559 boolean andSearch, int start, int end, 560 com.liferay.portal.kernel.search.Sort sort) 561 throws com.liferay.portal.kernel.exception.SystemException; 562 563 /** 564 * Returns the number of user groups that match the keywords 565 * 566 * @param companyId the primary key of the user group's company 567 * @param keywords the keywords (space separated), which may occur in the 568 user group's name or description (optionally <code>null</code>) 569 * @param params the finder params (optionally <code>null</code>). For more 570 information see {@link 571 com.liferay.portal.service.persistence.UserGroupFinder} 572 * @return the number of matching user groups 573 * @throws SystemException if a system exception occurred 574 * @see com.liferay.portal.service.persistence.UserGroupFinder 575 */ 576 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 577 public int searchCount(long companyId, java.lang.String keywords, 578 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) 579 throws com.liferay.portal.kernel.exception.SystemException; 580 581 /** 582 * Sets the user groups associated with the user copying the user group 583 * layouts and removing and adding user group associations for the user as 584 * necessary. 585 * 586 * @param userId the primary key of the user 587 * @param userGroupIds the primary keys of the user groups 588 * @throws PortalException if a portal exception occurred 589 * @throws SystemException if a system exception occurred 590 */ 591 public void setUserUserGroups(long userId, long[] userGroupIds) 592 throws com.liferay.portal.kernel.exception.PortalException, 593 com.liferay.portal.kernel.exception.SystemException; 594 595 /** 596 * Removes the user groups from the group. 597 * 598 * @param groupId the primary key of the group 599 * @param userGroupIds the primary keys of the user groups 600 * @throws SystemException if a system exception occurred 601 */ 602 public void unsetGroupUserGroups(long groupId, long[] userGroupIds) 603 throws com.liferay.portal.kernel.exception.SystemException; 604 605 /** 606 * Removes the user groups from the team. 607 * 608 * @param teamId the primary key of the team 609 * @param userGroupIds the primary keys of the user groups 610 * @throws SystemException if a system exception occurred 611 */ 612 public void unsetTeamUserGroups(long teamId, long[] userGroupIds) 613 throws com.liferay.portal.kernel.exception.SystemException; 614 615 /** 616 * Updates the user group. 617 * 618 * @param companyId the primary key of the user group's company 619 * @param userGroupId the primary key of the user group 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 a user group with the primary key could 624 not be found or if the new information was invalid 625 * @throws SystemException if a system exception occurred 626 * @deprecated {@link #updateUserGroup(long, long, String, String, 627 ServiceContext)} 628 */ 629 public com.liferay.portal.model.UserGroup updateUserGroup(long companyId, 630 long userGroupId, java.lang.String name, java.lang.String description) 631 throws com.liferay.portal.kernel.exception.PortalException, 632 com.liferay.portal.kernel.exception.SystemException; 633 634 /** 635 * Updates the user group. 636 * 637 * @param companyId the primary key of the user group's company 638 * @param userGroupId the primary key of the user group 639 * @param name the user group's name 640 * @param description the user group's description 641 * @param serviceContext the user group's service context (optionally 642 <code>null</code>). Can set expando bridge attributes for the 643 user group. 644 * @return the user group 645 * @throws PortalException if a user group with the primary key could not be 646 found or if the new information was invalid 647 * @throws SystemException if a system exception occurred 648 */ 649 public com.liferay.portal.model.UserGroup updateUserGroup(long companyId, 650 long userGroupId, java.lang.String name, java.lang.String description, 651 com.liferay.portal.service.ServiceContext serviceContext) 652 throws com.liferay.portal.kernel.exception.PortalException, 653 com.liferay.portal.kernel.exception.SystemException; 654 }