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