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