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