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