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 com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery(); 397 398 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 399 public java.util.List<com.liferay.portal.model.Organization> getNoAssetOrganizations(); 400 401 /** 402 * Returns the OSGi service identifier. 403 * 404 * @return the OSGi service identifier 405 */ 406 public java.lang.String getOSGiServiceIdentifier(); 407 408 /** 409 * Returns the organization with the name. 410 * 411 * @param companyId the primary key of the organization's company 412 * @param name the organization's name 413 * @return the organization with the name 414 */ 415 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 416 public com.liferay.portal.model.Organization getOrganization( 417 long companyId, java.lang.String name) throws PortalException; 418 419 /** 420 * Returns the organization with the primary key. 421 * 422 * @param organizationId the primary key of the organization 423 * @return the organization 424 * @throws PortalException if a organization with the primary key could not be found 425 */ 426 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 427 public com.liferay.portal.model.Organization getOrganization( 428 long organizationId) throws PortalException; 429 430 /** 431 * Returns the organization with the matching UUID and company. 432 * 433 * @param uuid the organization's UUID 434 * @param companyId the primary key of the company 435 * @return the matching organization 436 * @throws PortalException if a matching organization could not be found 437 */ 438 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 439 public com.liferay.portal.model.Organization getOrganizationByUuidAndCompanyId( 440 java.lang.String uuid, long companyId) throws PortalException; 441 442 /** 443 * Returns the primary key of the organization with the name. 444 * 445 * @param companyId the primary key of the organization's company 446 * @param name the organization's name 447 * @return the primary key of the organization with the name, or 448 <code>0</code> if the organization could not be found 449 */ 450 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 451 public long getOrganizationId(long companyId, java.lang.String name); 452 453 /** 454 * Returns all the organizations belonging to the parent organization. 455 * 456 * @param companyId the primary key of the organization's company 457 * @param parentOrganizationId the primary key of the organization's parent 458 organization 459 * @return the organizations belonging to the parent organization 460 */ 461 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 462 public java.util.List<com.liferay.portal.model.Organization> getOrganizations( 463 long companyId, long parentOrganizationId); 464 465 /** 466 * Returns a range of all the organizations belonging to the parent 467 * organization. 468 * 469 * <p> 470 * Useful when paginating results. Returns a maximum of <code>end - 471 * start</code> instances. <code>start</code> and <code>end</code> are not 472 * primary keys, they are indexes in the result set. Thus, <code>0</code> 473 * refers to the first result in the set. Setting both <code>start</code> 474 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 475 * result set. 476 * </p> 477 * 478 * @param companyId the primary key of the organization's company 479 * @param parentOrganizationId the primary key of the organization's parent 480 organization 481 * @param start the lower bound of the range of organizations to return 482 * @param end the upper bound of the range of organizations to return (not 483 inclusive) 484 * @return the range of organizations belonging to the parent organization 485 * @see com.liferay.portal.service.persistence.OrganizationPersistence#findByC_P( 486 long, long, int, int) 487 */ 488 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 489 public java.util.List<com.liferay.portal.model.Organization> getOrganizations( 490 long companyId, long parentOrganizationId, int start, int end); 491 492 /** 493 * Returns the organizations with the primary keys. 494 * 495 * @param organizationIds the primary keys of the organizations 496 * @return the organizations with the primary keys 497 */ 498 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 499 public java.util.List<com.liferay.portal.model.Organization> getOrganizations( 500 long[] organizationIds) throws PortalException; 501 502 /** 503 * Returns a range of all the organizations. 504 * 505 * <p> 506 * 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. 507 * </p> 508 * 509 * @param start the lower bound of the range of organizations 510 * @param end the upper bound of the range of organizations (not inclusive) 511 * @return the range of organizations 512 */ 513 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 514 public java.util.List<com.liferay.portal.model.Organization> getOrganizations( 515 int start, int end); 516 517 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 518 public java.util.List<com.liferay.portal.model.Organization> getOrganizations( 519 long userId, int start, int end, 520 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Organization> obc) 521 throws PortalException; 522 523 /** 524 * Returns the number of organizations. 525 * 526 * @return the number of organizations 527 */ 528 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 529 public int getOrganizationsCount(); 530 531 /** 532 * Returns the number of organizations belonging to the parent organization. 533 * 534 * @param companyId the primary key of the organization's company 535 * @param parentOrganizationId the primary key of the organization's parent 536 organization 537 * @return the number of organizations belonging to the parent organization 538 */ 539 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 540 public int getOrganizationsCount(long companyId, long parentOrganizationId); 541 542 /** 543 * Returns the parent organizations in order by closest ancestor. The list 544 * starts with the organization itself. 545 * 546 * @param organizationId the primary key of the organization 547 * @return the parent organizations in order by closest ancestor 548 */ 549 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 550 public java.util.List<com.liferay.portal.model.Organization> getParentOrganizations( 551 long organizationId) throws PortalException; 552 553 @Override 554 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 555 public com.liferay.portal.model.PersistedModel getPersistedModel( 556 java.io.Serializable primaryKeyObj) throws PortalException; 557 558 /** 559 * Returns the suborganizations of the organization. 560 * 561 * @param companyId the primary key of the organization's company 562 * @param organizationId the primary key of the organization 563 * @return the suborganizations of the organization 564 */ 565 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 566 public java.util.List<com.liferay.portal.model.Organization> getSuborganizations( 567 long companyId, long organizationId); 568 569 /** 570 * Returns the suborganizations of the organizations. 571 * 572 * @param organizations the organizations from which to get 573 suborganizations 574 * @return the suborganizations of the organizations 575 */ 576 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 577 public java.util.List<com.liferay.portal.model.Organization> getSuborganizations( 578 java.util.List<com.liferay.portal.model.Organization> organizations); 579 580 /** 581 * Returns the count of suborganizations of the organization. 582 * 583 * @param companyId the primary key of the organization's company 584 * @param organizationId the primary key of the organization 585 * @return the count of suborganizations of the organization 586 */ 587 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 588 public int getSuborganizationsCount(long companyId, long organizationId); 589 590 /** 591 * Returns the intersection of <code>allOrganizations</code> and 592 * <code>availableOrganizations</code>. 593 * 594 * @param allOrganizations the organizations to check for availability 595 * @param availableOrganizations the available organizations 596 * @return the intersection of <code>allOrganizations</code> and 597 <code>availableOrganizations</code> 598 */ 599 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 600 public java.util.List<com.liferay.portal.model.Organization> getSubsetOrganizations( 601 java.util.List<com.liferay.portal.model.Organization> allOrganizations, 602 java.util.List<com.liferay.portal.model.Organization> availableOrganizations); 603 604 /** 605 * Returns all the IDs of organizations with which the user is explicitly 606 * associated, optionally including the IDs of organizations that the user 607 * administers or owns. 608 * 609 * <p> 610 * A user is considered to be <i>explicitly</i> associated with an 611 * organization if his account is individually created within the 612 * organization or if the user is later added to it. 613 * </p> 614 * 615 * @param userId the primary key of the user 616 * @param includeAdministrative whether to include the IDs of organizations 617 that the user administers or owns, even if he's not a member of 618 the organizations 619 * @return the IDs of organizations with which the user is explicitly 620 associated, optionally including the IDs of organizations that 621 the user administers or owns 622 */ 623 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 624 public long[] getUserOrganizationIds(long userId, 625 boolean includeAdministrative) throws PortalException; 626 627 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 628 public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations( 629 long userId); 630 631 /** 632 * Returns all the organizations with which the user is explicitly 633 * associated, optionally including the organizations that the user 634 * administers or owns. 635 * 636 * <p> 637 * A user is considered to be <i>explicitly</i> associated with an 638 * organization if his account is individually created within the 639 * organization or if the user is later added as a member. 640 * </p> 641 * 642 * @param userId the primary key of the user 643 * @param includeAdministrative whether to include the IDs of organizations 644 that the user administers or owns, even if he's not a member of 645 the organizations 646 * @return the organizations with which the user is explicitly associated, 647 optionally including the organizations that the user administers 648 or owns 649 */ 650 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 651 public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations( 652 long userId, boolean includeAdministrative) throws PortalException; 653 654 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 655 public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations( 656 long userId, int start, int end); 657 658 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 659 public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations( 660 long userId, int start, int end, 661 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Organization> orderByComparator); 662 663 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 664 public int getUserOrganizationsCount(long userId); 665 666 /** 667 * Returns the userIds of the users associated with the organization. 668 * 669 * @param organizationId the organizationId of the organization 670 * @return long[] the userIds of users associated with the organization 671 */ 672 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 673 public long[] getUserPrimaryKeys(long organizationId); 674 675 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 676 public boolean hasGroupOrganization(long groupId, long organizationId); 677 678 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 679 public boolean hasGroupOrganizations(long groupId); 680 681 /** 682 * Returns <code>true</code> if the password policy has been assigned to the 683 * organization. 684 * 685 * @param passwordPolicyId the primary key of the password policy 686 * @param organizationId the primary key of the organization 687 * @return <code>true</code> if the password policy has been assigned to the 688 organization; <code>false</code> otherwise 689 */ 690 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 691 public boolean hasPasswordPolicyOrganization(long passwordPolicyId, 692 long organizationId); 693 694 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 695 public boolean hasUserOrganization(long userId, long organizationId); 696 697 /** 698 * Returns <code>true</code> if the user is a member of the organization, 699 * optionally focusing on suborganizations or the specified organization. 700 * This method is usually called to determine if the user has view access to 701 * a resource belonging to the organization. 702 * 703 * <ol> 704 * <li> 705 * If <code>inheritSuborganizations=<code>false</code></code>: 706 * the method checks whether the user belongs to the organization specified 707 * by <code>organizationId</code>. The parameter 708 * <code>includeSpecifiedOrganization</code> is ignored. 709 * </li> 710 * <li> 711 * The parameter <code>includeSpecifiedOrganization</code> is 712 * ignored unless <code>inheritSuborganizations</code> is also 713 * <code>true</code>. 714 * </li> 715 * <li> 716 * If <code>inheritSuborganizations=<code>true</code></code> and 717 * <code>includeSpecifiedOrganization=<code>false</code></code>: the method 718 * checks 719 * whether the user belongs to one of the child organizations of the one 720 * specified by <code>organizationId</code>. 721 * </li> 722 * <li> 723 * If <code>inheritSuborganizations=<code>true</code></code> and 724 * <code>includeSpecifiedOrganization=<code>true</code></code>: the method 725 * checks whether 726 * the user belongs to the organization specified by 727 * <code>organizationId</code> or any of 728 * its child organizations. 729 * </li> 730 * </ol> 731 * 732 * @param userId the primary key of the organization's user 733 * @param organizationId the primary key of the organization 734 * @param inheritSuborganizations if <code>true</code> suborganizations are 735 considered in the determination 736 * @param includeSpecifiedOrganization if <code>true</code> the 737 organization specified by <code>organizationId</code> is 738 considered in the determination 739 * @return <code>true</code> if the user has access to the organization; 740 <code>false</code> otherwise 741 * @see com.liferay.portal.service.persistence.OrganizationFinder 742 */ 743 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 744 public boolean hasUserOrganization(long userId, long organizationId, 745 boolean inheritSuborganizations, boolean includeSpecifiedOrganization) 746 throws PortalException; 747 748 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 749 public boolean hasUserOrganizations(long userId); 750 751 /** 752 * Rebuilds the organization's tree. 753 * 754 * <p> 755 * Only call this method if the tree has become stale through operations 756 * other than normal CRUD. Under normal circumstances the tree is 757 * automatically rebuilt whenever necessary. 758 * </p> 759 * 760 * @param companyId the primary key of the organization's company 761 */ 762 public void rebuildTree(long companyId) throws PortalException; 763 764 /** 765 * Returns an ordered range of all the organizations that match the 766 * keywords, using the indexer. It is preferable to use this method instead 767 * of the non-indexed version whenever possible for performance reasons. 768 * 769 * <p> 770 * Useful when paginating results. Returns a maximum of <code>end - 771 * start</code> instances. <code>start</code> and <code>end</code> are not 772 * primary keys, they are indexes in the result set. Thus, <code>0</code> 773 * refers to the first result in the set. Setting both <code>start</code> 774 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 775 * result set. 776 * </p> 777 * 778 * @param companyId the primary key of the organization's company 779 * @param parentOrganizationId the primary key of the organization's parent 780 organization 781 * @param keywords the keywords (space separated), which may occur in the 782 organization's name, street, city, zipcode, type, region or 783 country (optionally <code>null</code>) 784 * @param params the finder parameters (optionally <code>null</code>). For 785 more information see {@link 786 com.liferay.portlet.usersadmin.util.OrganizationIndexer} 787 * @param start the lower bound of the range of organizations to return 788 * @param end the upper bound of the range of organizations to return (not 789 inclusive) 790 * @param sort the field and direction by which to sort (optionally 791 <code>null</code>) 792 * @return the matching organizations ordered by name 793 * @see com.liferay.portlet.usersadmin.util.OrganizationIndexer 794 */ 795 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 796 public com.liferay.portal.kernel.search.Hits search(long companyId, 797 long parentOrganizationId, java.lang.String keywords, 798 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 799 int start, int end, com.liferay.portal.kernel.search.Sort sort); 800 801 /** 802 * Returns a name ordered range of all the organizations that match the 803 * keywords, type, region, and country, without using the indexer. It is 804 * preferable to use the indexed version {@link #search(long, long, String, 805 * LinkedHashMap, int, int, Sort)} instead of this method wherever possible 806 * for performance reasons. 807 * 808 * <p> 809 * Useful when paginating results. Returns a maximum of <code>end - 810 * start</code> instances. <code>start</code> and <code>end</code> are not 811 * primary keys, they are indexes in the result set. Thus, <code>0</code> 812 * refers to the first result in the set. Setting both <code>start</code> 813 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 814 * result set. 815 * </p> 816 * 817 * @param companyId the primary key of the organization's company 818 * @param parentOrganizationId the primary key of the organization's parent 819 organization 820 * @param keywords the keywords (space separated), which may occur in the 821 organization's name, street, city, or zipcode (optionally 822 <code>null</code>) 823 * @param type the organization's type (optionally <code>null</code>) 824 * @param regionId the primary key of the organization's region (optionally 825 <code>null</code>) 826 * @param countryId the primary key of the organization's country 827 (optionally <code>null</code>) 828 * @param params the finder params. For more information see {@link 829 com.liferay.portal.service.persistence.OrganizationFinder} 830 * @param start the lower bound of the range of organizations to return 831 * @param end the upper bound of the range of organizations to return (not 832 inclusive) 833 * @return the matching organizations ordered by name 834 * @see com.liferay.portal.service.persistence.OrganizationFinder 835 */ 836 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 837 public java.util.List<com.liferay.portal.model.Organization> search( 838 long companyId, long parentOrganizationId, java.lang.String keywords, 839 java.lang.String type, java.lang.Long regionId, 840 java.lang.Long countryId, 841 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 842 int start, int end); 843 844 /** 845 * Returns an ordered range of all the organizations that match the 846 * keywords, type, region, and country, without using the indexer. It is 847 * preferable to use the indexed version {@link #search(long, long, String, 848 * String, String, String, String, String, String, LinkedHashMap, boolean, 849 * int, int, Sort)} instead of this method wherever possible for performance 850 * reasons. 851 * 852 * <p> 853 * Useful when paginating results. Returns a maximum of <code>end - 854 * start</code> instances. <code>start</code> and <code>end</code> are not 855 * primary keys, they are indexes in the result set. Thus, <code>0</code> 856 * refers to the first result in the set. Setting both <code>start</code> 857 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 858 * result set. 859 * </p> 860 * 861 * @param companyId the primary key of the organization's company 862 * @param parentOrganizationId the primary key of the organization's parent 863 organization 864 * @param keywords the keywords (space separated), which may occur in the 865 organization's name, street, city, or zipcode (optionally 866 <code>null</code>) 867 * @param type the organization's type (optionally <code>null</code>) 868 * @param regionId the primary key of the organization's region (optionally 869 <code>null</code>) 870 * @param countryId the primary key of the organization's country 871 (optionally <code>null</code>) 872 * @param params the finder params. For more information see {@link 873 com.liferay.portal.service.persistence.OrganizationFinder} 874 * @param start the lower bound of the range of organizations to return 875 * @param end the upper bound of the range of organizations to return (not 876 inclusive) 877 * @param obc the comparator to order the organizations (optionally 878 <code>null</code>) 879 * @return the matching organizations ordered by comparator <code>obc</code> 880 * @see com.liferay.portal.service.persistence.OrganizationFinder 881 */ 882 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 883 public java.util.List<com.liferay.portal.model.Organization> search( 884 long companyId, long parentOrganizationId, java.lang.String keywords, 885 java.lang.String type, java.lang.Long regionId, 886 java.lang.Long countryId, 887 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 888 int start, int end, 889 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Organization> obc); 890 891 /** 892 * Returns an ordered range of all the organizations whose name, type, or 893 * location fields match the keywords specified for them, using the indexer. 894 * It is preferable to use this method instead of the non-indexed version 895 * whenever possible for performance reasons. 896 * 897 * <p> 898 * Useful when paginating results. Returns a maximum of <code>end - 899 * start</code> instances. <code>start</code> and <code>end</code> are not 900 * primary keys, they are indexes in the result set. Thus, <code>0</code> 901 * refers to the first result in the set. Setting both <code>start</code> 902 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 903 * result set. 904 * </p> 905 * 906 * @param companyId the primary key of the organization's company 907 * @param parentOrganizationId the primary key of the organization's parent 908 organization 909 * @param name the name keywords (space separated, optionally 910 <code>null</code>) 911 * @param type the type keywords (optionally <code>null</code>) 912 * @param street the street keywords (optionally <code>null</code>) 913 * @param city the city keywords (optionally <code>null</code>) 914 * @param zip the zipcode keywords (optionally <code>null</code>) 915 * @param region the region keywords (optionally <code>null</code>) 916 * @param country the country keywords (optionally <code>null</code>) 917 * @param params the finder parameters (optionally <code>null</code>). For 918 more information see {@link 919 com.liferay.portlet.usersadmin.util.OrganizationIndexer}. 920 * @param andSearch whether every field must match its keywords or just one 921 field 922 * @param start the lower bound of the range of organizations to return 923 * @param end the upper bound of the range of organizations to return (not 924 inclusive) 925 * @param sort the field and direction by which to sort (optionally 926 <code>null</code>) 927 * @return the matching organizations ordered by <code>sort</code> 928 * @see com.liferay.portlet.usersadmin.util.OrganizationIndexer 929 */ 930 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 931 public com.liferay.portal.kernel.search.Hits search(long companyId, 932 long parentOrganizationId, java.lang.String name, 933 java.lang.String type, java.lang.String street, java.lang.String city, 934 java.lang.String zip, java.lang.String region, 935 java.lang.String country, 936 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 937 boolean andSearch, int start, int end, 938 com.liferay.portal.kernel.search.Sort sort); 939 940 /** 941 * Returns a name ordered range of all the organizations with the type, 942 * region, and country, and whose name, street, city, and zipcode match the 943 * keywords specified for them, without using the indexer. It is preferable 944 * to use the indexed version {@link #search(long, long, String, String, 945 * String, String, String, String, String, LinkedHashMap, boolean, int, int, 946 * Sort)} instead of this method wherever possible for performance reasons. 947 * 948 * <p> 949 * Useful when paginating results. Returns a maximum of <code>end - 950 * start</code> instances. <code>start</code> and <code>end</code> are not 951 * primary keys, they are indexes in the result set. Thus, <code>0</code> 952 * refers to the first result in the set. Setting both <code>start</code> 953 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 954 * result set. 955 * </p> 956 * 957 * @param companyId the primary key of the organization's company 958 * @param parentOrganizationId the primary key of the organization's parent 959 * @param name the name keywords (space separated, optionally 960 <code>null</code>) 961 * @param type the organization's type (optionally <code>null</code>) 962 * @param street the street keywords (optionally <code>null</code>) 963 * @param city the city keywords (optionally <code>null</code>) 964 * @param zip the zipcode keywords (optionally <code>null</code>) 965 * @param regionId the primary key of the organization's region (optionally 966 <code>null</code>) 967 * @param countryId the primary key of the organization's country 968 (optionally <code>null</code>) 969 * @param params the finder parameters (optionally <code>null</code>). For 970 more information see {@link 971 com.liferay.portal.service.persistence.OrganizationFinder} 972 * @param andOperator whether every field must match its keywords, or just 973 one field. For example, "organizations with the name 974 'Employees' and city 'Chicago'" vs "organizations with 975 the name 'Employees' or the city 'Chicago'". 976 * @param start the lower bound of the range of organizations to return 977 * @param end the upper bound of the range of organizations to return (not 978 inclusive) 979 * @return the matching organizations ordered by name 980 * @see com.liferay.portal.service.persistence.OrganizationFinder 981 */ 982 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 983 public java.util.List<com.liferay.portal.model.Organization> search( 984 long companyId, long parentOrganizationId, java.lang.String name, 985 java.lang.String type, java.lang.String street, java.lang.String city, 986 java.lang.String zip, java.lang.Long regionId, 987 java.lang.Long countryId, 988 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 989 boolean andOperator, int start, int end); 990 991 /** 992 * Returns an ordered range of all the organizations with the type, region, 993 * and country, and whose name, street, city, and zipcode match the keywords 994 * specified for them, without using the indexer. It is preferable to use 995 * the indexed version {@link #search(long, long, String, String, String, 996 * String, String, String, String, LinkedHashMap, boolean, int, int, Sort)} 997 * instead of this method wherever possible for performance reasons. 998 * 999 * <p> 1000 * Useful when paginating results. Returns a maximum of <code>end - 1001 * start</code> instances. <code>start</code> and <code>end</code> are not 1002 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1003 * refers to the first result in the set. Setting both <code>start</code> 1004 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1005 * result set. 1006 * </p> 1007 * 1008 * @param companyId the primary key of the organization's company 1009 * @param parentOrganizationId the primary key of the organization's parent 1010 organization 1011 * @param name the name keywords (space separated, optionally 1012 <code>null</code>) 1013 * @param type the organization's type (optionally <code>null</code>) 1014 * @param street the street keywords (optionally <code>null</code>) 1015 * @param city the city keywords (optionally <code>null</code>) 1016 * @param zip the zipcode keywords (optionally <code>null</code>) 1017 * @param regionId the primary key of the organization's region (optionally 1018 <code>null</code>) 1019 * @param countryId the primary key of the organization's country 1020 (optionally <code>null</code>) 1021 * @param params the finder parameters (optionally <code>null</code>). For 1022 more information see {@link 1023 com.liferay.portal.service.persistence.OrganizationFinder} 1024 * @param andOperator whether every field must match its keywords, or just 1025 one field. For example, "organizations with the name 1026 'Employees' and city 'Chicago'" vs "organizations with 1027 the name 'Employees' or the city 'Chicago'". 1028 * @param start the lower bound of the range of organizations to return 1029 * @param end the upper bound of the range of organizations to return (not 1030 inclusive) 1031 * @param obc the comparator to order the organizations (optionally 1032 <code>null</code>) 1033 * @return the matching organizations ordered by comparator <code>obc</code> 1034 * @see com.liferay.portal.service.persistence.OrganizationFinder 1035 */ 1036 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1037 public java.util.List<com.liferay.portal.model.Organization> search( 1038 long companyId, long parentOrganizationId, java.lang.String name, 1039 java.lang.String type, java.lang.String street, java.lang.String city, 1040 java.lang.String zip, java.lang.Long regionId, 1041 java.lang.Long countryId, 1042 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1043 boolean andOperator, int start, int end, 1044 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Organization> obc); 1045 1046 /** 1047 * Returns the number of organizations that match the keywords, type, 1048 * region, and country. 1049 * 1050 * @param companyId the primary key of the organization's company 1051 * @param parentOrganizationId the primary key of the organization's parent 1052 organization 1053 * @param keywords the keywords (space separated), which may occur in the 1054 organization's name, street, city, or zipcode (optionally 1055 <code>null</code>) 1056 * @param type the organization's type (optionally <code>null</code>) 1057 * @param regionId the primary key of the organization's region (optionally 1058 <code>null</code>) 1059 * @param countryId the primary key of the organization's country 1060 (optionally <code>null</code>) 1061 * @param params the finder parameters (optionally <code>null</code>). For 1062 more information see {@link 1063 com.liferay.portal.service.persistence.OrganizationFinder} 1064 * @return the number of matching organizations 1065 * @see com.liferay.portal.service.persistence.OrganizationFinder 1066 */ 1067 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1068 public int searchCount(long companyId, long parentOrganizationId, 1069 java.lang.String keywords, java.lang.String type, 1070 java.lang.Long regionId, java.lang.Long countryId, 1071 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params); 1072 1073 /** 1074 * Returns the number of organizations with the type, region, and country, 1075 * and whose name, street, city, and zipcode match the keywords specified 1076 * for them. 1077 * 1078 * @param companyId the primary key of the organization's company 1079 * @param parentOrganizationId the primary key of the organization's parent 1080 organization 1081 * @param name the name keywords (space separated, optionally 1082 <code>null</code>) 1083 * @param type the organization's type (optionally <code>null</code>) 1084 * @param street the street keywords (optionally <code>null</code>) 1085 * @param city the city keywords (optionally <code>null</code>) 1086 * @param zip the zipcode keywords (optionally <code>null</code>) 1087 * @param regionId the primary key of the organization's region (optionally 1088 <code>null</code>) 1089 * @param countryId the primary key of the organization's country 1090 (optionally <code>null</code>) 1091 * @param params the finder parameters (optionally <code>null</code>). For 1092 more information see {@link 1093 com.liferay.portal.service.persistence.OrganizationFinder} 1094 * @param andOperator whether every field must match its keywords, or just 1095 one field. For example, "organizations with the name 1096 'Employees' and city 'Chicago'" vs "organizations with 1097 the name 'Employees' or the city 'Chicago'". 1098 * @return the number of matching organizations 1099 * @see com.liferay.portal.service.persistence.OrganizationFinder 1100 */ 1101 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1102 public int searchCount(long companyId, long parentOrganizationId, 1103 java.lang.String name, java.lang.String type, java.lang.String street, 1104 java.lang.String city, java.lang.String zip, java.lang.Long regionId, 1105 java.lang.Long countryId, 1106 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1107 boolean andOperator); 1108 1109 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1110 public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.Organization> searchOrganizations( 1111 long companyId, long parentOrganizationId, java.lang.String keywords, 1112 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1113 int start, int end, com.liferay.portal.kernel.search.Sort sort) 1114 throws PortalException; 1115 1116 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1117 public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.Organization> searchOrganizations( 1118 long companyId, long parentOrganizationId, java.lang.String name, 1119 java.lang.String type, java.lang.String street, java.lang.String city, 1120 java.lang.String zip, java.lang.String region, 1121 java.lang.String country, 1122 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1123 boolean andSearch, int start, int end, 1124 com.liferay.portal.kernel.search.Sort sort) throws PortalException; 1125 1126 public void setGroupOrganizations(long groupId, long[] organizationIds); 1127 1128 public void setUserOrganizations(long userId, long[] organizationIds); 1129 1130 /** 1131 * Removes the organizations from the group. 1132 * 1133 * @param groupId the primary key of the group 1134 * @param organizationIds the primary keys of the organizations 1135 */ 1136 public void unsetGroupOrganizations(long groupId, long[] organizationIds); 1137 1138 /** 1139 * Removes the organizations from the password policy. 1140 * 1141 * @param passwordPolicyId the primary key of the password policy 1142 * @param organizationIds the primary keys of the organizations 1143 */ 1144 public void unsetPasswordPolicyOrganizations(long passwordPolicyId, 1145 long[] organizationIds); 1146 1147 /** 1148 * Updates the organization's asset with the new asset categories and tag 1149 * names, removing and adding asset categories and tag names as necessary. 1150 * 1151 * @param userId the primary key of the user 1152 * @param organization the organization 1153 * @param assetCategoryIds the primary keys of the asset categories 1154 * @param assetTagNames the asset tag names 1155 */ 1156 public void updateAsset(long userId, 1157 com.liferay.portal.model.Organization organization, 1158 long[] assetCategoryIds, java.lang.String[] assetTagNames) 1159 throws PortalException; 1160 1161 /** 1162 * Updates the organization. 1163 * 1164 * @param companyId the primary key of the organization's company 1165 * @param organizationId the primary key of the organization 1166 * @param parentOrganizationId the primary key of organization's parent 1167 organization 1168 * @param name the organization's name 1169 * @param type the organization's type 1170 * @param recursable whether permissions of the organization are to be 1171 inherited by its suborganizations 1172 * @param regionId the primary key of the organization's region 1173 * @param countryId the primary key of the organization's country 1174 * @param statusId the organization's workflow status 1175 * @param comments the comments about the organization 1176 * @param site whether the organization is to be associated with a main 1177 site 1178 * @param serviceContext the service context to be applied (optionally 1179 <code>null</code>). Can set asset category IDs and asset tag 1180 names for the organization, and merge expando bridge 1181 attributes for the organization. 1182 * @return the organization 1183 * @deprecated As of 6.2.0, replaced by {@link #updateOrganization(long, 1184 long, long, String, String, long, long, int, String, boolean, 1185 byte[], boolean, ServiceContext)} 1186 */ 1187 @java.lang.Deprecated 1188 public com.liferay.portal.model.Organization updateOrganization( 1189 long companyId, long organizationId, long parentOrganizationId, 1190 java.lang.String name, java.lang.String type, boolean recursable, 1191 long regionId, long countryId, long statusId, 1192 java.lang.String comments, boolean site, 1193 com.liferay.portal.service.ServiceContext serviceContext) 1194 throws PortalException; 1195 1196 /** 1197 * Updates the organization. 1198 * 1199 * @param companyId the primary key of the organization's company 1200 * @param organizationId the primary key of the organization 1201 * @param parentOrganizationId the primary key of organization's parent 1202 organization 1203 * @param name the organization's name 1204 * @param type the organization's type 1205 * @param regionId the primary key of the organization's region 1206 * @param countryId the primary key of the organization's country 1207 * @param statusId the organization's workflow status 1208 * @param comments the comments about the organization 1209 * @param logo whether to update the ogranization's logo 1210 * @param logoBytes the new logo image data 1211 * @param site whether the organization is to be associated with a main 1212 site 1213 * @param serviceContext the service context to be applied (optionally 1214 <code>null</code>). Can set asset category IDs and asset tag 1215 names for the organization, and merge expando bridge attributes 1216 for the organization. 1217 * @return the organization 1218 */ 1219 public com.liferay.portal.model.Organization updateOrganization( 1220 long companyId, long organizationId, long parentOrganizationId, 1221 java.lang.String name, java.lang.String type, long regionId, 1222 long countryId, long statusId, java.lang.String comments, boolean logo, 1223 byte[] logoBytes, boolean site, 1224 com.liferay.portal.service.ServiceContext serviceContext) 1225 throws PortalException; 1226 1227 /** 1228 * Updates the organization. 1229 * 1230 * @param companyId the primary key of the organization's company 1231 * @param organizationId the primary key of the organization 1232 * @param parentOrganizationId the primary key of organization's parent 1233 organization 1234 * @param name the organization's name 1235 * @param type the organization's type 1236 * @param regionId the primary key of the organization's region 1237 * @param countryId the primary key of the organization's country 1238 * @param statusId the organization's workflow status 1239 * @param comments the comments about the organization 1240 * @param site whether the organization is to be associated with a main 1241 site 1242 * @param serviceContext the service context to be applied (optionally 1243 <code>null</code>). Can set asset category IDs and asset tag 1244 names for the organization, and merge expando bridge 1245 attributes for the organization. 1246 * @return the organization 1247 * @deprecated As of 7.0.0, replaced by {@link #updateOrganization(long, 1248 long, long, String, String, long, long, int, String, boolean, 1249 byte[], boolean, ServiceContext)} 1250 */ 1251 @java.lang.Deprecated 1252 public com.liferay.portal.model.Organization updateOrganization( 1253 long companyId, long organizationId, long parentOrganizationId, 1254 java.lang.String name, java.lang.String type, long regionId, 1255 long countryId, long statusId, java.lang.String comments, boolean site, 1256 com.liferay.portal.service.ServiceContext serviceContext) 1257 throws PortalException; 1258 1259 /** 1260 * Updates the organization in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 1261 * 1262 * @param organization the organization 1263 * @return the organization that was updated 1264 */ 1265 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 1266 public com.liferay.portal.model.Organization updateOrganization( 1267 com.liferay.portal.model.Organization organization); 1268 }