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