001 /** 002 * Copyright (c) 2000-present 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.http; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.log.Log; 020 import com.liferay.portal.kernel.log.LogFactoryUtil; 021 import com.liferay.portal.service.OrganizationServiceUtil; 022 023 import java.rmi.RemoteException; 024 025 /** 026 * Provides the SOAP utility for the 027 * {@link OrganizationServiceUtil} service utility. The 028 * static methods of this class calls the same methods of the service utility. 029 * However, the signatures are different because it is difficult for SOAP to 030 * support certain types. 031 * 032 * <p> 033 * ServiceBuilder follows certain rules in translating the methods. For example, 034 * if the method in the service utility returns a {@link java.util.List}, that 035 * is translated to an array of {@link com.liferay.portal.model.OrganizationSoap}. 036 * If the method in the service utility returns a 037 * {@link com.liferay.portal.model.Organization}, that is translated to a 038 * {@link com.liferay.portal.model.OrganizationSoap}. Methods that SOAP cannot 039 * safely wire are skipped. 040 * </p> 041 * 042 * <p> 043 * The benefits of using the SOAP utility is that it is cross platform 044 * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and 045 * even Perl, to call the generated services. One drawback of SOAP is that it is 046 * slow because it needs to serialize all calls into a text format (XML). 047 * </p> 048 * 049 * <p> 050 * You can see a list of services at http://localhost:8080/api/axis. Set the 051 * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure 052 * security. 053 * </p> 054 * 055 * <p> 056 * The SOAP utility is only generated for remote services. 057 * </p> 058 * 059 * @author Brian Wing Shun Chan 060 * @see OrganizationServiceHttp 061 * @see com.liferay.portal.model.OrganizationSoap 062 * @see OrganizationServiceUtil 063 * @generated 064 */ 065 @ProviderType 066 public class OrganizationServiceSoap { 067 /** 068 * Adds the organizations to the group. 069 * 070 * @param groupId the primary key of the group 071 * @param organizationIds the primary keys of the organizations 072 * @throws PortalException if a group or organization with the primary key 073 could not be found or if the user did not have permission to 074 assign group members 075 */ 076 public static void addGroupOrganizations(long groupId, 077 long[] organizationIds) throws RemoteException { 078 try { 079 OrganizationServiceUtil.addGroupOrganizations(groupId, 080 organizationIds); 081 } 082 catch (Exception e) { 083 _log.error(e, e); 084 085 throw new RemoteException(e.getMessage()); 086 } 087 } 088 089 /** 090 * Adds an organization with additional parameters. 091 * 092 * <p> 093 * This method handles the creation and bookkeeping of the organization 094 * including its resources, metadata, and internal data structures. 095 * </p> 096 * 097 * @param parentOrganizationId the primary key of the organization's 098 parent organization 099 * @param name the organization's name 100 * @param type the organization's type 101 * @param recursable whether the permissions of the organization are to 102 be inherited by its suborganizations 103 * @param regionId the primary key of the organization's region 104 * @param countryId the primary key of the organization's country 105 * @param statusId the organization's workflow status 106 * @param comments the comments about the organization 107 * @param site whether the organization is to be associated with a main 108 site 109 * @param addresses the organization's addresses 110 * @param emailAddresses the organization's email addresses 111 * @param orgLabors the organization's hours of operation 112 * @param phones the organization's phone numbers 113 * @param websites the organization's websites 114 * @param serviceContext the service context to be applied (optionally 115 <code>null</code>). Can set asset category IDs, asset tag 116 names, and expando bridge attributes for the organization. 117 * @return the organization 118 * @throws PortalException if a parent organization with the primary key 119 could not be found, if the organization's information was 120 invalid, or if the user did not have permission to add the 121 organization 122 * @deprecated As of 6.2.0, replaced by {@link #addOrganization(long, 123 String, String, long, long, int, String, boolean, 124 java.util.List, java.util.List, java.util.List, 125 java.util.List, java.util.List, ServiceContext)} 126 */ 127 @Deprecated 128 public static com.liferay.portal.model.OrganizationSoap addOrganization( 129 long parentOrganizationId, java.lang.String name, 130 java.lang.String type, boolean recursable, long regionId, 131 long countryId, long statusId, java.lang.String comments, boolean site, 132 com.liferay.portal.model.AddressSoap[] addresses, 133 com.liferay.portal.model.EmailAddressSoap[] emailAddresses, 134 com.liferay.portal.model.OrgLaborSoap[] orgLabors, 135 com.liferay.portal.model.PhoneSoap[] phones, 136 com.liferay.portal.model.WebsiteSoap[] websites, 137 com.liferay.portal.service.ServiceContext serviceContext) 138 throws RemoteException { 139 try { 140 com.liferay.portal.model.Organization returnValue = OrganizationServiceUtil.addOrganization(parentOrganizationId, 141 name, type, recursable, regionId, countryId, statusId, 142 comments, site, 143 com.liferay.portal.model.impl.AddressModelImpl.toModels( 144 addresses), 145 com.liferay.portal.model.impl.EmailAddressModelImpl.toModels( 146 emailAddresses), 147 com.liferay.portal.model.impl.OrgLaborModelImpl.toModels( 148 orgLabors), 149 com.liferay.portal.model.impl.PhoneModelImpl.toModels( 150 phones), 151 com.liferay.portal.model.impl.WebsiteModelImpl.toModels( 152 websites), serviceContext); 153 154 return com.liferay.portal.model.OrganizationSoap.toSoapModel(returnValue); 155 } 156 catch (Exception e) { 157 _log.error(e, e); 158 159 throw new RemoteException(e.getMessage()); 160 } 161 } 162 163 /** 164 * Adds an organization. 165 * 166 * <p> 167 * This method handles the creation and bookkeeping of the organization 168 * including its resources, metadata, and internal data structures. 169 * </p> 170 * 171 * @param parentOrganizationId the primary key of the organization's 172 parent organization 173 * @param name the organization's name 174 * @param type the organization's type 175 * @param recursable whether the permissions of the organization are to 176 be inherited by its suborganizations 177 * @param regionId the primary key of the organization's region 178 * @param countryId the primary key of the organization's country 179 * @param statusId the organization's workflow status 180 * @param comments the comments about the organization 181 * @param site whether the organization is to be associated with a main 182 site 183 * @param serviceContext the service context to be applied (optionally 184 <code>null</code>). Can set asset category IDs, asset tag 185 names, and expando bridge attributes for the organization. 186 * @return the organization 187 * @throws PortalException if the parent organization with the primary 188 key could not be found, if the organization information was 189 invalid, or if the user did not have permission to add the 190 organization 191 * @deprecated As of 6.2.0, replaced by {@link #addOrganization(long, 192 String, String, long, long, int, String, boolean, 193 ServiceContext)} 194 */ 195 @Deprecated 196 public static com.liferay.portal.model.OrganizationSoap addOrganization( 197 long parentOrganizationId, java.lang.String name, 198 java.lang.String type, boolean recursable, long regionId, 199 long countryId, long statusId, java.lang.String comments, boolean site, 200 com.liferay.portal.service.ServiceContext serviceContext) 201 throws RemoteException { 202 try { 203 com.liferay.portal.model.Organization returnValue = OrganizationServiceUtil.addOrganization(parentOrganizationId, 204 name, type, recursable, regionId, countryId, statusId, 205 comments, site, serviceContext); 206 207 return com.liferay.portal.model.OrganizationSoap.toSoapModel(returnValue); 208 } 209 catch (Exception e) { 210 _log.error(e, e); 211 212 throw new RemoteException(e.getMessage()); 213 } 214 } 215 216 /** 217 * Adds an organization with additional parameters. 218 * 219 * <p> 220 * This method handles the creation and bookkeeping of the organization 221 * including its resources, metadata, and internal data structures. 222 * </p> 223 * 224 * @param parentOrganizationId the primary key of the organization's parent 225 organization 226 * @param name the organization's name 227 * @param type the organization's type 228 * @param regionId the primary key of the organization's region 229 * @param countryId the primary key of the organization's country 230 * @param statusId the organization's workflow status 231 * @param comments the comments about the organization 232 * @param site whether the organization is to be associated with a main 233 site 234 * @param addresses the organization's addresses 235 * @param emailAddresses the organization's email addresses 236 * @param orgLabors the organization's hours of operation 237 * @param phones the organization's phone numbers 238 * @param websites the organization's websites 239 * @param serviceContext the service context to be applied (optionally 240 <code>null</code>). Can set asset category IDs, asset tag names, 241 and expando bridge attributes for the organization. 242 * @return the organization 243 * @throws PortalException if a parent organization with the primary key 244 could not be found, if the organization's information was 245 invalid, or if the user did not have permission to add the 246 organization 247 */ 248 public static com.liferay.portal.model.OrganizationSoap addOrganization( 249 long parentOrganizationId, java.lang.String name, 250 java.lang.String type, long regionId, long countryId, long statusId, 251 java.lang.String comments, boolean site, 252 com.liferay.portal.model.AddressSoap[] addresses, 253 com.liferay.portal.model.EmailAddressSoap[] emailAddresses, 254 com.liferay.portal.model.OrgLaborSoap[] orgLabors, 255 com.liferay.portal.model.PhoneSoap[] phones, 256 com.liferay.portal.model.WebsiteSoap[] websites, 257 com.liferay.portal.service.ServiceContext serviceContext) 258 throws RemoteException { 259 try { 260 com.liferay.portal.model.Organization returnValue = OrganizationServiceUtil.addOrganization(parentOrganizationId, 261 name, type, regionId, countryId, statusId, comments, site, 262 com.liferay.portal.model.impl.AddressModelImpl.toModels( 263 addresses), 264 com.liferay.portal.model.impl.EmailAddressModelImpl.toModels( 265 emailAddresses), 266 com.liferay.portal.model.impl.OrgLaborModelImpl.toModels( 267 orgLabors), 268 com.liferay.portal.model.impl.PhoneModelImpl.toModels( 269 phones), 270 com.liferay.portal.model.impl.WebsiteModelImpl.toModels( 271 websites), serviceContext); 272 273 return com.liferay.portal.model.OrganizationSoap.toSoapModel(returnValue); 274 } 275 catch (Exception e) { 276 _log.error(e, e); 277 278 throw new RemoteException(e.getMessage()); 279 } 280 } 281 282 /** 283 * Adds an organization. 284 * 285 * <p> 286 * This method handles the creation and bookkeeping of the organization 287 * including its resources, metadata, and internal data structures. 288 * </p> 289 * 290 * @param parentOrganizationId the primary key of the organization's parent 291 organization 292 * @param name the organization's name 293 * @param type the organization's type 294 * @param regionId the primary key of the organization's region 295 * @param countryId the primary key of the organization's country 296 * @param statusId the organization's workflow status 297 * @param comments the comments about the organization 298 * @param site whether the organization is to be associated with a main 299 site 300 * @param serviceContext the service context to be applied (optionally 301 <code>null</code>). Can set asset category IDs, asset tag names, 302 and expando bridge attributes for the organization. 303 * @return the organization 304 * @throws PortalException if the parent organization with the primary key 305 could not be found, if the organization information was invalid, 306 or if the user did not have permission to add the organization 307 */ 308 public static com.liferay.portal.model.OrganizationSoap addOrganization( 309 long parentOrganizationId, java.lang.String name, 310 java.lang.String type, long regionId, long countryId, long statusId, 311 java.lang.String comments, boolean site, 312 com.liferay.portal.service.ServiceContext serviceContext) 313 throws RemoteException { 314 try { 315 com.liferay.portal.model.Organization returnValue = OrganizationServiceUtil.addOrganization(parentOrganizationId, 316 name, type, regionId, countryId, statusId, comments, site, 317 serviceContext); 318 319 return com.liferay.portal.model.OrganizationSoap.toSoapModel(returnValue); 320 } 321 catch (Exception e) { 322 _log.error(e, e); 323 324 throw new RemoteException(e.getMessage()); 325 } 326 } 327 328 /** 329 * Assigns the password policy to the organizations, removing any other 330 * currently assigned password policies. 331 * 332 * @param passwordPolicyId the primary key of the password policy 333 * @param organizationIds the primary keys of the organizations 334 * @throws PortalException if the user did not have permission to update the 335 password policy 336 */ 337 public static void addPasswordPolicyOrganizations(long passwordPolicyId, 338 long[] organizationIds) throws RemoteException { 339 try { 340 OrganizationServiceUtil.addPasswordPolicyOrganizations(passwordPolicyId, 341 organizationIds); 342 } 343 catch (Exception e) { 344 _log.error(e, e); 345 346 throw new RemoteException(e.getMessage()); 347 } 348 } 349 350 /** 351 * Deletes the organization's logo. 352 * 353 * @param organizationId the primary key of the organization 354 * @throws PortalException if an organization with the primary key could not 355 be found, if the organization's logo could not be found, or if 356 the user did not have permission to update the organization 357 */ 358 public static void deleteLogo(long organizationId) 359 throws RemoteException { 360 try { 361 OrganizationServiceUtil.deleteLogo(organizationId); 362 } 363 catch (Exception e) { 364 _log.error(e, e); 365 366 throw new RemoteException(e.getMessage()); 367 } 368 } 369 370 /** 371 * Deletes the organization. The organization's associated resources and 372 * assets are also deleted. 373 * 374 * @param organizationId the primary key of the organization 375 * @throws PortalException if an organization with the primary key could not 376 be found, if the user did not have permission to delete the 377 organization, if the organization had a workflow in approved 378 status, or if the organization was a parent organization 379 */ 380 public static void deleteOrganization(long organizationId) 381 throws RemoteException { 382 try { 383 OrganizationServiceUtil.deleteOrganization(organizationId); 384 } 385 catch (Exception e) { 386 _log.error(e, e); 387 388 throw new RemoteException(e.getMessage()); 389 } 390 } 391 392 /** 393 * Returns the organization with the primary key. 394 * 395 * @param organizationId the primary key of the organization 396 * @return the organization with the primary key, or <code>null</code> if an 397 organization with the primary key could not be found or if the 398 user did not have permission to view the organization 399 * @throws PortalException if a portal exception occurred 400 */ 401 public static com.liferay.portal.model.OrganizationSoap fetchOrganization( 402 long organizationId) throws RemoteException { 403 try { 404 com.liferay.portal.model.Organization returnValue = OrganizationServiceUtil.fetchOrganization(organizationId); 405 406 return com.liferay.portal.model.OrganizationSoap.toSoapModel(returnValue); 407 } 408 catch (Exception e) { 409 _log.error(e, e); 410 411 throw new RemoteException(e.getMessage()); 412 } 413 } 414 415 /** 416 * Returns all the organizations which the user has permission to manage. 417 * 418 * @param actionId the permitted action 419 * @param max the maximum number of the organizations to be considered 420 * @return the organizations which the user has permission to manage 421 * @throws PortalException if a portal exception occurred 422 * @deprecated As of 6.2.0, replaced by {@link #getOrganizations(long, long, 423 int, int)} 424 */ 425 @Deprecated 426 public static com.liferay.portal.model.OrganizationSoap[] getManageableOrganizations( 427 java.lang.String actionId, int max) throws RemoteException { 428 try { 429 java.util.List<com.liferay.portal.model.Organization> returnValue = OrganizationServiceUtil.getManageableOrganizations(actionId, 430 max); 431 432 return com.liferay.portal.model.OrganizationSoap.toSoapModels(returnValue); 433 } 434 catch (Exception e) { 435 _log.error(e, e); 436 437 throw new RemoteException(e.getMessage()); 438 } 439 } 440 441 /** 442 * Returns the organization with the primary key. 443 * 444 * @param organizationId the primary key of the organization 445 * @return the organization with the primary key 446 * @throws PortalException if an organization with the primary key could not 447 be found or if the user did not have permission to view the 448 organization 449 */ 450 public static com.liferay.portal.model.OrganizationSoap getOrganization( 451 long organizationId) throws RemoteException { 452 try { 453 com.liferay.portal.model.Organization returnValue = OrganizationServiceUtil.getOrganization(organizationId); 454 455 return com.liferay.portal.model.OrganizationSoap.toSoapModel(returnValue); 456 } 457 catch (Exception e) { 458 _log.error(e, e); 459 460 throw new RemoteException(e.getMessage()); 461 } 462 } 463 464 /** 465 * Returns the primary key of the organization with the name. 466 * 467 * @param companyId the primary key of the organization's company 468 * @param name the organization's name 469 * @return the primary key of the organization with the name, or 470 <code>0</code> if the organization could not be found 471 * @throws PortalException if the user did not have permission to view the 472 organization 473 */ 474 public static long getOrganizationId(long companyId, java.lang.String name) 475 throws RemoteException { 476 try { 477 long returnValue = OrganizationServiceUtil.getOrganizationId(companyId, 478 name); 479 480 return returnValue; 481 } 482 catch (Exception e) { 483 _log.error(e, e); 484 485 throw new RemoteException(e.getMessage()); 486 } 487 } 488 489 /** 490 * Returns all the organizations belonging to the parent organization. 491 * 492 * @param companyId the primary key of the organizations' company 493 * @param parentOrganizationId the primary key of the organizations' parent 494 organization 495 * @return the organizations belonging to the parent organization 496 */ 497 public static com.liferay.portal.model.OrganizationSoap[] getOrganizations( 498 long companyId, long parentOrganizationId) throws RemoteException { 499 try { 500 java.util.List<com.liferay.portal.model.Organization> returnValue = OrganizationServiceUtil.getOrganizations(companyId, 501 parentOrganizationId); 502 503 return com.liferay.portal.model.OrganizationSoap.toSoapModels(returnValue); 504 } 505 catch (Exception e) { 506 _log.error(e, e); 507 508 throw new RemoteException(e.getMessage()); 509 } 510 } 511 512 /** 513 * Returns a range of all the organizations belonging to the parent 514 * organization. 515 * 516 * <p> 517 * Useful when paginating results. Returns a maximum of <code>end - 518 * start</code> instances. <code>start</code> and <code>end</code> are not 519 * primary keys, they are indexes in the result set. Thus, <code>0</code> 520 * refers to the first result in the set. Setting both <code>start</code> 521 * and <code>end</code> to {@link 522 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 523 * result set. 524 * </p> 525 * 526 * @param companyId the primary key of the organizations' company 527 * @param parentOrganizationId the primary key of the organizations' parent 528 organization 529 * @param start the lower bound of the range of organizations to return 530 * @param end the upper bound of the range of organizations to return (not 531 inclusive) 532 * @return the range of organizations belonging to the parent organization 533 */ 534 public static com.liferay.portal.model.OrganizationSoap[] getOrganizations( 535 long companyId, long parentOrganizationId, int start, int end) 536 throws RemoteException { 537 try { 538 java.util.List<com.liferay.portal.model.Organization> returnValue = OrganizationServiceUtil.getOrganizations(companyId, 539 parentOrganizationId, start, end); 540 541 return com.liferay.portal.model.OrganizationSoap.toSoapModels(returnValue); 542 } 543 catch (Exception e) { 544 _log.error(e, e); 545 546 throw new RemoteException(e.getMessage()); 547 } 548 } 549 550 /** 551 * Returns the number of organizations belonging to the parent organization. 552 * 553 * @param companyId the primary key of the organizations' company 554 * @param parentOrganizationId the primary key of the organizations' parent 555 organization 556 * @return the number of organizations belonging to the parent organization 557 */ 558 public static int getOrganizationsCount(long companyId, 559 long parentOrganizationId) throws RemoteException { 560 try { 561 int returnValue = OrganizationServiceUtil.getOrganizationsCount(companyId, 562 parentOrganizationId); 563 564 return returnValue; 565 } 566 catch (Exception e) { 567 _log.error(e, e); 568 569 throw new RemoteException(e.getMessage()); 570 } 571 } 572 573 /** 574 * Returns all the organizations with which the user is explicitly 575 * associated. 576 * 577 * <p> 578 * A user is considered to be <i>explicitly</i> associated with an 579 * organization if his account is individually created within the 580 * organization or if the user is later added as a member. 581 * </p> 582 * 583 * @param userId the primary key of the user 584 * @return the organizations with which the user is explicitly associated 585 * @throws PortalException if a user with the primary key could not be found 586 */ 587 public static com.liferay.portal.model.OrganizationSoap[] getUserOrganizations( 588 long userId) throws RemoteException { 589 try { 590 java.util.List<com.liferay.portal.model.Organization> returnValue = OrganizationServiceUtil.getUserOrganizations(userId); 591 592 return com.liferay.portal.model.OrganizationSoap.toSoapModels(returnValue); 593 } 594 catch (Exception e) { 595 _log.error(e, e); 596 597 throw new RemoteException(e.getMessage()); 598 } 599 } 600 601 /** 602 * Sets the organizations in the group, removing and adding organizations to 603 * the group as necessary. 604 * 605 * @param groupId the primary key of the group 606 * @param organizationIds the primary keys of the organizations 607 * @throws PortalException if a group or organization with the primary key 608 could not be found or if the user did not have permission to 609 assign group members 610 */ 611 public static void setGroupOrganizations(long groupId, 612 long[] organizationIds) throws RemoteException { 613 try { 614 OrganizationServiceUtil.setGroupOrganizations(groupId, 615 organizationIds); 616 } 617 catch (Exception e) { 618 _log.error(e, e); 619 620 throw new RemoteException(e.getMessage()); 621 } 622 } 623 624 /** 625 * Removes the organizations from the group. 626 * 627 * @param groupId the primary key of the group 628 * @param organizationIds the primary keys of the organizations 629 * @throws PortalException if a group or organization with the primary key 630 could not be found or if the user did not have permission to 631 assign group members 632 */ 633 public static void unsetGroupOrganizations(long groupId, 634 long[] organizationIds) throws RemoteException { 635 try { 636 OrganizationServiceUtil.unsetGroupOrganizations(groupId, 637 organizationIds); 638 } 639 catch (Exception e) { 640 _log.error(e, e); 641 642 throw new RemoteException(e.getMessage()); 643 } 644 } 645 646 /** 647 * Removes the organizations from the password policy. 648 * 649 * @param passwordPolicyId the primary key of the password policy 650 * @param organizationIds the primary keys of the organizations 651 * @throws PortalException if a password policy or organization with the 652 primary key could not be found, or if the user did not have 653 permission to update the password policy 654 */ 655 public static void unsetPasswordPolicyOrganizations(long passwordPolicyId, 656 long[] organizationIds) throws RemoteException { 657 try { 658 OrganizationServiceUtil.unsetPasswordPolicyOrganizations(passwordPolicyId, 659 organizationIds); 660 } 661 catch (Exception e) { 662 _log.error(e, e); 663 664 throw new RemoteException(e.getMessage()); 665 } 666 } 667 668 /** 669 * Updates the organization with additional parameters. 670 * 671 * @param organizationId the primary key of the organization 672 * @param parentOrganizationId the primary key of the organization's 673 parent organization 674 * @param name the organization's name 675 * @param type the organization's type 676 * @param recursable whether the permissions of the organization are to 677 be inherited by its suborganizations 678 * @param regionId the primary key of the organization's region 679 * @param countryId the primary key of the organization's country 680 * @param statusId the organization's workflow status 681 * @param comments the comments about the organization 682 * @param site whether the organization is to be associated with a main 683 site 684 * @param addresses the organization's addresses 685 * @param emailAddresses the organization's email addresses 686 * @param orgLabors the organization's hours of operation 687 * @param phones the organization's phone numbers 688 * @param websites the organization's websites 689 * @param serviceContext the service context to be applied (optionally 690 <code>null</code>). Can set asset category IDs and asset tag 691 names for the organization, and merge expando bridge 692 attributes for the organization. 693 * @return the organization 694 * @throws PortalException if an organization or parent organization 695 with the primary key could not be found, if the user did not 696 have permission to update the organization information, or if 697 the new information was invalid 698 * @deprecated As of 6.2.0, replaced by {@link #updateOrganization(long, 699 long, String, String, long, long, int, String, boolean, 700 byte[], boolean, java.util.List, java.util.List, 701 java.util.List, java.util.List, java.util.List, 702 ServiceContext)} 703 */ 704 @Deprecated 705 public static com.liferay.portal.model.OrganizationSoap updateOrganization( 706 long organizationId, long parentOrganizationId, java.lang.String name, 707 java.lang.String type, boolean recursable, long regionId, 708 long countryId, long statusId, java.lang.String comments, boolean site, 709 com.liferay.portal.model.AddressSoap[] addresses, 710 com.liferay.portal.model.EmailAddressSoap[] emailAddresses, 711 com.liferay.portal.model.OrgLaborSoap[] orgLabors, 712 com.liferay.portal.model.PhoneSoap[] phones, 713 com.liferay.portal.model.WebsiteSoap[] websites, 714 com.liferay.portal.service.ServiceContext serviceContext) 715 throws RemoteException { 716 try { 717 com.liferay.portal.model.Organization returnValue = OrganizationServiceUtil.updateOrganization(organizationId, 718 parentOrganizationId, name, type, recursable, regionId, 719 countryId, statusId, comments, site, 720 com.liferay.portal.model.impl.AddressModelImpl.toModels( 721 addresses), 722 com.liferay.portal.model.impl.EmailAddressModelImpl.toModels( 723 emailAddresses), 724 com.liferay.portal.model.impl.OrgLaborModelImpl.toModels( 725 orgLabors), 726 com.liferay.portal.model.impl.PhoneModelImpl.toModels( 727 phones), 728 com.liferay.portal.model.impl.WebsiteModelImpl.toModels( 729 websites), serviceContext); 730 731 return com.liferay.portal.model.OrganizationSoap.toSoapModel(returnValue); 732 } 733 catch (Exception e) { 734 _log.error(e, e); 735 736 throw new RemoteException(e.getMessage()); 737 } 738 } 739 740 /** 741 * Updates the organization. 742 * 743 * @param organizationId the primary key of the organization 744 * @param parentOrganizationId the primary key of the organization's 745 parent organization 746 * @param name the organization's name 747 * @param type the organization's type 748 * @param recursable whether permissions of the organization are to be 749 inherited by its suborganizations 750 * @param regionId the primary key of the organization's region 751 * @param countryId the primary key of the organization's country 752 * @param statusId the organization's workflow status 753 * @param comments the comments about the organization 754 * @param site whether the organization is to be associated with a main 755 site 756 * @param serviceContext the service context to be applied (optionally 757 <code>null</code>). Can set asset category IDs and asset tag 758 names for the organization, and merge expando bridge 759 attributes for the organization. 760 * @return the organization 761 * @throws PortalException if an organization or parent organization 762 with the primary key could not be found, if the user did not 763 have permission to update the organization, or if the new 764 information was invalid 765 * @deprecated As of 6.2.0, replaced by {@link #updateOrganization(long, 766 long, String, String, long, long, int, String, boolean, 767 ServiceContext)} 768 */ 769 @Deprecated 770 public static com.liferay.portal.model.OrganizationSoap updateOrganization( 771 long organizationId, long parentOrganizationId, java.lang.String name, 772 java.lang.String type, boolean recursable, long regionId, 773 long countryId, long statusId, java.lang.String comments, boolean site, 774 com.liferay.portal.service.ServiceContext serviceContext) 775 throws RemoteException { 776 try { 777 com.liferay.portal.model.Organization returnValue = OrganizationServiceUtil.updateOrganization(organizationId, 778 parentOrganizationId, name, type, recursable, regionId, 779 countryId, statusId, comments, site, serviceContext); 780 781 return com.liferay.portal.model.OrganizationSoap.toSoapModel(returnValue); 782 } 783 catch (Exception e) { 784 _log.error(e, e); 785 786 throw new RemoteException(e.getMessage()); 787 } 788 } 789 790 /** 791 * Updates the organization with additional parameters. 792 * 793 * @param organizationId the primary key of the organization 794 * @param parentOrganizationId the primary key of the organization's parent 795 organization 796 * @param name the organization's name 797 * @param type the organization's type 798 * @param regionId the primary key of the organization's region 799 * @param countryId the primary key of the organization's country 800 * @param statusId the organization's workflow status 801 * @param comments the comments about the organization 802 * @param logo whether to update the ogranization's logo 803 * @param logoBytes the new logo image data 804 * @param site whether the organization is to be associated with a main 805 site 806 * @param addresses the organization's addresses 807 * @param emailAddresses the organization's email addresses 808 * @param orgLabors the organization's hours of operation 809 * @param phones the organization's phone numbers 810 * @param websites the organization's websites 811 * @param serviceContext the service context to be applied (optionally 812 <code>null</code>). Can set asset category IDs and asset tag 813 names for the organization, and merge expando bridge attributes 814 for the organization. 815 * @return the organization 816 * @throws PortalException if an organization or parent organization with 817 the primary key could not be found, if the user did not have 818 permission to update the organization information, or if the new 819 information was invalid 820 */ 821 public static com.liferay.portal.model.OrganizationSoap updateOrganization( 822 long organizationId, long parentOrganizationId, java.lang.String name, 823 java.lang.String type, long regionId, long countryId, long statusId, 824 java.lang.String comments, boolean logo, byte[] logoBytes, 825 boolean site, com.liferay.portal.model.AddressSoap[] addresses, 826 com.liferay.portal.model.EmailAddressSoap[] emailAddresses, 827 com.liferay.portal.model.OrgLaborSoap[] orgLabors, 828 com.liferay.portal.model.PhoneSoap[] phones, 829 com.liferay.portal.model.WebsiteSoap[] websites, 830 com.liferay.portal.service.ServiceContext serviceContext) 831 throws RemoteException { 832 try { 833 com.liferay.portal.model.Organization returnValue = OrganizationServiceUtil.updateOrganization(organizationId, 834 parentOrganizationId, name, type, regionId, countryId, 835 statusId, comments, logo, logoBytes, site, 836 com.liferay.portal.model.impl.AddressModelImpl.toModels( 837 addresses), 838 com.liferay.portal.model.impl.EmailAddressModelImpl.toModels( 839 emailAddresses), 840 com.liferay.portal.model.impl.OrgLaborModelImpl.toModels( 841 orgLabors), 842 com.liferay.portal.model.impl.PhoneModelImpl.toModels( 843 phones), 844 com.liferay.portal.model.impl.WebsiteModelImpl.toModels( 845 websites), serviceContext); 846 847 return com.liferay.portal.model.OrganizationSoap.toSoapModel(returnValue); 848 } 849 catch (Exception e) { 850 _log.error(e, e); 851 852 throw new RemoteException(e.getMessage()); 853 } 854 } 855 856 /** 857 * Updates the organization with additional parameters. 858 * 859 * @param organizationId the primary key of the organization 860 * @param parentOrganizationId the primary key of the organization's 861 parent organization 862 * @param name the organization's name 863 * @param type the organization's type 864 * @param regionId the primary key of the organization's region 865 * @param countryId the primary key of the organization's country 866 * @param statusId the organization's workflow status 867 * @param comments the comments about the organization 868 * @param site whether the organization is to be associated with a main 869 site 870 * @param addresses the organization's addresses 871 * @param emailAddresses the organization's email addresses 872 * @param orgLabors the organization's hours of operation 873 * @param phones the organization's phone numbers 874 * @param websites the organization's websites 875 * @param serviceContext the service context to be applied (optionally 876 <code>null</code>). Can set asset category IDs and asset tag 877 names for the organization, and merge expando bridge 878 attributes for the organization. 879 * @return the organization 880 * @throws PortalException if an organization or parent organization 881 with the primary key could not be found, if the user did not 882 have permission to update the organization information, or if 883 the new information was invalid 884 * @deprecated As of 7.0.0, replaced by {@link #updateOrganization(long, 885 long, String, String, long, long, int, String, boolean, 886 byte[], boolean, java.util.List, java.util.List, 887 java.util.List, java.util.List, java.util.List, 888 ServiceContext)} 889 */ 890 @Deprecated 891 public static com.liferay.portal.model.OrganizationSoap updateOrganization( 892 long organizationId, long parentOrganizationId, java.lang.String name, 893 java.lang.String type, long regionId, long countryId, long statusId, 894 java.lang.String comments, boolean site, 895 com.liferay.portal.model.AddressSoap[] addresses, 896 com.liferay.portal.model.EmailAddressSoap[] emailAddresses, 897 com.liferay.portal.model.OrgLaborSoap[] orgLabors, 898 com.liferay.portal.model.PhoneSoap[] phones, 899 com.liferay.portal.model.WebsiteSoap[] websites, 900 com.liferay.portal.service.ServiceContext serviceContext) 901 throws RemoteException { 902 try { 903 com.liferay.portal.model.Organization returnValue = OrganizationServiceUtil.updateOrganization(organizationId, 904 parentOrganizationId, name, type, regionId, countryId, 905 statusId, comments, site, 906 com.liferay.portal.model.impl.AddressModelImpl.toModels( 907 addresses), 908 com.liferay.portal.model.impl.EmailAddressModelImpl.toModels( 909 emailAddresses), 910 com.liferay.portal.model.impl.OrgLaborModelImpl.toModels( 911 orgLabors), 912 com.liferay.portal.model.impl.PhoneModelImpl.toModels( 913 phones), 914 com.liferay.portal.model.impl.WebsiteModelImpl.toModels( 915 websites), serviceContext); 916 917 return com.liferay.portal.model.OrganizationSoap.toSoapModel(returnValue); 918 } 919 catch (Exception e) { 920 _log.error(e, e); 921 922 throw new RemoteException(e.getMessage()); 923 } 924 } 925 926 /** 927 * Updates the organization. 928 * 929 * @param organizationId the primary key of the organization 930 * @param parentOrganizationId the primary key of the organization's parent 931 organization 932 * @param name the organization's name 933 * @param type the organization's type 934 * @param regionId the primary key of the organization's region 935 * @param countryId the primary key of the organization's country 936 * @param statusId the organization's workflow status 937 * @param comments the comments about the organization 938 * @param site whether the organization is to be associated with a main 939 site 940 * @param serviceContext the service context to be applied (optionally 941 <code>null</code>). Can set asset category IDs and asset tag 942 names for the organization, and merge expando bridge attributes 943 for the organization. 944 * @return the organization 945 * @throws PortalException if an organization or parent organization with 946 the primary key could not be found, if the user did not have 947 permission to update the organization, or if the new information 948 was invalid 949 */ 950 public static com.liferay.portal.model.OrganizationSoap updateOrganization( 951 long organizationId, long parentOrganizationId, java.lang.String name, 952 java.lang.String type, long regionId, long countryId, long statusId, 953 java.lang.String comments, boolean site, 954 com.liferay.portal.service.ServiceContext serviceContext) 955 throws RemoteException { 956 try { 957 com.liferay.portal.model.Organization returnValue = OrganizationServiceUtil.updateOrganization(organizationId, 958 parentOrganizationId, name, type, regionId, countryId, 959 statusId, comments, site, serviceContext); 960 961 return com.liferay.portal.model.OrganizationSoap.toSoapModel(returnValue); 962 } 963 catch (Exception e) { 964 _log.error(e, e); 965 966 throw new RemoteException(e.getMessage()); 967 } 968 } 969 970 private static Log _log = LogFactoryUtil.getLog(OrganizationServiceSoap.class); 971 }