001 /** 002 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.service; 016 017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.util.MethodCache; 019 import com.liferay.portal.kernel.util.ReferenceRegistry; 020 021 /** 022 * The utility for the group local service. This utility wraps {@link com.liferay.portal.service.impl.GroupLocalServiceImpl} and is the primary access point for service operations in application layer code running on the local server. 023 * 024 * <p> 025 * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM. 026 * </p> 027 * 028 * @author Brian Wing Shun Chan 029 * @see GroupLocalService 030 * @see com.liferay.portal.service.base.GroupLocalServiceBaseImpl 031 * @see com.liferay.portal.service.impl.GroupLocalServiceImpl 032 * @generated 033 */ 034 public class GroupLocalServiceUtil { 035 /* 036 * NOTE FOR DEVELOPERS: 037 * 038 * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.GroupLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 039 */ 040 041 /** 042 * Adds the group to the database. Also notifies the appropriate model listeners. 043 * 044 * @param group the group 045 * @return the group that was added 046 * @throws SystemException if a system exception occurred 047 */ 048 public static com.liferay.portal.model.Group addGroup( 049 com.liferay.portal.model.Group group) 050 throws com.liferay.portal.kernel.exception.SystemException { 051 return getService().addGroup(group); 052 } 053 054 /** 055 * Creates a new group with the primary key. Does not add the group to the database. 056 * 057 * @param groupId the primary key for the new group 058 * @return the new group 059 */ 060 public static com.liferay.portal.model.Group createGroup(long groupId) { 061 return getService().createGroup(groupId); 062 } 063 064 /** 065 * Deletes the group with the primary key from the database. Also notifies the appropriate model listeners. 066 * 067 * @param groupId the primary key of the group 068 * @throws PortalException if a group with the primary key could not be found 069 * @throws SystemException if a system exception occurred 070 */ 071 public static void deleteGroup(long groupId) 072 throws com.liferay.portal.kernel.exception.PortalException, 073 com.liferay.portal.kernel.exception.SystemException { 074 getService().deleteGroup(groupId); 075 } 076 077 /** 078 * Deletes the group from the database. Also notifies the appropriate model listeners. 079 * 080 * @param group the group 081 * @throws PortalException 082 * @throws SystemException if a system exception occurred 083 */ 084 public static void deleteGroup(com.liferay.portal.model.Group group) 085 throws com.liferay.portal.kernel.exception.PortalException, 086 com.liferay.portal.kernel.exception.SystemException { 087 getService().deleteGroup(group); 088 } 089 090 /** 091 * Performs a dynamic query on the database and returns the matching rows. 092 * 093 * @param dynamicQuery the dynamic query 094 * @return the matching rows 095 * @throws SystemException if a system exception occurred 096 */ 097 @SuppressWarnings("rawtypes") 098 public static java.util.List dynamicQuery( 099 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 100 throws com.liferay.portal.kernel.exception.SystemException { 101 return getService().dynamicQuery(dynamicQuery); 102 } 103 104 /** 105 * Performs a dynamic query on the database and returns a range of the matching rows. 106 * 107 * <p> 108 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 109 * </p> 110 * 111 * @param dynamicQuery the dynamic query 112 * @param start the lower bound of the range of model instances 113 * @param end the upper bound of the range of model instances (not inclusive) 114 * @return the range of matching rows 115 * @throws SystemException if a system exception occurred 116 */ 117 @SuppressWarnings("rawtypes") 118 public static java.util.List dynamicQuery( 119 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 120 int end) throws com.liferay.portal.kernel.exception.SystemException { 121 return getService().dynamicQuery(dynamicQuery, start, end); 122 } 123 124 /** 125 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 126 * 127 * <p> 128 * 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. 129 * </p> 130 * 131 * @param dynamicQuery the dynamic query 132 * @param start the lower bound of the range of model instances 133 * @param end the upper bound of the range of model instances (not inclusive) 134 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 135 * @return the ordered range of matching rows 136 * @throws SystemException if a system exception occurred 137 */ 138 @SuppressWarnings("rawtypes") 139 public static java.util.List dynamicQuery( 140 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 141 int end, 142 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 143 throws com.liferay.portal.kernel.exception.SystemException { 144 return getService() 145 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 146 } 147 148 /** 149 * Returns the number of rows that match the dynamic query. 150 * 151 * @param dynamicQuery the dynamic query 152 * @return the number of rows that match the dynamic query 153 * @throws SystemException if a system exception occurred 154 */ 155 public static long dynamicQueryCount( 156 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 157 throws com.liferay.portal.kernel.exception.SystemException { 158 return getService().dynamicQueryCount(dynamicQuery); 159 } 160 161 public static com.liferay.portal.model.Group fetchGroup(long groupId) 162 throws com.liferay.portal.kernel.exception.SystemException { 163 return getService().fetchGroup(groupId); 164 } 165 166 /** 167 * Returns the group with the primary key. 168 * 169 * @param groupId the primary key of the group 170 * @return the group 171 * @throws PortalException if a group with the primary key could not be found 172 * @throws SystemException if a system exception occurred 173 */ 174 public static com.liferay.portal.model.Group getGroup(long groupId) 175 throws com.liferay.portal.kernel.exception.PortalException, 176 com.liferay.portal.kernel.exception.SystemException { 177 return getService().getGroup(groupId); 178 } 179 180 public static com.liferay.portal.model.PersistedModel getPersistedModel( 181 java.io.Serializable primaryKeyObj) 182 throws com.liferay.portal.kernel.exception.PortalException, 183 com.liferay.portal.kernel.exception.SystemException { 184 return getService().getPersistedModel(primaryKeyObj); 185 } 186 187 /** 188 * Returns a range of all the groups. 189 * 190 * <p> 191 * 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. 192 * </p> 193 * 194 * @param start the lower bound of the range of groups 195 * @param end the upper bound of the range of groups (not inclusive) 196 * @return the range of groups 197 * @throws SystemException if a system exception occurred 198 */ 199 public static java.util.List<com.liferay.portal.model.Group> getGroups( 200 int start, int end) 201 throws com.liferay.portal.kernel.exception.SystemException { 202 return getService().getGroups(start, end); 203 } 204 205 /** 206 * Returns the number of groups. 207 * 208 * @return the number of groups 209 * @throws SystemException if a system exception occurred 210 */ 211 public static int getGroupsCount() 212 throws com.liferay.portal.kernel.exception.SystemException { 213 return getService().getGroupsCount(); 214 } 215 216 /** 217 * Updates the group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 218 * 219 * @param group the group 220 * @return the group that was updated 221 * @throws SystemException if a system exception occurred 222 */ 223 public static com.liferay.portal.model.Group updateGroup( 224 com.liferay.portal.model.Group group) 225 throws com.liferay.portal.kernel.exception.SystemException { 226 return getService().updateGroup(group); 227 } 228 229 /** 230 * Updates the group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 231 * 232 * @param group the group 233 * @param merge whether to merge the group with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation. 234 * @return the group that was updated 235 * @throws SystemException if a system exception occurred 236 */ 237 public static com.liferay.portal.model.Group updateGroup( 238 com.liferay.portal.model.Group group, boolean merge) 239 throws com.liferay.portal.kernel.exception.SystemException { 240 return getService().updateGroup(group, merge); 241 } 242 243 /** 244 * Returns the Spring bean ID for this bean. 245 * 246 * @return the Spring bean ID for this bean 247 */ 248 public static java.lang.String getBeanIdentifier() { 249 return getService().getBeanIdentifier(); 250 } 251 252 /** 253 * Sets the Spring bean ID for this bean. 254 * 255 * @param beanIdentifier the Spring bean ID for this bean 256 */ 257 public static void setBeanIdentifier(java.lang.String beanIdentifier) { 258 getService().setBeanIdentifier(beanIdentifier); 259 } 260 261 /** 262 * Adds a group. 263 * 264 * @param userId the primary key of the group's creator/owner 265 * @param className the entity's class name 266 * @param classPK the primary key of the entity's instance 267 * @param liveGroupId the primary key of the live group 268 * @param name the entity's name 269 * @param description the group's description (optionally 270 <code>null</code>) 271 * @param type the group's type. For more information see {@link 272 com.liferay.portal.model.GroupConstants} 273 * @param friendlyURL the group's friendlyURL (optionally 274 <code>null</code>) 275 * @param site whether the group is to be associated with a main site 276 * @param active whether the group is active 277 * @param serviceContext the service context to be applied (optionally 278 <code>null</code>). Can set asset category IDs and asset tag 279 names for the group, and whether the group is for staging. 280 * @return the group 281 * @throws PortalException if a creator could not be found, if the group's 282 information was invalid, if a layout could not be found, or if a 283 valid friendly URL could not be created for the group 284 * @throws SystemException if a system exception occurred 285 */ 286 public static com.liferay.portal.model.Group addGroup(long userId, 287 java.lang.String className, long classPK, long liveGroupId, 288 java.lang.String name, java.lang.String description, int type, 289 java.lang.String friendlyURL, boolean site, boolean active, 290 com.liferay.portal.service.ServiceContext serviceContext) 291 throws com.liferay.portal.kernel.exception.PortalException, 292 com.liferay.portal.kernel.exception.SystemException { 293 return getService() 294 .addGroup(userId, className, classPK, liveGroupId, name, 295 description, type, friendlyURL, site, active, serviceContext); 296 } 297 298 /** 299 * Adds the group using the default live group. 300 * 301 * @param userId the primary key of the group's creator/owner 302 * @param className the entity's class name 303 * @param classPK the primary key of the entity's instance 304 * @param name the entity's name 305 * @param description the group's description (optionally 306 <code>null</code>) 307 * @param type the group's type. For more information see {@link 308 com.liferay.portal.model.GroupConstants} 309 * @param friendlyURL the group's friendlyURL 310 * @param site whether the group is to be associated with a main site 311 * @param active whether the group is active 312 * @param serviceContext the service context to be applied (optionally 313 <code>null</code>). Can set asset category IDs and asset tag 314 names for the group, and whether the group is for staging. 315 * @return the group 316 * @throws PortalException if a creator could not be found, if the group's 317 information was invalid, if a layout could not be found, or if a 318 valid friendly URL could not be created for the group 319 * @throws SystemException if a system exception occurred 320 */ 321 public static com.liferay.portal.model.Group addGroup(long userId, 322 java.lang.String className, long classPK, java.lang.String name, 323 java.lang.String description, int type, java.lang.String friendlyURL, 324 boolean site, boolean active, 325 com.liferay.portal.service.ServiceContext serviceContext) 326 throws com.liferay.portal.kernel.exception.PortalException, 327 com.liferay.portal.kernel.exception.SystemException { 328 return getService() 329 .addGroup(userId, className, classPK, name, description, 330 type, friendlyURL, site, active, serviceContext); 331 } 332 333 /** 334 * Adds the groups to the role. 335 * 336 * @param roleId the primary key of the role 337 * @param groupIds the primary keys of the groups 338 * @throws SystemException if a system exception occurred 339 */ 340 public static void addRoleGroups(long roleId, long[] groupIds) 341 throws com.liferay.portal.kernel.exception.SystemException { 342 getService().addRoleGroups(roleId, groupIds); 343 } 344 345 /** 346 * Adds the user to the groups. 347 * 348 * @param userId the primary key of the user 349 * @param groupIds the primary keys of the groups 350 * @throws SystemException if a system exception occurred 351 */ 352 public static void addUserGroups(long userId, long[] groupIds) 353 throws com.liferay.portal.kernel.exception.SystemException { 354 getService().addUserGroups(userId, groupIds); 355 } 356 357 /** 358 * Adds a company group if it does not exist. This method is typically used 359 * when a virtual host is added. 360 * 361 * @param companyId the primary key of the company 362 * @throws PortalException if a default user for the company could not be 363 found, if the group's information was invalid, if a layout could 364 not be found, or if a valid friendly URL could not be created for 365 the group 366 * @throws SystemException if a system exception occurred 367 */ 368 public static void checkCompanyGroup(long companyId) 369 throws com.liferay.portal.kernel.exception.PortalException, 370 com.liferay.portal.kernel.exception.SystemException { 371 getService().checkCompanyGroup(companyId); 372 } 373 374 /** 375 * Creates systems groups and other related data needed by the system on the 376 * very first startup. Also takes care of creating the control panel groups 377 * and layouts. 378 * 379 * @param companyId the primary key of the company 380 * @throws PortalException if a new system group could not be created 381 * @throws SystemException if a system exception occurred 382 */ 383 public static void checkSystemGroups(long companyId) 384 throws com.liferay.portal.kernel.exception.PortalException, 385 com.liferay.portal.kernel.exception.SystemException { 386 getService().checkSystemGroups(companyId); 387 } 388 389 /** 390 * Returns the group with the matching friendly URL. 391 * 392 * @param companyId the primary key of the company 393 * @param friendlyURL the friendly URL 394 * @return the group with the friendly URL, or <code>null</code> if a 395 matching group could not be found 396 * @throws SystemException if a system exception occurred 397 */ 398 public static com.liferay.portal.model.Group fetchFriendlyURLGroup( 399 long companyId, java.lang.String friendlyURL) 400 throws com.liferay.portal.kernel.exception.SystemException { 401 return getService().fetchFriendlyURLGroup(companyId, friendlyURL); 402 } 403 404 /** 405 * Returns the group with the matching group name. 406 * 407 * @param companyId the primary key of the company 408 * @param name the group's name 409 * @return the group with the name and associated company, or 410 <code>null</code> if a matching group could not be found 411 * @throws SystemException if a system exception occurred 412 */ 413 public static com.liferay.portal.model.Group fetchGroup(long companyId, 414 java.lang.String name) 415 throws com.liferay.portal.kernel.exception.SystemException { 416 return getService().fetchGroup(companyId, name); 417 } 418 419 /** 420 * Returns the company group. 421 * 422 * @param companyId the primary key of the company 423 * @return the group associated with the company 424 * @throws PortalException if a matching group could not be found 425 * @throws SystemException if a system exception occurred 426 */ 427 public static com.liferay.portal.model.Group getCompanyGroup(long companyId) 428 throws com.liferay.portal.kernel.exception.PortalException, 429 com.liferay.portal.kernel.exception.SystemException { 430 return getService().getCompanyGroup(companyId); 431 } 432 433 /** 434 * Returns a range of all the groups associated with the company. 435 * 436 * <p> 437 * Useful when paginating results. Returns a maximum of <code>end - 438 * start</code> instances. <code>start</code> and <code>end</code> are not 439 * primary keys, they are indexes in the result set. Thus, <code>0</code> 440 * refers to the first result in the set. Setting both <code>start</code> 441 * and <code>end</code> to {@link 442 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 443 * result set. 444 * </p> 445 * 446 * @param companyId the primary key of the company 447 * @param start the lower bound of the range of groups to return 448 * @param end the upper bound of the range of groups to return (not 449 inclusive) 450 * @return the range of groups associated with the company 451 * @throws SystemException if a system exception occurred 452 */ 453 public static java.util.List<com.liferay.portal.model.Group> getCompanyGroups( 454 long companyId, int start, int end) 455 throws com.liferay.portal.kernel.exception.SystemException { 456 return getService().getCompanyGroups(companyId, start, end); 457 } 458 459 /** 460 * Returns the number of groups associated with the company. 461 * 462 * @param companyId the primary key of the company 463 * @return the number of groups associated with the company 464 * @throws SystemException if a system exception occurred 465 */ 466 public static int getCompanyGroupsCount(long companyId) 467 throws com.liferay.portal.kernel.exception.SystemException { 468 return getService().getCompanyGroupsCount(companyId); 469 } 470 471 /** 472 * Returns the group with the matching friendly URL. 473 * 474 * @param companyId the primary key of the company 475 * @param friendlyURL the group's friendlyURL 476 * @return the group with the friendly URL 477 * @throws PortalException if a matching group could not be found, or if the 478 friendly URL was invalid 479 * @throws SystemException if a system exception occurred 480 */ 481 public static com.liferay.portal.model.Group getFriendlyURLGroup( 482 long companyId, java.lang.String friendlyURL) 483 throws com.liferay.portal.kernel.exception.PortalException, 484 com.liferay.portal.kernel.exception.SystemException { 485 return getService().getFriendlyURLGroup(companyId, friendlyURL); 486 } 487 488 /** 489 * Returns the group with the matching group name. 490 * 491 * @param companyId the primary key of the company 492 * @param name the group's name 493 * @return the group with the name 494 * @throws PortalException if a matching group could not be found 495 * @throws SystemException if a system exception occurred 496 */ 497 public static com.liferay.portal.model.Group getGroup(long companyId, 498 java.lang.String name) 499 throws com.liferay.portal.kernel.exception.PortalException, 500 com.liferay.portal.kernel.exception.SystemException { 501 return getService().getGroup(companyId, name); 502 } 503 504 /** 505 * Returns the groups with the matching primary keys. 506 * 507 * @param groupIds the primary keys of the groups 508 * @return the groups with the primary keys 509 * @throws PortalException if any one of the groups could not be found 510 * @throws SystemException if a system exception occurred 511 */ 512 public static java.util.List<com.liferay.portal.model.Group> getGroups( 513 long[] groupIds) 514 throws com.liferay.portal.kernel.exception.PortalException, 515 com.liferay.portal.kernel.exception.SystemException { 516 return getService().getGroups(groupIds); 517 } 518 519 /** 520 * Returns the group associated with the layout. 521 * 522 * @param companyId the primary key of the company 523 * @param plid the primary key of the layout 524 * @return the group associated with the layout 525 * @throws PortalException if a matching group could not be found 526 * @throws SystemException if a system exception occurred 527 */ 528 public static com.liferay.portal.model.Group getLayoutGroup( 529 long companyId, long plid) 530 throws com.liferay.portal.kernel.exception.PortalException, 531 com.liferay.portal.kernel.exception.SystemException { 532 return getService().getLayoutGroup(companyId, plid); 533 } 534 535 /** 536 * Returns the group associated with the layout prototype. 537 * 538 * @param companyId the primary key of the company 539 * @param layoutPrototypeId the primary key of the layout prototype 540 * @return the group associated with the layout prototype 541 * @throws PortalException if a matching group could not be found 542 * @throws SystemException if a system exception occurred 543 */ 544 public static com.liferay.portal.model.Group getLayoutPrototypeGroup( 545 long companyId, long layoutPrototypeId) 546 throws com.liferay.portal.kernel.exception.PortalException, 547 com.liferay.portal.kernel.exception.SystemException { 548 return getService().getLayoutPrototypeGroup(companyId, layoutPrototypeId); 549 } 550 551 /** 552 * Returns the group associated with the layout set prototype. 553 * 554 * @param companyId the primary key of the company 555 * @param layoutSetPrototypeId the primary key of the layout set prototype 556 * @return the group associated with the layout set prototype 557 * @throws PortalException if a matching group could not be found 558 * @throws SystemException if a system exception occurred 559 */ 560 public static com.liferay.portal.model.Group getLayoutSetPrototypeGroup( 561 long companyId, long layoutSetPrototypeId) 562 throws com.liferay.portal.kernel.exception.PortalException, 563 com.liferay.portal.kernel.exception.SystemException { 564 return getService() 565 .getLayoutSetPrototypeGroup(companyId, layoutSetPrototypeId); 566 } 567 568 /** 569 * Returns all live groups. 570 * 571 * @return all live groups 572 * @throws SystemException if a system exception occurred 573 */ 574 public static java.util.List<com.liferay.portal.model.Group> getLiveGroups() 575 throws com.liferay.portal.kernel.exception.SystemException { 576 return getService().getLiveGroups(); 577 } 578 579 /** 580 * Returns a range of all non-system groups of a specified type (className) 581 * that have no layouts. 582 * 583 * <p> 584 * Useful when paginating results. Returns a maximum of <code>end - 585 * start</code> instances. <code>start</code> and <code>end</code> are not 586 * primary keys, they are indexes in the result set. Thus, <code>0</code> 587 * refers to the first result in the set. Setting both <code>start</code> 588 * and <code>end</code> to {@link 589 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 590 * result set. 591 * </p> 592 * 593 * @param className the entity's class name 594 * @param privateLayout whether to include groups with private layout sets 595 or non-private layout sets 596 * @param start the lower bound of the range of groups to return 597 * @param end the upper bound of the range of groups to return (not 598 inclusive) 599 * @return the range of matching groups 600 * @throws SystemException if a system exception occurred 601 */ 602 public static java.util.List<com.liferay.portal.model.Group> getNoLayoutsGroups( 603 java.lang.String className, boolean privateLayout, int start, int end) 604 throws com.liferay.portal.kernel.exception.SystemException { 605 return getService() 606 .getNoLayoutsGroups(className, privateLayout, start, end); 607 } 608 609 /** 610 * Returns all non-system groups having <code>null</code> or empty friendly 611 * URLs. 612 * 613 * @return the non-system groups having <code>null</code> or empty friendly 614 URLs 615 * @throws SystemException if a system exception occurred 616 */ 617 public static java.util.List<com.liferay.portal.model.Group> getNullFriendlyURLGroups() 618 throws com.liferay.portal.kernel.exception.SystemException { 619 return getService().getNullFriendlyURLGroups(); 620 } 621 622 /** 623 * Returns the specified organization group. 624 * 625 * @param companyId the primary key of the company 626 * @param organizationId the primary key of the organization 627 * @return the group associated with the organization 628 * @throws PortalException if a matching group could not be found 629 * @throws SystemException if a system exception occurred 630 */ 631 public static com.liferay.portal.model.Group getOrganizationGroup( 632 long companyId, long organizationId) 633 throws com.liferay.portal.kernel.exception.PortalException, 634 com.liferay.portal.kernel.exception.SystemException { 635 return getService().getOrganizationGroup(companyId, organizationId); 636 } 637 638 /** 639 * Returns the specified organization groups. 640 * 641 * @param organizations the organizations 642 * @return the groups associated with the organizations 643 */ 644 public static java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups( 645 java.util.List<com.liferay.portal.model.Organization> organizations) { 646 return getService().getOrganizationsGroups(organizations); 647 } 648 649 /** 650 * Returns all the groups related to the organizations. 651 * 652 * @param organizations the organizations 653 * @return the groups related to the organizations 654 * @throws SystemException if a system exception occurred 655 */ 656 public static java.util.List<com.liferay.portal.model.Group> getOrganizationsRelatedGroups( 657 java.util.List<com.liferay.portal.model.Organization> organizations) 658 throws com.liferay.portal.kernel.exception.SystemException { 659 return getService().getOrganizationsRelatedGroups(organizations); 660 } 661 662 /** 663 * Returns all the groups associated with the role. 664 * 665 * @param roleId the primary key of the role 666 * @return the groups associated with the role 667 * @throws SystemException if a system exception occurred 668 */ 669 public static java.util.List<com.liferay.portal.model.Group> getRoleGroups( 670 long roleId) throws com.liferay.portal.kernel.exception.SystemException { 671 return getService().getRoleGroups(roleId); 672 } 673 674 /** 675 * Returns the staging group. 676 * 677 * @param liveGroupId the primary key of the live group 678 * @return the staging group 679 * @throws PortalException if a matching staging group could not be found 680 * @throws SystemException if a system exception occurred 681 */ 682 public static com.liferay.portal.model.Group getStagingGroup( 683 long liveGroupId) 684 throws com.liferay.portal.kernel.exception.PortalException, 685 com.liferay.portal.kernel.exception.SystemException { 686 return getService().getStagingGroup(liveGroupId); 687 } 688 689 /** 690 * Returns the group associated with the user. 691 * 692 * @param companyId the primary key of the company 693 * @param userId the primary key of the user 694 * @return the group associated with the user 695 * @throws PortalException if a matching group could not be found 696 * @throws SystemException if a system exception occurred 697 */ 698 public static com.liferay.portal.model.Group getUserGroup(long companyId, 699 long userId) 700 throws com.liferay.portal.kernel.exception.PortalException, 701 com.liferay.portal.kernel.exception.SystemException { 702 return getService().getUserGroup(companyId, userId); 703 } 704 705 /** 706 * Returns the specified "user group" group. That is, the group that 707 * represents the {@link com.liferay.portal.model.UserGroup} entity. 708 * 709 * @param companyId the primary key of the company 710 * @param userGroupId the primary key of the user group 711 * @return the group associated with the user group 712 * @throws PortalException if a matching group could not be found 713 * @throws SystemException if a system exception occurred 714 */ 715 public static com.liferay.portal.model.Group getUserGroupGroup( 716 long companyId, long userGroupId) 717 throws com.liferay.portal.kernel.exception.PortalException, 718 com.liferay.portal.kernel.exception.SystemException { 719 return getService().getUserGroupGroup(companyId, userGroupId); 720 } 721 722 /** 723 * Returns all the user's site groups and immediate organization groups. 724 * System and staged groups are not included. 725 * 726 * @param userId the primary key of the user 727 * @return the user's groups and organization groups 728 * @throws PortalException if a user with the primary key could not be found 729 * @throws SystemException if a system exception occurred 730 */ 731 public static java.util.List<com.liferay.portal.model.Group> getUserGroups( 732 long userId) 733 throws com.liferay.portal.kernel.exception.PortalException, 734 com.liferay.portal.kernel.exception.SystemException { 735 return getService().getUserGroups(userId); 736 } 737 738 /** 739 * Returns all the user's site groups and immediate organization groups, 740 * optionally including the user's inherited organization groups and user 741 * groups. System and staged groups are not included. 742 * 743 * @param userId the primary key of the user 744 * @param inherit whether to include the user's inherited organization 745 groups and user groups 746 * @return the user's groups and immediate organization groups 747 * @throws PortalException if a user with the primary key could not be found 748 * @throws SystemException if a system exception occurred 749 */ 750 public static java.util.List<com.liferay.portal.model.Group> getUserGroups( 751 long userId, boolean inherit) 752 throws com.liferay.portal.kernel.exception.PortalException, 753 com.liferay.portal.kernel.exception.SystemException { 754 return getService().getUserGroups(userId, inherit); 755 } 756 757 /** 758 * Returns a name ordered range of all the user's site groups and immediate 759 * organization groups, optionally including the user's inherited 760 * organization groups and user groups. System and staged groups are not 761 * included. 762 * 763 * <p> 764 * Useful when paginating results. Returns a maximum of <code>end - 765 * start</code> instances. <code>start</code> and <code>end</code> are not 766 * primary keys, they are indexes in the result set. Thus, <code>0</code> 767 * refers to the first result in the set. Setting both <code>start</code> 768 * and <code>end</code> to {@link 769 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 770 * result set. 771 * </p> 772 * 773 * @param userId the primary key of the user 774 * @param inherit whether to include the user's inherited organization 775 groups and user groups 776 * @param start the lower bound of the range of groups to return 777 * @param end the upper bound of the range of groups to return (not 778 inclusive) 779 * @return the range of the user's groups and immediate organization groups 780 ordered by name 781 * @throws PortalException if a user with the primary key could not be found 782 * @throws SystemException if a system exception occurred 783 */ 784 public static java.util.List<com.liferay.portal.model.Group> getUserGroups( 785 long userId, boolean inherit, int start, int end) 786 throws com.liferay.portal.kernel.exception.PortalException, 787 com.liferay.portal.kernel.exception.SystemException { 788 return getService().getUserGroups(userId, inherit, start, end); 789 } 790 791 /** 792 * Returns a name ordered range of all the user's site groups and immediate 793 * organization groups. System and staged groups are not included. 794 * 795 * <p> 796 * Useful when paginating results. Returns a maximum of <code>end - 797 * start</code> instances. <code>start</code> and <code>end</code> are not 798 * primary keys, they are indexes in the result set. Thus, <code>0</code> 799 * refers to the first result in the set. Setting both <code>start</code> 800 * and <code>end</code> to {@link 801 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 802 * result set. 803 * </p> 804 * 805 * @param userId the primary key of the user 806 * @param start the lower bound of the range of groups to return 807 * @param end the upper bound of the range of groups to return (not 808 inclusive) 809 * @return the range of the user's groups and organization groups ordered by 810 name 811 * @throws PortalException if a user with the primary key could not be found 812 * @throws SystemException if a system exception occurred 813 */ 814 public static java.util.List<com.liferay.portal.model.Group> getUserGroups( 815 long userId, int start, int end) 816 throws com.liferay.portal.kernel.exception.PortalException, 817 com.liferay.portal.kernel.exception.SystemException { 818 return getService().getUserGroups(userId, start, end); 819 } 820 821 /** 822 * Returns the groups associated with the user groups. 823 * 824 * @param userGroups the user groups 825 * @return the groups associated with the user groups 826 * @throws PortalException if any one of the user group's group could not be 827 found 828 * @throws SystemException if a system exception occurred 829 */ 830 public static java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups( 831 java.util.List<com.liferay.portal.model.UserGroup> userGroups) 832 throws com.liferay.portal.kernel.exception.PortalException, 833 com.liferay.portal.kernel.exception.SystemException { 834 return getService().getUserGroupsGroups(userGroups); 835 } 836 837 /** 838 * Returns all the groups related to the user groups. 839 * 840 * @param userGroups the user groups 841 * @return the groups related to the user groups 842 * @throws SystemException if a system exception occurred 843 */ 844 public static java.util.List<com.liferay.portal.model.Group> getUserGroupsRelatedGroups( 845 java.util.List<com.liferay.portal.model.UserGroup> userGroups) 846 throws com.liferay.portal.kernel.exception.SystemException { 847 return getService().getUserGroupsRelatedGroups(userGroups); 848 } 849 850 /** 851 * Returns the range of all groups associated with the user's organization 852 * groups, including the ancestors of the organization groups, unless portal 853 * property <code>organizations.membership.strict</code> is set to 854 * <code>true</code>. 855 * 856 * <p> 857 * Useful when paginating results. Returns a maximum of <code>end - 858 * start</code> instances. <code>start</code> and <code>end</code> are not 859 * primary keys, they are indexes in the result set. Thus, <code>0</code> 860 * refers to the first result in the set. Setting both <code>start</code> 861 * and <code>end</code> to {@link 862 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 863 * result set. 864 * </p> 865 * 866 * @param userId the primary key of the user 867 * @param start the lower bound of the range of groups to consider 868 * @param end the upper bound of the range of groups to consider (not 869 inclusive) 870 * @return the range of groups associated with the user's organization 871 groups 872 * @throws PortalException if a user with the primary key could not be found 873 or if another portal exception occurred 874 * @throws SystemException if a system exception occurred 875 */ 876 public static java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups( 877 long userId, int start, int end) 878 throws com.liferay.portal.kernel.exception.PortalException, 879 com.liferay.portal.kernel.exception.SystemException { 880 return getService().getUserOrganizationsGroups(userId, start, end); 881 } 882 883 /** 884 * Returns <code>true</code> if the group is associated with the role. 885 * 886 * @param roleId the primary key of the role 887 * @param groupId the primary key of the group 888 * @return <code>true</code> if the group is associated with the role; 889 <code>false</code> otherwise 890 * @throws SystemException if a system exception occurred 891 */ 892 public static boolean hasRoleGroup(long roleId, long groupId) 893 throws com.liferay.portal.kernel.exception.SystemException { 894 return getService().hasRoleGroup(roleId, groupId); 895 } 896 897 /** 898 * Returns <code>true</code> if the live group has a staging group. 899 * 900 * @param liveGroupId the primary key of the live group 901 * @return <code>true</code> if the live group has a staging group; 902 <code>false</code> otherwise 903 * @throws SystemException if a system exception occurred 904 */ 905 public static boolean hasStagingGroup(long liveGroupId) 906 throws com.liferay.portal.kernel.exception.SystemException { 907 return getService().hasStagingGroup(liveGroupId); 908 } 909 910 /** 911 * Returns <code>true</code> if the user is immediately associated with the 912 * group, or associated with the group via the user's organizations, 913 * inherited organizations, or user groups. 914 * 915 * @param userId the primary key of the user 916 * @param groupId the primary key of the group 917 * @return <code>true</code> if the user is associated with the group; 918 <code>false</code> otherwise 919 * @throws SystemException if a system exception occurred 920 */ 921 public static boolean hasUserGroup(long userId, long groupId) 922 throws com.liferay.portal.kernel.exception.SystemException { 923 return getService().hasUserGroup(userId, groupId); 924 } 925 926 /** 927 * Returns <code>true</code> if the user is immediately associated with the 928 * group, or optionally if the user is associated with the group via the 929 * user's organizations, inherited organizations, or user groups. 930 * 931 * @param userId the primary key of the user 932 * @param groupId the primary key of the group 933 * @param inherit whether to include organization groups and user groups to 934 which the user belongs in the determination 935 * @return <code>true</code> if the user is associated with the group; 936 <code>false</code> otherwise 937 * @throws SystemException if a system exception occurred 938 */ 939 public static boolean hasUserGroup(long userId, long groupId, 940 boolean inherit) 941 throws com.liferay.portal.kernel.exception.SystemException { 942 return getService().hasUserGroup(userId, groupId, inherit); 943 } 944 945 public static com.liferay.portal.model.Group loadFetchGroup( 946 long companyId, java.lang.String name) 947 throws com.liferay.portal.kernel.exception.SystemException { 948 return getService().loadFetchGroup(companyId, name); 949 } 950 951 public static com.liferay.portal.model.Group loadGetGroup(long companyId, 952 java.lang.String name) 953 throws com.liferay.portal.kernel.exception.PortalException, 954 com.liferay.portal.kernel.exception.SystemException { 955 return getService().loadGetGroup(companyId, name); 956 } 957 958 public static java.util.List<com.liferay.portal.model.Group> search( 959 long companyId, 960 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 961 int start, int end) 962 throws com.liferay.portal.kernel.exception.SystemException { 963 return getService().search(companyId, params, start, end); 964 } 965 966 /** 967 * Returns a name ordered range of all the groups that match the class name 968 * IDs, name, and description, optionally including the user's inherited 969 * organization groups and user groups. System and staged groups are not 970 * included. 971 * 972 * <p> 973 * Useful when paginating results. Returns a maximum of <code>end - 974 * start</code> instances. <code>start</code> and <code>end</code> are not 975 * primary keys, they are indexes in the result set. Thus, <code>0</code> 976 * refers to the first result in the set. Setting both <code>start</code> 977 * and <code>end</code> to {@link 978 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 979 * result set. 980 * </p> 981 * 982 * @param companyId the primary key of the company 983 * @param classNameIds the class names of entities to include in the search 984 (optionally <code>null</code>) 985 * @param name the group's name (optionally <code>null</code>) 986 * @param description the group's description (optionally 987 <code>null</code>) 988 * @param params the finder params (optionally <code>null</code>). To 989 include a user's organizations, inherited organizations, and user 990 groups in the search, add an entry with key 991 "usersGroups" mapped to the user's ID and an entry with 992 key "inherit" mapped to a non-<code>null</code> object. 993 For more information see {@link 994 com.liferay.portal.service.persistence.GroupFinder} 995 com.liferay.portal.service.persistence.GroupFinder} 996 * @param start the lower bound of the range of groups to return 997 * @param end the upper bound of the range of groups to return (not 998 inclusive) 999 * @return the matching groups ordered by name 1000 * @throws SystemException if a system exception occurred 1001 */ 1002 public static java.util.List<com.liferay.portal.model.Group> search( 1003 long companyId, long[] classNameIds, java.lang.String name, 1004 java.lang.String description, 1005 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1006 int start, int end) 1007 throws com.liferay.portal.kernel.exception.SystemException { 1008 return getService() 1009 .search(companyId, classNameIds, name, description, params, 1010 start, end); 1011 } 1012 1013 /** 1014 * Returns an ordered range of all the groups that match the class name IDs, 1015 * name, and description, optionally including the user's inherited 1016 * organization groups and user groups. System and staged groups are not 1017 * included. 1018 * 1019 * <p> 1020 * Useful when paginating results. Returns a maximum of <code>end - 1021 * start</code> instances. <code>start</code> and <code>end</code> are not 1022 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1023 * refers to the first result in the set. Setting both <code>start</code> 1024 * and <code>end</code> to {@link 1025 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1026 * result set. 1027 * </p> 1028 * 1029 * @param companyId the primary key of the company 1030 * @param classNameIds the group's class name IDs (optionally 1031 <code>null</code>) 1032 * @param name the group's name (optionally <code>null</code>) 1033 * @param description the group's description (optionally 1034 <code>null</code>) 1035 * @param params the finder params (optionally <code>null</code>). To 1036 include a user's organizations, inherited organizations, and user 1037 groups in the search, add an entry with key 1038 "usersGroups" mapped to the user's ID and an entry with 1039 key "inherit" mapped to a non-<code>null</code> object. 1040 For more information see {@link 1041 com.liferay.portal.service.persistence.GroupFinder} 1042 * @param start the lower bound of the range of groups to return 1043 * @param end the upper bound of the range of groups to return (not 1044 inclusive) 1045 * @param obc the comparator to order the groups (optionally 1046 <code>null</code>) 1047 * @return the matching groups ordered by comparator <code>obc</code> 1048 * @throws SystemException if a system exception occurred 1049 */ 1050 public static java.util.List<com.liferay.portal.model.Group> search( 1051 long companyId, long[] classNameIds, java.lang.String name, 1052 java.lang.String description, 1053 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1054 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc) 1055 throws com.liferay.portal.kernel.exception.SystemException { 1056 return getService() 1057 .search(companyId, classNameIds, name, description, params, 1058 start, end, obc); 1059 } 1060 1061 /** 1062 * Returns a name ordered range of all the site groups and organization 1063 * groups that match the name and description, optionally including the 1064 * user's inherited organization groups and user groups. System and staged 1065 * groups are not included. 1066 * 1067 * <p> 1068 * Useful when paginating results. Returns a maximum of <code>end - 1069 * start</code> instances. <code>start</code> and <code>end</code> are not 1070 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1071 * refers to the first result in the set. Setting both <code>start</code> 1072 * and <code>end</code> to {@link 1073 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1074 * result set. 1075 * </p> 1076 * 1077 * @param companyId the primary key of the company 1078 * @param name the group's name (optionally <code>null</code>) 1079 * @param description the group's description (optionally 1080 <code>null</code>) 1081 * @param params the finder params (optionally <code>null</code>). To 1082 include the user's inherited organizations and user groups in the 1083 search, add entries having "usersGroups" and 1084 "inherit" as keys mapped to the the user's ID. For more 1085 information see {@link 1086 com.liferay.portal.service.persistence.GroupFinder} 1087 * @param start the lower bound of the range of groups to return 1088 * @param end the upper bound of the range of groups to return (not 1089 inclusive) 1090 * @return the matching groups ordered by name 1091 * @throws SystemException if a system exception occurred 1092 */ 1093 public static java.util.List<com.liferay.portal.model.Group> search( 1094 long companyId, java.lang.String name, java.lang.String description, 1095 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1096 int start, int end) 1097 throws com.liferay.portal.kernel.exception.SystemException { 1098 return getService() 1099 .search(companyId, name, description, params, start, end); 1100 } 1101 1102 /** 1103 * Returns an ordered range of all the site groups and organization groups 1104 * that match the name and description, optionally including the user's 1105 * inherited organization groups and user groups. System and staged groups 1106 * are not included. 1107 * 1108 * <p> 1109 * Useful when paginating results. Returns a maximum of <code>end - 1110 * start</code> instances. <code>start</code> and <code>end</code> are not 1111 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1112 * refers to the first result in the set. Setting both <code>start</code> 1113 * and <code>end</code> to {@link 1114 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1115 * result set. 1116 * </p> 1117 * 1118 * @param companyId the primary key of the company 1119 * @param name the group's name (optionally <code>null</code>) 1120 * @param description the group's description (optionally 1121 <code>null</code>) 1122 * @param params the finder params (optionally <code>null</code>). To 1123 include the user's inherited organizations and user groups in the 1124 search, add entries having "usersGroups" and 1125 "inherit" as keys mapped to the the user's ID. For more 1126 information see {@link 1127 com.liferay.portal.service.persistence.GroupFinder} 1128 * @param start the lower bound of the range of groups to return 1129 * @param end the upper bound of the range of groups to return (not 1130 inclusive) 1131 * @param obc the comparator to order the groups (optionally 1132 <code>null</code>) 1133 * @return the matching groups ordered by comparator <code>obc</code> 1134 * @throws SystemException if a system exception occurred 1135 */ 1136 public static java.util.List<com.liferay.portal.model.Group> search( 1137 long companyId, java.lang.String name, java.lang.String description, 1138 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1139 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc) 1140 throws com.liferay.portal.kernel.exception.SystemException { 1141 return getService() 1142 .search(companyId, name, description, params, start, end, obc); 1143 } 1144 1145 /** 1146 * Returns the number of groups that match the class name IDs, name, and 1147 * description, optionally including the user's inherited organization 1148 * groups and user groups. System and staged groups are not included. 1149 * 1150 * @param companyId the primary key of the company 1151 * @param classNameIds the class names of entities to include in the search 1152 (optionally <code>null</code>) 1153 * @param name the group's name (optionally <code>null</code>) 1154 * @param description the group's description (optionally 1155 <code>null</code>) 1156 * @param params the finder params (optionally <code>null</code>). To 1157 include the user's inherited organization groups and user groups 1158 in the search, add entries having "usersGroups" and 1159 "inherit" as keys mapped to the the user's ID. For more 1160 information see {@link 1161 com.liferay.portal.service.persistence.GroupFinder} 1162 * @return the number of matching groups 1163 * @throws SystemException if a system exception occurred 1164 */ 1165 public static int searchCount(long companyId, long[] classNameIds, 1166 java.lang.String name, java.lang.String description, 1167 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) 1168 throws com.liferay.portal.kernel.exception.SystemException { 1169 return getService() 1170 .searchCount(companyId, classNameIds, name, description, 1171 params); 1172 } 1173 1174 /** 1175 * Returns the number of groups and immediate organization groups that match 1176 * the name and description, optionally including the user's inherited 1177 * organization groups and user groups. System and staged groups are not 1178 * included. 1179 * 1180 * @param companyId the primary key of the company 1181 * @param name the group's name (optionally <code>null</code>) 1182 * @param description the group's description (optionally 1183 <code>null</code>) 1184 * @param params the finder params (optionally <code>null</code>). To 1185 include the user's inherited organization groups and user groups 1186 in the search, add entries having "usersGroups" and 1187 "inherit" as keys mapped to the the user's ID. For more 1188 information see {@link 1189 com.liferay.portal.service.persistence.GroupFinder} 1190 * @return the number of matching groups 1191 * @throws SystemException if a system exception occurred 1192 */ 1193 public static int searchCount(long companyId, java.lang.String name, 1194 java.lang.String description, 1195 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) 1196 throws com.liferay.portal.kernel.exception.SystemException { 1197 return getService().searchCount(companyId, name, description, params); 1198 } 1199 1200 /** 1201 * Sets the groups associated with the role, removing and adding 1202 * associations as necessary. 1203 * 1204 * @param roleId the primary key of the role 1205 * @param groupIds the primary keys of the groups 1206 * @throws SystemException if a system exception occurred 1207 */ 1208 public static void setRoleGroups(long roleId, long[] groupIds) 1209 throws com.liferay.portal.kernel.exception.SystemException { 1210 getService().setRoleGroups(roleId, groupIds); 1211 } 1212 1213 /** 1214 * Removes the groups from the role. 1215 * 1216 * @param roleId the primary key of the role 1217 * @param groupIds the primary keys of the groups 1218 * @throws SystemException if a system exception occurred 1219 */ 1220 public static void unsetRoleGroups(long roleId, long[] groupIds) 1221 throws com.liferay.portal.kernel.exception.SystemException { 1222 getService().unsetRoleGroups(roleId, groupIds); 1223 } 1224 1225 /** 1226 * Removes the user from the groups. 1227 * 1228 * @param userId the primary key of the user 1229 * @param groupIds the primary keys of the groups 1230 * @throws SystemException if a system exception occurred 1231 */ 1232 public static void unsetUserGroups(long userId, long[] groupIds) 1233 throws com.liferay.portal.kernel.exception.SystemException { 1234 getService().unsetUserGroups(userId, groupIds); 1235 } 1236 1237 /** 1238 * Updates the group's asset replacing categories and tag names. 1239 * 1240 * @param userId the primary key of the user 1241 * @param group the group 1242 * @param assetCategoryIds the primary keys of the asset categories 1243 (optionally <code>null</code>) 1244 * @param assetTagNames the asset tag names (optionally <code>null</code>) 1245 * @throws PortalException if a user with the primary key could not be found 1246 * @throws SystemException if a system exception occurred 1247 */ 1248 public static void updateAsset(long userId, 1249 com.liferay.portal.model.Group group, long[] assetCategoryIds, 1250 java.lang.String[] assetTagNames) 1251 throws com.liferay.portal.kernel.exception.PortalException, 1252 com.liferay.portal.kernel.exception.SystemException { 1253 getService().updateAsset(userId, group, assetCategoryIds, assetTagNames); 1254 } 1255 1256 /** 1257 * Updates the group's friendly URL. 1258 * 1259 * @param groupId the primary key of the group 1260 * @param friendlyURL the group's new friendlyURL (optionally 1261 <code>null</code>) 1262 * @return the group 1263 * @throws PortalException if a group with the primary key could not be 1264 found or if a valid friendly URL could not be created for the 1265 group 1266 * @throws SystemException if a system exception occurred 1267 */ 1268 public static com.liferay.portal.model.Group updateFriendlyURL( 1269 long groupId, java.lang.String friendlyURL) 1270 throws com.liferay.portal.kernel.exception.PortalException, 1271 com.liferay.portal.kernel.exception.SystemException { 1272 return getService().updateFriendlyURL(groupId, friendlyURL); 1273 } 1274 1275 /** 1276 * Updates the group's type settings. 1277 * 1278 * @param groupId the primary key of the group 1279 * @param typeSettings the group's new type settings (optionally 1280 <code>null</code>) 1281 * @return the group 1282 * @throws PortalException if a group with the primary key could not be 1283 found 1284 * @throws SystemException if a system exception occurred 1285 */ 1286 public static com.liferay.portal.model.Group updateGroup(long groupId, 1287 java.lang.String typeSettings) 1288 throws com.liferay.portal.kernel.exception.PortalException, 1289 com.liferay.portal.kernel.exception.SystemException { 1290 return getService().updateGroup(groupId, typeSettings); 1291 } 1292 1293 /** 1294 * Updates the group. 1295 * 1296 * @param groupId the primary key of the group 1297 * @param name the group's new name 1298 * @param description the group's new description (optionally 1299 <code>null</code>) 1300 * @param type the group's new type. For more information see {@link 1301 com.liferay.portal.model.GroupConstants} 1302 * @param friendlyURL the group's new friendlyURL (optionally 1303 <code>null</code>) 1304 * @param active whether the group is active 1305 * @param serviceContext the service context to be applied (optionally 1306 <code>null</code>). Can set asset category IDs and asset tag 1307 names for the group. 1308 * @return the group 1309 * @throws PortalException if a group with the primary key could not be 1310 found or if the friendly URL was invalid or could one not be 1311 created 1312 * @throws SystemException if a system exception occurred 1313 */ 1314 public static com.liferay.portal.model.Group updateGroup(long groupId, 1315 java.lang.String name, java.lang.String description, int type, 1316 java.lang.String friendlyURL, boolean active, 1317 com.liferay.portal.service.ServiceContext serviceContext) 1318 throws com.liferay.portal.kernel.exception.PortalException, 1319 com.liferay.portal.kernel.exception.SystemException { 1320 return getService() 1321 .updateGroup(groupId, name, description, type, friendlyURL, 1322 active, serviceContext); 1323 } 1324 1325 /** 1326 * Associates the group with a main site if the group is an organization. 1327 * 1328 * @param groupId the primary key of the group 1329 * @param site whether the group is to be associated with a main site 1330 * @return the group 1331 * @throws PortalException if a group with the primary key could not be 1332 found 1333 * @throws SystemException if a system exception occurred 1334 */ 1335 public static com.liferay.portal.model.Group updateSite(long groupId, 1336 boolean site) 1337 throws com.liferay.portal.kernel.exception.PortalException, 1338 com.liferay.portal.kernel.exception.SystemException { 1339 return getService().updateSite(groupId, site); 1340 } 1341 1342 public static GroupLocalService getService() { 1343 if (_service == null) { 1344 _service = (GroupLocalService)PortalBeanLocatorUtil.locate(GroupLocalService.class.getName()); 1345 1346 ReferenceRegistry.registerReference(GroupLocalServiceUtil.class, 1347 "_service"); 1348 MethodCache.remove(GroupLocalService.class); 1349 } 1350 1351 return _service; 1352 } 1353 1354 public void setService(GroupLocalService service) { 1355 MethodCache.remove(GroupLocalService.class); 1356 1357 _service = service; 1358 1359 ReferenceRegistry.registerReference(GroupLocalServiceUtil.class, 1360 "_service"); 1361 MethodCache.remove(GroupLocalService.class); 1362 } 1363 1364 private static GroupLocalService _service; 1365 }