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 com.liferay.portal.service.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 com.liferay.portal.service.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, int 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, int 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, int 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, int 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 all the organizations which the user has permission to manage. 394 * 395 * @param actionId the permitted action 396 * @param max the maximum number of the organizations to be considered 397 * @return the organizations which the user has permission to manage 398 * @throws PortalException if a portal exception occurred 399 * @deprecated As of 6.2.0, replaced by {@link #getOrganizations(long, long, 400 int, int)} 401 */ 402 @Deprecated 403 public static com.liferay.portal.model.OrganizationSoap[] getManageableOrganizations( 404 java.lang.String actionId, int max) throws RemoteException { 405 try { 406 java.util.List<com.liferay.portal.model.Organization> returnValue = OrganizationServiceUtil.getManageableOrganizations(actionId, 407 max); 408 409 return com.liferay.portal.model.OrganizationSoap.toSoapModels(returnValue); 410 } 411 catch (Exception e) { 412 _log.error(e, e); 413 414 throw new RemoteException(e.getMessage()); 415 } 416 } 417 418 /** 419 * Returns the organization with the primary key. 420 * 421 * @param organizationId the primary key of the organization 422 * @return the organization with the primary key 423 * @throws PortalException if an organization with the primary key could not 424 be found or if the user did not have permission to view the 425 organization 426 */ 427 public static com.liferay.portal.model.OrganizationSoap getOrganization( 428 long organizationId) throws RemoteException { 429 try { 430 com.liferay.portal.model.Organization returnValue = OrganizationServiceUtil.getOrganization(organizationId); 431 432 return com.liferay.portal.model.OrganizationSoap.toSoapModel(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 primary key of the organization with the name. 443 * 444 * @param companyId the primary key of the organization's company 445 * @param name the organization's name 446 * @return the primary key of the organization with the name, or 447 <code>0</code> if the organization could not be found 448 * @throws PortalException if the user did not have permission to view the 449 organization 450 */ 451 public static long getOrganizationId(long companyId, java.lang.String name) 452 throws RemoteException { 453 try { 454 long returnValue = OrganizationServiceUtil.getOrganizationId(companyId, 455 name); 456 457 return returnValue; 458 } 459 catch (Exception e) { 460 _log.error(e, e); 461 462 throw new RemoteException(e.getMessage()); 463 } 464 } 465 466 /** 467 * Returns all the organizations belonging to the parent organization. 468 * 469 * @param companyId the primary key of the organizations' company 470 * @param parentOrganizationId the primary key of the organizations' parent 471 organization 472 * @return the organizations belonging to the parent organization 473 */ 474 public static com.liferay.portal.model.OrganizationSoap[] getOrganizations( 475 long companyId, long parentOrganizationId) throws RemoteException { 476 try { 477 java.util.List<com.liferay.portal.model.Organization> returnValue = OrganizationServiceUtil.getOrganizations(companyId, 478 parentOrganizationId); 479 480 return com.liferay.portal.model.OrganizationSoap.toSoapModels(returnValue); 481 } 482 catch (Exception e) { 483 _log.error(e, e); 484 485 throw new RemoteException(e.getMessage()); 486 } 487 } 488 489 /** 490 * Returns a range of all the organizations belonging to the parent 491 * organization. 492 * 493 * <p> 494 * Useful when paginating results. Returns a maximum of <code>end - 495 * start</code> instances. <code>start</code> and <code>end</code> are not 496 * primary keys, they are indexes in the result set. Thus, <code>0</code> 497 * refers to the first result in the set. Setting both <code>start</code> 498 * and <code>end</code> to {@link 499 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 500 * result set. 501 * </p> 502 * 503 * @param companyId the primary key of the organizations' company 504 * @param parentOrganizationId the primary key of the organizations' parent 505 organization 506 * @param start the lower bound of the range of organizations to return 507 * @param end the upper bound of the range of organizations to return (not 508 inclusive) 509 * @return the range of organizations belonging to the parent organization 510 */ 511 public static com.liferay.portal.model.OrganizationSoap[] getOrganizations( 512 long companyId, long parentOrganizationId, int start, int end) 513 throws RemoteException { 514 try { 515 java.util.List<com.liferay.portal.model.Organization> returnValue = OrganizationServiceUtil.getOrganizations(companyId, 516 parentOrganizationId, start, end); 517 518 return com.liferay.portal.model.OrganizationSoap.toSoapModels(returnValue); 519 } 520 catch (Exception e) { 521 _log.error(e, e); 522 523 throw new RemoteException(e.getMessage()); 524 } 525 } 526 527 /** 528 * Returns the number of organizations belonging to the parent organization. 529 * 530 * @param companyId the primary key of the organizations' company 531 * @param parentOrganizationId the primary key of the organizations' parent 532 organization 533 * @return the number of organizations belonging to the parent organization 534 */ 535 public static int getOrganizationsCount(long companyId, 536 long parentOrganizationId) throws RemoteException { 537 try { 538 int returnValue = OrganizationServiceUtil.getOrganizationsCount(companyId, 539 parentOrganizationId); 540 541 return returnValue; 542 } 543 catch (Exception e) { 544 _log.error(e, e); 545 546 throw new RemoteException(e.getMessage()); 547 } 548 } 549 550 /** 551 * Returns all the organizations associated with the user. 552 * 553 * @param userId the primary key of the user 554 * @return the organizations associated with the user 555 * @throws PortalException if a user with the primary key could not be found 556 */ 557 public static com.liferay.portal.model.OrganizationSoap[] getUserOrganizations( 558 long userId) throws RemoteException { 559 try { 560 java.util.List<com.liferay.portal.model.Organization> returnValue = OrganizationServiceUtil.getUserOrganizations(userId); 561 562 return com.liferay.portal.model.OrganizationSoap.toSoapModels(returnValue); 563 } 564 catch (Exception e) { 565 _log.error(e, e); 566 567 throw new RemoteException(e.getMessage()); 568 } 569 } 570 571 /** 572 * Sets the organizations in the group, removing and adding organizations to 573 * the group as necessary. 574 * 575 * @param groupId the primary key of the group 576 * @param organizationIds the primary keys of the organizations 577 * @throws PortalException if a group or organization with the primary key 578 could not be found or if the user did not have permission to 579 assign group members 580 */ 581 public static void setGroupOrganizations(long groupId, 582 long[] organizationIds) throws RemoteException { 583 try { 584 OrganizationServiceUtil.setGroupOrganizations(groupId, 585 organizationIds); 586 } 587 catch (Exception e) { 588 _log.error(e, e); 589 590 throw new RemoteException(e.getMessage()); 591 } 592 } 593 594 /** 595 * Removes the organizations from the group. 596 * 597 * @param groupId the primary key of the group 598 * @param organizationIds the primary keys of the organizations 599 * @throws PortalException if a group or organization with the primary key 600 could not be found or if the user did not have permission to 601 assign group members 602 */ 603 public static void unsetGroupOrganizations(long groupId, 604 long[] organizationIds) throws RemoteException { 605 try { 606 OrganizationServiceUtil.unsetGroupOrganizations(groupId, 607 organizationIds); 608 } 609 catch (Exception e) { 610 _log.error(e, e); 611 612 throw new RemoteException(e.getMessage()); 613 } 614 } 615 616 /** 617 * Removes the organizations from the password policy. 618 * 619 * @param passwordPolicyId the primary key of the password policy 620 * @param organizationIds the primary keys of the organizations 621 * @throws PortalException if a password policy or organization with the 622 primary key could not be found, or if the user did not have 623 permission to update the password policy 624 */ 625 public static void unsetPasswordPolicyOrganizations(long passwordPolicyId, 626 long[] organizationIds) throws RemoteException { 627 try { 628 OrganizationServiceUtil.unsetPasswordPolicyOrganizations(passwordPolicyId, 629 organizationIds); 630 } 631 catch (Exception e) { 632 _log.error(e, e); 633 634 throw new RemoteException(e.getMessage()); 635 } 636 } 637 638 /** 639 * Updates the organization with additional parameters. 640 * 641 * @param organizationId the primary key of the organization 642 * @param parentOrganizationId the primary key of the organization's 643 parent organization 644 * @param name the organization's name 645 * @param type the organization's type 646 * @param recursable whether the permissions of the organization are to 647 be inherited by its suborganizations 648 * @param regionId the primary key of the organization's region 649 * @param countryId the primary key of the organization's country 650 * @param statusId the organization's workflow status 651 * @param comments the comments about the organization 652 * @param site whether the organization is to be associated with a main 653 site 654 * @param addresses the organization's addresses 655 * @param emailAddresses the organization's email addresses 656 * @param orgLabors the organization's hours of operation 657 * @param phones the organization's phone numbers 658 * @param websites the organization's websites 659 * @param serviceContext the service context to be applied (optionally 660 <code>null</code>). Can set asset category IDs and asset tag 661 names for the organization, and merge expando bridge 662 attributes for the organization. 663 * @return the organization 664 * @throws PortalException if an organization or parent organization 665 with the primary key could not be found, if the user did not 666 have permission to update the organization information, or if 667 the new information was invalid 668 * @deprecated As of 6.2.0, replaced by {@link #updateOrganization(long, 669 long, String, String, long, long, int, String, boolean, 670 java.util.List, java.util.List, java.util.List, 671 java.util.List, java.util.List, boolean, byte[], 672 ServiceContext)} 673 */ 674 @Deprecated 675 public static com.liferay.portal.model.OrganizationSoap updateOrganization( 676 long organizationId, long parentOrganizationId, java.lang.String name, 677 java.lang.String type, boolean recursable, long regionId, 678 long countryId, int statusId, java.lang.String comments, boolean site, 679 com.liferay.portal.model.AddressSoap[] addresses, 680 com.liferay.portal.model.EmailAddressSoap[] emailAddresses, 681 com.liferay.portal.model.OrgLaborSoap[] orgLabors, 682 com.liferay.portal.model.PhoneSoap[] phones, 683 com.liferay.portal.model.WebsiteSoap[] websites, 684 com.liferay.portal.service.ServiceContext serviceContext) 685 throws RemoteException { 686 try { 687 com.liferay.portal.model.Organization returnValue = OrganizationServiceUtil.updateOrganization(organizationId, 688 parentOrganizationId, name, type, recursable, regionId, 689 countryId, statusId, comments, site, 690 com.liferay.portal.model.impl.AddressModelImpl.toModels( 691 addresses), 692 com.liferay.portal.model.impl.EmailAddressModelImpl.toModels( 693 emailAddresses), 694 com.liferay.portal.model.impl.OrgLaborModelImpl.toModels( 695 orgLabors), 696 com.liferay.portal.model.impl.PhoneModelImpl.toModels( 697 phones), 698 com.liferay.portal.model.impl.WebsiteModelImpl.toModels( 699 websites), serviceContext); 700 701 return com.liferay.portal.model.OrganizationSoap.toSoapModel(returnValue); 702 } 703 catch (Exception e) { 704 _log.error(e, e); 705 706 throw new RemoteException(e.getMessage()); 707 } 708 } 709 710 /** 711 * Updates the organization. 712 * 713 * @param organizationId the primary key of the organization 714 * @param parentOrganizationId the primary key of the organization's 715 parent organization 716 * @param name the organization's name 717 * @param type the organization's type 718 * @param recursable whether permissions of the organization are to be 719 inherited by its suborganizations 720 * @param regionId the primary key of the organization's region 721 * @param countryId the primary key of the organization's country 722 * @param statusId the organization's workflow status 723 * @param comments the comments about the organization 724 * @param site whether the organization is to be associated with a main 725 site 726 * @param serviceContext the service context to be applied (optionally 727 <code>null</code>). Can set asset category IDs and asset tag 728 names for the organization, and merge expando bridge 729 attributes for the organization. 730 * @return the organization 731 * @throws PortalException if an organization or parent organization 732 with the primary key could not be found, if the user did not 733 have permission to update the organization, or if the new 734 information was invalid 735 * @deprecated As of 6.2.0, replaced by {@link #updateOrganization(long, 736 long, String, String, long, long, int, String, boolean, 737 ServiceContext)} 738 */ 739 @Deprecated 740 public static com.liferay.portal.model.OrganizationSoap updateOrganization( 741 long organizationId, long parentOrganizationId, java.lang.String name, 742 java.lang.String type, boolean recursable, long regionId, 743 long countryId, int statusId, java.lang.String comments, boolean site, 744 com.liferay.portal.service.ServiceContext serviceContext) 745 throws RemoteException { 746 try { 747 com.liferay.portal.model.Organization returnValue = OrganizationServiceUtil.updateOrganization(organizationId, 748 parentOrganizationId, name, type, recursable, regionId, 749 countryId, statusId, comments, site, serviceContext); 750 751 return com.liferay.portal.model.OrganizationSoap.toSoapModel(returnValue); 752 } 753 catch (Exception e) { 754 _log.error(e, e); 755 756 throw new RemoteException(e.getMessage()); 757 } 758 } 759 760 /** 761 * Updates the organization with additional parameters. 762 * 763 * @param organizationId the primary key of the organization 764 * @param parentOrganizationId the primary key of the organization's parent 765 organization 766 * @param name the organization's name 767 * @param type the organization's type 768 * @param regionId the primary key of the organization's region 769 * @param countryId the primary key of the organization's country 770 * @param statusId the organization's workflow status 771 * @param comments the comments about the organization 772 * @param logo whether to update the ogranization's logo 773 * @param logoBytes the new logo image data 774 * @param site whether the organization is to be associated with a main 775 site 776 * @param addresses the organization's addresses 777 * @param emailAddresses the organization's email addresses 778 * @param orgLabors the organization's hours of operation 779 * @param phones the organization's phone numbers 780 * @param websites the organization's websites 781 * @param serviceContext the service context to be applied (optionally 782 <code>null</code>). Can set asset category IDs and asset tag 783 names for the organization, and merge expando bridge attributes 784 for the organization. 785 * @return the organization 786 * @throws PortalException if an organization or parent organization with 787 the primary key could not be found, if the user did not have 788 permission to update the organization information, or if the new 789 information was invalid 790 */ 791 public static com.liferay.portal.model.OrganizationSoap updateOrganization( 792 long organizationId, long parentOrganizationId, java.lang.String name, 793 java.lang.String type, long regionId, long countryId, int statusId, 794 java.lang.String comments, boolean logo, byte[] logoBytes, 795 boolean site, com.liferay.portal.model.AddressSoap[] addresses, 796 com.liferay.portal.model.EmailAddressSoap[] emailAddresses, 797 com.liferay.portal.model.OrgLaborSoap[] orgLabors, 798 com.liferay.portal.model.PhoneSoap[] phones, 799 com.liferay.portal.model.WebsiteSoap[] websites, 800 com.liferay.portal.service.ServiceContext serviceContext) 801 throws RemoteException { 802 try { 803 com.liferay.portal.model.Organization returnValue = OrganizationServiceUtil.updateOrganization(organizationId, 804 parentOrganizationId, name, type, regionId, countryId, 805 statusId, comments, logo, logoBytes, site, 806 com.liferay.portal.model.impl.AddressModelImpl.toModels( 807 addresses), 808 com.liferay.portal.model.impl.EmailAddressModelImpl.toModels( 809 emailAddresses), 810 com.liferay.portal.model.impl.OrgLaborModelImpl.toModels( 811 orgLabors), 812 com.liferay.portal.model.impl.PhoneModelImpl.toModels( 813 phones), 814 com.liferay.portal.model.impl.WebsiteModelImpl.toModels( 815 websites), serviceContext); 816 817 return com.liferay.portal.model.OrganizationSoap.toSoapModel(returnValue); 818 } 819 catch (Exception e) { 820 _log.error(e, e); 821 822 throw new RemoteException(e.getMessage()); 823 } 824 } 825 826 /** 827 * Updates the organization with additional parameters. 828 * 829 * @param organizationId the primary key of the organization 830 * @param parentOrganizationId the primary key of the organization's 831 parent organization 832 * @param name the organization's name 833 * @param type the organization's type 834 * @param regionId the primary key of the organization's region 835 * @param countryId the primary key of the organization's country 836 * @param statusId the organization's workflow status 837 * @param comments the comments about the organization 838 * @param site whether the organization is to be associated with a main 839 site 840 * @param addresses the organization's addresses 841 * @param emailAddresses the organization's email addresses 842 * @param orgLabors the organization's hours of operation 843 * @param phones the organization's phone numbers 844 * @param websites the organization's websites 845 * @param serviceContext the service context to be applied (optionally 846 <code>null</code>). Can set asset category IDs and asset tag 847 names for the organization, and merge expando bridge 848 attributes for the organization. 849 * @return the organization 850 * @throws PortalException if an organization or parent organization 851 with the primary key could not be found, if the user did not 852 have permission to update the organization information, or if 853 the new information was invalid 854 * @deprecated As of 7.0.0, replaced by {@link #updateOrganization(long, 855 long, String, String, long, long, int, String, boolean, 856 java.util.List, java.util.List, java.util.List, 857 java.util.List, java.util.List, boolean, byte[], 858 ServiceContext)} 859 */ 860 @Deprecated 861 public static com.liferay.portal.model.OrganizationSoap updateOrganization( 862 long organizationId, long parentOrganizationId, java.lang.String name, 863 java.lang.String type, long regionId, long countryId, int statusId, 864 java.lang.String comments, boolean site, 865 com.liferay.portal.model.AddressSoap[] addresses, 866 com.liferay.portal.model.EmailAddressSoap[] emailAddresses, 867 com.liferay.portal.model.OrgLaborSoap[] orgLabors, 868 com.liferay.portal.model.PhoneSoap[] phones, 869 com.liferay.portal.model.WebsiteSoap[] websites, 870 com.liferay.portal.service.ServiceContext serviceContext) 871 throws RemoteException { 872 try { 873 com.liferay.portal.model.Organization returnValue = OrganizationServiceUtil.updateOrganization(organizationId, 874 parentOrganizationId, name, type, regionId, countryId, 875 statusId, comments, site, 876 com.liferay.portal.model.impl.AddressModelImpl.toModels( 877 addresses), 878 com.liferay.portal.model.impl.EmailAddressModelImpl.toModels( 879 emailAddresses), 880 com.liferay.portal.model.impl.OrgLaborModelImpl.toModels( 881 orgLabors), 882 com.liferay.portal.model.impl.PhoneModelImpl.toModels( 883 phones), 884 com.liferay.portal.model.impl.WebsiteModelImpl.toModels( 885 websites), serviceContext); 886 887 return com.liferay.portal.model.OrganizationSoap.toSoapModel(returnValue); 888 } 889 catch (Exception e) { 890 _log.error(e, e); 891 892 throw new RemoteException(e.getMessage()); 893 } 894 } 895 896 /** 897 * Updates the organization. 898 * 899 * @param organizationId the primary key of the organization 900 * @param parentOrganizationId the primary key of the organization's parent 901 organization 902 * @param name the organization's name 903 * @param type the organization's type 904 * @param regionId the primary key of the organization's region 905 * @param countryId the primary key of the organization's country 906 * @param statusId the organization's workflow status 907 * @param comments the comments about the organization 908 * @param site whether the organization is to be associated with a main 909 site 910 * @param serviceContext the service context to be applied (optionally 911 <code>null</code>). Can set asset category IDs and asset tag 912 names for the organization, and merge expando bridge attributes 913 for the organization. 914 * @return the organization 915 * @throws PortalException if an organization or parent organization with 916 the primary key could not be found, if the user did not have 917 permission to update the organization, or if the new information 918 was invalid 919 */ 920 public static com.liferay.portal.model.OrganizationSoap updateOrganization( 921 long organizationId, long parentOrganizationId, java.lang.String name, 922 java.lang.String type, long regionId, long countryId, int statusId, 923 java.lang.String comments, boolean site, 924 com.liferay.portal.service.ServiceContext serviceContext) 925 throws RemoteException { 926 try { 927 com.liferay.portal.model.Organization returnValue = OrganizationServiceUtil.updateOrganization(organizationId, 928 parentOrganizationId, name, type, regionId, countryId, 929 statusId, comments, site, serviceContext); 930 931 return com.liferay.portal.model.OrganizationSoap.toSoapModel(returnValue); 932 } 933 catch (Exception e) { 934 _log.error(e, e); 935 936 throw new RemoteException(e.getMessage()); 937 } 938 } 939 940 private static Log _log = LogFactoryUtil.getLog(OrganizationServiceSoap.class); 941 }