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