001 /** 002 * Copyright (c) 2000-present 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.jsonwebservice.JSONWebService; 022 import com.liferay.portal.kernel.security.access.control.AccessControlled; 023 import com.liferay.portal.kernel.transaction.Isolation; 024 import com.liferay.portal.kernel.transaction.Propagation; 025 import com.liferay.portal.kernel.transaction.Transactional; 026 027 /** 028 * Provides the remote service interface for Group. Methods of this 029 * service are expected to have security checks based on the propagated JAAS 030 * credentials because this service can be accessed remotely. 031 * 032 * @author Brian Wing Shun Chan 033 * @see GroupServiceUtil 034 * @see com.liferay.portal.service.base.GroupServiceBaseImpl 035 * @see com.liferay.portal.service.impl.GroupServiceImpl 036 * @generated 037 */ 038 @AccessControlled 039 @JSONWebService 040 @ProviderType 041 @Transactional(isolation = Isolation.PORTAL, rollbackFor = { 042 PortalException.class, SystemException.class}) 043 public interface GroupService extends BaseService { 044 /* 045 * NOTE FOR DEVELOPERS: 046 * 047 * Never modify or reference this interface directly. Always use {@link GroupServiceUtil} to access the group remote service. Add custom service methods to {@link com.liferay.portal.service.impl.GroupServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. 048 */ 049 050 /** 051 * @deprecated As of 6.2.0, replaced by {@link #addGroup(long, String, 052 String, int, String, boolean, boolean, ServiceContext)} 053 */ 054 @java.lang.Deprecated 055 public com.liferay.portal.model.Group addGroup(java.lang.String name, 056 java.lang.String description, int type, java.lang.String friendlyURL, 057 boolean site, boolean active, 058 com.liferay.portal.service.ServiceContext serviceContext) 059 throws PortalException; 060 061 /** 062 * Adds a group. 063 * 064 * @param parentGroupId the primary key of the parent group 065 * @param liveGroupId the primary key of the live group 066 * @param name the entity's name 067 * @param description the group's description (optionally 068 <code>null</code>) 069 * @param type the group's type. For more information see {@link 070 GroupConstants}. 071 * @param manualMembership whether manual membership is allowed for the 072 group 073 * @param membershipRestriction the group's membership restriction. For 074 more information see {@link GroupConstants}. 075 * @param friendlyURL the group's friendlyURL (optionally 076 <code>null</code>) 077 * @param site whether the group is to be associated with a main site 078 * @param active whether the group is active 079 * @param serviceContext the service context to be applied (optionally 080 <code>null</code>). Can set the asset category IDs and asset 081 tag names for the group, and can set whether the group is for 082 staging 083 * @return the group 084 * @throws PortalException if the user did not have permission to add 085 the group, if a creator could not be found, if the group's 086 information was invalid, if a layout could not be found, or 087 if a valid friendly URL could not be created for the group 088 * @deprecated As of 7.0.0, replaced by {@link #addGroup(long, long, Map, 089 Map, int, boolean, int, String, boolean, boolean, 090 ServiceContext)} 091 */ 092 @java.lang.Deprecated 093 public com.liferay.portal.model.Group addGroup(long parentGroupId, 094 long liveGroupId, java.lang.String name, java.lang.String description, 095 int type, boolean manualMembership, int membershipRestriction, 096 java.lang.String friendlyURL, boolean site, boolean active, 097 com.liferay.portal.service.ServiceContext serviceContext) 098 throws PortalException; 099 100 public com.liferay.portal.model.Group addGroup(long parentGroupId, 101 long liveGroupId, 102 java.util.Map<java.util.Locale, java.lang.String> nameMap, 103 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 104 int type, boolean manualMembership, int membershipRestriction, 105 java.lang.String friendlyURL, boolean site, boolean active, 106 com.liferay.portal.service.ServiceContext serviceContext) 107 throws PortalException; 108 109 public com.liferay.portal.model.Group addGroup(long parentGroupId, 110 long liveGroupId, 111 java.util.Map<java.util.Locale, java.lang.String> nameMap, 112 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 113 int type, boolean manualMembership, int membershipRestriction, 114 java.lang.String friendlyURL, boolean site, boolean inheritContent, 115 boolean active, com.liferay.portal.service.ServiceContext serviceContext) 116 throws PortalException; 117 118 /** 119 * Adds the group using the group default live group ID. 120 * 121 * @param parentGroupId the primary key of the parent group 122 * @param name the entity's name 123 * @param description the group's description (optionally 124 <code>null</code>) 125 * @param type the group's type. For more information see {@link 126 GroupConstants}. 127 * @param friendlyURL the group's friendlyURL 128 * @param site whether the group is to be associated with a main site 129 * @param active whether the group is active 130 * @param serviceContext the service context to be applied (optionally 131 <code>null</code>). Can set asset category IDs and asset tag 132 names for the group, and can set whether the group is for 133 staging 134 * @return the group 135 * @throws PortalException if the user did not have permission to add 136 the group, if a creator could not be found, if the group's 137 information was invalid, if a layout could not be found, or 138 if a valid friendly URL could not be created for the group 139 * @deprecated As of 6.2.0, replaced by {@link #addGroup(long, long, Map, 140 Map, int, boolean, int, String, boolean, boolean, 141 ServiceContext)} 142 */ 143 @java.lang.Deprecated 144 public com.liferay.portal.model.Group addGroup(long parentGroupId, 145 java.lang.String name, java.lang.String description, int type, 146 java.lang.String friendlyURL, boolean site, boolean active, 147 com.liferay.portal.service.ServiceContext serviceContext) 148 throws PortalException; 149 150 /** 151 * Adds the groups to the role. 152 * 153 * @param roleId the primary key of the role 154 * @param groupIds the primary keys of the groups 155 * @throws PortalException if the user did not have permission to update the 156 role 157 */ 158 public void addRoleGroups(long roleId, long[] groupIds) 159 throws PortalException; 160 161 /** 162 * Checks that the current user is permitted to use the group for Remote 163 * Staging. 164 * 165 * @param groupId the primary key of the group 166 * @throws PortalException if a group with the primary key could not be 167 found, if the current user did not have permission to view the 168 group, or if the group's company was different from the current 169 user's company 170 */ 171 public void checkRemoteStagingGroup(long groupId) throws PortalException; 172 173 /** 174 * Deletes the group. 175 * 176 * <p> 177 * The group is unstaged and its assets and resources including layouts, 178 * membership requests, subscriptions, teams, blogs, bookmarks, calendar 179 * events, image gallery, journals, message boards, polls, shopping related 180 * entities, software catalog, and wikis are also deleted. 181 * </p> 182 * 183 * @param groupId the primary key of the group 184 * @throws PortalException if the user did not have permission to delete the 185 group or its assets or resources, if a group with the primary key 186 could not be found, or if the group was a system group 187 */ 188 public void deleteGroup(long groupId) throws PortalException; 189 190 public void disableStaging(long groupId) throws PortalException; 191 192 public void enableStaging(long groupId) throws PortalException; 193 194 /** 195 * Returns the Spring bean ID for this bean. 196 * 197 * @return the Spring bean ID for this bean 198 */ 199 public java.lang.String getBeanIdentifier(); 200 201 /** 202 * Returns the company group. 203 * 204 * @param companyId the primary key of the company 205 * @return the group associated with the company 206 * @throws PortalException if a matching group could not be found 207 */ 208 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 209 public com.liferay.portal.model.Group getCompanyGroup(long companyId) 210 throws PortalException; 211 212 /** 213 * Returns the group with the name. 214 * 215 * @param companyId the primary key of the company 216 * @param groupKey the group key 217 * @return the group with the group key 218 * @throws PortalException if a matching group could not be found or if the 219 current user did not have permission to view the group 220 */ 221 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 222 public com.liferay.portal.model.Group getGroup(long companyId, 223 java.lang.String groupKey) throws PortalException; 224 225 /** 226 * Returns the group with the primary key. 227 * 228 * @param groupId the primary key of the group 229 * @return the group with the primary key 230 * @throws PortalException if a group with the primary key could not be 231 found or if the current user did not have permission to view the 232 group 233 */ 234 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 235 public com.liferay.portal.model.Group getGroup(long groupId) 236 throws PortalException; 237 238 /** 239 * Returns all the groups that are direct children of the parent group. 240 * 241 * @param companyId the primary key of the company 242 * @param parentGroupId the primary key of the parent group 243 * @param site whether the group is to be associated with a main site 244 * @return the matching groups, or <code>null</code> if no matches were 245 found 246 * @throws PortalException if the user did not have permission to view the 247 group or if a portal exception occurred 248 */ 249 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 250 public java.util.List<com.liferay.portal.model.Group> getGroups( 251 long companyId, long parentGroupId, boolean site) 252 throws PortalException; 253 254 /** 255 * Returns a range of all the site groups for which the user has control 256 * panel access. 257 * 258 * @param portlets the portlets to manage 259 * @param max the upper bound of the range of groups to consider (not 260 inclusive) 261 * @return the range of site groups for which the user has Control Panel 262 access 263 * @throws PortalException if a portal exception occurred 264 */ 265 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 266 public java.util.List<com.liferay.portal.model.Group> getManageableSiteGroups( 267 java.util.Collection<com.liferay.portal.model.Portlet> portlets, int max) 268 throws PortalException; 269 270 /** 271 * Returns a range of all the site groups for which the user has control 272 * panel access. 273 * 274 * @param portlets the portlets to manage 275 * @param max the upper bound of the range of groups to consider (not 276 inclusive) 277 * @return the range of site groups for which the user has Control Panel 278 access 279 * @throws PortalException if a portal exception occurred 280 * @deprecated As of 6.2.0, replaced by {@link 281 #getManageableSiteGroups(Collection, int)} 282 */ 283 @java.lang.Deprecated 284 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 285 public java.util.List<com.liferay.portal.model.Group> getManageableSites( 286 java.util.Collection<com.liferay.portal.model.Portlet> portlets, int max) 287 throws PortalException; 288 289 /** 290 * Returns the groups associated with the organizations. 291 * 292 * @param organizations the organizations 293 * @return the groups associated with the organizations 294 * @throws PortalException if a portal exception occurred 295 */ 296 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 297 public java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups( 298 java.util.List<com.liferay.portal.model.Organization> organizations) 299 throws PortalException; 300 301 /** 302 * Returns the group directly associated with the user. 303 * 304 * @param companyId the primary key of the company 305 * @param userId the primary key of the user 306 * @return the group directly associated with the user 307 * @throws PortalException if a matching group could not be found or if the 308 current user did not have permission to view the group 309 */ 310 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 311 public com.liferay.portal.model.Group getUserGroup(long companyId, 312 long userId) throws PortalException; 313 314 /** 315 * Returns the groups associated with the user groups. 316 * 317 * @param userGroups the user groups 318 * @return the groups associated with the user groups 319 * @throws PortalException if any one of the user group's group could not be 320 found 321 */ 322 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 323 public java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups( 324 java.util.List<com.liferay.portal.model.UserGroup> userGroups) 325 throws PortalException; 326 327 /** 328 * Returns the range of all groups associated with the user's organization 329 * groups, including the ancestors of the organization groups, unless portal 330 * property <code>organizations.membership.strict</code> is set to 331 * <code>true</code>. 332 * 333 * <p> 334 * Useful when paginating results. Returns a maximum of <code>end - 335 * start</code> instances. <code>start</code> and <code>end</code> are not 336 * primary keys, they are indexes in the result set. Thus, <code>0</code> 337 * refers to the first result in the set. Setting both <code>start</code> 338 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 339 * result set. 340 * </p> 341 * 342 * @param userId the primary key of the user 343 * @param start the lower bound of the range of groups to consider 344 * @param end the upper bound of the range of groups to consider (not 345 inclusive) 346 * @return the range of groups associated with the user's organizations 347 * @throws PortalException if a user with the primary key could not be found 348 or if another portal exception occurred 349 */ 350 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 351 public java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups( 352 long userId, int start, int end) throws PortalException; 353 354 /** 355 * Returns the guest or current user's groups "sites" associated 356 * with the group entity class names, including the Control Panel group if 357 * the user is permitted to view the Control Panel. 358 * 359 * <ul> 360 * <li> 361 * Class name "User" includes the user's layout set 362 * group. 363 * </li> 364 * <li> 365 * Class name "Organization" includes the user's 366 * immediate organization groups and inherited organization groups. 367 * </li> 368 * <li> 369 * Class name "Group" includes the user's immediate 370 * organization groups and site groups. 371 * </li> 372 * <li> 373 * A <code>classNames</code> 374 * value of <code>null</code> includes the user's layout set group, 375 * organization groups, inherited organization groups, and site groups. 376 * </li> 377 * </ul> 378 * 379 * @param classNames the group entity class names (optionally 380 <code>null</code>). For more information see {@link 381 #getUserSitesGroups(String[], int)}. 382 * @param max the maximum number of groups to return 383 * @return the user's groups "sites" 384 * @throws PortalException if a portal exception occurred 385 * @deprecated As of 6.2.0, replaced by {@link #getUserSitesGroups(String[], 386 int)} 387 */ 388 @java.lang.Deprecated 389 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 390 public java.util.List<com.liferay.portal.model.Group> getUserPlaces( 391 java.lang.String[] classNames, int max) throws PortalException; 392 393 /** 394 * @deprecated As of 6.2.0, replaced by {@link #getUserSitesGroups(long, 395 String[], int)} 396 */ 397 @java.lang.Deprecated 398 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 399 public java.util.List<com.liferay.portal.model.Group> getUserPlaces( 400 long userId, java.lang.String[] classNames, 401 boolean includeControlPanel, int max) throws PortalException; 402 403 /** 404 * Returns the user's groups "sites" associated with the group 405 * entity class names, including the Control Panel group if the user is 406 * permitted to view the Control Panel. 407 * 408 * <ul> 409 * <li> 410 * Class name "User" includes the user's layout set 411 * group. 412 * </li> 413 * <li> 414 * Class name "Organization" includes the user's 415 * immediate organization groups and inherited organization groups. 416 * </li> 417 * <li> 418 * Class name "Group" includes the user's immediate 419 * organization groups and site groups. 420 * </li> 421 * <li> 422 * A <code>classNames</code> 423 * value of <code>null</code> includes the user's layout set group, 424 * organization groups, inherited organization groups, and site groups. 425 * </li> 426 * </ul> 427 * 428 * @param userId the primary key of the user 429 * @param classNames the group entity class names (optionally 430 <code>null</code>). For more information see {@link 431 #getUserSitesGroups(long, String[], int)}. 432 * @param max the maximum number of groups to return 433 * @return the user's groups "sites" 434 * @throws PortalException if a portal exception occurred 435 * @deprecated As of 6.2.0, replaced by {@link #getUserSitesGroups(long, 436 String[], int)} 437 */ 438 @java.lang.Deprecated 439 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 440 public java.util.List<com.liferay.portal.model.Group> getUserPlaces( 441 long userId, java.lang.String[] classNames, int max) 442 throws PortalException; 443 444 /** 445 * Returns the number of the guest or current user's groups 446 * "sites" associated with the group entity class names, including 447 * the Control Panel group if the user is permitted to view the Control 448 * Panel. 449 * 450 * @return the number of user's groups "sites" 451 * @throws PortalException if a portal exception occurred 452 * @deprecated As of 6.2.0, replaced by {@link #getUserSitesGroupsCount()} 453 */ 454 @java.lang.Deprecated 455 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 456 public int getUserPlacesCount() throws PortalException; 457 458 /** 459 * Returns the guest or current user's layout set group, organization 460 * groups, inherited organization groups, and site groups. 461 * 462 * @return the user's layout set group, organization groups, and 463 inherited organization groups, and site groups 464 * @throws PortalException if a portal exception occurred 465 * @deprecated As of 6.2.0, replaced by {@link #getUserSitesGroups} 466 */ 467 @java.lang.Deprecated 468 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 469 public java.util.List<com.liferay.portal.model.Group> getUserSites() 470 throws PortalException; 471 472 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 473 public java.util.List<com.liferay.portal.model.Group> getUserSitesGroups() 474 throws PortalException; 475 476 /** 477 * Returns the guest or current user's groups "sites" associated 478 * with the group entity class names, including the Control Panel group if 479 * the user is permitted to view the Control Panel. 480 * 481 * <ul> 482 * <li> 483 * Class name "User" includes the user's layout set 484 * group. 485 * </li> 486 * <li> 487 * Class name "Organization" includes the user's 488 * immediate organization groups and inherited organization groups. 489 * </li> 490 * <li> 491 * Class name "Group" includes the user's immediate 492 * organization groups and site groups. 493 * </li> 494 * <li> 495 * A <code>classNames</code> 496 * value of <code>null</code> includes the user's layout set group, 497 * organization groups, inherited organization groups, and site groups. 498 * </li> 499 * </ul> 500 * 501 * @param classNames the group entity class names (optionally 502 <code>null</code>). For more information see {@link 503 #getUserSitesGroups(long, String[], int)}. 504 * @param max the maximum number of groups to return 505 * @return the user's groups "sites" 506 * @throws PortalException if a portal exception occurred 507 */ 508 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 509 public java.util.List<com.liferay.portal.model.Group> getUserSitesGroups( 510 java.lang.String[] classNames, int max) throws PortalException; 511 512 /** 513 * Returns the user's groups "sites" associated with the group 514 * entity class names, including the Control Panel group if the user is 515 * permitted to view the Control Panel. 516 * 517 * <ul> 518 * <li> 519 * Class name "User" includes the user's layout set 520 * group. 521 * </li> 522 * <li> 523 * Class name "Organization" includes the user's 524 * immediate organization groups and inherited organization groups. 525 * </li> 526 * <li> 527 * Class name "Group" includes the user's immediate 528 * organization groups and site groups. 529 * </li> 530 * <li> 531 * A <code>classNames</code> 532 * value of <code>null</code> includes the user's layout set group, 533 * organization groups, inherited organization groups, and site groups. 534 * </li> 535 * </ul> 536 * 537 * @param userId the primary key of the user 538 * @param classNames the group entity class names (optionally 539 <code>null</code>). For more information see {@link 540 #getUserSitesGroups(long, String[], int)}. 541 * @param max the maximum number of groups to return 542 * @return the user's groups "sites" 543 * @throws PortalException if a portal exception occurred 544 */ 545 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 546 public java.util.List<com.liferay.portal.model.Group> getUserSitesGroups( 547 long userId, java.lang.String[] classNames, int max) 548 throws PortalException; 549 550 /** 551 * Returns the number of the guest or current user's groups 552 * "sites" associated with the group entity class names, including 553 * the Control Panel group if the user is permitted to view the Control 554 * Panel. 555 * 556 * @return the number of user's groups "sites" 557 * @throws PortalException if a portal exception occurred 558 */ 559 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 560 public int getUserSitesGroupsCount() throws PortalException; 561 562 /** 563 * Returns <code>true</code> if the user is associated with the group, 564 * including the user's inherited organizations and user groups. System and 565 * staged groups are not included. 566 * 567 * @param userId the primary key of the user 568 * @param groupId the primary key of the group 569 * @return <code>true</code> if the user is associated with the group; 570 <code>false</code> otherwise 571 * @throws PortalException if the current user did not have permission to 572 view the user or group members 573 */ 574 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 575 public boolean hasUserGroup(long userId, long groupId) 576 throws PortalException; 577 578 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 579 public java.util.List<com.liferay.portal.model.Group> search( 580 long companyId, long[] classNameIds, java.lang.String keywords, 581 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 582 int start, int end, 583 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> obc) 584 throws PortalException; 585 586 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 587 public java.util.List<com.liferay.portal.model.Group> search( 588 long companyId, long[] classNameIds, java.lang.String name, 589 java.lang.String description, 590 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 591 boolean andOperator, int start, int end, 592 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> obc) 593 throws PortalException; 594 595 /** 596 * Returns an ordered range of all the site groups and organization groups 597 * that match the name and description, optionally including the user's 598 * inherited organization groups and user groups. System and staged groups 599 * are not included. 600 * 601 * <p> 602 * Useful when paginating results. Returns a maximum of <code>end - 603 * start</code> instances. <code>start</code> and <code>end</code> are not 604 * primary keys, they are indexes in the result set. Thus, <code>0</code> 605 * refers to the first result in the set. Setting both <code>start</code> 606 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 607 * result set. 608 * </p> 609 * 610 * @param companyId the primary key of the company 611 * @param name the group's name (optionally <code>null</code>) 612 * @param description the group's description (optionally 613 <code>null</code>) 614 * @param params the finder params (optionally <code>null</code>). To 615 include the user's inherited organizations and user groups in the 616 search, add entries having "usersGroups" and 617 "inherit" as keys mapped to the the user's ID. For more 618 information see {@link 619 com.liferay.portal.service.persistence.GroupFinder}. 620 * @param start the lower bound of the range of groups to return 621 * @param end the upper bound of the range of groups to return (not 622 inclusive) 623 * @return the matching groups ordered by name 624 * @throws PortalException if a portal exception occurred 625 */ 626 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 627 public java.util.List<com.liferay.portal.model.Group> search( 628 long companyId, java.lang.String name, java.lang.String description, 629 java.lang.String[] params, int start, int end) 630 throws PortalException; 631 632 /** 633 * Returns the number of groups and organization groups that match the name 634 * and description, optionally including the user's inherited organizations 635 * and user groups. System and staged groups are not included. 636 * 637 * @param companyId the primary key of the company 638 * @param name the group's name (optionally <code>null</code>) 639 * @param description the group's description (optionally 640 <code>null</code>) 641 * @param params the finder params (optionally <code>null</code>). To 642 include the user's inherited organizations and user groups in the 643 search, add entries having "usersGroups" and 644 "inherit" as keys mapped to the the user's ID. For more 645 information see {@link 646 com.liferay.portal.service.persistence.GroupFinder}. 647 * @return the number of matching groups 648 */ 649 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 650 public int searchCount(long companyId, java.lang.String name, 651 java.lang.String description, java.lang.String[] params); 652 653 /** 654 * Sets the Spring bean ID for this bean. 655 * 656 * @param beanIdentifier the Spring bean ID for this bean 657 */ 658 public void setBeanIdentifier(java.lang.String beanIdentifier); 659 660 /** 661 * Sets the groups associated with the role, removing and adding 662 * associations as necessary. 663 * 664 * @param roleId the primary key of the role 665 * @param groupIds the primary keys of the groups 666 * @throws PortalException if the user did not have permission to update 667 update the role 668 */ 669 public void setRoleGroups(long roleId, long[] groupIds) 670 throws PortalException; 671 672 /** 673 * Removes the groups from the role. 674 * 675 * @param roleId the primary key of the role 676 * @param groupIds the primary keys of the groups 677 * @throws PortalException if the user did not have permission to update the 678 role 679 */ 680 public void unsetRoleGroups(long roleId, long[] groupIds) 681 throws PortalException; 682 683 /** 684 * Updates the group's friendly URL. 685 * 686 * @param groupId the primary key of the group 687 * @param friendlyURL the group's new friendlyURL (optionally 688 <code>null</code>) 689 * @return the group 690 * @throws PortalException if the user did not have permission to update the 691 group, if a group with the primary key could not be found, or if 692 a valid friendly URL could not be created for the group 693 */ 694 public com.liferay.portal.model.Group updateFriendlyURL(long groupId, 695 java.lang.String friendlyURL) throws PortalException; 696 697 /** 698 * Updates the group. 699 * 700 * @param groupId the primary key of the group 701 * @param parentGroupId the primary key of the parent group 702 * @param name the group's name 703 * @param description the group's new description (optionally 704 <code>null</code>) 705 * @param type the group's new type. For more information see {@link 706 GroupConstants}. 707 * @param manualMembership whether manual membership is allowed for the 708 group 709 * @param membershipRestriction the group's membership restriction. For 710 more information see {@link GroupConstants}. 711 * @param friendlyURL the group's new friendlyURL (optionally 712 <code>null</code>) 713 * @param active whether the group is active 714 * @param serviceContext the service context to be applied (optionally 715 <code>null</code>). Can set the asset category IDs and asset 716 tag names for the group. 717 * @return the group 718 * @throws PortalException if the user did not have permission to update 719 the group, if a group with the primary key could not be 720 found, if the friendly URL was invalid or could one not be 721 created 722 * @deprecated As of 7.0.0, replaced by {@link #updateGroup(long, long, Map, 723 Map, int, boolean, int, String, boolean, boolean, 724 ServiceContext)} 725 */ 726 @java.lang.Deprecated 727 public com.liferay.portal.model.Group updateGroup(long groupId, 728 long parentGroupId, java.lang.String name, 729 java.lang.String description, int type, boolean manualMembership, 730 int membershipRestriction, java.lang.String friendlyURL, 731 boolean inheritContent, boolean active, 732 com.liferay.portal.service.ServiceContext serviceContext) 733 throws PortalException; 734 735 public com.liferay.portal.model.Group updateGroup(long groupId, 736 long parentGroupId, 737 java.util.Map<java.util.Locale, java.lang.String> nameMap, 738 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 739 int type, boolean manualMembership, int membershipRestriction, 740 java.lang.String friendlyURL, boolean inheritContent, boolean active, 741 com.liferay.portal.service.ServiceContext serviceContext) 742 throws PortalException; 743 744 /** 745 * Updates the group's type settings. 746 * 747 * @param groupId the primary key of the group 748 * @param typeSettings the group's new type settings (optionally 749 <code>null</code>) 750 * @return the group 751 * @throws PortalException if the user did not have permission to update the 752 group or if a group with the primary key could not be found 753 */ 754 public com.liferay.portal.model.Group updateGroup(long groupId, 755 java.lang.String typeSettings) throws PortalException; 756 757 public void updateStagedPortlets(long groupId, 758 java.util.Map<java.lang.String, java.lang.String> stagedPortletIds) 759 throws PortalException; 760 }