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, long 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, long 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, long 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, long 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 organization with the primary key.
293            *
294            * @param organizationId the primary key of the organization
295            * @return the organization with the primary key, or <code>null</code> if an
296            organization with the primary key could not be found or if the
297            user did not have permission to view the organization
298            * @throws PortalException if a portal exception occurred
299            */
300            public static com.liferay.portal.model.Organization fetchOrganization(
301                    long organizationId)
302                    throws com.liferay.portal.kernel.exception.PortalException {
303                    return getService().fetchOrganization(organizationId);
304            }
305    
306            /**
307            * Returns the Spring bean ID for this bean.
308            *
309            * @return the Spring bean ID for this bean
310            */
311            public static java.lang.String getBeanIdentifier() {
312                    return getService().getBeanIdentifier();
313            }
314    
315            /**
316            * Returns all the organizations which the user has permission to manage.
317            *
318            * @param actionId the permitted action
319            * @param max the maximum number of the organizations to be considered
320            * @return the organizations which the user has permission to manage
321            * @throws PortalException if a portal exception occurred
322            * @deprecated As of 6.2.0, replaced by {@link #getOrganizations(long, long,
323            int, int)}
324            */
325            @Deprecated
326            public static java.util.List<com.liferay.portal.model.Organization> getManageableOrganizations(
327                    java.lang.String actionId, int max)
328                    throws com.liferay.portal.kernel.exception.PortalException {
329                    return getService().getManageableOrganizations(actionId, max);
330            }
331    
332            /**
333            * Returns the organization with the primary key.
334            *
335            * @param organizationId the primary key of the organization
336            * @return the organization with the primary key
337            * @throws PortalException if an organization with the primary key could not
338            be found or if the user did not have permission to view the
339            organization
340            */
341            public static com.liferay.portal.model.Organization getOrganization(
342                    long organizationId)
343                    throws com.liferay.portal.kernel.exception.PortalException {
344                    return getService().getOrganization(organizationId);
345            }
346    
347            /**
348            * Returns the primary key of the organization with the name.
349            *
350            * @param companyId the primary key of the organization's company
351            * @param name the organization's name
352            * @return the primary key of the organization with the name, or
353            <code>0</code> if the organization could not be found
354            * @throws PortalException if the user did not have permission to view the
355            organization
356            */
357            public static long getOrganizationId(long companyId, java.lang.String name)
358                    throws com.liferay.portal.kernel.exception.PortalException {
359                    return getService().getOrganizationId(companyId, name);
360            }
361    
362            /**
363            * Returns all the organizations belonging to the parent organization.
364            *
365            * @param companyId the primary key of the organizations' company
366            * @param parentOrganizationId the primary key of the organizations' parent
367            organization
368            * @return the organizations belonging to the parent organization
369            */
370            public static java.util.List<com.liferay.portal.model.Organization> getOrganizations(
371                    long companyId, long parentOrganizationId) {
372                    return getService().getOrganizations(companyId, parentOrganizationId);
373            }
374    
375            /**
376            * Returns a range of all the organizations belonging to the parent
377            * organization.
378            *
379            * <p>
380            * Useful when paginating results. Returns a maximum of <code>end -
381            * start</code> instances. <code>start</code> and <code>end</code> are not
382            * primary keys, they are indexes in the result set. Thus, <code>0</code>
383            * refers to the first result in the set. Setting both <code>start</code>
384            * and <code>end</code> to {@link
385            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
386            * result set.
387            * </p>
388            *
389            * @param companyId the primary key of the organizations' company
390            * @param parentOrganizationId the primary key of the organizations' parent
391            organization
392            * @param start the lower bound of the range of organizations to return
393            * @param end the upper bound of the range of organizations to return (not
394            inclusive)
395            * @return the range of organizations belonging to the parent organization
396            */
397            public static java.util.List<com.liferay.portal.model.Organization> getOrganizations(
398                    long companyId, long parentOrganizationId, int start, int end) {
399                    return getService()
400                                       .getOrganizations(companyId, parentOrganizationId, start, end);
401            }
402    
403            /**
404            * Returns the number of organizations belonging to the parent organization.
405            *
406            * @param companyId the primary key of the organizations' company
407            * @param parentOrganizationId the primary key of the organizations' parent
408            organization
409            * @return the number of organizations belonging to the parent organization
410            */
411            public static int getOrganizationsCount(long companyId,
412                    long parentOrganizationId) {
413                    return getService()
414                                       .getOrganizationsCount(companyId, parentOrganizationId);
415            }
416    
417            /**
418            * Returns all the organizations with which the user is explicitly
419            * associated.
420            *
421            * <p>
422            * A user is considered to be <i>explicitly</i> associated with an
423            * organization if his account is individually created within the
424            * organization or if the user is later added as a member.
425            * </p>
426            *
427            * @param userId the primary key of the user
428            * @return the organizations with which the user is explicitly associated
429            * @throws PortalException if a user with the primary key could not be found
430            */
431            public static java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
432                    long userId) throws com.liferay.portal.kernel.exception.PortalException {
433                    return getService().getUserOrganizations(userId);
434            }
435    
436            /**
437            * Sets the Spring bean ID for this bean.
438            *
439            * @param beanIdentifier the Spring bean ID for this bean
440            */
441            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
442                    getService().setBeanIdentifier(beanIdentifier);
443            }
444    
445            /**
446            * Sets the organizations in the group, removing and adding organizations to
447            * the group as necessary.
448            *
449            * @param groupId the primary key of the group
450            * @param organizationIds the primary keys of the organizations
451            * @throws PortalException if a group or organization with the primary key
452            could not be found or if the user did not have permission to
453            assign group members
454            */
455            public static void setGroupOrganizations(long groupId,
456                    long[] organizationIds)
457                    throws com.liferay.portal.kernel.exception.PortalException {
458                    getService().setGroupOrganizations(groupId, organizationIds);
459            }
460    
461            /**
462            * Removes the organizations from the group.
463            *
464            * @param groupId the primary key of the group
465            * @param organizationIds the primary keys of the organizations
466            * @throws PortalException if a group or organization with the primary key
467            could not be found or if the user did not have permission to
468            assign group members
469            */
470            public static void unsetGroupOrganizations(long groupId,
471                    long[] organizationIds)
472                    throws com.liferay.portal.kernel.exception.PortalException {
473                    getService().unsetGroupOrganizations(groupId, organizationIds);
474            }
475    
476            /**
477            * Removes the organizations from the password policy.
478            *
479            * @param passwordPolicyId the primary key of the password policy
480            * @param organizationIds the primary keys of the organizations
481            * @throws PortalException if a password policy or organization with the
482            primary key could not be found, or if the user did not have
483            permission to update the password policy
484            */
485            public static void unsetPasswordPolicyOrganizations(long passwordPolicyId,
486                    long[] organizationIds)
487                    throws com.liferay.portal.kernel.exception.PortalException {
488                    getService()
489                            .unsetPasswordPolicyOrganizations(passwordPolicyId, organizationIds);
490            }
491    
492            /**
493            * Updates the organization with additional parameters.
494            *
495            * @param organizationId the primary key of the organization
496            * @param parentOrganizationId the primary key of the organization's
497            parent organization
498            * @param name the organization's name
499            * @param type the organization's type
500            * @param recursable whether the permissions of the organization are to
501            be inherited by its suborganizations
502            * @param regionId the primary key of the organization's region
503            * @param countryId the primary key of the organization's country
504            * @param statusId the organization's workflow status
505            * @param comments the comments about the organization
506            * @param site whether the organization is to be associated with a main
507            site
508            * @param addresses the organization's addresses
509            * @param emailAddresses the organization's email addresses
510            * @param orgLabors the organization's hours of operation
511            * @param phones the organization's phone numbers
512            * @param websites the organization's websites
513            * @param serviceContext the service context to be applied (optionally
514            <code>null</code>). Can set asset category IDs and asset tag
515            names for the organization, and merge expando bridge
516            attributes for the organization.
517            * @return the organization
518            * @throws PortalException if an organization or parent organization
519            with the primary key could not be found, if the user did not
520            have permission to update the organization information, or if
521            the new information was invalid
522            * @deprecated As of 6.2.0, replaced by {@link #updateOrganization(long,
523            long, String, String, long, long, int, String, boolean,
524            byte[], boolean, java.util.List, java.util.List,
525            java.util.List, java.util.List, java.util.List,
526            ServiceContext)}
527            */
528            @Deprecated
529            public static com.liferay.portal.model.Organization updateOrganization(
530                    long organizationId, long parentOrganizationId, java.lang.String name,
531                    java.lang.String type, boolean recursable, long regionId,
532                    long countryId, long statusId, java.lang.String comments, boolean site,
533                    java.util.List<com.liferay.portal.model.Address> addresses,
534                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
535                    java.util.List<com.liferay.portal.model.OrgLabor> orgLabors,
536                    java.util.List<com.liferay.portal.model.Phone> phones,
537                    java.util.List<com.liferay.portal.model.Website> websites,
538                    com.liferay.portal.service.ServiceContext serviceContext)
539                    throws com.liferay.portal.kernel.exception.PortalException {
540                    return getService()
541                                       .updateOrganization(organizationId, parentOrganizationId,
542                            name, type, recursable, regionId, countryId, statusId, comments,
543                            site, addresses, emailAddresses, orgLabors, phones, websites,
544                            serviceContext);
545            }
546    
547            /**
548            * Updates the organization.
549            *
550            * @param organizationId the primary key of the organization
551            * @param parentOrganizationId the primary key of the organization's
552            parent organization
553            * @param name the organization's name
554            * @param type the organization's type
555            * @param recursable whether permissions of the organization are to be
556            inherited by its suborganizations
557            * @param regionId the primary key of the organization's region
558            * @param countryId the primary key of the organization's country
559            * @param statusId the organization's workflow status
560            * @param comments the comments about the organization
561            * @param site whether the organization is to be associated with a main
562            site
563            * @param serviceContext the service context to be applied (optionally
564            <code>null</code>). Can set asset category IDs and asset tag
565            names for the organization, and merge expando bridge
566            attributes for the organization.
567            * @return the organization
568            * @throws PortalException if an organization or parent organization
569            with the primary key could not be found, if the user did not
570            have permission to update the organization, or if the new
571            information was invalid
572            * @deprecated As of 6.2.0, replaced by {@link #updateOrganization(long,
573            long, String, String, long, long, int, String, boolean,
574            ServiceContext)}
575            */
576            @Deprecated
577            public static com.liferay.portal.model.Organization updateOrganization(
578                    long organizationId, long parentOrganizationId, java.lang.String name,
579                    java.lang.String type, boolean recursable, long regionId,
580                    long countryId, long statusId, java.lang.String comments, boolean site,
581                    com.liferay.portal.service.ServiceContext serviceContext)
582                    throws com.liferay.portal.kernel.exception.PortalException {
583                    return getService()
584                                       .updateOrganization(organizationId, parentOrganizationId,
585                            name, type, recursable, regionId, countryId, statusId, comments,
586                            site, serviceContext);
587            }
588    
589            /**
590            * Updates the organization with additional parameters.
591            *
592            * @param organizationId the primary key of the organization
593            * @param parentOrganizationId the primary key of the organization's parent
594            organization
595            * @param name the organization's name
596            * @param type the organization's type
597            * @param regionId the primary key of the organization's region
598            * @param countryId the primary key of the organization's country
599            * @param statusId the organization's workflow status
600            * @param comments the comments about the organization
601            * @param logo whether to update the ogranization's logo
602            * @param logoBytes the new logo image data
603            * @param site whether the organization is to be associated with a main
604            site
605            * @param addresses the organization's addresses
606            * @param emailAddresses the organization's email addresses
607            * @param orgLabors the organization's hours of operation
608            * @param phones the organization's phone numbers
609            * @param websites the organization's websites
610            * @param serviceContext the service context to be applied (optionally
611            <code>null</code>). Can set asset category IDs and asset tag
612            names for the organization, and merge expando bridge attributes
613            for the organization.
614            * @return the organization
615            * @throws PortalException if an organization or parent organization with
616            the primary key could not be found, if the user did not have
617            permission to update the organization information, or if the new
618            information was invalid
619            */
620            public static com.liferay.portal.model.Organization updateOrganization(
621                    long organizationId, long parentOrganizationId, java.lang.String name,
622                    java.lang.String type, long regionId, long countryId, long statusId,
623                    java.lang.String comments, boolean logo, byte[] logoBytes,
624                    boolean site,
625                    java.util.List<com.liferay.portal.model.Address> addresses,
626                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
627                    java.util.List<com.liferay.portal.model.OrgLabor> orgLabors,
628                    java.util.List<com.liferay.portal.model.Phone> phones,
629                    java.util.List<com.liferay.portal.model.Website> websites,
630                    com.liferay.portal.service.ServiceContext serviceContext)
631                    throws com.liferay.portal.kernel.exception.PortalException {
632                    return getService()
633                                       .updateOrganization(organizationId, parentOrganizationId,
634                            name, type, regionId, countryId, statusId, comments, logo,
635                            logoBytes, site, addresses, emailAddresses, orgLabors, phones,
636                            websites, serviceContext);
637            }
638    
639            /**
640            * Updates the organization with additional parameters.
641            *
642            * @param organizationId the primary key of the organization
643            * @param parentOrganizationId the primary key of the organization's
644            parent organization
645            * @param name the organization's name
646            * @param type the organization's type
647            * @param regionId the primary key of the organization's region
648            * @param countryId the primary key of the organization's country
649            * @param statusId the organization's workflow status
650            * @param comments the comments about the organization
651            * @param site whether the organization is to be associated with a main
652            site
653            * @param addresses the organization's addresses
654            * @param emailAddresses the organization's email addresses
655            * @param orgLabors the organization's hours of operation
656            * @param phones the organization's phone numbers
657            * @param websites the organization's websites
658            * @param serviceContext the service context to be applied (optionally
659            <code>null</code>). Can set asset category IDs and asset tag
660            names for the organization, and merge expando bridge
661            attributes for the organization.
662            * @return the organization
663            * @throws PortalException if an organization or parent organization
664            with the primary key could not be found, if the user did not
665            have permission to update the organization information, or if
666            the new information was invalid
667            * @deprecated As of 7.0.0, replaced by {@link #updateOrganization(long,
668            long, String, String, long, long, int, String, boolean,
669            byte[], boolean, java.util.List, java.util.List,
670            java.util.List, java.util.List, java.util.List,
671            ServiceContext)}
672            */
673            @Deprecated
674            public static com.liferay.portal.model.Organization updateOrganization(
675                    long organizationId, long parentOrganizationId, java.lang.String name,
676                    java.lang.String type, long regionId, long countryId, long statusId,
677                    java.lang.String comments, boolean site,
678                    java.util.List<com.liferay.portal.model.Address> addresses,
679                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
680                    java.util.List<com.liferay.portal.model.OrgLabor> orgLabors,
681                    java.util.List<com.liferay.portal.model.Phone> phones,
682                    java.util.List<com.liferay.portal.model.Website> websites,
683                    com.liferay.portal.service.ServiceContext serviceContext)
684                    throws com.liferay.portal.kernel.exception.PortalException {
685                    return getService()
686                                       .updateOrganization(organizationId, parentOrganizationId,
687                            name, type, regionId, countryId, statusId, comments, site,
688                            addresses, emailAddresses, orgLabors, phones, websites,
689                            serviceContext);
690            }
691    
692            /**
693            * Updates the organization.
694            *
695            * @param organizationId the primary key of the organization
696            * @param parentOrganizationId the primary key of the organization's parent
697            organization
698            * @param name the organization's name
699            * @param type the organization's type
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 attributes
709            for the organization.
710            * @return the organization
711            * @throws PortalException if an organization or parent organization with
712            the primary key could not be found, if the user did not have
713            permission to update the organization, or if the new information
714            was invalid
715            */
716            public static com.liferay.portal.model.Organization updateOrganization(
717                    long organizationId, long parentOrganizationId, java.lang.String name,
718                    java.lang.String type, long regionId, long countryId, long statusId,
719                    java.lang.String comments, boolean site,
720                    com.liferay.portal.service.ServiceContext serviceContext)
721                    throws com.liferay.portal.kernel.exception.PortalException {
722                    return getService()
723                                       .updateOrganization(organizationId, parentOrganizationId,
724                            name, type, regionId, countryId, statusId, comments, site,
725                            serviceContext);
726            }
727    
728            public static OrganizationService getService() {
729                    if (_service == null) {
730                            _service = (OrganizationService)PortalBeanLocatorUtil.locate(OrganizationService.class.getName());
731    
732                            ReferenceRegistry.registerReference(OrganizationServiceUtil.class,
733                                    "_service");
734                    }
735    
736                    return _service;
737            }
738    
739            /**
740             * @deprecated As of 6.2.0
741             */
742            @Deprecated
743            public void setService(OrganizationService service) {
744            }
745    
746            private static OrganizationService _service;
747    }