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