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 import com.liferay.portal.model.SystemEventConstants; 026 027 /** 028 * Provides the local service interface for Organization. Methods of this 029 * service will not have security checks based on the propagated JAAS 030 * credentials because this service can only be accessed from within the same 031 * VM. 032 * 033 * @author Brian Wing Shun Chan 034 * @see OrganizationLocalServiceUtil 035 * @see com.liferay.portal.service.base.OrganizationLocalServiceBaseImpl 036 * @see com.liferay.portal.service.impl.OrganizationLocalServiceImpl 037 * @generated 038 */ 039 @ProviderType 040 @Transactional(isolation = Isolation.PORTAL, rollbackFor = { 041 PortalException.class, SystemException.class}) 042 public interface OrganizationLocalService extends BaseLocalService, 043 PersistedModelLocalService { 044 /* 045 * NOTE FOR DEVELOPERS: 046 * 047 * Never modify or reference this interface directly. Always use {@link OrganizationLocalServiceUtil} to access the organization local service. Add custom service methods to {@link com.liferay.portal.service.impl.OrganizationLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. 048 */ 049 public void addGroupOrganization(long groupId, 050 com.liferay.portal.model.Organization organization); 051 052 public void addGroupOrganization(long groupId, long organizationId); 053 054 public void addGroupOrganizations(long groupId, 055 java.util.List<com.liferay.portal.model.Organization> Organizations); 056 057 public void addGroupOrganizations(long groupId, long[] organizationIds); 058 059 /** 060 * Adds the organization to the database. Also notifies the appropriate model listeners. 061 * 062 * @param organization the organization 063 * @return the organization that was added 064 */ 065 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 066 public com.liferay.portal.model.Organization addOrganization( 067 com.liferay.portal.model.Organization organization); 068 069 /** 070 * Adds an organization. 071 * 072 * <p> 073 * This method handles the creation and bookkeeping of the organization 074 * including its resources, metadata, and internal data structures. It is 075 * not necessary to make a subsequent call to {@link 076 * #addOrganizationResources(long, Organization)}. 077 * </p> 078 * 079 * @param userId the primary key of the creator/owner of the organization 080 * @param parentOrganizationId the primary key of the organization's parent 081 organization 082 * @param name the organization's name 083 * @param site whether the organization is to be associated with a main 084 site 085 * @return the organization 086 */ 087 public com.liferay.portal.model.Organization addOrganization(long userId, 088 long parentOrganizationId, java.lang.String name, boolean site) 089 throws PortalException; 090 091 /** 092 * Adds an organization. 093 * 094 * <p> 095 * This method handles the creation and bookkeeping of the organization 096 * including its resources, metadata, and internal data structures. It is 097 * not necessary to make a subsequent call to {@link 098 * #addOrganizationResources(long, Organization)}. 099 * </p> 100 * 101 * @param userId the primary key of the creator/owner of the 102 organization 103 * @param parentOrganizationId the primary key of the organization's 104 parent organization 105 * @param name the organization's name 106 * @param type the organization's type 107 * @param recursable whether the permissions of the organization are to 108 be inherited by its suborganizations 109 * @param regionId the primary key of the organization's region 110 * @param countryId the primary key of the organization's country 111 * @param statusId the organization's workflow status 112 * @param comments the comments about the organization 113 * @param site whether the organization is to be associated with a main 114 site 115 * @param serviceContext the service context to be applied (optionally 116 <code>null</code>). Can set asset category IDs, asset tag 117 names, and expando bridge attributes for the organization. 118 * @return the organization 119 * @deprecated As of 6.2.0, replaced by {@link #addOrganization(long, long, 120 String, String, long, long, int, String, boolean, 121 ServiceContext)} 122 */ 123 @java.lang.Deprecated 124 public com.liferay.portal.model.Organization addOrganization(long userId, 125 long parentOrganizationId, java.lang.String name, 126 java.lang.String type, boolean recursable, long regionId, 127 long countryId, long statusId, java.lang.String comments, boolean site, 128 com.liferay.portal.service.ServiceContext serviceContext) 129 throws PortalException; 130 131 /** 132 * Adds an organization. 133 * 134 * <p> 135 * This method handles the creation and bookkeeping of the organization 136 * including its resources, metadata, and internal data structures. It is 137 * not necessary to make a subsequent call to {@link 138 * #addOrganizationResources(long, Organization)}. 139 * </p> 140 * 141 * @param userId the primary key of the creator/owner of the organization 142 * @param parentOrganizationId the primary key of the organization's parent 143 organization 144 * @param name the organization's name 145 * @param type the organization's type 146 * @param regionId the primary key of the organization's region 147 * @param countryId the primary key of the organization's country 148 * @param statusId the organization's workflow status 149 * @param comments the comments about the organization 150 * @param site whether the organization is to be associated with a main 151 site 152 * @param serviceContext the service context to be applied (optionally 153 <code>null</code>). Can set asset category IDs, asset tag names, 154 and expando bridge attributes for the organization. 155 * @return the organization 156 */ 157 public com.liferay.portal.model.Organization addOrganization(long userId, 158 long parentOrganizationId, java.lang.String name, 159 java.lang.String type, long regionId, long countryId, long statusId, 160 java.lang.String comments, boolean site, 161 com.liferay.portal.service.ServiceContext serviceContext) 162 throws PortalException; 163 164 /** 165 * Adds a resource for each type of permission available on the 166 * organization. 167 * 168 * @param userId the primary key of the creator/owner of the organization 169 * @param organization the organization 170 */ 171 public void addOrganizationResources(long userId, 172 com.liferay.portal.model.Organization organization) 173 throws PortalException; 174 175 /** 176 * Assigns the password policy to the organizations, removing any other 177 * currently assigned password policies. 178 * 179 * @param passwordPolicyId the primary key of the password policy 180 * @param organizationIds the primary keys of the organizations 181 */ 182 public void addPasswordPolicyOrganizations(long passwordPolicyId, 183 long[] organizationIds); 184 185 public void addUserOrganization(long userId, 186 com.liferay.portal.model.Organization organization); 187 188 public void addUserOrganization(long userId, long organizationId); 189 190 public void addUserOrganizations(long userId, 191 java.util.List<com.liferay.portal.model.Organization> Organizations); 192 193 public void addUserOrganizations(long userId, long[] organizationIds); 194 195 public void clearGroupOrganizations(long groupId); 196 197 public void clearUserOrganizations(long userId); 198 199 /** 200 * Creates a new organization with the primary key. Does not add the organization to the database. 201 * 202 * @param organizationId the primary key for the new organization 203 * @return the new organization 204 */ 205 public com.liferay.portal.model.Organization createOrganization( 206 long organizationId); 207 208 public void deleteGroupOrganization(long groupId, 209 com.liferay.portal.model.Organization organization); 210 211 public void deleteGroupOrganization(long groupId, long organizationId); 212 213 public void deleteGroupOrganizations(long groupId, 214 java.util.List<com.liferay.portal.model.Organization> Organizations); 215 216 public void deleteGroupOrganizations(long groupId, long[] organizationIds); 217 218 /** 219 * Deletes the organization's logo. 220 * 221 * @param organizationId the primary key of the organization 222 */ 223 public void deleteLogo(long organizationId) throws PortalException; 224 225 /** 226 * Deletes the organization from the database. Also notifies the appropriate model listeners. 227 * 228 * @param organization the organization 229 * @return the organization that was removed 230 * @throws PortalException 231 */ 232 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 233 @com.liferay.portal.kernel.systemevent.SystemEvent(type = SystemEventConstants.TYPE_DELETE) 234 public com.liferay.portal.model.Organization deleteOrganization( 235 com.liferay.portal.model.Organization organization) 236 throws PortalException; 237 238 /** 239 * Deletes the organization with the primary key from the database. Also notifies the appropriate model listeners. 240 * 241 * @param organizationId the primary key of the organization 242 * @return the organization that was removed 243 * @throws PortalException if a organization with the primary key could not be found 244 */ 245 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 246 public com.liferay.portal.model.Organization deleteOrganization( 247 long organizationId) throws PortalException; 248 249 /** 250 * @throws PortalException 251 */ 252 @Override 253 public com.liferay.portal.model.PersistedModel deletePersistedModel( 254 com.liferay.portal.model.PersistedModel persistedModel) 255 throws PortalException; 256 257 public void deleteUserOrganization(long userId, 258 com.liferay.portal.model.Organization organization); 259 260 public void deleteUserOrganization(long userId, long organizationId); 261 262 public void deleteUserOrganizations(long userId, 263 java.util.List<com.liferay.portal.model.Organization> Organizations); 264 265 public void deleteUserOrganizations(long userId, long[] organizationIds); 266 267 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery(); 268 269 /** 270 * Performs a dynamic query on the database and returns the matching rows. 271 * 272 * @param dynamicQuery the dynamic query 273 * @return the matching rows 274 */ 275 public <T> java.util.List<T> dynamicQuery( 276 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 277 278 /** 279 * Performs a dynamic query on the database and returns a range of the matching rows. 280 * 281 * <p> 282 * 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.OrganizationModelImpl}. 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. 283 * </p> 284 * 285 * @param dynamicQuery the dynamic query 286 * @param start the lower bound of the range of model instances 287 * @param end the upper bound of the range of model instances (not inclusive) 288 * @return the range of matching rows 289 */ 290 public <T> java.util.List<T> dynamicQuery( 291 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 292 int end); 293 294 /** 295 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 296 * 297 * <p> 298 * 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.OrganizationModelImpl}. 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. 299 * </p> 300 * 301 * @param dynamicQuery the dynamic query 302 * @param start the lower bound of the range of model instances 303 * @param end the upper bound of the range of model instances (not inclusive) 304 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 305 * @return the ordered range of matching rows 306 */ 307 public <T> java.util.List<T> dynamicQuery( 308 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 309 int end, 310 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator); 311 312 /** 313 * Returns the number of rows matching the dynamic query. 314 * 315 * @param dynamicQuery the dynamic query 316 * @return the number of rows matching the dynamic query 317 */ 318 public long dynamicQueryCount( 319 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 320 321 /** 322 * Returns the number of rows matching the dynamic query. 323 * 324 * @param dynamicQuery the dynamic query 325 * @param projection the projection to apply to the query 326 * @return the number of rows matching the dynamic query 327 */ 328 public long dynamicQueryCount( 329 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 330 com.liferay.portal.kernel.dao.orm.Projection projection); 331 332 /** 333 * Returns the organization with the name. 334 * 335 * @param companyId the primary key of the organization's company 336 * @param name the organization's name 337 * @return the organization with the name, or <code>null</code> if no 338 organization could be found 339 */ 340 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 341 public com.liferay.portal.model.Organization fetchOrganization( 342 long companyId, java.lang.String name); 343 344 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 345 public com.liferay.portal.model.Organization fetchOrganization( 346 long organizationId); 347 348 /** 349 * Returns the organization with the matching UUID and company. 350 * 351 * @param uuid the organization's UUID 352 * @param companyId the primary key of the company 353 * @return the matching organization, or <code>null</code> if a matching organization could not be found 354 */ 355 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 356 public com.liferay.portal.model.Organization fetchOrganizationByUuidAndCompanyId( 357 java.lang.String uuid, long companyId); 358 359 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 360 public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery(); 361 362 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 363 public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 364 com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext); 365 366 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 367 public java.util.List<com.liferay.portal.model.Organization> getGroupOrganizations( 368 long groupId); 369 370 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 371 public java.util.List<com.liferay.portal.model.Organization> getGroupOrganizations( 372 long groupId, int start, int end); 373 374 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 375 public java.util.List<com.liferay.portal.model.Organization> getGroupOrganizations( 376 long groupId, int start, int end, 377 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Organization> orderByComparator); 378 379 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 380 public int getGroupOrganizationsCount(long groupId); 381 382 /** 383 * Returns the groupIds of the groups associated with the organization. 384 * 385 * @param organizationId the organizationId of the organization 386 * @return long[] the groupIds of groups associated with the organization 387 */ 388 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 389 public long[] getGroupPrimaryKeys(long organizationId); 390 391 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 392 public java.util.List<com.liferay.portal.model.Organization> getGroupUserOrganizations( 393 long groupId, long userId) throws PortalException; 394 395 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 396 public java.util.List<com.liferay.portal.model.Organization> getNoAssetOrganizations(); 397 398 /** 399 * Returns the OSGi service identifier. 400 * 401 * @return the OSGi service identifier 402 */ 403 public java.lang.String getOSGiServiceIdentifier(); 404 405 /** 406 * Returns the organization with the name. 407 * 408 * @param companyId the primary key of the organization's company 409 * @param name the organization's name 410 * @return the organization with the name 411 */ 412 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 413 public com.liferay.portal.model.Organization getOrganization( 414 long companyId, java.lang.String name) throws PortalException; 415 416 /** 417 * Returns the organization with the primary key. 418 * 419 * @param organizationId the primary key of the organization 420 * @return the organization 421 * @throws PortalException if a organization with the primary key could not be found 422 */ 423 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 424 public com.liferay.portal.model.Organization getOrganization( 425 long organizationId) throws PortalException; 426 427 /** 428 * Returns the organization with the matching UUID and company. 429 * 430 * @param uuid the organization's UUID 431 * @param companyId the primary key of the company 432 * @return the matching organization 433 * @throws PortalException if a matching organization could not be found 434 */ 435 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 436 public com.liferay.portal.model.Organization getOrganizationByUuidAndCompanyId( 437 java.lang.String uuid, long companyId) throws PortalException; 438 439 /** 440 * Returns the primary key of the organization with the name. 441 * 442 * @param companyId the primary key of the organization's company 443 * @param name the organization's name 444 * @return the primary key of the organization with the name, or 445 <code>0</code> if the organization could not be found 446 */ 447 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 448 public long getOrganizationId(long companyId, java.lang.String name); 449 450 /** 451 * Returns all the organizations belonging to the parent organization. 452 * 453 * @param companyId the primary key of the organization's company 454 * @param parentOrganizationId the primary key of the organization's parent 455 organization 456 * @return the organizations belonging to the parent organization 457 */ 458 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 459 public java.util.List<com.liferay.portal.model.Organization> getOrganizations( 460 long companyId, long parentOrganizationId); 461 462 /** 463 * Returns a range of all the organizations belonging to the parent 464 * organization. 465 * 466 * <p> 467 * Useful when paginating results. Returns a maximum of <code>end - 468 * start</code> instances. <code>start</code> and <code>end</code> are not 469 * primary keys, they are indexes in the result set. Thus, <code>0</code> 470 * refers to the first result in the set. Setting both <code>start</code> 471 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 472 * result set. 473 * </p> 474 * 475 * @param companyId the primary key of the organization's company 476 * @param parentOrganizationId the primary key of the organization's parent 477 organization 478 * @param start the lower bound of the range of organizations to return 479 * @param end the upper bound of the range of organizations to return (not 480 inclusive) 481 * @return the range of organizations belonging to the parent organization 482 * @see com.liferay.portal.service.persistence.OrganizationPersistence#findByC_P( 483 long, long, int, int) 484 */ 485 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 486 public java.util.List<com.liferay.portal.model.Organization> getOrganizations( 487 long companyId, long parentOrganizationId, int start, int end); 488 489 /** 490 * Returns the organizations with the primary keys. 491 * 492 * @param organizationIds the primary keys of the organizations 493 * @return the organizations with the primary keys 494 */ 495 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 496 public java.util.List<com.liferay.portal.model.Organization> getOrganizations( 497 long[] organizationIds) throws PortalException; 498 499 /** 500 * Returns a range of all the organizations. 501 * 502 * <p> 503 * 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.OrganizationModelImpl}. 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. 504 * </p> 505 * 506 * @param start the lower bound of the range of organizations 507 * @param end the upper bound of the range of organizations (not inclusive) 508 * @return the range of organizations 509 */ 510 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 511 public java.util.List<com.liferay.portal.model.Organization> getOrganizations( 512 int start, int end); 513 514 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 515 public java.util.List<com.liferay.portal.model.Organization> getOrganizations( 516 long userId, int start, int end, 517 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Organization> obc) 518 throws PortalException; 519 520 /** 521 * Returns the number of organizations. 522 * 523 * @return the number of organizations 524 */ 525 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 526 public int getOrganizationsCount(); 527 528 /** 529 * Returns the number of organizations belonging to the parent organization. 530 * 531 * @param companyId the primary key of the organization's company 532 * @param parentOrganizationId the primary key of the organization's parent 533 organization 534 * @return the number of organizations belonging to the parent organization 535 */ 536 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 537 public int getOrganizationsCount(long companyId, long parentOrganizationId); 538 539 /** 540 * Returns the parent organizations in order by closest ancestor. The list 541 * starts with the organization itself. 542 * 543 * @param organizationId the primary key of the organization 544 * @return the parent organizations in order by closest ancestor 545 */ 546 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 547 public java.util.List<com.liferay.portal.model.Organization> getParentOrganizations( 548 long organizationId) throws PortalException; 549 550 @Override 551 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 552 public com.liferay.portal.model.PersistedModel getPersistedModel( 553 java.io.Serializable primaryKeyObj) throws PortalException; 554 555 /** 556 * Returns the suborganizations of the organization. 557 * 558 * @param companyId the primary key of the organization's company 559 * @param organizationId the primary key of the organization 560 * @return the suborganizations of the organization 561 */ 562 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 563 public java.util.List<com.liferay.portal.model.Organization> getSuborganizations( 564 long companyId, long organizationId); 565 566 /** 567 * Returns the suborganizations of the organizations. 568 * 569 * @param organizations the organizations from which to get 570 suborganizations 571 * @return the suborganizations of the organizations 572 */ 573 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 574 public java.util.List<com.liferay.portal.model.Organization> getSuborganizations( 575 java.util.List<com.liferay.portal.model.Organization> organizations); 576 577 /** 578 * Returns the count of suborganizations of the organization. 579 * 580 * @param companyId the primary key of the organization's company 581 * @param organizationId the primary key of the organization 582 * @return the count of suborganizations of the organization 583 */ 584 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 585 public int getSuborganizationsCount(long companyId, long organizationId); 586 587 /** 588 * Returns the intersection of <code>allOrganizations</code> and 589 * <code>availableOrganizations</code>. 590 * 591 * @param allOrganizations the organizations to check for availability 592 * @param availableOrganizations the available organizations 593 * @return the intersection of <code>allOrganizations</code> and 594 <code>availableOrganizations</code> 595 */ 596 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 597 public java.util.List<com.liferay.portal.model.Organization> getSubsetOrganizations( 598 java.util.List<com.liferay.portal.model.Organization> allOrganizations, 599 java.util.List<com.liferay.portal.model.Organization> availableOrganizations); 600 601 /** 602 * Returns all the IDs of organizations with which the user is explicitly 603 * associated, optionally including the IDs of organizations that the user 604 * administers or owns. 605 * 606 * <p> 607 * A user is considered to be <i>explicitly</i> associated with an 608 * organization if his account is individually created within the 609 * organization or if the user is later added to it. 610 * </p> 611 * 612 * @param userId the primary key of the user 613 * @param includeAdministrative whether to include the IDs of organizations 614 that the user administers or owns, even if he's not a member of 615 the organizations 616 * @return the IDs of organizations with which the user is explicitly 617 associated, optionally including the IDs of organizations that 618 the user administers or owns 619 */ 620 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 621 public long[] getUserOrganizationIds(long userId, 622 boolean includeAdministrative) throws PortalException; 623 624 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 625 public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations( 626 long userId); 627 628 /** 629 * Returns all the organizations with which the user is explicitly 630 * associated, optionally including the organizations that the user 631 * administers or owns. 632 * 633 * <p> 634 * A user is considered to be <i>explicitly</i> associated with an 635 * organization if his account is individually created within the 636 * organization or if the user is later added as a member. 637 * </p> 638 * 639 * @param userId the primary key of the user 640 * @param includeAdministrative whether to include the IDs of organizations 641 that the user administers or owns, even if he's not a member of 642 the organizations 643 * @return the organizations with which the user is explicitly associated, 644 optionally including the organizations that the user administers 645 or owns 646 */ 647 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 648 public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations( 649 long userId, boolean includeAdministrative) throws PortalException; 650 651 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 652 public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations( 653 long userId, int start, int end); 654 655 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 656 public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations( 657 long userId, int start, int end, 658 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Organization> orderByComparator); 659 660 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 661 public int getUserOrganizationsCount(long userId); 662 663 /** 664 * Returns the userIds of the users associated with the organization. 665 * 666 * @param organizationId the organizationId of the organization 667 * @return long[] the userIds of users associated with the organization 668 */ 669 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 670 public long[] getUserPrimaryKeys(long organizationId); 671 672 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 673 public boolean hasGroupOrganization(long groupId, long organizationId); 674 675 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 676 public boolean hasGroupOrganizations(long groupId); 677 678 /** 679 * Returns <code>true</code> if the password policy has been assigned to the 680 * organization. 681 * 682 * @param passwordPolicyId the primary key of the password policy 683 * @param organizationId the primary key of the organization 684 * @return <code>true</code> if the password policy has been assigned to the 685 organization; <code>false</code> otherwise 686 */ 687 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 688 public boolean hasPasswordPolicyOrganization(long passwordPolicyId, 689 long organizationId); 690 691 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 692 public boolean hasUserOrganization(long userId, long organizationId); 693 694 /** 695 * Returns <code>true</code> if the user is a member of the organization, 696 * optionally focusing on suborganizations or the specified organization. 697 * This method is usually called to determine if the user has view access to 698 * a resource belonging to the organization. 699 * 700 * <ol> 701 * <li> 702 * If <code>inheritSuborganizations=<code>false</code></code>: 703 * the method checks whether the user belongs to the organization specified 704 * by <code>organizationId</code>. The parameter 705 * <code>includeSpecifiedOrganization</code> is ignored. 706 * </li> 707 * <li> 708 * The parameter <code>includeSpecifiedOrganization</code> is 709 * ignored unless <code>inheritSuborganizations</code> is also 710 * <code>true</code>. 711 * </li> 712 * <li> 713 * If <code>inheritSuborganizations=<code>true</code></code> and 714 * <code>includeSpecifiedOrganization=<code>false</code></code>: the method 715 * checks 716 * whether the user belongs to one of the child organizations of the one 717 * specified by <code>organizationId</code>. 718 * </li> 719 * <li> 720 * If <code>inheritSuborganizations=<code>true</code></code> and 721 * <code>includeSpecifiedOrganization=<code>true</code></code>: the method 722 * checks whether 723 * the user belongs to the organization specified by 724 * <code>organizationId</code> or any of 725 * its child organizations. 726 * </li> 727 * </ol> 728 * 729 * @param userId the primary key of the organization's user 730 * @param organizationId the primary key of the organization 731 * @param inheritSuborganizations if <code>true</code> suborganizations are 732 considered in the determination 733 * @param includeSpecifiedOrganization if <code>true</code> the 734 organization specified by <code>organizationId</code> is 735 considered in the determination 736 * @return <code>true</code> if the user has access to the organization; 737 <code>false</code> otherwise 738 * @see com.liferay.portal.service.persistence.OrganizationFinder 739 */ 740 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 741 public boolean hasUserOrganization(long userId, long organizationId, 742 boolean inheritSuborganizations, boolean includeSpecifiedOrganization) 743 throws PortalException; 744 745 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 746 public boolean hasUserOrganizations(long userId); 747 748 /** 749 * Rebuilds the organization's tree. 750 * 751 * <p> 752 * Only call this method if the tree has become stale through operations 753 * other than normal CRUD. Under normal circumstances the tree is 754 * automatically rebuilt whenever necessary. 755 * </p> 756 * 757 * @param companyId the primary key of the organization's company 758 */ 759 public void rebuildTree(long companyId) throws PortalException; 760 761 /** 762 * Returns an ordered range of all the organizations that match the 763 * keywords, using the indexer. It is preferable to use this method instead 764 * of the non-indexed version whenever possible for performance reasons. 765 * 766 * <p> 767 * Useful when paginating results. Returns a maximum of <code>end - 768 * start</code> instances. <code>start</code> and <code>end</code> are not 769 * primary keys, they are indexes in the result set. Thus, <code>0</code> 770 * refers to the first result in the set. Setting both <code>start</code> 771 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 772 * result set. 773 * </p> 774 * 775 * @param companyId the primary key of the organization's company 776 * @param parentOrganizationId the primary key of the organization's parent 777 organization 778 * @param keywords the keywords (space separated), which may occur in the 779 organization's name, street, city, zipcode, type, region or 780 country (optionally <code>null</code>) 781 * @param params the finder parameters (optionally <code>null</code>). For 782 more information see {@link 783 com.liferay.portlet.usersadmin.util.OrganizationIndexer} 784 * @param start the lower bound of the range of organizations to return 785 * @param end the upper bound of the range of organizations to return (not 786 inclusive) 787 * @param sort the field and direction by which to sort (optionally 788 <code>null</code>) 789 * @return the matching organizations ordered by name 790 * @see com.liferay.portlet.usersadmin.util.OrganizationIndexer 791 */ 792 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 793 public com.liferay.portal.kernel.search.Hits search(long companyId, 794 long parentOrganizationId, java.lang.String keywords, 795 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 796 int start, int end, com.liferay.portal.kernel.search.Sort sort); 797 798 /** 799 * Returns a name ordered range of all the organizations that match the 800 * keywords, type, region, and country, without using the indexer. It is 801 * preferable to use the indexed version {@link #search(long, long, String, 802 * LinkedHashMap, int, int, Sort)} instead of this method wherever possible 803 * for performance reasons. 804 * 805 * <p> 806 * Useful when paginating results. Returns a maximum of <code>end - 807 * start</code> instances. <code>start</code> and <code>end</code> are not 808 * primary keys, they are indexes in the result set. Thus, <code>0</code> 809 * refers to the first result in the set. Setting both <code>start</code> 810 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 811 * result set. 812 * </p> 813 * 814 * @param companyId the primary key of the organization's company 815 * @param parentOrganizationId the primary key of the organization's parent 816 organization 817 * @param keywords the keywords (space separated), which may occur in the 818 organization's name, street, city, or zipcode (optionally 819 <code>null</code>) 820 * @param type the organization's type (optionally <code>null</code>) 821 * @param regionId the primary key of the organization's region (optionally 822 <code>null</code>) 823 * @param countryId the primary key of the organization's country 824 (optionally <code>null</code>) 825 * @param params the finder params. For more information see {@link 826 com.liferay.portal.service.persistence.OrganizationFinder} 827 * @param start the lower bound of the range of organizations to return 828 * @param end the upper bound of the range of organizations to return (not 829 inclusive) 830 * @return the matching organizations ordered by name 831 * @see com.liferay.portal.service.persistence.OrganizationFinder 832 */ 833 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 834 public java.util.List<com.liferay.portal.model.Organization> search( 835 long companyId, long parentOrganizationId, java.lang.String keywords, 836 java.lang.String type, java.lang.Long regionId, 837 java.lang.Long countryId, 838 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 839 int start, int end); 840 841 /** 842 * Returns an ordered range of all the organizations that match the 843 * keywords, type, region, and country, without using the indexer. It is 844 * preferable to use the indexed version {@link #search(long, long, String, 845 * String, String, String, String, String, String, LinkedHashMap, boolean, 846 * int, int, Sort)} instead of this method wherever possible for performance 847 * reasons. 848 * 849 * <p> 850 * Useful when paginating results. Returns a maximum of <code>end - 851 * start</code> instances. <code>start</code> and <code>end</code> are not 852 * primary keys, they are indexes in the result set. Thus, <code>0</code> 853 * refers to the first result in the set. Setting both <code>start</code> 854 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 855 * result set. 856 * </p> 857 * 858 * @param companyId the primary key of the organization's company 859 * @param parentOrganizationId the primary key of the organization's parent 860 organization 861 * @param keywords the keywords (space separated), which may occur in the 862 organization's name, street, city, or zipcode (optionally 863 <code>null</code>) 864 * @param type the organization's type (optionally <code>null</code>) 865 * @param regionId the primary key of the organization's region (optionally 866 <code>null</code>) 867 * @param countryId the primary key of the organization's country 868 (optionally <code>null</code>) 869 * @param params the finder params. For more information see {@link 870 com.liferay.portal.service.persistence.OrganizationFinder} 871 * @param start the lower bound of the range of organizations to return 872 * @param end the upper bound of the range of organizations to return (not 873 inclusive) 874 * @param obc the comparator to order the organizations (optionally 875 <code>null</code>) 876 * @return the matching organizations ordered by comparator <code>obc</code> 877 * @see com.liferay.portal.service.persistence.OrganizationFinder 878 */ 879 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 880 public java.util.List<com.liferay.portal.model.Organization> search( 881 long companyId, long parentOrganizationId, java.lang.String keywords, 882 java.lang.String type, java.lang.Long regionId, 883 java.lang.Long countryId, 884 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 885 int start, int end, 886 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Organization> obc); 887 888 /** 889 * Returns an ordered range of all the organizations whose name, type, or 890 * location fields match the keywords specified for them, using the indexer. 891 * It is preferable to use this method instead of the non-indexed version 892 * whenever possible for performance reasons. 893 * 894 * <p> 895 * Useful when paginating results. Returns a maximum of <code>end - 896 * start</code> instances. <code>start</code> and <code>end</code> are not 897 * primary keys, they are indexes in the result set. Thus, <code>0</code> 898 * refers to the first result in the set. Setting both <code>start</code> 899 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 900 * result set. 901 * </p> 902 * 903 * @param companyId the primary key of the organization's company 904 * @param parentOrganizationId the primary key of the organization's parent 905 organization 906 * @param name the name keywords (space separated, optionally 907 <code>null</code>) 908 * @param type the type keywords (optionally <code>null</code>) 909 * @param street the street keywords (optionally <code>null</code>) 910 * @param city the city keywords (optionally <code>null</code>) 911 * @param zip the zipcode keywords (optionally <code>null</code>) 912 * @param region the region keywords (optionally <code>null</code>) 913 * @param country the country keywords (optionally <code>null</code>) 914 * @param params the finder parameters (optionally <code>null</code>). For 915 more information see {@link 916 com.liferay.portlet.usersadmin.util.OrganizationIndexer}. 917 * @param andSearch whether every field must match its keywords or just one 918 field 919 * @param start the lower bound of the range of organizations to return 920 * @param end the upper bound of the range of organizations to return (not 921 inclusive) 922 * @param sort the field and direction by which to sort (optionally 923 <code>null</code>) 924 * @return the matching organizations ordered by <code>sort</code> 925 * @see com.liferay.portlet.usersadmin.util.OrganizationIndexer 926 */ 927 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 928 public com.liferay.portal.kernel.search.Hits search(long companyId, 929 long parentOrganizationId, java.lang.String name, 930 java.lang.String type, java.lang.String street, java.lang.String city, 931 java.lang.String zip, java.lang.String region, 932 java.lang.String country, 933 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 934 boolean andSearch, int start, int end, 935 com.liferay.portal.kernel.search.Sort sort); 936 937 /** 938 * Returns a name ordered range of all the organizations with the type, 939 * region, and country, and whose name, street, city, and zipcode match the 940 * keywords specified for them, without using the indexer. It is preferable 941 * to use the indexed version {@link #search(long, long, String, String, 942 * String, String, String, String, String, LinkedHashMap, boolean, int, int, 943 * Sort)} instead of this method wherever possible for performance reasons. 944 * 945 * <p> 946 * Useful when paginating results. Returns a maximum of <code>end - 947 * start</code> instances. <code>start</code> and <code>end</code> are not 948 * primary keys, they are indexes in the result set. Thus, <code>0</code> 949 * refers to the first result in the set. Setting both <code>start</code> 950 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 951 * result set. 952 * </p> 953 * 954 * @param companyId the primary key of the organization's company 955 * @param parentOrganizationId the primary key of the organization's parent 956 * @param name the name keywords (space separated, optionally 957 <code>null</code>) 958 * @param type the organization's type (optionally <code>null</code>) 959 * @param street the street keywords (optionally <code>null</code>) 960 * @param city the city keywords (optionally <code>null</code>) 961 * @param zip the zipcode keywords (optionally <code>null</code>) 962 * @param regionId the primary key of the organization's region (optionally 963 <code>null</code>) 964 * @param countryId the primary key of the organization's country 965 (optionally <code>null</code>) 966 * @param params the finder parameters (optionally <code>null</code>). For 967 more information see {@link 968 com.liferay.portal.service.persistence.OrganizationFinder} 969 * @param andOperator whether every field must match its keywords, or just 970 one field. For example, "organizations with the name 971 'Employees' and city 'Chicago'" vs "organizations with 972 the name 'Employees' or the city 'Chicago'". 973 * @param start the lower bound of the range of organizations to return 974 * @param end the upper bound of the range of organizations to return (not 975 inclusive) 976 * @return the matching organizations ordered by name 977 * @see com.liferay.portal.service.persistence.OrganizationFinder 978 */ 979 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 980 public java.util.List<com.liferay.portal.model.Organization> search( 981 long companyId, long parentOrganizationId, java.lang.String name, 982 java.lang.String type, java.lang.String street, java.lang.String city, 983 java.lang.String zip, java.lang.Long regionId, 984 java.lang.Long countryId, 985 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 986 boolean andOperator, int start, int end); 987 988 /** 989 * Returns an ordered range of all the organizations with the type, region, 990 * and country, and whose name, street, city, and zipcode match the keywords 991 * specified for them, without using the indexer. It is preferable to use 992 * the indexed version {@link #search(long, long, String, String, String, 993 * String, String, String, String, LinkedHashMap, boolean, int, int, Sort)} 994 * instead of this method wherever possible for performance reasons. 995 * 996 * <p> 997 * Useful when paginating results. Returns a maximum of <code>end - 998 * start</code> instances. <code>start</code> and <code>end</code> are not 999 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1000 * refers to the first result in the set. Setting both <code>start</code> 1001 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1002 * result set. 1003 * </p> 1004 * 1005 * @param companyId the primary key of the organization's company 1006 * @param parentOrganizationId the primary key of the organization's parent 1007 organization 1008 * @param name the name keywords (space separated, optionally 1009 <code>null</code>) 1010 * @param type the organization's type (optionally <code>null</code>) 1011 * @param street the street keywords (optionally <code>null</code>) 1012 * @param city the city keywords (optionally <code>null</code>) 1013 * @param zip the zipcode keywords (optionally <code>null</code>) 1014 * @param regionId the primary key of the organization's region (optionally 1015 <code>null</code>) 1016 * @param countryId the primary key of the organization's country 1017 (optionally <code>null</code>) 1018 * @param params the finder parameters (optionally <code>null</code>). For 1019 more information see {@link 1020 com.liferay.portal.service.persistence.OrganizationFinder} 1021 * @param andOperator whether every field must match its keywords, or just 1022 one field. For example, "organizations with the name 1023 'Employees' and city 'Chicago'" vs "organizations with 1024 the name 'Employees' or the city 'Chicago'". 1025 * @param start the lower bound of the range of organizations to return 1026 * @param end the upper bound of the range of organizations to return (not 1027 inclusive) 1028 * @param obc the comparator to order the organizations (optionally 1029 <code>null</code>) 1030 * @return the matching organizations ordered by comparator <code>obc</code> 1031 * @see com.liferay.portal.service.persistence.OrganizationFinder 1032 */ 1033 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1034 public java.util.List<com.liferay.portal.model.Organization> search( 1035 long companyId, long parentOrganizationId, java.lang.String name, 1036 java.lang.String type, java.lang.String street, java.lang.String city, 1037 java.lang.String zip, java.lang.Long regionId, 1038 java.lang.Long countryId, 1039 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1040 boolean andOperator, int start, int end, 1041 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Organization> obc); 1042 1043 /** 1044 * Returns the number of organizations that match the keywords, type, 1045 * region, and country. 1046 * 1047 * @param companyId the primary key of the organization's company 1048 * @param parentOrganizationId the primary key of the organization's parent 1049 organization 1050 * @param keywords the keywords (space separated), which may occur in the 1051 organization's name, street, city, or zipcode (optionally 1052 <code>null</code>) 1053 * @param type the organization's type (optionally <code>null</code>) 1054 * @param regionId the primary key of the organization's region (optionally 1055 <code>null</code>) 1056 * @param countryId the primary key of the organization's country 1057 (optionally <code>null</code>) 1058 * @param params the finder parameters (optionally <code>null</code>). For 1059 more information see {@link 1060 com.liferay.portal.service.persistence.OrganizationFinder} 1061 * @return the number of matching organizations 1062 * @see com.liferay.portal.service.persistence.OrganizationFinder 1063 */ 1064 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1065 public int searchCount(long companyId, long parentOrganizationId, 1066 java.lang.String keywords, java.lang.String type, 1067 java.lang.Long regionId, java.lang.Long countryId, 1068 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params); 1069 1070 /** 1071 * Returns the number of organizations with the type, region, and country, 1072 * and whose name, street, city, and zipcode match the keywords specified 1073 * for them. 1074 * 1075 * @param companyId the primary key of the organization's company 1076 * @param parentOrganizationId the primary key of the organization's parent 1077 organization 1078 * @param name the name keywords (space separated, optionally 1079 <code>null</code>) 1080 * @param type the organization's type (optionally <code>null</code>) 1081 * @param street the street keywords (optionally <code>null</code>) 1082 * @param city the city keywords (optionally <code>null</code>) 1083 * @param zip the zipcode keywords (optionally <code>null</code>) 1084 * @param regionId the primary key of the organization's region (optionally 1085 <code>null</code>) 1086 * @param countryId the primary key of the organization's country 1087 (optionally <code>null</code>) 1088 * @param params the finder parameters (optionally <code>null</code>). For 1089 more information see {@link 1090 com.liferay.portal.service.persistence.OrganizationFinder} 1091 * @param andOperator whether every field must match its keywords, or just 1092 one field. For example, "organizations with the name 1093 'Employees' and city 'Chicago'" vs "organizations with 1094 the name 'Employees' or the city 'Chicago'". 1095 * @return the number of matching organizations 1096 * @see com.liferay.portal.service.persistence.OrganizationFinder 1097 */ 1098 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1099 public int searchCount(long companyId, long parentOrganizationId, 1100 java.lang.String name, java.lang.String type, java.lang.String street, 1101 java.lang.String city, java.lang.String zip, java.lang.Long regionId, 1102 java.lang.Long countryId, 1103 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1104 boolean andOperator); 1105 1106 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1107 public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.Organization> searchOrganizations( 1108 long companyId, long parentOrganizationId, java.lang.String keywords, 1109 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1110 int start, int end, com.liferay.portal.kernel.search.Sort sort) 1111 throws PortalException; 1112 1113 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1114 public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.Organization> searchOrganizations( 1115 long companyId, long parentOrganizationId, java.lang.String name, 1116 java.lang.String type, java.lang.String street, java.lang.String city, 1117 java.lang.String zip, java.lang.String region, 1118 java.lang.String country, 1119 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1120 boolean andSearch, int start, int end, 1121 com.liferay.portal.kernel.search.Sort sort) throws PortalException; 1122 1123 public void setGroupOrganizations(long groupId, long[] organizationIds); 1124 1125 public void setUserOrganizations(long userId, long[] organizationIds); 1126 1127 /** 1128 * Removes the organizations from the group. 1129 * 1130 * @param groupId the primary key of the group 1131 * @param organizationIds the primary keys of the organizations 1132 */ 1133 public void unsetGroupOrganizations(long groupId, long[] organizationIds); 1134 1135 /** 1136 * Removes the organizations from the password policy. 1137 * 1138 * @param passwordPolicyId the primary key of the password policy 1139 * @param organizationIds the primary keys of the organizations 1140 */ 1141 public void unsetPasswordPolicyOrganizations(long passwordPolicyId, 1142 long[] organizationIds); 1143 1144 /** 1145 * Updates the organization's asset with the new asset categories and tag 1146 * names, removing and adding asset categories and tag names as necessary. 1147 * 1148 * @param userId the primary key of the user 1149 * @param organization the organization 1150 * @param assetCategoryIds the primary keys of the asset categories 1151 * @param assetTagNames the asset tag names 1152 */ 1153 public void updateAsset(long userId, 1154 com.liferay.portal.model.Organization organization, 1155 long[] assetCategoryIds, java.lang.String[] assetTagNames) 1156 throws PortalException; 1157 1158 /** 1159 * Updates the organization. 1160 * 1161 * @param companyId the primary key of the organization's company 1162 * @param organizationId the primary key of the organization 1163 * @param parentOrganizationId the primary key of organization's parent 1164 organization 1165 * @param name the organization's name 1166 * @param type the organization's type 1167 * @param recursable whether permissions of the organization are to be 1168 inherited by its suborganizations 1169 * @param regionId the primary key of the organization's region 1170 * @param countryId the primary key of the organization's country 1171 * @param statusId the organization's workflow status 1172 * @param comments the comments about the organization 1173 * @param site whether the organization is to be associated with a main 1174 site 1175 * @param serviceContext the service context to be applied (optionally 1176 <code>null</code>). Can set asset category IDs and asset tag 1177 names for the organization, and merge expando bridge 1178 attributes for the organization. 1179 * @return the organization 1180 * @deprecated As of 6.2.0, replaced by {@link #updateOrganization(long, 1181 long, long, String, String, long, long, int, String, boolean, 1182 byte[], boolean, ServiceContext)} 1183 */ 1184 @java.lang.Deprecated 1185 public com.liferay.portal.model.Organization updateOrganization( 1186 long companyId, long organizationId, long parentOrganizationId, 1187 java.lang.String name, java.lang.String type, boolean recursable, 1188 long regionId, long countryId, long statusId, 1189 java.lang.String comments, boolean site, 1190 com.liferay.portal.service.ServiceContext serviceContext) 1191 throws PortalException; 1192 1193 /** 1194 * Updates the organization. 1195 * 1196 * @param companyId the primary key of the organization's company 1197 * @param organizationId the primary key of the organization 1198 * @param parentOrganizationId the primary key of organization's parent 1199 organization 1200 * @param name the organization's name 1201 * @param type the organization's type 1202 * @param regionId the primary key of the organization's region 1203 * @param countryId the primary key of the organization's country 1204 * @param statusId the organization's workflow status 1205 * @param comments the comments about the organization 1206 * @param logo whether to update the ogranization's logo 1207 * @param logoBytes the new logo image data 1208 * @param site whether the organization is to be associated with a main 1209 site 1210 * @param serviceContext the service context to be applied (optionally 1211 <code>null</code>). Can set asset category IDs and asset tag 1212 names for the organization, and merge expando bridge attributes 1213 for the organization. 1214 * @return the organization 1215 */ 1216 public com.liferay.portal.model.Organization updateOrganization( 1217 long companyId, long organizationId, long parentOrganizationId, 1218 java.lang.String name, java.lang.String type, long regionId, 1219 long countryId, long statusId, java.lang.String comments, boolean logo, 1220 byte[] logoBytes, boolean site, 1221 com.liferay.portal.service.ServiceContext serviceContext) 1222 throws PortalException; 1223 1224 /** 1225 * Updates the organization. 1226 * 1227 * @param companyId the primary key of the organization's company 1228 * @param organizationId the primary key of the organization 1229 * @param parentOrganizationId the primary key of organization's parent 1230 organization 1231 * @param name the organization's name 1232 * @param type the organization's type 1233 * @param regionId the primary key of the organization's region 1234 * @param countryId the primary key of the organization's country 1235 * @param statusId the organization's workflow status 1236 * @param comments the comments about the organization 1237 * @param site whether the organization is to be associated with a main 1238 site 1239 * @param serviceContext the service context to be applied (optionally 1240 <code>null</code>). Can set asset category IDs and asset tag 1241 names for the organization, and merge expando bridge 1242 attributes for the organization. 1243 * @return the organization 1244 * @deprecated As of 7.0.0, replaced by {@link #updateOrganization(long, 1245 long, long, String, String, long, long, int, String, boolean, 1246 byte[], boolean, ServiceContext)} 1247 */ 1248 @java.lang.Deprecated 1249 public com.liferay.portal.model.Organization updateOrganization( 1250 long companyId, long organizationId, long parentOrganizationId, 1251 java.lang.String name, java.lang.String type, long regionId, 1252 long countryId, long statusId, java.lang.String comments, boolean site, 1253 com.liferay.portal.service.ServiceContext serviceContext) 1254 throws PortalException; 1255 1256 /** 1257 * Updates the organization in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 1258 * 1259 * @param organization the organization 1260 * @return the organization that was updated 1261 */ 1262 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 1263 public com.liferay.portal.model.Organization updateOrganization( 1264 com.liferay.portal.model.Organization organization); 1265 }