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