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.bean.PortalBeanLocatorUtil; 020 import com.liferay.portal.kernel.util.ReferenceRegistry; 021 022 /** 023 * Provides the local service utility for Group. This utility wraps 024 * {@link com.liferay.portal.service.impl.GroupLocalServiceImpl} and is the 025 * primary access point for service operations in application layer code running 026 * on the local server. Methods of this service will not have security checks 027 * based on the propagated JAAS credentials because this service can only be 028 * accessed from within the same VM. 029 * 030 * @author Brian Wing Shun Chan 031 * @see GroupLocalService 032 * @see com.liferay.portal.service.base.GroupLocalServiceBaseImpl 033 * @see com.liferay.portal.service.impl.GroupLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class GroupLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.GroupLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 044 /** 045 * Adds the group to the database. Also notifies the appropriate model listeners. 046 * 047 * @param group the group 048 * @return the group that was added 049 */ 050 public static com.liferay.portal.model.Group addGroup( 051 com.liferay.portal.model.Group group) { 052 return getService().addGroup(group); 053 } 054 055 /** 056 * Adds a group. 057 * 058 * @param userId the primary key of the group's creator/owner 059 * @param parentGroupId the primary key of the parent group 060 * @param className the entity's class name 061 * @param classPK the primary key of the entity's instance 062 * @param liveGroupId the primary key of the live group 063 * @param name the entity's name 064 * @param description the group's description (optionally 065 <code>null</code>) 066 * @param type the group's type. For more information see {@link 067 GroupConstants}. 068 * @param manualMembership whether manual membership is allowed for the 069 group 070 * @param membershipRestriction the group's membership restriction. For 071 more information see {@link GroupConstants}. 072 * @param friendlyURL the group's friendlyURL (optionally 073 <code>null</code>) 074 * @param site whether the group is to be associated with a main site 075 * @param active whether the group is active 076 * @param serviceContext the service context to be applied (optionally 077 <code>null</code>). Can set asset category IDs and asset tag 078 names for the group, and whether the group is for staging. 079 * @return the group 080 * @throws PortalException if a portal exception occured 081 * @deprecated As of 7.0.0, replaced by {@link #addGroup(long, long, String, 082 long, long, Map, Map, int, boolean, int, String, boolean, 083 boolean, ServiceContext)} 084 */ 085 @Deprecated 086 public static com.liferay.portal.model.Group addGroup(long userId, 087 long parentGroupId, java.lang.String className, long classPK, 088 long liveGroupId, java.lang.String name, java.lang.String description, 089 int type, boolean manualMembership, int membershipRestriction, 090 java.lang.String friendlyURL, boolean site, boolean active, 091 com.liferay.portal.service.ServiceContext serviceContext) 092 throws com.liferay.portal.kernel.exception.PortalException { 093 return getService() 094 .addGroup(userId, parentGroupId, className, classPK, 095 liveGroupId, name, description, type, manualMembership, 096 membershipRestriction, friendlyURL, site, active, serviceContext); 097 } 098 099 public static com.liferay.portal.model.Group addGroup(long userId, 100 long parentGroupId, java.lang.String className, long classPK, 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 com.liferay.portal.kernel.exception.PortalException { 108 return getService() 109 .addGroup(userId, parentGroupId, className, classPK, 110 liveGroupId, nameMap, descriptionMap, type, manualMembership, 111 membershipRestriction, friendlyURL, site, active, serviceContext); 112 } 113 114 public static com.liferay.portal.model.Group addGroup(long userId, 115 long parentGroupId, java.lang.String className, long classPK, 116 long liveGroupId, 117 java.util.Map<java.util.Locale, java.lang.String> nameMap, 118 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 119 int type, boolean manualMembership, int membershipRestriction, 120 java.lang.String friendlyURL, boolean site, boolean inheritContent, 121 boolean active, com.liferay.portal.service.ServiceContext serviceContext) 122 throws com.liferay.portal.kernel.exception.PortalException { 123 return getService() 124 .addGroup(userId, parentGroupId, className, classPK, 125 liveGroupId, nameMap, descriptionMap, type, manualMembership, 126 membershipRestriction, friendlyURL, site, inheritContent, active, 127 serviceContext); 128 } 129 130 public static void addOrganizationGroup(long organizationId, 131 com.liferay.portal.model.Group group) { 132 getService().addOrganizationGroup(organizationId, group); 133 } 134 135 public static void addOrganizationGroup(long organizationId, long groupId) { 136 getService().addOrganizationGroup(organizationId, groupId); 137 } 138 139 public static void addOrganizationGroups(long organizationId, 140 java.util.List<com.liferay.portal.model.Group> Groups) { 141 getService().addOrganizationGroups(organizationId, Groups); 142 } 143 144 public static void addOrganizationGroups(long organizationId, 145 long[] groupIds) { 146 getService().addOrganizationGroups(organizationId, groupIds); 147 } 148 149 public static void addRoleGroup(long roleId, 150 com.liferay.portal.model.Group group) { 151 getService().addRoleGroup(roleId, group); 152 } 153 154 public static void addRoleGroup(long roleId, long groupId) { 155 getService().addRoleGroup(roleId, groupId); 156 } 157 158 public static void addRoleGroups(long roleId, 159 java.util.List<com.liferay.portal.model.Group> Groups) { 160 getService().addRoleGroups(roleId, Groups); 161 } 162 163 public static void addRoleGroups(long roleId, long[] groupIds) { 164 getService().addRoleGroups(roleId, groupIds); 165 } 166 167 public static void addUserGroup(long userId, 168 com.liferay.portal.model.Group group) { 169 getService().addUserGroup(userId, group); 170 } 171 172 public static void addUserGroup(long userId, long groupId) { 173 getService().addUserGroup(userId, groupId); 174 } 175 176 public static void addUserGroupGroup(long userGroupId, 177 com.liferay.portal.model.Group group) { 178 getService().addUserGroupGroup(userGroupId, group); 179 } 180 181 public static void addUserGroupGroup(long userGroupId, long groupId) { 182 getService().addUserGroupGroup(userGroupId, groupId); 183 } 184 185 public static void addUserGroupGroups(long userGroupId, 186 java.util.List<com.liferay.portal.model.Group> Groups) { 187 getService().addUserGroupGroups(userGroupId, Groups); 188 } 189 190 public static void addUserGroupGroups(long userGroupId, long[] groupIds) { 191 getService().addUserGroupGroups(userGroupId, groupIds); 192 } 193 194 public static void addUserGroups(long userId, 195 java.util.List<com.liferay.portal.model.Group> Groups) { 196 getService().addUserGroups(userId, Groups); 197 } 198 199 public static void addUserGroups(long userId, long[] groupIds) { 200 getService().addUserGroups(userId, groupIds); 201 } 202 203 /** 204 * Adds a company group if it does not exist. This method is typically used 205 * when a virtual host is added. 206 * 207 * @param companyId the primary key of the company 208 * @throws PortalException if a portal exception occurred 209 */ 210 public static void checkCompanyGroup(long companyId) 211 throws com.liferay.portal.kernel.exception.PortalException { 212 getService().checkCompanyGroup(companyId); 213 } 214 215 /** 216 * Creates systems groups and other related data needed by the system on the 217 * very first startup. Also takes care of creating the Control Panel groups 218 * and layouts. 219 * 220 * @param companyId the primary key of the company 221 * @throws PortalException if a portal exception occurred 222 */ 223 public static void checkSystemGroups(long companyId) 224 throws com.liferay.portal.kernel.exception.PortalException { 225 getService().checkSystemGroups(companyId); 226 } 227 228 public static void clearOrganizationGroups(long organizationId) { 229 getService().clearOrganizationGroups(organizationId); 230 } 231 232 public static void clearRoleGroups(long roleId) { 233 getService().clearRoleGroups(roleId); 234 } 235 236 public static void clearUserGroupGroups(long userGroupId) { 237 getService().clearUserGroupGroups(userGroupId); 238 } 239 240 public static void clearUserGroups(long userId) { 241 getService().clearUserGroups(userId); 242 } 243 244 /** 245 * Creates a new group with the primary key. Does not add the group to the database. 246 * 247 * @param groupId the primary key for the new group 248 * @return the new group 249 */ 250 public static com.liferay.portal.model.Group createGroup(long groupId) { 251 return getService().createGroup(groupId); 252 } 253 254 /** 255 * Deletes the group from the database. Also notifies the appropriate model listeners. 256 * 257 * @param group the group 258 * @return the group that was removed 259 * @throws PortalException 260 */ 261 public static com.liferay.portal.model.Group deleteGroup( 262 com.liferay.portal.model.Group group) 263 throws com.liferay.portal.kernel.exception.PortalException { 264 return getService().deleteGroup(group); 265 } 266 267 /** 268 * Deletes the group with the primary key from the database. Also notifies the appropriate model listeners. 269 * 270 * @param groupId the primary key of the group 271 * @return the group that was removed 272 * @throws PortalException if a group with the primary key could not be found 273 */ 274 public static com.liferay.portal.model.Group deleteGroup(long groupId) 275 throws com.liferay.portal.kernel.exception.PortalException { 276 return getService().deleteGroup(groupId); 277 } 278 279 public static void deleteOrganizationGroup(long organizationId, 280 com.liferay.portal.model.Group group) { 281 getService().deleteOrganizationGroup(organizationId, group); 282 } 283 284 public static void deleteOrganizationGroup(long organizationId, long groupId) { 285 getService().deleteOrganizationGroup(organizationId, groupId); 286 } 287 288 public static void deleteOrganizationGroups(long organizationId, 289 java.util.List<com.liferay.portal.model.Group> Groups) { 290 getService().deleteOrganizationGroups(organizationId, Groups); 291 } 292 293 public static void deleteOrganizationGroups(long organizationId, 294 long[] groupIds) { 295 getService().deleteOrganizationGroups(organizationId, groupIds); 296 } 297 298 /** 299 * @throws PortalException 300 */ 301 public static com.liferay.portal.model.PersistedModel deletePersistedModel( 302 com.liferay.portal.model.PersistedModel persistedModel) 303 throws com.liferay.portal.kernel.exception.PortalException { 304 return getService().deletePersistedModel(persistedModel); 305 } 306 307 public static void deleteRoleGroup(long roleId, 308 com.liferay.portal.model.Group group) { 309 getService().deleteRoleGroup(roleId, group); 310 } 311 312 public static void deleteRoleGroup(long roleId, long groupId) { 313 getService().deleteRoleGroup(roleId, groupId); 314 } 315 316 public static void deleteRoleGroups(long roleId, 317 java.util.List<com.liferay.portal.model.Group> Groups) { 318 getService().deleteRoleGroups(roleId, Groups); 319 } 320 321 public static void deleteRoleGroups(long roleId, long[] groupIds) { 322 getService().deleteRoleGroups(roleId, groupIds); 323 } 324 325 public static void deleteUserGroup(long userId, 326 com.liferay.portal.model.Group group) { 327 getService().deleteUserGroup(userId, group); 328 } 329 330 public static void deleteUserGroup(long userId, long groupId) { 331 getService().deleteUserGroup(userId, groupId); 332 } 333 334 public static void deleteUserGroupGroup(long userGroupId, 335 com.liferay.portal.model.Group group) { 336 getService().deleteUserGroupGroup(userGroupId, group); 337 } 338 339 public static void deleteUserGroupGroup(long userGroupId, long groupId) { 340 getService().deleteUserGroupGroup(userGroupId, groupId); 341 } 342 343 public static void deleteUserGroupGroups(long userGroupId, 344 java.util.List<com.liferay.portal.model.Group> Groups) { 345 getService().deleteUserGroupGroups(userGroupId, Groups); 346 } 347 348 public static void deleteUserGroupGroups(long userGroupId, long[] groupIds) { 349 getService().deleteUserGroupGroups(userGroupId, groupIds); 350 } 351 352 public static void deleteUserGroups(long userId, 353 java.util.List<com.liferay.portal.model.Group> Groups) { 354 getService().deleteUserGroups(userId, Groups); 355 } 356 357 public static void deleteUserGroups(long userId, long[] groupIds) { 358 getService().deleteUserGroups(userId, groupIds); 359 } 360 361 public static void disableStaging(long groupId) 362 throws com.liferay.portal.kernel.exception.PortalException { 363 getService().disableStaging(groupId); 364 } 365 366 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 367 return getService().dynamicQuery(); 368 } 369 370 /** 371 * Performs a dynamic query on the database and returns the matching rows. 372 * 373 * @param dynamicQuery the dynamic query 374 * @return the matching rows 375 */ 376 public static <T> java.util.List<T> dynamicQuery( 377 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 378 return getService().dynamicQuery(dynamicQuery); 379 } 380 381 /** 382 * Performs a dynamic query on the database and returns a range of the matching rows. 383 * 384 * <p> 385 * 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.GroupModelImpl}. 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. 386 * </p> 387 * 388 * @param dynamicQuery the dynamic query 389 * @param start the lower bound of the range of model instances 390 * @param end the upper bound of the range of model instances (not inclusive) 391 * @return the range of matching rows 392 */ 393 public static <T> java.util.List<T> dynamicQuery( 394 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 395 int end) { 396 return getService().dynamicQuery(dynamicQuery, start, end); 397 } 398 399 /** 400 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 401 * 402 * <p> 403 * 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.GroupModelImpl}. 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. 404 * </p> 405 * 406 * @param dynamicQuery the dynamic query 407 * @param start the lower bound of the range of model instances 408 * @param end the upper bound of the range of model instances (not inclusive) 409 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 410 * @return the ordered range of matching rows 411 */ 412 public static <T> java.util.List<T> dynamicQuery( 413 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 414 int end, 415 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 416 return getService() 417 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 418 } 419 420 /** 421 * Returns the number of rows matching the dynamic query. 422 * 423 * @param dynamicQuery the dynamic query 424 * @return the number of rows matching the dynamic query 425 */ 426 public static long dynamicQueryCount( 427 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 428 return getService().dynamicQueryCount(dynamicQuery); 429 } 430 431 /** 432 * Returns the number of rows matching the dynamic query. 433 * 434 * @param dynamicQuery the dynamic query 435 * @param projection the projection to apply to the query 436 * @return the number of rows matching the dynamic query 437 */ 438 public static long dynamicQueryCount( 439 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 440 com.liferay.portal.kernel.dao.orm.Projection projection) { 441 return getService().dynamicQueryCount(dynamicQuery, projection); 442 } 443 444 public static void enableStaging(long groupId) 445 throws com.liferay.portal.kernel.exception.PortalException { 446 getService().enableStaging(groupId); 447 } 448 449 /** 450 * Returns the company's group. 451 * 452 * @param companyId the primary key of the company 453 * @return the company's group, or <code>null</code> if a matching group 454 could not be found 455 */ 456 public static com.liferay.portal.model.Group fetchCompanyGroup( 457 long companyId) { 458 return getService().fetchCompanyGroup(companyId); 459 } 460 461 /** 462 * Returns the group with the matching friendly URL. 463 * 464 * @param companyId the primary key of the company 465 * @param friendlyURL the friendly URL 466 * @return the group with the friendly URL, or <code>null</code> if a 467 matching group could not be found 468 */ 469 public static com.liferay.portal.model.Group fetchFriendlyURLGroup( 470 long companyId, java.lang.String friendlyURL) { 471 return getService().fetchFriendlyURLGroup(companyId, friendlyURL); 472 } 473 474 /** 475 * Returns the group with the matching group key by first searching the 476 * system groups and then using the finder cache. 477 * 478 * @param companyId the primary key of the company 479 * @param groupKey the group key 480 * @return the group with the group key and associated company, or 481 <code>null</code> if a matching group could not be found 482 */ 483 public static com.liferay.portal.model.Group fetchGroup(long companyId, 484 java.lang.String groupKey) { 485 return getService().fetchGroup(companyId, groupKey); 486 } 487 488 public static com.liferay.portal.model.Group fetchGroup(long groupId) { 489 return getService().fetchGroup(groupId); 490 } 491 492 /** 493 * Returns the group with the matching UUID and company. 494 * 495 * @param uuid the group's UUID 496 * @param companyId the primary key of the company 497 * @return the matching group, or <code>null</code> if a matching group could not be found 498 */ 499 public static com.liferay.portal.model.Group fetchGroupByUuidAndCompanyId( 500 java.lang.String uuid, long companyId) { 501 return getService().fetchGroupByUuidAndCompanyId(uuid, companyId); 502 } 503 504 public static com.liferay.portal.model.Group fetchUserGroup( 505 long companyId, long userId) { 506 return getService().fetchUserGroup(companyId, userId); 507 } 508 509 /** 510 * Returns the default user's personal site group. 511 * 512 * @param companyId the primary key of the company 513 * @return the default user's personal site group, or <code>null</code> if a 514 matching group could not be found 515 * @throws PortalException if a portal exception occurred 516 */ 517 public static com.liferay.portal.model.Group fetchUserPersonalSiteGroup( 518 long companyId) 519 throws com.liferay.portal.kernel.exception.PortalException { 520 return getService().fetchUserPersonalSiteGroup(companyId); 521 } 522 523 public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 524 return getService().getActionableDynamicQuery(); 525 } 526 527 /** 528 * Returns all the active or inactive groups associated with the company. 529 * 530 * @param companyId the primary key of the company 531 * @param active whether to return only active groups, or only inactive 532 groups 533 * @return the active or inactive groups associated with the company 534 */ 535 public static java.util.List<com.liferay.portal.model.Group> getActiveGroups( 536 long companyId, boolean active) { 537 return getService().getActiveGroups(companyId, active); 538 } 539 540 /** 541 * Returns the company group. 542 * 543 * @param companyId the primary key of the company 544 * @return the group associated with the company 545 * @throws PortalException if a portal exception occurred 546 */ 547 public static com.liferay.portal.model.Group getCompanyGroup(long companyId) 548 throws com.liferay.portal.kernel.exception.PortalException { 549 return getService().getCompanyGroup(companyId); 550 } 551 552 /** 553 * Returns a range of all the groups associated with the company. 554 * 555 * <p> 556 * Useful when paginating results. Returns a maximum of <code>end - 557 * start</code> instances. <code>start</code> and <code>end</code> are not 558 * primary keys, they are indexes in the result set. Thus, <code>0</code> 559 * refers to the first result in the set. Setting both <code>start</code> 560 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 561 * result set. 562 * </p> 563 * 564 * @param companyId the primary key of the company 565 * @param start the lower bound of the range of groups to return 566 * @param end the upper bound of the range of groups to return (not 567 inclusive) 568 * @return the range of groups associated with the company 569 */ 570 public static java.util.List<com.liferay.portal.model.Group> getCompanyGroups( 571 long companyId, int start, int end) { 572 return getService().getCompanyGroups(companyId, start, end); 573 } 574 575 /** 576 * Returns the number of groups associated with the company. 577 * 578 * @param companyId the primary key of the company 579 * @return the number of groups associated with the company 580 */ 581 public static int getCompanyGroupsCount(long companyId) { 582 return getService().getCompanyGroupsCount(companyId); 583 } 584 585 /** 586 * Returns the group with the matching friendly URL. 587 * 588 * @param companyId the primary key of the company 589 * @param friendlyURL the group's friendlyURL 590 * @return the group with the friendly URL 591 * @throws PortalException if a portal exception occurred 592 */ 593 public static com.liferay.portal.model.Group getFriendlyURLGroup( 594 long companyId, java.lang.String friendlyURL) 595 throws com.liferay.portal.kernel.exception.PortalException { 596 return getService().getFriendlyURLGroup(companyId, friendlyURL); 597 } 598 599 /** 600 * Returns the group with the matching group key. 601 * 602 * @param companyId the primary key of the company 603 * @param groupKey the group key 604 * @return the group with the group key 605 * @throws PortalException if a portal exception occurred 606 */ 607 public static com.liferay.portal.model.Group getGroup(long companyId, 608 java.lang.String groupKey) 609 throws com.liferay.portal.kernel.exception.PortalException { 610 return getService().getGroup(companyId, groupKey); 611 } 612 613 /** 614 * Returns the group with the primary key. 615 * 616 * @param groupId the primary key of the group 617 * @return the group 618 * @throws PortalException if a group with the primary key could not be found 619 */ 620 public static com.liferay.portal.model.Group getGroup(long groupId) 621 throws com.liferay.portal.kernel.exception.PortalException { 622 return getService().getGroup(groupId); 623 } 624 625 /** 626 * Returns the group with the matching UUID and company. 627 * 628 * @param uuid the group's UUID 629 * @param companyId the primary key of the company 630 * @return the matching group 631 * @throws PortalException if a matching group could not be found 632 */ 633 public static com.liferay.portal.model.Group getGroupByUuidAndCompanyId( 634 java.lang.String uuid, long companyId) 635 throws com.liferay.portal.kernel.exception.PortalException { 636 return getService().getGroupByUuidAndCompanyId(uuid, companyId); 637 } 638 639 /** 640 * @deprecated As of 7.0.0, replaced by {@link 641 Group#getDescriptiveName(Locale)} 642 */ 643 @Deprecated 644 public static java.lang.String getGroupDescriptiveName( 645 com.liferay.portal.model.Group group, java.util.Locale locale) 646 throws com.liferay.portal.kernel.exception.PortalException { 647 return getService().getGroupDescriptiveName(group, locale); 648 } 649 650 /** 651 * @deprecated As of 7.0.0, replaced by {@link 652 Group#getDescriptiveName(Locale)} 653 */ 654 @Deprecated 655 public static java.lang.String getGroupDescriptiveName(long groupId, 656 java.util.Locale locale) 657 throws com.liferay.portal.kernel.exception.PortalException { 658 return getService().getGroupDescriptiveName(groupId, locale); 659 } 660 661 /** 662 * Returns all the groups that are direct children of the parent group with 663 * the matching className. 664 * 665 * @param companyId the primary key of the company 666 * @param className the class name of the group 667 * @param parentGroupId the primary key of the parent group 668 * @return the matching groups, or <code>null</code> if no matches were 669 found 670 */ 671 public static java.util.List<com.liferay.portal.model.Group> getGroups( 672 long companyId, java.lang.String className, long parentGroupId) { 673 return getService().getGroups(companyId, className, parentGroupId); 674 } 675 676 /** 677 * Returns a range of all the groups that are direct children of the parent 678 * group with the matching className. 679 * 680 * @param companyId the primary key of the company 681 * @param className the class name of the group 682 * @param parentGroupId the primary key of the parent group 683 * @param start the lower bound of the range of results 684 * @param end the upper bound of the range of results (not inclusive) 685 * @return the range of matching groups 686 */ 687 public static java.util.List<com.liferay.portal.model.Group> getGroups( 688 long companyId, java.lang.String className, long parentGroupId, 689 int start, int end) { 690 return getService() 691 .getGroups(companyId, className, parentGroupId, start, end); 692 } 693 694 /** 695 * Returns all the groups that are direct children of the parent group. 696 * 697 * @param companyId the primary key of the company 698 * @param parentGroupId the primary key of the parent group 699 * @param site whether the group is to be associated with a main site 700 * @return the matching groups, or <code>null</code> if no matches were 701 found 702 */ 703 public static java.util.List<com.liferay.portal.model.Group> getGroups( 704 long companyId, long parentGroupId, boolean site) { 705 return getService().getGroups(companyId, parentGroupId, site); 706 } 707 708 public static java.util.List<com.liferay.portal.model.Group> getGroups( 709 long companyId, long parentGroupId, boolean site, boolean inheritContent) { 710 return getService() 711 .getGroups(companyId, parentGroupId, site, inheritContent); 712 } 713 714 /** 715 * Returns the groups with the matching primary keys. 716 * 717 * @param groupIds the primary keys of the groups 718 * @return the groups with the primary keys 719 * @throws PortalException if a portal exception occurred 720 */ 721 public static java.util.List<com.liferay.portal.model.Group> getGroups( 722 long[] groupIds) 723 throws com.liferay.portal.kernel.exception.PortalException { 724 return getService().getGroups(groupIds); 725 } 726 727 /** 728 * Returns a range of all the groups. 729 * 730 * <p> 731 * 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.GroupModelImpl}. 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. 732 * </p> 733 * 734 * @param start the lower bound of the range of groups 735 * @param end the upper bound of the range of groups (not inclusive) 736 * @return the range of groups 737 */ 738 public static java.util.List<com.liferay.portal.model.Group> getGroups( 739 int start, int end) { 740 return getService().getGroups(start, end); 741 } 742 743 /** 744 * Returns the number of groups. 745 * 746 * @return the number of groups 747 */ 748 public static int getGroupsCount() { 749 return getService().getGroupsCount(); 750 } 751 752 /** 753 * Returns the number of groups that are direct children of the parent group 754 * with the matching className. 755 * 756 * @param companyId the primary key of the company 757 * @param className the class name of the group 758 * @param parentGroupId the primary key of the parent group 759 * @return the number of matching groups 760 */ 761 public static int getGroupsCount(long companyId, 762 java.lang.String className, long parentGroupId) { 763 return getService().getGroupsCount(companyId, className, parentGroupId); 764 } 765 766 /** 767 * Returns the number of groups that are direct children of the parent 768 * group. 769 * 770 * @param companyId the primary key of the company 771 * @param parentGroupId the primary key of the parent group 772 * @param site whether the group is to be associated with a main site 773 * @return the number of matching groups 774 */ 775 public static int getGroupsCount(long companyId, long parentGroupId, 776 boolean site) { 777 return getService().getGroupsCount(companyId, parentGroupId, site); 778 } 779 780 public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { 781 return getService().getIndexableActionableDynamicQuery(); 782 } 783 784 /** 785 * Returns the group associated with the layout. 786 * 787 * @param companyId the primary key of the company 788 * @param plid the primary key of the layout 789 * @return the group associated with the layout 790 * @throws PortalException if a portal exception occurred 791 */ 792 public static com.liferay.portal.model.Group getLayoutGroup( 793 long companyId, long plid) 794 throws com.liferay.portal.kernel.exception.PortalException { 795 return getService().getLayoutGroup(companyId, plid); 796 } 797 798 /** 799 * Returns the group associated with the layout prototype. 800 * 801 * @param companyId the primary key of the company 802 * @param layoutPrototypeId the primary key of the layout prototype 803 * @return the group associated with the layout prototype 804 * @throws PortalException if a portal exception occurred 805 */ 806 public static com.liferay.portal.model.Group getLayoutPrototypeGroup( 807 long companyId, long layoutPrototypeId) 808 throws com.liferay.portal.kernel.exception.PortalException { 809 return getService().getLayoutPrototypeGroup(companyId, layoutPrototypeId); 810 } 811 812 /** 813 * Returns the group associated with the layout set prototype. 814 * 815 * @param companyId the primary key of the company 816 * @param layoutSetPrototypeId the primary key of the layout set prototype 817 * @return the group associated with the layout set prototype 818 * @throws PortalException if a portal exception occurred 819 */ 820 public static com.liferay.portal.model.Group getLayoutSetPrototypeGroup( 821 long companyId, long layoutSetPrototypeId) 822 throws com.liferay.portal.kernel.exception.PortalException { 823 return getService() 824 .getLayoutSetPrototypeGroup(companyId, layoutSetPrototypeId); 825 } 826 827 /** 828 * Returns a range of all groups that are children of the parent group and 829 * that have at least one layout. 830 * 831 * <p> 832 * Useful when paginating results. Returns a maximum of <code>end - 833 * start</code> instances. <code>start</code> and <code>end</code> are not 834 * primary keys, they are indexes in the result set. Thus, <code>0</code> 835 * refers to the first result in the set. Setting both <code>start</code> 836 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 837 * result set. 838 * </p> 839 * 840 * @param companyId the primary key of the company 841 * @param parentGroupId the primary key of the parent group 842 * @param site whether the group is to be associated with a main site 843 * @param start the lower bound of the range of groups to return 844 * @param end the upper bound of the range of groups to return (not 845 inclusive) 846 * @param obc the comparator to order the groups (optionally 847 <code>null</code>) 848 * @return the range of matching groups ordered by comparator 849 <code>obc</code> 850 */ 851 public static java.util.List<com.liferay.portal.model.Group> getLayoutsGroups( 852 long companyId, long parentGroupId, boolean site, int start, int end, 853 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> obc) { 854 return getService() 855 .getLayoutsGroups(companyId, parentGroupId, site, start, 856 end, obc); 857 } 858 859 /** 860 * Returns the number of groups that are children or the parent group and 861 * that have at least one layout 862 * 863 * @param companyId the primary key of the company 864 * @param parentGroupId the primary key of the parent group 865 * @param site whether the group is to be associated with a main site 866 * @return the number of matching groups 867 */ 868 public static int getLayoutsGroupsCount(long companyId, long parentGroupId, 869 boolean site) { 870 return getService().getLayoutsGroupsCount(companyId, parentGroupId, site); 871 } 872 873 /** 874 * Returns all live groups. 875 * 876 * @return all live groups 877 */ 878 public static java.util.List<com.liferay.portal.model.Group> getLiveGroups() { 879 return getService().getLiveGroups(); 880 } 881 882 /** 883 * Returns a range of all non-system groups of a specified type (className) 884 * that have no layouts. 885 * 886 * <p> 887 * Useful when paginating results. Returns a maximum of <code>end - 888 * start</code> instances. <code>start</code> and <code>end</code> are not 889 * primary keys, they are indexes in the result set. Thus, <code>0</code> 890 * refers to the first result in the set. Setting both <code>start</code> 891 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 892 * result set. 893 * </p> 894 * 895 * @param className the entity's class name 896 * @param privateLayout whether to include groups with private layout sets 897 or non-private layout sets 898 * @param start the lower bound of the range of groups to return 899 * @param end the upper bound of the range of groups to return (not 900 inclusive) 901 * @return the range of matching groups 902 */ 903 public static java.util.List<com.liferay.portal.model.Group> getNoLayoutsGroups( 904 java.lang.String className, boolean privateLayout, int start, int end) { 905 return getService() 906 .getNoLayoutsGroups(className, privateLayout, start, end); 907 } 908 909 /** 910 * Returns all non-system groups having <code>null</code> or empty friendly 911 * URLs. 912 * 913 * @return the non-system groups having <code>null</code> or empty friendly 914 URLs 915 */ 916 public static java.util.List<com.liferay.portal.model.Group> getNullFriendlyURLGroups() { 917 return getService().getNullFriendlyURLGroups(); 918 } 919 920 /** 921 * Returns the OSGi service identifier. 922 * 923 * @return the OSGi service identifier 924 */ 925 public static java.lang.String getOSGiServiceIdentifier() { 926 return getService().getOSGiServiceIdentifier(); 927 } 928 929 /** 930 * Returns the specified organization group. 931 * 932 * @param companyId the primary key of the company 933 * @param organizationId the primary key of the organization 934 * @return the group associated with the organization 935 * @throws PortalException if a portal exception occurred 936 */ 937 public static com.liferay.portal.model.Group getOrganizationGroup( 938 long companyId, long organizationId) 939 throws com.liferay.portal.kernel.exception.PortalException { 940 return getService().getOrganizationGroup(companyId, organizationId); 941 } 942 943 public static java.util.List<com.liferay.portal.model.Group> getOrganizationGroups( 944 long organizationId) { 945 return getService().getOrganizationGroups(organizationId); 946 } 947 948 public static java.util.List<com.liferay.portal.model.Group> getOrganizationGroups( 949 long organizationId, int start, int end) { 950 return getService().getOrganizationGroups(organizationId, start, end); 951 } 952 953 public static java.util.List<com.liferay.portal.model.Group> getOrganizationGroups( 954 long organizationId, int start, int end, 955 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> orderByComparator) { 956 return getService() 957 .getOrganizationGroups(organizationId, start, end, 958 orderByComparator); 959 } 960 961 public static int getOrganizationGroupsCount(long organizationId) { 962 return getService().getOrganizationGroupsCount(organizationId); 963 } 964 965 /** 966 * Returns the organizationIds of the organizations associated with the group. 967 * 968 * @param groupId the groupId of the group 969 * @return long[] the organizationIds of organizations associated with the group 970 */ 971 public static long[] getOrganizationPrimaryKeys(long groupId) { 972 return getService().getOrganizationPrimaryKeys(groupId); 973 } 974 975 /** 976 * Returns the specified organization groups. 977 * 978 * @param organizations the organizations 979 * @return the groups associated with the organizations 980 */ 981 public static java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups( 982 java.util.List<com.liferay.portal.model.Organization> organizations) { 983 return getService().getOrganizationsGroups(organizations); 984 } 985 986 /** 987 * Returns all the groups related to the organizations. 988 * 989 * @param organizations the organizations 990 * @return the groups related to the organizations 991 */ 992 public static java.util.List<com.liferay.portal.model.Group> getOrganizationsRelatedGroups( 993 java.util.List<com.liferay.portal.model.Organization> organizations) { 994 return getService().getOrganizationsRelatedGroups(organizations); 995 } 996 997 /** 998 * Returns the group followed by all its parent groups ordered by closest 999 * ancestor. 1000 * 1001 * @param groupId the primary key of the group 1002 * @return the group followed by all its parent groups ordered by closest 1003 ancestor 1004 * @throws PortalException if a portal exception occurred 1005 */ 1006 public static java.util.List<com.liferay.portal.model.Group> getParentGroups( 1007 long groupId) 1008 throws com.liferay.portal.kernel.exception.PortalException { 1009 return getService().getParentGroups(groupId); 1010 } 1011 1012 public static com.liferay.portal.model.PersistedModel getPersistedModel( 1013 java.io.Serializable primaryKeyObj) 1014 throws com.liferay.portal.kernel.exception.PortalException { 1015 return getService().getPersistedModel(primaryKeyObj); 1016 } 1017 1018 public static java.util.List<com.liferay.portal.model.Group> getRoleGroups( 1019 long roleId) { 1020 return getService().getRoleGroups(roleId); 1021 } 1022 1023 public static java.util.List<com.liferay.portal.model.Group> getRoleGroups( 1024 long roleId, int start, int end) { 1025 return getService().getRoleGroups(roleId, start, end); 1026 } 1027 1028 public static java.util.List<com.liferay.portal.model.Group> getRoleGroups( 1029 long roleId, int start, int end, 1030 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> orderByComparator) { 1031 return getService().getRoleGroups(roleId, start, end, orderByComparator); 1032 } 1033 1034 public static int getRoleGroupsCount(long roleId) { 1035 return getService().getRoleGroupsCount(roleId); 1036 } 1037 1038 /** 1039 * Returns the roleIds of the roles associated with the group. 1040 * 1041 * @param groupId the groupId of the group 1042 * @return long[] the roleIds of roles associated with the group 1043 */ 1044 public static long[] getRolePrimaryKeys(long groupId) { 1045 return getService().getRolePrimaryKeys(groupId); 1046 } 1047 1048 /** 1049 * Returns the staging group. 1050 * 1051 * @param liveGroupId the primary key of the live group 1052 * @return the staging group 1053 * @throws PortalException if a portal exception occurred 1054 */ 1055 public static com.liferay.portal.model.Group getStagingGroup( 1056 long liveGroupId) 1057 throws com.liferay.portal.kernel.exception.PortalException { 1058 return getService().getStagingGroup(liveGroupId); 1059 } 1060 1061 /** 1062 * Returns the group directly associated with the user. 1063 * 1064 * @param companyId the primary key of the company 1065 * @param userId the primary key of the user 1066 * @return the group directly associated with the user 1067 * @throws PortalException if a portal exception occurred 1068 */ 1069 public static com.liferay.portal.model.Group getUserGroup(long companyId, 1070 long userId) throws com.liferay.portal.kernel.exception.PortalException { 1071 return getService().getUserGroup(companyId, userId); 1072 } 1073 1074 /** 1075 * Returns the specified "user group" group. That is, the group that 1076 * represents the {@link UserGroup} entity. 1077 * 1078 * @param companyId the primary key of the company 1079 * @param userGroupId the primary key of the user group 1080 * @return the group associated with the user group 1081 * @throws PortalException if a portal exception occurred 1082 */ 1083 public static com.liferay.portal.model.Group getUserGroupGroup( 1084 long companyId, long userGroupId) 1085 throws com.liferay.portal.kernel.exception.PortalException { 1086 return getService().getUserGroupGroup(companyId, userGroupId); 1087 } 1088 1089 public static java.util.List<com.liferay.portal.model.Group> getUserGroupGroups( 1090 long userGroupId) { 1091 return getService().getUserGroupGroups(userGroupId); 1092 } 1093 1094 public static java.util.List<com.liferay.portal.model.Group> getUserGroupGroups( 1095 long userGroupId, int start, int end) { 1096 return getService().getUserGroupGroups(userGroupId, start, end); 1097 } 1098 1099 public static java.util.List<com.liferay.portal.model.Group> getUserGroupGroups( 1100 long userGroupId, int start, int end, 1101 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> orderByComparator) { 1102 return getService() 1103 .getUserGroupGroups(userGroupId, start, end, 1104 orderByComparator); 1105 } 1106 1107 public static int getUserGroupGroupsCount(long userGroupId) { 1108 return getService().getUserGroupGroupsCount(userGroupId); 1109 } 1110 1111 /** 1112 * Returns the userGroupIds of the user groups associated with the group. 1113 * 1114 * @param groupId the groupId of the group 1115 * @return long[] the userGroupIds of user groups associated with the group 1116 */ 1117 public static long[] getUserGroupPrimaryKeys(long groupId) { 1118 return getService().getUserGroupPrimaryKeys(groupId); 1119 } 1120 1121 public static java.util.List<com.liferay.portal.model.Group> getUserGroups( 1122 long userId) { 1123 return getService().getUserGroups(userId); 1124 } 1125 1126 /** 1127 * Returns all the user's site groups and immediate organization groups, 1128 * optionally including the user's inherited organization groups and user 1129 * groups. System and staged groups are not included. 1130 * 1131 * @param userId the primary key of the user 1132 * @param inherit whether to include the user's inherited organization 1133 groups and user groups 1134 * @return the user's groups and immediate organization groups 1135 * @throws PortalException if a portal exception occurred 1136 */ 1137 public static java.util.List<com.liferay.portal.model.Group> getUserGroups( 1138 long userId, boolean inherit) 1139 throws com.liferay.portal.kernel.exception.PortalException { 1140 return getService().getUserGroups(userId, inherit); 1141 } 1142 1143 /** 1144 * Returns an ordered range of all the user's site groups and immediate 1145 * organization groups, optionally including the user's inherited 1146 * organization groups and user groups. System and staged groups are not 1147 * included. 1148 * 1149 * <p> 1150 * Useful when paginating results. Returns a maximum of <code>end - 1151 * start</code> instances. <code>start</code> and <code>end</code> are not 1152 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1153 * refers to the first result in the set. Setting both <code>start</code> 1154 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1155 * result set. 1156 * </p> 1157 * 1158 * @param userId the primary key of the user 1159 * @param inherit whether to include the user's inherited organization 1160 groups and user groups 1161 * @param start the lower bound of the range of groups to return 1162 * @param end the upper bound of the range of groups to return (not 1163 inclusive) 1164 * @return the range of the user's groups and immediate organization groups 1165 ordered by name 1166 * @throws PortalException if a portal exception occurred 1167 */ 1168 public static java.util.List<com.liferay.portal.model.Group> getUserGroups( 1169 long userId, boolean inherit, int start, int end) 1170 throws com.liferay.portal.kernel.exception.PortalException { 1171 return getService().getUserGroups(userId, inherit, start, end); 1172 } 1173 1174 public static java.util.List<com.liferay.portal.model.Group> getUserGroups( 1175 long userId, int start, int end) { 1176 return getService().getUserGroups(userId, start, end); 1177 } 1178 1179 /** 1180 * @throws PortalException 1181 */ 1182 public static java.util.List<com.liferay.portal.model.Group> getUserGroups( 1183 long userId, int start, int end, 1184 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> orderByComparator) 1185 throws com.liferay.portal.kernel.exception.PortalException { 1186 return getService().getUserGroups(userId, start, end, orderByComparator); 1187 } 1188 1189 public static int getUserGroupsCount(long userId) { 1190 return getService().getUserGroupsCount(userId); 1191 } 1192 1193 /** 1194 * Returns the groups associated with the user groups. 1195 * 1196 * @param userGroups the user groups 1197 * @return the groups associated with the user groups 1198 * @throws PortalException if a portal exception occurred 1199 */ 1200 public static java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups( 1201 java.util.List<com.liferay.portal.model.UserGroup> userGroups) 1202 throws com.liferay.portal.kernel.exception.PortalException { 1203 return getService().getUserGroupsGroups(userGroups); 1204 } 1205 1206 /** 1207 * Returns all the groups related to the user groups. 1208 * 1209 * @param userGroups the user groups 1210 * @return the groups related to the user groups 1211 */ 1212 public static java.util.List<com.liferay.portal.model.Group> getUserGroupsRelatedGroups( 1213 java.util.List<com.liferay.portal.model.UserGroup> userGroups) { 1214 return getService().getUserGroupsRelatedGroups(userGroups); 1215 } 1216 1217 /** 1218 * Returns the range of all groups associated with the user's organization 1219 * groups, including the ancestors of the organization groups, unless portal 1220 * property <code>organizations.membership.strict</code> is set to 1221 * <code>true</code>. 1222 * 1223 * <p> 1224 * Useful when paginating results. Returns a maximum of <code>end - 1225 * start</code> instances. <code>start</code> and <code>end</code> are not 1226 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1227 * refers to the first result in the set. Setting both <code>start</code> 1228 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1229 * result set. 1230 * </p> 1231 * 1232 * @param userId the primary key of the user 1233 * @param start the lower bound of the range of groups to consider 1234 * @param end the upper bound of the range of groups to consider (not 1235 inclusive) 1236 * @return the range of groups associated with the user's organization 1237 groups 1238 * @throws PortalException if a portal exception occurred 1239 */ 1240 public static java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups( 1241 long userId, int start, int end) 1242 throws com.liferay.portal.kernel.exception.PortalException { 1243 return getService().getUserOrganizationsGroups(userId, start, end); 1244 } 1245 1246 /** 1247 * Returns the default user's personal site group. 1248 * 1249 * @param companyId the primary key of the company 1250 * @return the default user's personal site group 1251 * @throws PortalException if a portal exception occurred 1252 */ 1253 public static com.liferay.portal.model.Group getUserPersonalSiteGroup( 1254 long companyId) 1255 throws com.liferay.portal.kernel.exception.PortalException { 1256 return getService().getUserPersonalSiteGroup(companyId); 1257 } 1258 1259 /** 1260 * Returns the userIds of the users associated with the group. 1261 * 1262 * @param groupId the groupId of the group 1263 * @return long[] the userIds of users associated with the group 1264 */ 1265 public static long[] getUserPrimaryKeys(long groupId) { 1266 return getService().getUserPrimaryKeys(groupId); 1267 } 1268 1269 public static java.util.List<com.liferay.portal.model.Group> getUserSitesGroups( 1270 long userId) throws com.liferay.portal.kernel.exception.PortalException { 1271 return getService().getUserSitesGroups(userId); 1272 } 1273 1274 public static java.util.List<com.liferay.portal.model.Group> getUserSitesGroups( 1275 long userId, boolean includeAdministrative) 1276 throws com.liferay.portal.kernel.exception.PortalException { 1277 return getService().getUserSitesGroups(userId, includeAdministrative); 1278 } 1279 1280 public static boolean hasOrganizationGroup(long organizationId, long groupId) { 1281 return getService().hasOrganizationGroup(organizationId, groupId); 1282 } 1283 1284 public static boolean hasOrganizationGroups(long organizationId) { 1285 return getService().hasOrganizationGroups(organizationId); 1286 } 1287 1288 public static boolean hasRoleGroup(long roleId, long groupId) { 1289 return getService().hasRoleGroup(roleId, groupId); 1290 } 1291 1292 public static boolean hasRoleGroups(long roleId) { 1293 return getService().hasRoleGroups(roleId); 1294 } 1295 1296 /** 1297 * Returns <code>true</code> if the live group has a staging group. 1298 * 1299 * @param liveGroupId the primary key of the live group 1300 * @return <code>true</code> if the live group has a staging group; 1301 <code>false</code> otherwise 1302 */ 1303 public static boolean hasStagingGroup(long liveGroupId) { 1304 return getService().hasStagingGroup(liveGroupId); 1305 } 1306 1307 public static boolean hasUserGroup(long userId, long groupId) { 1308 return getService().hasUserGroup(userId, groupId); 1309 } 1310 1311 /** 1312 * Returns <code>true</code> if the user is immediately associated with the 1313 * group, or optionally if the user is associated with the group via the 1314 * user's organizations, inherited organizations, or user groups. 1315 * 1316 * @param userId the primary key of the user 1317 * @param groupId the primary key of the group 1318 * @param inherit whether to include organization groups and user groups to 1319 which the user belongs in the determination 1320 * @return <code>true</code> if the user is associated with the group; 1321 <code>false</code> otherwise 1322 */ 1323 public static boolean hasUserGroup(long userId, long groupId, 1324 boolean inherit) { 1325 return getService().hasUserGroup(userId, groupId, inherit); 1326 } 1327 1328 public static boolean hasUserGroupGroup(long userGroupId, long groupId) { 1329 return getService().hasUserGroupGroup(userGroupId, groupId); 1330 } 1331 1332 public static boolean hasUserGroupGroups(long userGroupId) { 1333 return getService().hasUserGroupGroups(userGroupId); 1334 } 1335 1336 public static boolean hasUserGroups(long userId) { 1337 return getService().hasUserGroups(userId); 1338 } 1339 1340 /** 1341 * Returns the group with the matching group key by first searching the 1342 * system groups and then using the finder cache. 1343 * 1344 * @param companyId the primary key of the company 1345 * @param groupKey the group key 1346 * @return the group with the group key and associated company, or 1347 <code>null</code> if a matching group could not be found 1348 */ 1349 public static com.liferay.portal.model.Group loadFetchGroup( 1350 long companyId, java.lang.String groupKey) { 1351 return getService().loadFetchGroup(companyId, groupKey); 1352 } 1353 1354 /** 1355 * Returns the group with the matching group key. 1356 * 1357 * @param companyId the primary key of the company 1358 * @param groupKey the group key 1359 * @return the group with the group key and associated company 1360 * @throws PortalException if a portal exception occurred 1361 */ 1362 public static com.liferay.portal.model.Group loadGetGroup(long companyId, 1363 java.lang.String groupKey) 1364 throws com.liferay.portal.kernel.exception.PortalException { 1365 return getService().loadGetGroup(companyId, groupKey); 1366 } 1367 1368 /** 1369 * Rebuilds the group tree. 1370 * 1371 * <p> 1372 * Only call this method if the tree has become stale through operations 1373 * other than normal CRUD. Under normal circumstances the tree is 1374 * automatically rebuilt whenever necessary. 1375 * </p> 1376 * 1377 * @param companyId the primary key of the group's company 1378 * @throws PortalException if a portal exception occurred 1379 */ 1380 public static void rebuildTree(long companyId) 1381 throws com.liferay.portal.kernel.exception.PortalException { 1382 getService().rebuildTree(companyId); 1383 } 1384 1385 /** 1386 * Returns an ordered range of all the groups that match the class name IDs 1387 * and keywords, optionally including the user's inherited organization 1388 * groups and user groups. System and staged groups are not included. 1389 * 1390 * <p> 1391 * Useful when paginating results. Returns a maximum of <code>end - 1392 * start</code> instances. <code>start</code> and <code>end</code> are not 1393 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1394 * refers to the first result in the set. Setting both <code>start</code> 1395 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1396 * result set. 1397 * </p> 1398 * 1399 * @param companyId the primary key of the company 1400 * @param classNameIds the primary keys of the class names of the entities 1401 the groups are related to (optionally <code>null</code>) 1402 * @param keywords the keywords (space separated), which may occur in the 1403 sites's name, or description (optionally <code>null</code>) 1404 * @param params the finder params (optionally <code>null</code>). To 1405 include a user's organizations, inherited organizations, and user 1406 groups in the search, add an entry with key 1407 "usersGroups" mapped to the user's ID and an entry with 1408 key "inherit" mapped to a non-<code>null</code> object. 1409 For more information see {@link 1410 com.liferay.portal.service.persistence.GroupFinder}. 1411 * @param start the lower bound of the range of groups to return 1412 * @param end the upper bound of the range of groups to return (not 1413 inclusive) 1414 * @return the matching groups ordered by name 1415 */ 1416 public static java.util.List<com.liferay.portal.model.Group> search( 1417 long companyId, long[] classNameIds, java.lang.String keywords, 1418 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1419 int start, int end) { 1420 return getService() 1421 .search(companyId, classNameIds, keywords, params, start, end); 1422 } 1423 1424 /** 1425 * Returns an ordered range of all the groups that match the class name IDs 1426 * and keywords, optionally including the user's inherited organization 1427 * groups and user groups. System and staged groups are not included. 1428 * 1429 * <p> 1430 * Useful when paginating results. Returns a maximum of <code>end - 1431 * start</code> instances. <code>start</code> and <code>end</code> are not 1432 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1433 * refers to the first result in the set. Setting both <code>start</code> 1434 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1435 * result set. 1436 * </p> 1437 * 1438 * @param companyId the primary key of the company 1439 * @param classNameIds the primary keys of the class names of the entities 1440 the groups are related to (optionally <code>null</code>) 1441 * @param keywords the keywords (space separated), which may occur in the 1442 sites's name, or description (optionally <code>null</code>) 1443 * @param params the finder params (optionally <code>null</code>). To 1444 include a user's organizations, inherited organizations, and user 1445 groups in the search, add an entry with key 1446 "usersGroups" mapped to the user's ID and an entry with 1447 key "inherit" mapped to a non-<code>null</code> object. 1448 For more information see {@link 1449 com.liferay.portal.service.persistence.GroupFinder}. 1450 * @param start the lower bound of the range of groups to return 1451 * @param end the upper bound of the range of groups to return (not 1452 inclusive) 1453 * @param obc the comparator to order the groups (optionally 1454 <code>null</code>) 1455 * @return the matching groups ordered by comparator <code>obc</code> 1456 */ 1457 public static java.util.List<com.liferay.portal.model.Group> search( 1458 long companyId, long[] classNameIds, java.lang.String keywords, 1459 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1460 int start, int end, 1461 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> obc) { 1462 return getService() 1463 .search(companyId, classNameIds, keywords, params, start, 1464 end, obc); 1465 } 1466 1467 /** 1468 * Returns an ordered range of all the groups that match the class name IDs, 1469 * name, and description, optionally including the user's inherited 1470 * organization groups and user groups. System and staged groups are not 1471 * included. 1472 * 1473 * <p> 1474 * Useful when paginating results. Returns a maximum of <code>end - 1475 * start</code> instances. <code>start</code> and <code>end</code> are not 1476 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1477 * refers to the first result in the set. Setting both <code>start</code> 1478 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1479 * result set. 1480 * </p> 1481 * 1482 * @param companyId the primary key of the company 1483 * @param classNameIds the primary keys of the class names of the entities 1484 the groups are related to (optionally <code>null</code>) 1485 * @param name the group's name (optionally <code>null</code>) 1486 * @param description the group's description (optionally 1487 <code>null</code>) 1488 * @param params the finder params (optionally <code>null</code>). To 1489 include a user's organizations, inherited organizations, and user 1490 groups in the search, add an entry with key 1491 "usersGroups" mapped to the user's ID and an entry with 1492 key "inherit" mapped to a non-<code>null</code> object. 1493 For more information see {@link 1494 com.liferay.portal.service.persistence.GroupFinder}. 1495 * @param andOperator whether every field must match its keywords, or just 1496 one field. 1497 * @param start the lower bound of the range of groups to return 1498 * @param end the upper bound of the range of groups to return (not 1499 inclusive) 1500 * @return the matching groups ordered by name 1501 */ 1502 public static java.util.List<com.liferay.portal.model.Group> search( 1503 long companyId, long[] classNameIds, java.lang.String name, 1504 java.lang.String description, 1505 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1506 boolean andOperator, int start, int end) { 1507 return getService() 1508 .search(companyId, classNameIds, name, description, params, 1509 andOperator, start, end); 1510 } 1511 1512 /** 1513 * Returns an ordered range of all the groups that match the class name IDs, 1514 * name, and description, optionally including the user's inherited 1515 * organization groups and user groups. System and staged groups are not 1516 * included. 1517 * 1518 * <p> 1519 * Useful when paginating results. Returns a maximum of <code>end - 1520 * start</code> instances. <code>start</code> and <code>end</code> are not 1521 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1522 * refers to the first result in the set. Setting both <code>start</code> 1523 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1524 * result set. 1525 * </p> 1526 * 1527 * @param companyId the primary key of the company 1528 * @param classNameIds the primary keys of the class names of the entities 1529 the groups are related to (optionally <code>null</code>) 1530 * @param name the group's name (optionally <code>null</code>) 1531 * @param description the group's description (optionally 1532 <code>null</code>) 1533 * @param params the finder params (optionally <code>null</code>). To 1534 include a user's organizations, inherited organizations, and user 1535 groups in the search, add an entry with key 1536 "usersGroups" mapped to the user's ID and an entry with 1537 key "inherit" mapped to a non-<code>null</code> object. 1538 For more information see {@link 1539 com.liferay.portal.service.persistence.GroupFinder}. 1540 * @param andOperator whether every field must match its keywords, or just 1541 one field. 1542 * @param start the lower bound of the range of groups to return 1543 * @param end the upper bound of the range of groups to return (not 1544 inclusive) 1545 * @param obc the comparator to order the groups (optionally 1546 <code>null</code>) 1547 * @return the matching groups ordered by comparator <code>obc</code> 1548 */ 1549 public static java.util.List<com.liferay.portal.model.Group> search( 1550 long companyId, long[] classNameIds, java.lang.String name, 1551 java.lang.String description, 1552 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1553 boolean andOperator, int start, int end, 1554 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> obc) { 1555 return getService() 1556 .search(companyId, classNameIds, name, description, params, 1557 andOperator, start, end, obc); 1558 } 1559 1560 /** 1561 * Returns an ordered range of all the groups belonging to the parent group 1562 * that match the class name IDs and keywords, optionally including the 1563 * user's inherited organization groups and user groups. System and staged 1564 * groups are not included. 1565 * 1566 * <p> 1567 * Useful when paginating results. Returns a maximum of <code>end - 1568 * start</code> instances. <code>start</code> and <code>end</code> are not 1569 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1570 * refers to the first result in the set. Setting both <code>start</code> 1571 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1572 * result set. 1573 * </p> 1574 * 1575 * @param companyId the primary key of the company 1576 * @param classNameIds the primary keys of the class names of the entities 1577 the groups are related to (optionally <code>null</code>) 1578 * @param parentGroupId the primary key of the parent group 1579 * @param keywords the keywords (space separated), which may occur in the 1580 sites's name, or description (optionally <code>null</code>) 1581 * @param params the finder params (optionally <code>null</code>). To 1582 include a user's organizations, inherited organizations, and user 1583 groups in the search, add an entry with key 1584 "usersGroups" mapped to the user's ID and an entry with 1585 key "inherit" mapped to a non-<code>null</code> object. 1586 For more information see {@link 1587 com.liferay.portal.service.persistence.GroupFinder}. 1588 * @param start the lower bound of the range of groups to return 1589 * @param end the upper bound of the range of groups to return (not 1590 inclusive) 1591 * @return the matching groups ordered by name 1592 */ 1593 public static java.util.List<com.liferay.portal.model.Group> search( 1594 long companyId, long[] classNameIds, long parentGroupId, 1595 java.lang.String keywords, 1596 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1597 int start, int end) { 1598 return getService() 1599 .search(companyId, classNameIds, parentGroupId, keywords, 1600 params, start, end); 1601 } 1602 1603 /** 1604 * Returns an ordered range of all the groups belonging to the parent group 1605 * that match the class name IDs and keywords, optionally including the 1606 * user's inherited organization groups and user groups. System and staged 1607 * groups are not included. 1608 * 1609 * <p> 1610 * Useful when paginating results. Returns a maximum of <code>end - 1611 * start</code> instances. <code>start</code> and <code>end</code> are not 1612 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1613 * refers to the first result in the set. Setting both <code>start</code> 1614 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1615 * result set. 1616 * </p> 1617 * 1618 * @param companyId the primary key of the company 1619 * @param classNameIds the primary keys of the class names of the entities 1620 the groups are related to (optionally <code>null</code>) 1621 * @param parentGroupId the primary key of the parent group 1622 * @param keywords the keywords (space separated), which may occur in the 1623 sites's name, or description (optionally <code>null</code>) 1624 * @param params the finder params (optionally <code>null</code>). To 1625 include a user's organizations, inherited organizations, and user 1626 groups in the search, add an entry with key 1627 "usersGroups" mapped to the user's ID and an entry with 1628 key "inherit" mapped to a non-<code>null</code> object. 1629 For more information see {@link 1630 com.liferay.portal.service.persistence.GroupFinder}. 1631 * @param start the lower bound of the range of groups to return 1632 * @param end the upper bound of the range of groups to return (not 1633 inclusive) 1634 * @param obc the comparator to order the groups (optionally 1635 <code>null</code>) 1636 * @return the matching groups ordered by comparator <code>obc</code> 1637 */ 1638 public static java.util.List<com.liferay.portal.model.Group> search( 1639 long companyId, long[] classNameIds, long parentGroupId, 1640 java.lang.String keywords, 1641 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1642 int start, int end, 1643 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> obc) { 1644 return getService() 1645 .search(companyId, classNameIds, parentGroupId, keywords, 1646 params, start, end, obc); 1647 } 1648 1649 /** 1650 * Returns an ordered range of all the groups belonging to the parent group 1651 * that match the class name IDs, name, and description, optionally 1652 * including the user's inherited organization groups and user groups. 1653 * System and staged groups are not included. 1654 * 1655 * <p> 1656 * Useful when paginating results. Returns a maximum of <code>end - 1657 * start</code> instances. <code>start</code> and <code>end</code> are not 1658 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1659 * refers to the first result in the set. Setting both <code>start</code> 1660 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1661 * result set. 1662 * </p> 1663 * 1664 * @param companyId the primary key of the company 1665 * @param classNameIds the primary keys of the class names of the entities 1666 the groups are related to (optionally <code>null</code>) 1667 * @param parentGroupId the primary key of the parent group 1668 * @param name the group's name (optionally <code>null</code>) 1669 * @param description the group's description (optionally 1670 <code>null</code>) 1671 * @param params the finder params (optionally <code>null</code>). To 1672 include a user's organizations, inherited organizations, and user 1673 groups in the search, add an entry with key 1674 "usersGroups" mapped to the user's ID and an entry with 1675 key "inherit" mapped to a non-<code>null</code> object. 1676 For more information see {@link 1677 com.liferay.portal.service.persistence.GroupFinder}. 1678 * @param andOperator whether every field must match its keywords, or just 1679 one field. 1680 * @param start the lower bound of the range of groups to return 1681 * @param end the upper bound of the range of groups to return (not 1682 inclusive) 1683 * @return the matching groups ordered by name 1684 */ 1685 public static java.util.List<com.liferay.portal.model.Group> search( 1686 long companyId, long[] classNameIds, long parentGroupId, 1687 java.lang.String name, java.lang.String description, 1688 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1689 boolean andOperator, int start, int end) { 1690 return getService() 1691 .search(companyId, classNameIds, parentGroupId, name, 1692 description, params, andOperator, start, end); 1693 } 1694 1695 /** 1696 * Returns an ordered range of all the groups belonging to the parent group 1697 * that match the class name IDs, name, and description, optionally 1698 * including the user's inherited organization groups and user groups. 1699 * System and staged groups are not included. 1700 * 1701 * <p> 1702 * Useful when paginating results. Returns a maximum of <code>end - 1703 * start</code> instances. <code>start</code> and <code>end</code> are not 1704 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1705 * refers to the first result in the set. Setting both <code>start</code> 1706 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1707 * result set. 1708 * </p> 1709 * 1710 * @param companyId the primary key of the company 1711 * @param classNameIds the primary keys of the class names of the entities 1712 the groups are related to (optionally <code>null</code>) 1713 * @param parentGroupId the primary key of the parent group 1714 * @param name the group's name (optionally <code>null</code>) 1715 * @param description the group's description (optionally 1716 <code>null</code>) 1717 * @param params the finder params (optionally <code>null</code>). To 1718 include a user's organizations, inherited organizations, and user 1719 groups in the search, add an entry with key 1720 "usersGroups" mapped to the user's ID and an entry with 1721 key "inherit" mapped to a non-<code>null</code> object. 1722 For more information see {@link 1723 com.liferay.portal.service.persistence.GroupFinder}. 1724 * @param andOperator whether every field must match its keywords, or just 1725 one field. 1726 * @param start the lower bound of the range of groups to return 1727 * @param end the upper bound of the range of groups to return (not 1728 inclusive) 1729 * @param obc the comparator to order the groups (optionally 1730 <code>null</code>) 1731 * @return the matching groups ordered by comparator <code>obc</code> 1732 */ 1733 public static java.util.List<com.liferay.portal.model.Group> search( 1734 long companyId, long[] classNameIds, long parentGroupId, 1735 java.lang.String name, java.lang.String description, 1736 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1737 boolean andOperator, int start, int end, 1738 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> obc) { 1739 return getService() 1740 .search(companyId, classNameIds, parentGroupId, name, 1741 description, params, andOperator, start, end, obc); 1742 } 1743 1744 /** 1745 * Returns an ordered range of all the groups that match the keywords, 1746 * optionally including the user's inherited organization groups and user 1747 * groups. System and staged groups are not included. 1748 * 1749 * <p> 1750 * Useful when paginating results. Returns a maximum of <code>end - 1751 * start</code> instances. <code>start</code> and <code>end</code> are not 1752 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1753 * refers to the first result in the set. Setting both <code>start</code> 1754 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1755 * result set. 1756 * </p> 1757 * 1758 * @param companyId the primary key of the company 1759 * @param keywords the keywords (space separated), which may occur in the 1760 sites's name, or description (optionally <code>null</code>) 1761 * @param params the finder params (optionally <code>null</code>). To 1762 include the user's inherited organizations and user groups in the 1763 search, add entries having "usersGroups" and 1764 "inherit" as keys mapped to the the user's ID. For more 1765 information see {@link 1766 com.liferay.portal.service.persistence.GroupFinder}. 1767 * @param start the lower bound of the range of groups to return 1768 * @param end the upper bound of the range of groups to return (not 1769 inclusive) 1770 * @return the matching groups ordered by name 1771 */ 1772 public static java.util.List<com.liferay.portal.model.Group> search( 1773 long companyId, java.lang.String keywords, 1774 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1775 int start, int end) { 1776 return getService().search(companyId, keywords, params, start, end); 1777 } 1778 1779 /** 1780 * Returns an ordered range of all the groups that match the keywords, 1781 * optionally including the user's inherited organization groups and user 1782 * groups. System and staged groups are not included. 1783 * 1784 * <p> 1785 * Useful when paginating results. Returns a maximum of <code>end - 1786 * start</code> instances. <code>start</code> and <code>end</code> are not 1787 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1788 * refers to the first result in the set. Setting both <code>start</code> 1789 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1790 * result set. 1791 * </p> 1792 * 1793 * @param companyId the primary key of the company 1794 * @param keywords the keywords (space separated), which may occur in the 1795 sites's name, or description (optionally <code>null</code>) 1796 * @param params the finder params (optionally <code>null</code>). To 1797 include the user's inherited organizations and user groups in the 1798 search, add entries having "usersGroups" and 1799 "inherit" as keys mapped to the the user's ID. For more 1800 information see {@link 1801 com.liferay.portal.service.persistence.GroupFinder}. 1802 * @param start the lower bound of the range of groups to return 1803 * @param end the upper bound of the range of groups to return (not 1804 inclusive) 1805 * @param obc the comparator to order the groups (optionally 1806 <code>null</code>) 1807 * @return the matching groups ordered by comparator <code>obc</code> 1808 */ 1809 public static java.util.List<com.liferay.portal.model.Group> search( 1810 long companyId, java.lang.String keywords, 1811 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1812 int start, int end, 1813 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> obc) { 1814 return getService().search(companyId, keywords, params, start, end, obc); 1815 } 1816 1817 /** 1818 * Returns an ordered range of all the site groups and organization groups 1819 * that match the name and description, optionally including the user's 1820 * inherited organization groups and user groups. System and staged groups 1821 * are not included. 1822 * 1823 * <p> 1824 * Useful when paginating results. Returns a maximum of <code>end - 1825 * start</code> instances. <code>start</code> and <code>end</code> are not 1826 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1827 * refers to the first result in the set. Setting both <code>start</code> 1828 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1829 * result set. 1830 * </p> 1831 * 1832 * @param companyId the primary key of the company 1833 * @param name the group's name (optionally <code>null</code>) 1834 * @param description the group's description (optionally 1835 <code>null</code>) 1836 * @param params the finder params (optionally <code>null</code>). To 1837 include the user's inherited organizations and user groups in the 1838 search, add entries having "usersGroups" and 1839 "inherit" as keys mapped to the the user's ID. For more 1840 information see {@link 1841 com.liferay.portal.service.persistence.GroupFinder}. 1842 * @param andOperator whether every field must match its keywords, or just 1843 one field. 1844 * @param start the lower bound of the range of groups to return 1845 * @param end the upper bound of the range of groups to return (not 1846 inclusive) 1847 * @return the matching groups ordered by name 1848 */ 1849 public static java.util.List<com.liferay.portal.model.Group> search( 1850 long companyId, java.lang.String name, java.lang.String description, 1851 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1852 boolean andOperator, int start, int end) { 1853 return getService() 1854 .search(companyId, name, description, params, andOperator, 1855 start, end); 1856 } 1857 1858 /** 1859 * Returns an ordered range of all the site groups and organization groups 1860 * that match the name and description, optionally including the user's 1861 * inherited organization groups and user groups. System and staged groups 1862 * are not included. 1863 * 1864 * <p> 1865 * Useful when paginating results. Returns a maximum of <code>end - 1866 * start</code> instances. <code>start</code> and <code>end</code> are not 1867 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1868 * refers to the first result in the set. Setting both <code>start</code> 1869 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1870 * result set. 1871 * </p> 1872 * 1873 * @param companyId the primary key of the company 1874 * @param name the group's name (optionally <code>null</code>) 1875 * @param description the group's description (optionally 1876 <code>null</code>) 1877 * @param params the finder params (optionally <code>null</code>). To 1878 include the user's inherited organizations and user groups in the 1879 search, add entries having "usersGroups" and 1880 "inherit" as keys mapped to the the user's ID. For more 1881 information see {@link 1882 com.liferay.portal.service.persistence.GroupFinder}. 1883 * @param andOperator whether every field must match its keywords, or just 1884 one field. 1885 * @param start the lower bound of the range of groups to return 1886 * @param end the upper bound of the range of groups to return (not 1887 inclusive) 1888 * @param obc the comparator to order the groups (optionally 1889 <code>null</code>) 1890 * @return the matching groups ordered by comparator <code>obc</code> 1891 */ 1892 public static java.util.List<com.liferay.portal.model.Group> search( 1893 long companyId, java.lang.String name, java.lang.String description, 1894 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1895 boolean andOperator, int start, int end, 1896 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> obc) { 1897 return getService() 1898 .search(companyId, name, description, params, andOperator, 1899 start, end, obc); 1900 } 1901 1902 /** 1903 * Returns an ordered range of all the company's groups, optionally 1904 * including the user's inherited organization groups and user groups. 1905 * System and staged groups are not included. 1906 * 1907 * <p> 1908 * Useful when paginating results. Returns a maximum of <code>end - 1909 * start</code> instances. <code>start</code> and <code>end</code> are not 1910 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1911 * refers to the first result in the set. Setting both <code>start</code> 1912 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1913 * result set. 1914 * </p> 1915 * 1916 * @param companyId the primary key of the company 1917 * @param params the finder params (optionally <code>null</code>). To 1918 include a user's organizations, inherited organizations, and user 1919 groups in the search, add an entry with key 1920 "usersGroups" mapped to the user's ID and an entry with 1921 key "inherit" mapped to a non-<code>null</code> object. 1922 For more information see {@link 1923 com.liferay.portal.service.persistence.GroupFinder}. 1924 * @param start the lower bound of the range of groups to return 1925 * @param end the upper bound of the range of groups to return (not 1926 inclusive) 1927 * @return the matching groups ordered by name 1928 */ 1929 public static java.util.List<com.liferay.portal.model.Group> search( 1930 long companyId, 1931 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1932 int start, int end) { 1933 return getService().search(companyId, params, start, end); 1934 } 1935 1936 /** 1937 * Returns an ordered range of all the groups belonging to the parent group 1938 * that match the keywords, optionally including the user's inherited 1939 * organization groups and user groups. System and staged groups are not 1940 * included. 1941 * 1942 * <p> 1943 * Useful when paginating results. Returns a maximum of <code>end - 1944 * start</code> instances. <code>start</code> and <code>end</code> are not 1945 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1946 * refers to the first result in the set. Setting both <code>start</code> 1947 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1948 * result set. 1949 * </p> 1950 * 1951 * @param companyId the primary key of the company 1952 * @param parentGroupId the primary key of the parent group 1953 * @param keywords the keywords (space separated), which may occur in the 1954 sites's name, or description (optionally <code>null</code>) 1955 * @param params the finder params (optionally <code>null</code>). To 1956 include the user's inherited organizations and user groups in the 1957 search, add entries having "usersGroups" and 1958 "inherit" as keys mapped to the the user's ID. For more 1959 information see {@link 1960 com.liferay.portal.service.persistence.GroupFinder}. 1961 * @param start the lower bound of the range of groups to return 1962 * @param end the upper bound of the range of groups to return (not 1963 inclusive) 1964 * @return the matching groups ordered by name 1965 */ 1966 public static java.util.List<com.liferay.portal.model.Group> search( 1967 long companyId, long parentGroupId, java.lang.String keywords, 1968 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1969 int start, int end) { 1970 return getService() 1971 .search(companyId, parentGroupId, keywords, params, start, 1972 end); 1973 } 1974 1975 /** 1976 * Returns an ordered range of all the groups belonging to the parent group 1977 * that match the keywords, optionally including the user's inherited 1978 * organization groups and user groups. System and staged groups are not 1979 * included. 1980 * 1981 * <p> 1982 * Useful when paginating results. Returns a maximum of <code>end - 1983 * start</code> instances. <code>start</code> and <code>end</code> are not 1984 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1985 * refers to the first result in the set. Setting both <code>start</code> 1986 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1987 * result set. 1988 * </p> 1989 * 1990 * @param companyId the primary key of the company 1991 * @param parentGroupId the primary key of the parent group 1992 * @param keywords the keywords (space separated), which may occur in the 1993 sites's name, or description (optionally <code>null</code>) 1994 * @param params the finder params (optionally <code>null</code>). To 1995 include the user's inherited organizations and user groups in the 1996 search, add entries having "usersGroups" and 1997 "inherit" as keys mapped to the the user's ID. For more 1998 information see {@link 1999 com.liferay.portal.service.persistence.GroupFinder}. 2000 * @param start the lower bound of the range of groups to return 2001 * @param end the upper bound of the range of groups to return (not 2002 inclusive) 2003 * @param obc the comparator to order the groups (optionally 2004 <code>null</code>) 2005 * @return the matching groups ordered by comparator <code>obc</code> 2006 */ 2007 public static java.util.List<com.liferay.portal.model.Group> search( 2008 long companyId, long parentGroupId, java.lang.String keywords, 2009 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2010 int start, int end, 2011 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> obc) { 2012 return getService() 2013 .search(companyId, parentGroupId, keywords, params, start, 2014 end, obc); 2015 } 2016 2017 /** 2018 * Returns an ordered range of all the site groups belonging to the parent 2019 * group and organization groups that match the name and description, 2020 * optionally including the user's inherited organization groups and user 2021 * groups. System and staged groups are not included. 2022 * 2023 * <p> 2024 * Useful when paginating results. Returns a maximum of <code>end - 2025 * start</code> instances. <code>start</code> and <code>end</code> are not 2026 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2027 * refers to the first result in the set. Setting both <code>start</code> 2028 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 2029 * result set. 2030 * </p> 2031 * 2032 * @param companyId the primary key of the company 2033 * @param parentGroupId the primary key of the parent group 2034 * @param name the group's name (optionally <code>null</code>) 2035 * @param description the group's description (optionally 2036 <code>null</code>) 2037 * @param params the finder params (optionally <code>null</code>). To 2038 include the user's inherited organizations and user groups in the 2039 search, add entries having "usersGroups" and 2040 "inherit" as keys mapped to the the user's ID. For more 2041 information see {@link 2042 com.liferay.portal.service.persistence.GroupFinder}. 2043 * @param andOperator whether every field must match its keywords, or just 2044 one field. 2045 * @param start the lower bound of the range of groups to return 2046 * @param end the upper bound of the range of groups to return (not 2047 inclusive) 2048 * @return the matching groups ordered by name 2049 */ 2050 public static java.util.List<com.liferay.portal.model.Group> search( 2051 long companyId, long parentGroupId, java.lang.String name, 2052 java.lang.String description, 2053 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2054 boolean andOperator, int start, int end) { 2055 return getService() 2056 .search(companyId, parentGroupId, name, description, params, 2057 andOperator, start, end); 2058 } 2059 2060 /** 2061 * Returns an ordered range of all the site groups belonging to the parent 2062 * group and organization groups that match the name and description, 2063 * optionally including the user's inherited organization groups and user 2064 * groups. System and staged groups are not included. 2065 * 2066 * <p> 2067 * Useful when paginating results. Returns a maximum of <code>end - 2068 * start</code> instances. <code>start</code> and <code>end</code> are not 2069 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2070 * refers to the first result in the set. Setting both <code>start</code> 2071 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 2072 * result set. 2073 * </p> 2074 * 2075 * @param companyId the primary key of the company 2076 * @param parentGroupId the primary key of the parent group 2077 * @param name the group's name (optionally <code>null</code>) 2078 * @param description the group's description (optionally 2079 <code>null</code>) 2080 * @param params the finder params (optionally <code>null</code>). To 2081 include the user's inherited organizations and user groups in the 2082 search, add entries having "usersGroups" and 2083 "inherit" as keys mapped to the the user's ID. For more 2084 information see {@link 2085 com.liferay.portal.service.persistence.GroupFinder}. 2086 * @param andOperator whether every field must match its keywords, or just 2087 one field. 2088 * @param start the lower bound of the range of groups to return 2089 * @param end the upper bound of the range of groups to return (not 2090 inclusive) 2091 * @param obc the comparator to order the groups (optionally 2092 <code>null</code>) 2093 * @return the matching groups ordered by comparator <code>obc</code> 2094 */ 2095 public static java.util.List<com.liferay.portal.model.Group> search( 2096 long companyId, long parentGroupId, java.lang.String name, 2097 java.lang.String description, 2098 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2099 boolean andOperator, int start, int end, 2100 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> obc) { 2101 return getService() 2102 .search(companyId, parentGroupId, name, description, params, 2103 andOperator, start, end, obc); 2104 } 2105 2106 /** 2107 * Returns the number of groups that match the class name IDs, and keywords, 2108 * optionally including the user's inherited organization groups and user 2109 * groups. System and staged groups are not included. 2110 * 2111 * @param companyId the primary key of the company 2112 * @param classNameIds the primary keys of the class names of the entities 2113 the groups are related to (optionally <code>null</code>) 2114 * @param keywords the keywords (space separated), which may occur in the 2115 sites's name, or description (optionally <code>null</code>) 2116 * @param params the finder params (optionally <code>null</code>). To 2117 include the user's inherited organization groups and user groups 2118 in the search, add entries having "usersGroups" and 2119 "inherit" as keys mapped to the the user's ID. For more 2120 information see {@link 2121 com.liferay.portal.service.persistence.GroupFinder}. 2122 * @return the number of matching groups 2123 */ 2124 public static int searchCount(long companyId, long[] classNameIds, 2125 java.lang.String keywords, 2126 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) { 2127 return getService() 2128 .searchCount(companyId, classNameIds, keywords, params); 2129 } 2130 2131 /** 2132 * Returns the number of groups that match the class name IDs, name, and 2133 * description, optionally including the user's inherited organization 2134 * groups and user groups. System and staged groups are not included. 2135 * 2136 * @param companyId the primary key of the company 2137 * @param classNameIds the primary keys of the class names of the entities 2138 the groups are related to (optionally <code>null</code>) 2139 * @param name the group's name (optionally <code>null</code>) 2140 * @param description the group's description (optionally 2141 <code>null</code>) 2142 * @param params the finder params (optionally <code>null</code>). To 2143 include the user's inherited organization groups and user groups 2144 in the search, add entries having "usersGroups" and 2145 "inherit" as keys mapped to the the user's ID. For more 2146 information see {@link 2147 com.liferay.portal.service.persistence.GroupFinder}. 2148 * @param andOperator whether every field must match its keywords, or just 2149 one field. 2150 * @return the number of matching groups 2151 */ 2152 public static int searchCount(long companyId, long[] classNameIds, 2153 java.lang.String name, java.lang.String description, 2154 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2155 boolean andOperator) { 2156 return getService() 2157 .searchCount(companyId, classNameIds, name, description, 2158 params, andOperator); 2159 } 2160 2161 /** 2162 * Returns the number of groups belonging to the parent group that match the 2163 * class name IDs, and keywords, optionally including the user's inherited 2164 * organization groups and user groups. System and staged groups are not 2165 * included. 2166 * 2167 * @param companyId the primary key of the company 2168 * @param classNameIds the primary keys of the class names of the entities 2169 the groups are related to (optionally <code>null</code>) 2170 * @param parentGroupId the primary key of the parent group 2171 * @param keywords the keywords (space separated), which may occur in the 2172 sites's name, or description (optionally <code>null</code>) 2173 * @param params the finder params (optionally <code>null</code>). To 2174 include the user's inherited organization groups and user groups 2175 in the search, add entries having "usersGroups" and 2176 "inherit" as keys mapped to the the user's ID. For more 2177 information see {@link 2178 com.liferay.portal.service.persistence.GroupFinder}. 2179 * @return the number of matching groups 2180 */ 2181 public static int searchCount(long companyId, long[] classNameIds, 2182 long parentGroupId, java.lang.String keywords, 2183 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) { 2184 return getService() 2185 .searchCount(companyId, classNameIds, parentGroupId, 2186 keywords, params); 2187 } 2188 2189 /** 2190 * Returns the number of groups belonging to the parent group that match the 2191 * class name IDs, name, and description, optionally including the user's 2192 * inherited organization groups and user groups. System and staged groups 2193 * are not included. 2194 * 2195 * @param companyId the primary key of the company 2196 * @param classNameIds the primary keys of the class names of the entities 2197 the groups are related to (optionally <code>null</code>) 2198 * @param parentGroupId the primary key of the parent group 2199 * @param name the group's name (optionally <code>null</code>) 2200 * @param description the group's description (optionally 2201 <code>null</code>) 2202 * @param params the finder params (optionally <code>null</code>). To 2203 include the user's inherited organization groups and user groups 2204 in the search, add entries having "usersGroups" and 2205 "inherit" as keys mapped to the the user's ID. For more 2206 information see {@link 2207 com.liferay.portal.service.persistence.GroupFinder}. 2208 * @param andOperator whether every field must match its keywords, or just 2209 one field. 2210 * @return the number of matching groups 2211 */ 2212 public static int searchCount(long companyId, long[] classNameIds, 2213 long parentGroupId, java.lang.String name, 2214 java.lang.String description, 2215 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2216 boolean andOperator) { 2217 return getService() 2218 .searchCount(companyId, classNameIds, parentGroupId, name, 2219 description, params, andOperator); 2220 } 2221 2222 /** 2223 * Returns the number of groups that match the keywords, optionally 2224 * including the user's inherited organization groups and user groups. 2225 * System and staged groups are not included. 2226 * 2227 * @param companyId the primary key of the company 2228 * @param keywords the keywords (space separated), which may occur in the 2229 sites's name, or description (optionally <code>null</code>) 2230 * @param params the finder params (optionally <code>null</code>). To 2231 include the user's inherited organization groups and user groups 2232 in the search, add entries having "usersGroups" and 2233 "inherit" as keys mapped to the the user's ID. For more 2234 information see {@link 2235 com.liferay.portal.service.persistence.GroupFinder}. 2236 * @return the number of matching groups 2237 */ 2238 public static int searchCount(long companyId, java.lang.String keywords, 2239 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) { 2240 return getService().searchCount(companyId, keywords, params); 2241 } 2242 2243 /** 2244 * Returns the number of groups and immediate organization groups that match 2245 * the name and description, optionally including the user's inherited 2246 * organization groups and user groups. System and staged groups are not 2247 * included. 2248 * 2249 * @param companyId the primary key of the company 2250 * @param name the group's name (optionally <code>null</code>) 2251 * @param description the group's description (optionally 2252 <code>null</code>) 2253 * @param params the finder params (optionally <code>null</code>). To 2254 include the user's inherited organization groups and user groups 2255 in the search, add entries having "usersGroups" and 2256 "inherit" as keys mapped to the the user's ID. For more 2257 information see {@link 2258 com.liferay.portal.service.persistence.GroupFinder}. 2259 * @param andOperator whether every field must match its keywords, or just 2260 one field. 2261 * @return the number of matching groups 2262 */ 2263 public static int searchCount(long companyId, java.lang.String name, 2264 java.lang.String description, 2265 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2266 boolean andOperator) { 2267 return getService() 2268 .searchCount(companyId, name, description, params, 2269 andOperator); 2270 } 2271 2272 /** 2273 * Returns the number of groups belonging to the parent group that match the 2274 * keywords, optionally including the user's inherited organization groups 2275 * and user groups. System and staged groups are not included. 2276 * 2277 * @param companyId the primary key of the company 2278 * @param parentGroupId the primary key of the parent group 2279 * @param keywords the keywords (space separated), which may occur in the 2280 sites's name, or description (optionally <code>null</code>) 2281 * @param params the finder params (optionally <code>null</code>). To 2282 include the user's inherited organization groups and user groups 2283 in the search, add entries having "usersGroups" and 2284 "inherit" as keys mapped to the the user's ID. For more 2285 information see {@link 2286 com.liferay.portal.service.persistence.GroupFinder}. 2287 * @return the number of matching groups 2288 */ 2289 public static int searchCount(long companyId, long parentGroupId, 2290 java.lang.String keywords, 2291 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) { 2292 return getService() 2293 .searchCount(companyId, parentGroupId, keywords, params); 2294 } 2295 2296 /** 2297 * Returns the number of groups belonging to the parent group and immediate 2298 * organization groups that match the name and description, optionally 2299 * including the user's inherited organization groups and user groups. 2300 * System and staged groups are not included. 2301 * 2302 * @param companyId the primary key of the company 2303 * @param parentGroupId the primary key of the parent group 2304 * @param name the group's name (optionally <code>null</code>) 2305 * @param description the group's description (optionally 2306 <code>null</code>) 2307 * @param params the finder params (optionally <code>null</code>). To 2308 include the user's inherited organization groups and user groups 2309 in the search, add entries having "usersGroups" and 2310 "inherit" as keys mapped to the the user's ID. For more 2311 information see {@link 2312 com.liferay.portal.service.persistence.GroupFinder}. 2313 * @param andOperator whether every field must match its keywords, or just 2314 one field. 2315 * @return the number of matching groups 2316 */ 2317 public static int searchCount(long companyId, long parentGroupId, 2318 java.lang.String name, java.lang.String description, 2319 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2320 boolean andOperator) { 2321 return getService() 2322 .searchCount(companyId, parentGroupId, name, description, 2323 params, andOperator); 2324 } 2325 2326 public static void setOrganizationGroups(long organizationId, 2327 long[] groupIds) { 2328 getService().setOrganizationGroups(organizationId, groupIds); 2329 } 2330 2331 public static void setRoleGroups(long roleId, long[] groupIds) { 2332 getService().setRoleGroups(roleId, groupIds); 2333 } 2334 2335 public static void setUserGroupGroups(long userGroupId, long[] groupIds) { 2336 getService().setUserGroupGroups(userGroupId, groupIds); 2337 } 2338 2339 public static void setUserGroups(long userId, long[] groupIds) { 2340 getService().setUserGroups(userId, groupIds); 2341 } 2342 2343 /** 2344 * Removes the groups from the role. 2345 * 2346 * @param roleId the primary key of the role 2347 * @param groupIds the primary keys of the groups 2348 */ 2349 public static void unsetRoleGroups(long roleId, long[] groupIds) { 2350 getService().unsetRoleGroups(roleId, groupIds); 2351 } 2352 2353 /** 2354 * Removes the user from the groups. 2355 * 2356 * @param userId the primary key of the user 2357 * @param groupIds the primary keys of the groups 2358 */ 2359 public static void unsetUserGroups(long userId, long[] groupIds) { 2360 getService().unsetUserGroups(userId, groupIds); 2361 } 2362 2363 /** 2364 * Updates the group's asset replacing categories and tag names. 2365 * 2366 * @param userId the primary key of the user 2367 * @param group the group 2368 * @param assetCategoryIds the primary keys of the asset categories 2369 (optionally <code>null</code>) 2370 * @param assetTagNames the asset tag names (optionally <code>null</code>) 2371 * @throws PortalException if a portal exception occurred 2372 */ 2373 public static void updateAsset(long userId, 2374 com.liferay.portal.model.Group group, long[] assetCategoryIds, 2375 java.lang.String[] assetTagNames) 2376 throws com.liferay.portal.kernel.exception.PortalException { 2377 getService().updateAsset(userId, group, assetCategoryIds, assetTagNames); 2378 } 2379 2380 /** 2381 * Updates the group's friendly URL. 2382 * 2383 * @param groupId the primary key of the group 2384 * @param friendlyURL the group's new friendlyURL (optionally 2385 <code>null</code>) 2386 * @return the group 2387 * @throws PortalException if a portal exception occurred 2388 */ 2389 public static com.liferay.portal.model.Group updateFriendlyURL( 2390 long groupId, java.lang.String friendlyURL) 2391 throws com.liferay.portal.kernel.exception.PortalException { 2392 return getService().updateFriendlyURL(groupId, friendlyURL); 2393 } 2394 2395 /** 2396 * Updates the group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 2397 * 2398 * @param group the group 2399 * @return the group that was updated 2400 */ 2401 public static com.liferay.portal.model.Group updateGroup( 2402 com.liferay.portal.model.Group group) { 2403 return getService().updateGroup(group); 2404 } 2405 2406 /** 2407 * Updates the group. 2408 * 2409 * @param groupId the primary key of the group 2410 * @param parentGroupId the primary key of the parent group 2411 * @param name the name's key 2412 * @param description the group's new description (optionally 2413 <code>null</code>) 2414 * @param type the group's new type. For more information see {@link 2415 GroupConstants}. 2416 * @param manualMembership whether manual membership is allowed for the 2417 group 2418 * @param membershipRestriction the group's membership restriction. For 2419 more information see {@link GroupConstants}. 2420 * @param friendlyURL the group's new friendlyURL (optionally 2421 <code>null</code>) 2422 * @param inheritContent whether to inherit content from the parent 2423 group 2424 * @param active whether the group is active 2425 * @param serviceContext the service context to be applied (optionally 2426 <code>null</code>). Can set asset category IDs and asset tag 2427 names for the group. 2428 * @return the group 2429 * @throws PortalException if a portal exception occurred 2430 * @deprecated As of 7.0.0, replaced by {@link #updateGroup(long, long, Map, 2431 Map, int, boolean, int, String, boolean, boolean, 2432 ServiceContext)} 2433 */ 2434 @Deprecated 2435 public static com.liferay.portal.model.Group updateGroup(long groupId, 2436 long parentGroupId, java.lang.String name, 2437 java.lang.String description, int type, boolean manualMembership, 2438 int membershipRestriction, java.lang.String friendlyURL, 2439 boolean inheritContent, boolean active, 2440 com.liferay.portal.service.ServiceContext serviceContext) 2441 throws com.liferay.portal.kernel.exception.PortalException { 2442 return getService() 2443 .updateGroup(groupId, parentGroupId, name, description, 2444 type, manualMembership, membershipRestriction, friendlyURL, 2445 inheritContent, active, serviceContext); 2446 } 2447 2448 public static com.liferay.portal.model.Group updateGroup(long groupId, 2449 long parentGroupId, 2450 java.util.Map<java.util.Locale, java.lang.String> nameMap, 2451 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 2452 int type, boolean manualMembership, int membershipRestriction, 2453 java.lang.String friendlyURL, boolean inheritContent, boolean active, 2454 com.liferay.portal.service.ServiceContext serviceContext) 2455 throws com.liferay.portal.kernel.exception.PortalException { 2456 return getService() 2457 .updateGroup(groupId, parentGroupId, nameMap, 2458 descriptionMap, type, manualMembership, membershipRestriction, 2459 friendlyURL, inheritContent, active, serviceContext); 2460 } 2461 2462 /** 2463 * Updates the group's type settings. 2464 * 2465 * @param groupId the primary key of the group 2466 * @param typeSettings the group's new type settings (optionally 2467 <code>null</code>) 2468 * @return the group 2469 * @throws PortalException if a portal exception occurred 2470 */ 2471 public static com.liferay.portal.model.Group updateGroup(long groupId, 2472 java.lang.String typeSettings) 2473 throws com.liferay.portal.kernel.exception.PortalException { 2474 return getService().updateGroup(groupId, typeSettings); 2475 } 2476 2477 /** 2478 * Associates the group with a main site if the group is an organization. 2479 * 2480 * @param groupId the primary key of the group 2481 * @param site whether the group is to be associated with a main site 2482 * @return the group 2483 * @throws PortalException if a portal exception occurred 2484 */ 2485 public static com.liferay.portal.model.Group updateSite(long groupId, 2486 boolean site) 2487 throws com.liferay.portal.kernel.exception.PortalException { 2488 return getService().updateSite(groupId, site); 2489 } 2490 2491 public static GroupLocalService getService() { 2492 if (_service == null) { 2493 _service = (GroupLocalService)PortalBeanLocatorUtil.locate(GroupLocalService.class.getName()); 2494 2495 ReferenceRegistry.registerReference(GroupLocalServiceUtil.class, 2496 "_service"); 2497 } 2498 2499 return _service; 2500 } 2501 2502 private static GroupLocalService _service; 2503 }