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