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