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