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