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;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the remote service utility for Organization. This utility wraps
024     * {@link com.liferay.portal.service.impl.OrganizationServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on a remote server. Methods of this service are expected to have security
027     * checks based on the propagated JAAS credentials because this service can be
028     * accessed remotely.
029     *
030     * @author Brian Wing Shun Chan
031     * @see OrganizationService
032     * @see com.liferay.portal.service.base.OrganizationServiceBaseImpl
033     * @see com.liferay.portal.service.impl.OrganizationServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class OrganizationServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.OrganizationServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the organizations to the group.
046            *
047            * @param groupId the primary key of the group
048            * @param organizationIds the primary keys of the organizations
049            * @throws PortalException if a group or organization with the primary key
050            could not be found or if the user did not have permission to
051            assign group members
052            */
053            public static void addGroupOrganizations(long groupId,
054                    long[] organizationIds)
055                    throws com.liferay.portal.kernel.exception.PortalException {
056                    getService().addGroupOrganizations(groupId, organizationIds);
057            }
058    
059            /**
060            * Adds an organization with additional parameters.
061            *
062            * <p>
063            * This method handles the creation and bookkeeping of the organization
064            * including its resources, metadata, and internal data structures.
065            * </p>
066            *
067            * @param parentOrganizationId the primary key of the organization's
068            parent organization
069            * @param name the organization's name
070            * @param type the organization's type
071            * @param recursable whether the permissions of the organization are to
072            be inherited by its suborganizations
073            * @param regionId the primary key of the organization's region
074            * @param countryId the primary key of the organization's country
075            * @param statusId the organization's workflow status
076            * @param comments the comments about the organization
077            * @param site whether the organization is to be associated with a main
078            site
079            * @param addresses the organization's addresses
080            * @param emailAddresses the organization's email addresses
081            * @param orgLabors the organization's hours of operation
082            * @param phones the organization's phone numbers
083            * @param websites the organization's websites
084            * @param serviceContext the service context to be applied (optionally
085            <code>null</code>). Can set asset category IDs, asset tag
086            names, and expando bridge attributes for the organization.
087            * @return the organization
088            * @throws PortalException if a parent organization with the primary key
089            could not be found, if the organization's information was
090            invalid, or if the user did not have permission to add the
091            organization
092            * @deprecated As of 6.2.0, replaced by {@link #addOrganization(long,
093            String, String, long, long, int, String, boolean,
094            java.util.List, java.util.List, java.util.List,
095            java.util.List, java.util.List, ServiceContext)}
096            */
097            @Deprecated
098            public static com.liferay.portal.model.Organization addOrganization(
099                    long parentOrganizationId, java.lang.String name,
100                    java.lang.String type, boolean recursable, long regionId,
101                    long countryId, int statusId, java.lang.String comments, boolean site,
102                    java.util.List<com.liferay.portal.model.Address> addresses,
103                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
104                    java.util.List<com.liferay.portal.model.OrgLabor> orgLabors,
105                    java.util.List<com.liferay.portal.model.Phone> phones,
106                    java.util.List<com.liferay.portal.model.Website> websites,
107                    com.liferay.portal.service.ServiceContext serviceContext)
108                    throws com.liferay.portal.kernel.exception.PortalException {
109                    return getService()
110                                       .addOrganization(parentOrganizationId, name, type,
111                            recursable, regionId, countryId, statusId, comments, site,
112                            addresses, emailAddresses, orgLabors, phones, websites,
113                            serviceContext);
114            }
115    
116            /**
117            * Adds an organization.
118            *
119            * <p>
120            * This method handles the creation and bookkeeping of the organization
121            * including its resources, metadata, and internal data structures.
122            * </p>
123            *
124            * @param parentOrganizationId the primary key of the organization's
125            parent organization
126            * @param name the organization's name
127            * @param type the organization's type
128            * @param recursable whether the permissions of the organization are to
129            be inherited by its suborganizations
130            * @param regionId the primary key of the organization's region
131            * @param countryId the primary key of the organization's country
132            * @param statusId the organization's workflow status
133            * @param comments the comments about the organization
134            * @param site whether the organization is to be associated with a main
135            site
136            * @param serviceContext the service context to be applied (optionally
137            <code>null</code>). Can set asset category IDs, asset tag
138            names, and expando bridge attributes for the organization.
139            * @return the organization
140            * @throws PortalException if the parent organization with the primary
141            key could not be found, if the organization information was
142            invalid, or if the user did not have permission to add the
143            organization
144            * @deprecated As of 6.2.0, replaced by {@link #addOrganization(long,
145            String, String, long, long, int, String, boolean,
146            ServiceContext)}
147            */
148            @Deprecated
149            public static com.liferay.portal.model.Organization addOrganization(
150                    long parentOrganizationId, java.lang.String name,
151                    java.lang.String type, boolean recursable, long regionId,
152                    long countryId, int statusId, java.lang.String comments, boolean site,
153                    com.liferay.portal.service.ServiceContext serviceContext)
154                    throws com.liferay.portal.kernel.exception.PortalException {
155                    return getService()
156                                       .addOrganization(parentOrganizationId, name, type,
157                            recursable, regionId, countryId, statusId, comments, site,
158                            serviceContext);
159            }
160    
161            /**
162            * Adds an organization with additional parameters.
163            *
164            * <p>
165            * This method handles the creation and bookkeeping of the organization
166            * including its resources, metadata, and internal data structures.
167            * </p>
168            *
169            * @param parentOrganizationId the primary key of the organization's parent
170            organization
171            * @param name the organization's name
172            * @param type the organization's type
173            * @param regionId the primary key of the organization's region
174            * @param countryId the primary key of the organization's country
175            * @param statusId the organization's workflow status
176            * @param comments the comments about the organization
177            * @param site whether the organization is to be associated with a main
178            site
179            * @param addresses the organization's addresses
180            * @param emailAddresses the organization's email addresses
181            * @param orgLabors the organization's hours of operation
182            * @param phones the organization's phone numbers
183            * @param websites the organization's websites
184            * @param serviceContext the service context to be applied (optionally
185            <code>null</code>). Can set asset category IDs, asset tag names,
186            and expando bridge attributes for the organization.
187            * @return the organization
188            * @throws PortalException if a parent organization with the primary key
189            could not be found, if the organization's information was
190            invalid, or if the user did not have permission to add the
191            organization
192            */
193            public static com.liferay.portal.model.Organization addOrganization(
194                    long parentOrganizationId, java.lang.String name,
195                    java.lang.String type, long regionId, long countryId, int statusId,
196                    java.lang.String comments, boolean site,
197                    java.util.List<com.liferay.portal.model.Address> addresses,
198                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
199                    java.util.List<com.liferay.portal.model.OrgLabor> orgLabors,
200                    java.util.List<com.liferay.portal.model.Phone> phones,
201                    java.util.List<com.liferay.portal.model.Website> websites,
202                    com.liferay.portal.service.ServiceContext serviceContext)
203                    throws com.liferay.portal.kernel.exception.PortalException {
204                    return getService()
205                                       .addOrganization(parentOrganizationId, name, type, regionId,
206                            countryId, statusId, comments, site, addresses, emailAddresses,
207                            orgLabors, phones, websites, serviceContext);
208            }
209    
210            /**
211            * Adds an organization.
212            *
213            * <p>
214            * This method handles the creation and bookkeeping of the organization
215            * including its resources, metadata, and internal data structures.
216            * </p>
217            *
218            * @param parentOrganizationId the primary key of the organization's parent
219            organization
220            * @param name the organization's name
221            * @param type the organization's type
222            * @param regionId the primary key of the organization's region
223            * @param countryId the primary key of the organization's country
224            * @param statusId the organization's workflow status
225            * @param comments the comments about the organization
226            * @param site whether the organization is to be associated with a main
227            site
228            * @param serviceContext the service context to be applied (optionally
229            <code>null</code>). Can set asset category IDs, asset tag names,
230            and expando bridge attributes for the organization.
231            * @return the organization
232            * @throws PortalException if the parent organization with the primary key
233            could not be found, if the organization information was invalid,
234            or if the user did not have permission to add the organization
235            */
236            public static com.liferay.portal.model.Organization addOrganization(
237                    long parentOrganizationId, java.lang.String name,
238                    java.lang.String type, long regionId, long countryId, int statusId,
239                    java.lang.String comments, boolean site,
240                    com.liferay.portal.service.ServiceContext serviceContext)
241                    throws com.liferay.portal.kernel.exception.PortalException {
242                    return getService()
243                                       .addOrganization(parentOrganizationId, name, type, regionId,
244                            countryId, statusId, comments, site, serviceContext);
245            }
246    
247            /**
248            * Assigns the password policy to the organizations, removing any other
249            * currently assigned password policies.
250            *
251            * @param passwordPolicyId the primary key of the password policy
252            * @param organizationIds the primary keys of the organizations
253            * @throws PortalException if the user did not have permission to update the
254            password policy
255            */
256            public static void addPasswordPolicyOrganizations(long passwordPolicyId,
257                    long[] organizationIds)
258                    throws com.liferay.portal.kernel.exception.PortalException {
259                    getService()
260                            .addPasswordPolicyOrganizations(passwordPolicyId, organizationIds);
261            }
262    
263            /**
264            * Deletes the organization's logo.
265            *
266            * @param organizationId the primary key of the organization
267            * @throws PortalException if an organization with the primary key could not
268            be found, if the organization's logo could not be found, or if
269            the user did not have permission to update the organization
270            */
271            public static void deleteLogo(long organizationId)
272                    throws com.liferay.portal.kernel.exception.PortalException {
273                    getService().deleteLogo(organizationId);
274            }
275    
276            /**
277            * Deletes the organization. The organization's associated resources and
278            * assets are also deleted.
279            *
280            * @param organizationId the primary key of the organization
281            * @throws PortalException if an organization with the primary key could not
282            be found, if the user did not have permission to delete the
283            organization, if the organization had a workflow in approved
284            status, or if the organization was a parent organization
285            */
286            public static void deleteOrganization(long organizationId)
287                    throws com.liferay.portal.kernel.exception.PortalException {
288                    getService().deleteOrganization(organizationId);
289            }
290    
291            /**
292            * Returns the Spring bean ID for this bean.
293            *
294            * @return the Spring bean ID for this bean
295            */
296            public static java.lang.String getBeanIdentifier() {
297                    return getService().getBeanIdentifier();
298            }
299    
300            /**
301            * Returns all the organizations which the user has permission to manage.
302            *
303            * @param actionId the permitted action
304            * @param max the maximum number of the organizations to be considered
305            * @return the organizations which the user has permission to manage
306            * @throws PortalException if a portal exception occurred
307            * @deprecated As of 6.2.0, replaced by {@link #getOrganizations(long, long,
308            int, int)}
309            */
310            @Deprecated
311            public static java.util.List<com.liferay.portal.model.Organization> getManageableOrganizations(
312                    java.lang.String actionId, int max)
313                    throws com.liferay.portal.kernel.exception.PortalException {
314                    return getService().getManageableOrganizations(actionId, max);
315            }
316    
317            /**
318            * Returns the organization with the primary key.
319            *
320            * @param organizationId the primary key of the organization
321            * @return the organization with the primary key
322            * @throws PortalException if an organization with the primary key could not
323            be found or if the user did not have permission to view the
324            organization
325            */
326            public static com.liferay.portal.model.Organization getOrganization(
327                    long organizationId)
328                    throws com.liferay.portal.kernel.exception.PortalException {
329                    return getService().getOrganization(organizationId);
330            }
331    
332            /**
333            * Returns the primary key of the organization with the name.
334            *
335            * @param companyId the primary key of the organization's company
336            * @param name the organization's name
337            * @return the primary key of the organization with the name, or
338            <code>0</code> if the organization could not be found
339            * @throws PortalException if the user did not have permission to view the
340            organization
341            */
342            public static long getOrganizationId(long companyId, java.lang.String name)
343                    throws com.liferay.portal.kernel.exception.PortalException {
344                    return getService().getOrganizationId(companyId, name);
345            }
346    
347            /**
348            * Returns all the organizations belonging to the parent organization.
349            *
350            * @param companyId the primary key of the organizations' company
351            * @param parentOrganizationId the primary key of the organizations' parent
352            organization
353            * @return the organizations belonging to the parent organization
354            */
355            public static java.util.List<com.liferay.portal.model.Organization> getOrganizations(
356                    long companyId, long parentOrganizationId) {
357                    return getService().getOrganizations(companyId, parentOrganizationId);
358            }
359    
360            /**
361            * Returns a range of all the organizations belonging to the parent
362            * organization.
363            *
364            * <p>
365            * Useful when paginating results. Returns a maximum of <code>end -
366            * start</code> instances. <code>start</code> and <code>end</code> are not
367            * primary keys, they are indexes in the result set. Thus, <code>0</code>
368            * refers to the first result in the set. Setting both <code>start</code>
369            * and <code>end</code> to {@link
370            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
371            * result set.
372            * </p>
373            *
374            * @param companyId the primary key of the organizations' company
375            * @param parentOrganizationId the primary key of the organizations' parent
376            organization
377            * @param start the lower bound of the range of organizations to return
378            * @param end the upper bound of the range of organizations to return (not
379            inclusive)
380            * @return the range of organizations belonging to the parent organization
381            */
382            public static java.util.List<com.liferay.portal.model.Organization> getOrganizations(
383                    long companyId, long parentOrganizationId, int start, int end) {
384                    return getService()
385                                       .getOrganizations(companyId, parentOrganizationId, start, end);
386            }
387    
388            /**
389            * Returns the number of organizations belonging to the parent organization.
390            *
391            * @param companyId the primary key of the organizations' company
392            * @param parentOrganizationId the primary key of the organizations' parent
393            organization
394            * @return the number of organizations belonging to the parent organization
395            */
396            public static int getOrganizationsCount(long companyId,
397                    long parentOrganizationId) {
398                    return getService()
399                                       .getOrganizationsCount(companyId, parentOrganizationId);
400            }
401    
402            /**
403            * Returns all the organizations associated with the user.
404            *
405            * @param userId the primary key of the user
406            * @return the organizations associated with the user
407            * @throws PortalException if a user with the primary key could not be found
408            */
409            public static java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
410                    long userId) throws com.liferay.portal.kernel.exception.PortalException {
411                    return getService().getUserOrganizations(userId);
412            }
413    
414            /**
415            * Sets the Spring bean ID for this bean.
416            *
417            * @param beanIdentifier the Spring bean ID for this bean
418            */
419            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
420                    getService().setBeanIdentifier(beanIdentifier);
421            }
422    
423            /**
424            * Sets the organizations in the group, removing and adding organizations to
425            * the group as necessary.
426            *
427            * @param groupId the primary key of the group
428            * @param organizationIds the primary keys of the organizations
429            * @throws PortalException if a group or organization with the primary key
430            could not be found or if the user did not have permission to
431            assign group members
432            */
433            public static void setGroupOrganizations(long groupId,
434                    long[] organizationIds)
435                    throws com.liferay.portal.kernel.exception.PortalException {
436                    getService().setGroupOrganizations(groupId, organizationIds);
437            }
438    
439            /**
440            * Removes the organizations from the group.
441            *
442            * @param groupId the primary key of the group
443            * @param organizationIds the primary keys of the organizations
444            * @throws PortalException if a group or organization with the primary key
445            could not be found or if the user did not have permission to
446            assign group members
447            */
448            public static void unsetGroupOrganizations(long groupId,
449                    long[] organizationIds)
450                    throws com.liferay.portal.kernel.exception.PortalException {
451                    getService().unsetGroupOrganizations(groupId, organizationIds);
452            }
453    
454            /**
455            * Removes the organizations from the password policy.
456            *
457            * @param passwordPolicyId the primary key of the password policy
458            * @param organizationIds the primary keys of the organizations
459            * @throws PortalException if a password policy or organization with the
460            primary key could not be found, or if the user did not have
461            permission to update the password policy
462            */
463            public static void unsetPasswordPolicyOrganizations(long passwordPolicyId,
464                    long[] organizationIds)
465                    throws com.liferay.portal.kernel.exception.PortalException {
466                    getService()
467                            .unsetPasswordPolicyOrganizations(passwordPolicyId, organizationIds);
468            }
469    
470            /**
471            * Updates the organization with additional parameters.
472            *
473            * @param organizationId the primary key of the organization
474            * @param parentOrganizationId the primary key of the organization's
475            parent organization
476            * @param name the organization's name
477            * @param type the organization's type
478            * @param recursable whether the permissions of the organization are to
479            be inherited by its suborganizations
480            * @param regionId the primary key of the organization's region
481            * @param countryId the primary key of the organization's country
482            * @param statusId the organization's workflow status
483            * @param comments the comments about the organization
484            * @param site whether the organization is to be associated with a main
485            site
486            * @param addresses the organization's addresses
487            * @param emailAddresses the organization's email addresses
488            * @param orgLabors the organization's hours of operation
489            * @param phones the organization's phone numbers
490            * @param websites the organization's websites
491            * @param serviceContext the service context to be applied (optionally
492            <code>null</code>). Can set asset category IDs and asset tag
493            names for the organization, and merge expando bridge
494            attributes for the organization.
495            * @return the organization
496            * @throws PortalException if an organization or parent organization
497            with the primary key could not be found, if the user did not
498            have permission to update the organization information, or if
499            the new information was invalid
500            * @deprecated As of 6.2.0, replaced by {@link #updateOrganization(long,
501            long, String, String, long, long, int, String, boolean,
502            java.util.List, java.util.List, java.util.List,
503            java.util.List, java.util.List, boolean, byte[],
504            ServiceContext)}
505            */
506            @Deprecated
507            public static com.liferay.portal.model.Organization updateOrganization(
508                    long organizationId, long parentOrganizationId, java.lang.String name,
509                    java.lang.String type, boolean recursable, long regionId,
510                    long countryId, int statusId, java.lang.String comments, boolean site,
511                    java.util.List<com.liferay.portal.model.Address> addresses,
512                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
513                    java.util.List<com.liferay.portal.model.OrgLabor> orgLabors,
514                    java.util.List<com.liferay.portal.model.Phone> phones,
515                    java.util.List<com.liferay.portal.model.Website> websites,
516                    com.liferay.portal.service.ServiceContext serviceContext)
517                    throws com.liferay.portal.kernel.exception.PortalException {
518                    return getService()
519                                       .updateOrganization(organizationId, parentOrganizationId,
520                            name, type, recursable, regionId, countryId, statusId, comments,
521                            site, addresses, emailAddresses, orgLabors, phones, websites,
522                            serviceContext);
523            }
524    
525            /**
526            * Updates the organization.
527            *
528            * @param organizationId the primary key of the organization
529            * @param parentOrganizationId the primary key of the organization's
530            parent organization
531            * @param name the organization's name
532            * @param type the organization's type
533            * @param recursable whether permissions of the organization are to be
534            inherited by its suborganizations
535            * @param regionId the primary key of the organization's region
536            * @param countryId the primary key of the organization's country
537            * @param statusId the organization's workflow status
538            * @param comments the comments about the organization
539            * @param site whether the organization is to be associated with a main
540            site
541            * @param serviceContext the service context to be applied (optionally
542            <code>null</code>). Can set asset category IDs and asset tag
543            names for the organization, and merge expando bridge
544            attributes for the organization.
545            * @return the organization
546            * @throws PortalException if an organization or parent organization
547            with the primary key could not be found, if the user did not
548            have permission to update the organization, or if the new
549            information was invalid
550            * @deprecated As of 6.2.0, replaced by {@link #updateOrganization(long,
551            long, String, String, long, long, int, String, boolean,
552            ServiceContext)}
553            */
554            @Deprecated
555            public static com.liferay.portal.model.Organization updateOrganization(
556                    long organizationId, long parentOrganizationId, java.lang.String name,
557                    java.lang.String type, boolean recursable, long regionId,
558                    long countryId, int statusId, java.lang.String comments, boolean site,
559                    com.liferay.portal.service.ServiceContext serviceContext)
560                    throws com.liferay.portal.kernel.exception.PortalException {
561                    return getService()
562                                       .updateOrganization(organizationId, parentOrganizationId,
563                            name, type, recursable, regionId, countryId, statusId, comments,
564                            site, serviceContext);
565            }
566    
567            /**
568            * Updates the organization with additional parameters.
569            *
570            * @param organizationId the primary key of the organization
571            * @param parentOrganizationId the primary key of the organization's parent
572            organization
573            * @param name the organization's name
574            * @param type the organization's type
575            * @param regionId the primary key of the organization's region
576            * @param countryId the primary key of the organization's country
577            * @param statusId the organization's workflow status
578            * @param comments the comments about the organization
579            * @param logo whether to update the ogranization's logo
580            * @param logoBytes the new logo image data
581            * @param site whether the organization is to be associated with a main
582            site
583            * @param addresses the organization's addresses
584            * @param emailAddresses the organization's email addresses
585            * @param orgLabors the organization's hours of operation
586            * @param phones the organization's phone numbers
587            * @param websites the organization's websites
588            * @param serviceContext the service context to be applied (optionally
589            <code>null</code>). Can set asset category IDs and asset tag
590            names for the organization, and merge expando bridge attributes
591            for the organization.
592            * @return the organization
593            * @throws PortalException if an organization or parent organization with
594            the primary key could not be found, if the user did not have
595            permission to update the organization information, or if the new
596            information was invalid
597            */
598            public static com.liferay.portal.model.Organization updateOrganization(
599                    long organizationId, long parentOrganizationId, java.lang.String name,
600                    java.lang.String type, long regionId, long countryId, int statusId,
601                    java.lang.String comments, boolean logo, byte[] logoBytes,
602                    boolean site,
603                    java.util.List<com.liferay.portal.model.Address> addresses,
604                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
605                    java.util.List<com.liferay.portal.model.OrgLabor> orgLabors,
606                    java.util.List<com.liferay.portal.model.Phone> phones,
607                    java.util.List<com.liferay.portal.model.Website> websites,
608                    com.liferay.portal.service.ServiceContext serviceContext)
609                    throws com.liferay.portal.kernel.exception.PortalException {
610                    return getService()
611                                       .updateOrganization(organizationId, parentOrganizationId,
612                            name, type, regionId, countryId, statusId, comments, logo,
613                            logoBytes, site, addresses, emailAddresses, orgLabors, phones,
614                            websites, serviceContext);
615            }
616    
617            /**
618            * Updates the organization with additional parameters.
619            *
620            * @param organizationId the primary key of the organization
621            * @param parentOrganizationId the primary key of the organization's
622            parent organization
623            * @param name the organization's name
624            * @param type the organization's type
625            * @param regionId the primary key of the organization's region
626            * @param countryId the primary key of the organization's country
627            * @param statusId the organization's workflow status
628            * @param comments the comments about the organization
629            * @param site whether the organization is to be associated with a main
630            site
631            * @param addresses the organization's addresses
632            * @param emailAddresses the organization's email addresses
633            * @param orgLabors the organization's hours of operation
634            * @param phones the organization's phone numbers
635            * @param websites the organization's websites
636            * @param serviceContext the service context to be applied (optionally
637            <code>null</code>). Can set asset category IDs and asset tag
638            names for the organization, and merge expando bridge
639            attributes for the organization.
640            * @return the organization
641            * @throws PortalException if an organization or parent organization
642            with the primary key could not be found, if the user did not
643            have permission to update the organization information, or if
644            the new information was invalid
645            * @deprecated As of 7.0.0, replaced by {@link #updateOrganization(long,
646            long, String, String, long, long, int, String, boolean,
647            java.util.List, java.util.List, java.util.List,
648            java.util.List, java.util.List, boolean, byte[],
649            ServiceContext)}
650            */
651            @Deprecated
652            public static com.liferay.portal.model.Organization updateOrganization(
653                    long organizationId, long parentOrganizationId, java.lang.String name,
654                    java.lang.String type, long regionId, long countryId, int statusId,
655                    java.lang.String comments, boolean site,
656                    java.util.List<com.liferay.portal.model.Address> addresses,
657                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
658                    java.util.List<com.liferay.portal.model.OrgLabor> orgLabors,
659                    java.util.List<com.liferay.portal.model.Phone> phones,
660                    java.util.List<com.liferay.portal.model.Website> websites,
661                    com.liferay.portal.service.ServiceContext serviceContext)
662                    throws com.liferay.portal.kernel.exception.PortalException {
663                    return getService()
664                                       .updateOrganization(organizationId, parentOrganizationId,
665                            name, type, regionId, countryId, statusId, comments, site,
666                            addresses, emailAddresses, orgLabors, phones, websites,
667                            serviceContext);
668            }
669    
670            /**
671            * Updates the organization.
672            *
673            * @param organizationId the primary key of the organization
674            * @param parentOrganizationId the primary key of the organization's parent
675            organization
676            * @param name the organization's name
677            * @param type the organization's type
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 serviceContext the service context to be applied (optionally
685            <code>null</code>). Can set asset category IDs and asset tag
686            names for the organization, and merge expando bridge attributes
687            for the organization.
688            * @return the organization
689            * @throws PortalException if an organization or parent organization with
690            the primary key could not be found, if the user did not have
691            permission to update the organization, or if the new information
692            was invalid
693            */
694            public static com.liferay.portal.model.Organization updateOrganization(
695                    long organizationId, long parentOrganizationId, java.lang.String name,
696                    java.lang.String type, long regionId, long countryId, int statusId,
697                    java.lang.String comments, boolean site,
698                    com.liferay.portal.service.ServiceContext serviceContext)
699                    throws com.liferay.portal.kernel.exception.PortalException {
700                    return getService()
701                                       .updateOrganization(organizationId, parentOrganizationId,
702                            name, type, regionId, countryId, statusId, comments, site,
703                            serviceContext);
704            }
705    
706            public static OrganizationService getService() {
707                    if (_service == null) {
708                            _service = (OrganizationService)PortalBeanLocatorUtil.locate(OrganizationService.class.getName());
709    
710                            ReferenceRegistry.registerReference(OrganizationServiceUtil.class,
711                                    "_service");
712                    }
713    
714                    return _service;
715            }
716    
717            /**
718             * @deprecated As of 6.2.0
719             */
720            @Deprecated
721            public void setService(OrganizationService service) {
722            }
723    
724            private static OrganizationService _service;
725    }