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