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.exception.PortalException;
020    import com.liferay.portal.kernel.exception.SystemException;
021    import com.liferay.portal.kernel.search.IndexableType;
022    import com.liferay.portal.kernel.transaction.Isolation;
023    import com.liferay.portal.kernel.transaction.Propagation;
024    import com.liferay.portal.kernel.transaction.Transactional;
025    import com.liferay.portal.model.SystemEventConstants;
026    
027    /**
028     * Provides the local service interface for Organization. Methods of this
029     * service will not have security checks based on the propagated JAAS
030     * credentials because this service can only be accessed from within the same
031     * VM.
032     *
033     * @author Brian Wing Shun Chan
034     * @see OrganizationLocalServiceUtil
035     * @see com.liferay.portal.service.base.OrganizationLocalServiceBaseImpl
036     * @see com.liferay.portal.service.impl.OrganizationLocalServiceImpl
037     * @generated
038     */
039    @ProviderType
040    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
041            PortalException.class, SystemException.class})
042    public interface OrganizationLocalService extends BaseLocalService,
043            PersistedModelLocalService {
044            /*
045             * NOTE FOR DEVELOPERS:
046             *
047             * Never modify or reference this interface directly. Always use {@link OrganizationLocalServiceUtil} to access the organization local service. Add custom service methods to {@link com.liferay.portal.service.impl.OrganizationLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
048             */
049            public void addGroupOrganization(long groupId,
050                    com.liferay.portal.model.Organization organization);
051    
052            public void addGroupOrganization(long groupId, long organizationId);
053    
054            public void addGroupOrganizations(long groupId,
055                    java.util.List<com.liferay.portal.model.Organization> Organizations);
056    
057            public void addGroupOrganizations(long groupId, long[] organizationIds);
058    
059            /**
060            * Adds the organization to the database. Also notifies the appropriate model listeners.
061            *
062            * @param organization the organization
063            * @return the organization that was added
064            */
065            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
066            public com.liferay.portal.model.Organization addOrganization(
067                    com.liferay.portal.model.Organization organization);
068    
069            /**
070            * Adds an organization.
071            *
072            * <p>
073            * This method handles the creation and bookkeeping of the organization
074            * including its resources, metadata, and internal data structures. It is
075            * not necessary to make a subsequent call to {@link
076            * #addOrganizationResources(long, Organization)}.
077            * </p>
078            *
079            * @param userId the primary key of the creator/owner of the organization
080            * @param parentOrganizationId the primary key of the organization's parent
081            organization
082            * @param name the organization's name
083            * @param site whether the organization is to be associated with a main
084            site
085            * @return the organization
086            */
087            public com.liferay.portal.model.Organization addOrganization(long userId,
088                    long parentOrganizationId, java.lang.String name, boolean site)
089                    throws PortalException;
090    
091            /**
092            * Adds an organization.
093            *
094            * <p>
095            * This method handles the creation and bookkeeping of the organization
096            * including its resources, metadata, and internal data structures. It is
097            * not necessary to make a subsequent call to {@link
098            * #addOrganizationResources(long, Organization)}.
099            * </p>
100            *
101            * @param userId the primary key of the creator/owner of the organization
102            * @param parentOrganizationId the primary key of the organization's parent
103            organization
104            * @param name the organization's name
105            * @param type the organization's type
106            * @param regionId the primary key of the organization's region
107            * @param countryId the primary key of the organization's country
108            * @param statusId the organization's workflow status
109            * @param comments the comments about the organization
110            * @param site whether the organization is to be associated with a main
111            site
112            * @param serviceContext the service context to be applied (optionally
113            <code>null</code>). Can set asset category IDs, asset tag names,
114            and expando bridge attributes for the organization.
115            * @return the organization
116            */
117            public com.liferay.portal.model.Organization addOrganization(long userId,
118                    long parentOrganizationId, java.lang.String name,
119                    java.lang.String type, long regionId, long countryId, long statusId,
120                    java.lang.String comments, boolean site,
121                    com.liferay.portal.service.ServiceContext serviceContext)
122                    throws PortalException;
123    
124            /**
125            * Adds a resource for each type of permission available on the
126            * organization.
127            *
128            * @param userId the primary key of the creator/owner of the organization
129            * @param organization the organization
130            */
131            public void addOrganizationResources(long userId,
132                    com.liferay.portal.model.Organization organization)
133                    throws PortalException;
134    
135            /**
136            * Assigns the password policy to the organizations, removing any other
137            * currently assigned password policies.
138            *
139            * @param passwordPolicyId the primary key of the password policy
140            * @param organizationIds the primary keys of the organizations
141            */
142            public void addPasswordPolicyOrganizations(long passwordPolicyId,
143                    long[] organizationIds);
144    
145            public void addUserOrganization(long userId,
146                    com.liferay.portal.model.Organization organization);
147    
148            public void addUserOrganization(long userId, long organizationId);
149    
150            public void addUserOrganizations(long userId,
151                    java.util.List<com.liferay.portal.model.Organization> Organizations);
152    
153            public void addUserOrganizations(long userId, long[] organizationIds);
154    
155            public void clearGroupOrganizations(long groupId);
156    
157            public void clearUserOrganizations(long userId);
158    
159            /**
160            * Creates a new organization with the primary key. Does not add the organization to the database.
161            *
162            * @param organizationId the primary key for the new organization
163            * @return the new organization
164            */
165            public com.liferay.portal.model.Organization createOrganization(
166                    long organizationId);
167    
168            public void deleteGroupOrganization(long groupId,
169                    com.liferay.portal.model.Organization organization);
170    
171            public void deleteGroupOrganization(long groupId, long organizationId);
172    
173            public void deleteGroupOrganizations(long groupId,
174                    java.util.List<com.liferay.portal.model.Organization> Organizations);
175    
176            public void deleteGroupOrganizations(long groupId, long[] organizationIds);
177    
178            /**
179            * Deletes the organization's logo.
180            *
181            * @param organizationId the primary key of the organization
182            */
183            public void deleteLogo(long organizationId) throws PortalException;
184    
185            /**
186            * Deletes the organization from the database. Also notifies the appropriate model listeners.
187            *
188            * @param organization the organization
189            * @return the organization that was removed
190            * @throws PortalException
191            */
192            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
193            @com.liferay.portal.kernel.systemevent.SystemEvent(type = SystemEventConstants.TYPE_DELETE)
194            public com.liferay.portal.model.Organization deleteOrganization(
195                    com.liferay.portal.model.Organization organization)
196                    throws PortalException;
197    
198            /**
199            * Deletes the organization with the primary key from the database. Also notifies the appropriate model listeners.
200            *
201            * @param organizationId the primary key of the organization
202            * @return the organization that was removed
203            * @throws PortalException if a organization with the primary key could not be found
204            */
205            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
206            public com.liferay.portal.model.Organization deleteOrganization(
207                    long organizationId) throws PortalException;
208    
209            /**
210            * @throws PortalException
211            */
212            @Override
213            public com.liferay.portal.model.PersistedModel deletePersistedModel(
214                    com.liferay.portal.model.PersistedModel persistedModel)
215                    throws PortalException;
216    
217            public void deleteUserOrganization(long userId,
218                    com.liferay.portal.model.Organization organization);
219    
220            public void deleteUserOrganization(long userId, long organizationId);
221    
222            public void deleteUserOrganizations(long userId,
223                    java.util.List<com.liferay.portal.model.Organization> Organizations);
224    
225            public void deleteUserOrganizations(long userId, long[] organizationIds);
226    
227            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
228    
229            /**
230            * Performs a dynamic query on the database and returns the matching rows.
231            *
232            * @param dynamicQuery the dynamic query
233            * @return the matching rows
234            */
235            public <T> java.util.List<T> dynamicQuery(
236                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
237    
238            /**
239            * Performs a dynamic query on the database and returns a range of the matching rows.
240            *
241            * <p>
242            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.OrganizationModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
243            * </p>
244            *
245            * @param dynamicQuery the dynamic query
246            * @param start the lower bound of the range of model instances
247            * @param end the upper bound of the range of model instances (not inclusive)
248            * @return the range of matching rows
249            */
250            public <T> java.util.List<T> dynamicQuery(
251                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
252                    int end);
253    
254            /**
255            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
256            *
257            * <p>
258            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.OrganizationModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
259            * </p>
260            *
261            * @param dynamicQuery the dynamic query
262            * @param start the lower bound of the range of model instances
263            * @param end the upper bound of the range of model instances (not inclusive)
264            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
265            * @return the ordered range of matching rows
266            */
267            public <T> java.util.List<T> dynamicQuery(
268                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
269                    int end,
270                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
271    
272            /**
273            * Returns the number of rows matching the dynamic query.
274            *
275            * @param dynamicQuery the dynamic query
276            * @return the number of rows matching the dynamic query
277            */
278            public long dynamicQueryCount(
279                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
280    
281            /**
282            * Returns the number of rows matching the dynamic query.
283            *
284            * @param dynamicQuery the dynamic query
285            * @param projection the projection to apply to the query
286            * @return the number of rows matching the dynamic query
287            */
288            public long dynamicQueryCount(
289                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
290                    com.liferay.portal.kernel.dao.orm.Projection projection);
291    
292            /**
293            * Returns the organization with the name.
294            *
295            * @param companyId the primary key of the organization's company
296            * @param name the organization's name
297            * @return the organization with the name, or <code>null</code> if no
298            organization could be found
299            */
300            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
301            public com.liferay.portal.model.Organization fetchOrganization(
302                    long companyId, java.lang.String name);
303    
304            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
305            public com.liferay.portal.model.Organization fetchOrganization(
306                    long organizationId);
307    
308            /**
309            * Returns the organization with the matching UUID and company.
310            *
311            * @param uuid the organization's UUID
312            * @param companyId the primary key of the company
313            * @return the matching organization, or <code>null</code> if a matching organization could not be found
314            */
315            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
316            public com.liferay.portal.model.Organization fetchOrganizationByUuidAndCompanyId(
317                    java.lang.String uuid, long companyId);
318    
319            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
320            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
321    
322            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
323            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
324                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext);
325    
326            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
327            public java.util.List<com.liferay.portal.model.Organization> getGroupOrganizations(
328                    long groupId);
329    
330            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
331            public java.util.List<com.liferay.portal.model.Organization> getGroupOrganizations(
332                    long groupId, int start, int end);
333    
334            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
335            public java.util.List<com.liferay.portal.model.Organization> getGroupOrganizations(
336                    long groupId, int start, int end,
337                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Organization> orderByComparator);
338    
339            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
340            public int getGroupOrganizationsCount(long groupId);
341    
342            /**
343            * Returns the groupIds of the groups associated with the organization.
344            *
345            * @param organizationId the organizationId of the organization
346            * @return long[] the groupIds of groups associated with the organization
347            */
348            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
349            public long[] getGroupPrimaryKeys(long organizationId);
350    
351            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
352            public java.util.List<com.liferay.portal.model.Organization> getGroupUserOrganizations(
353                    long groupId, long userId) throws PortalException;
354    
355            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
356            public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
357    
358            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
359            public java.util.List<com.liferay.portal.model.Organization> getNoAssetOrganizations();
360    
361            /**
362            * Returns the OSGi service identifier.
363            *
364            * @return the OSGi service identifier
365            */
366            public java.lang.String getOSGiServiceIdentifier();
367    
368            /**
369            * Returns the organization with the name.
370            *
371            * @param companyId the primary key of the organization's company
372            * @param name the organization's name
373            * @return the organization with the name
374            */
375            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
376            public com.liferay.portal.model.Organization getOrganization(
377                    long companyId, java.lang.String name) throws PortalException;
378    
379            /**
380            * Returns the organization with the primary key.
381            *
382            * @param organizationId the primary key of the organization
383            * @return the organization
384            * @throws PortalException if a organization with the primary key could not be found
385            */
386            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
387            public com.liferay.portal.model.Organization getOrganization(
388                    long organizationId) throws PortalException;
389    
390            /**
391            * Returns the organization with the matching UUID and company.
392            *
393            * @param uuid the organization's UUID
394            * @param companyId the primary key of the company
395            * @return the matching organization
396            * @throws PortalException if a matching organization could not be found
397            */
398            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
399            public com.liferay.portal.model.Organization getOrganizationByUuidAndCompanyId(
400                    java.lang.String uuid, long companyId) throws PortalException;
401    
402            /**
403            * Returns the primary key of the organization with the name.
404            *
405            * @param companyId the primary key of the organization's company
406            * @param name the organization's name
407            * @return the primary key of the organization with the name, or
408            <code>0</code> if the organization could not be found
409            */
410            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
411            public long getOrganizationId(long companyId, java.lang.String name);
412    
413            /**
414            * Returns all the organizations belonging to the parent organization.
415            *
416            * @param companyId the primary key of the organization's company
417            * @param parentOrganizationId the primary key of the organization's parent
418            organization
419            * @return the organizations belonging to the parent organization
420            */
421            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
422            public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
423                    long companyId, long parentOrganizationId);
424    
425            /**
426            * Returns a range of all the organizations belonging to the parent
427            * organization.
428            *
429            * <p>
430            * Useful when paginating results. Returns a maximum of <code>end -
431            * start</code> instances. <code>start</code> and <code>end</code> are not
432            * primary keys, they are indexes in the result set. Thus, <code>0</code>
433            * refers to the first result in the set. Setting both <code>start</code>
434            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
435            * result set.
436            * </p>
437            *
438            * @param companyId the primary key of the organization's company
439            * @param parentOrganizationId the primary key of the organization's parent
440            organization
441            * @param start the lower bound of the range of organizations to return
442            * @param end the upper bound of the range of organizations to return (not
443            inclusive)
444            * @return the range of organizations belonging to the parent organization
445            * @see com.liferay.portal.service.persistence.OrganizationPersistence#findByC_P(
446            long, long, int, int)
447            */
448            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
449            public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
450                    long companyId, long parentOrganizationId, int start, int end);
451    
452            /**
453            * Returns the organizations with the primary keys.
454            *
455            * @param organizationIds the primary keys of the organizations
456            * @return the organizations with the primary keys
457            */
458            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
459            public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
460                    long[] organizationIds) throws PortalException;
461    
462            /**
463            * Returns a range of all the organizations.
464            *
465            * <p>
466            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.OrganizationModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
467            * </p>
468            *
469            * @param start the lower bound of the range of organizations
470            * @param end the upper bound of the range of organizations (not inclusive)
471            * @return the range of organizations
472            */
473            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
474            public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
475                    int start, int end);
476    
477            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
478            public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
479                    long userId, int start, int end,
480                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Organization> obc)
481                    throws PortalException;
482    
483            /**
484            * Returns the number of organizations.
485            *
486            * @return the number of organizations
487            */
488            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
489            public int getOrganizationsCount();
490    
491            /**
492            * Returns the number of organizations belonging to the parent organization.
493            *
494            * @param companyId the primary key of the organization's company
495            * @param parentOrganizationId the primary key of the organization's parent
496            organization
497            * @return the number of organizations belonging to the parent organization
498            */
499            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
500            public int getOrganizationsCount(long companyId, long parentOrganizationId);
501    
502            /**
503            * Returns the parent organizations in order by closest ancestor. The list
504            * starts with the organization itself.
505            *
506            * @param organizationId the primary key of the organization
507            * @return the parent organizations in order by closest ancestor
508            */
509            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
510            public java.util.List<com.liferay.portal.model.Organization> getParentOrganizations(
511                    long organizationId) throws PortalException;
512    
513            @Override
514            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
515            public com.liferay.portal.model.PersistedModel getPersistedModel(
516                    java.io.Serializable primaryKeyObj) throws PortalException;
517    
518            /**
519            * Returns the suborganizations of the organization.
520            *
521            * @param companyId the primary key of the organization's company
522            * @param organizationId the primary key of the organization
523            * @return the suborganizations of the organization
524            */
525            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
526            public java.util.List<com.liferay.portal.model.Organization> getSuborganizations(
527                    long companyId, long organizationId);
528    
529            /**
530            * Returns the suborganizations of the organizations.
531            *
532            * @param organizations the organizations from which to get
533            suborganizations
534            * @return the suborganizations of the organizations
535            */
536            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
537            public java.util.List<com.liferay.portal.model.Organization> getSuborganizations(
538                    java.util.List<com.liferay.portal.model.Organization> organizations);
539    
540            /**
541            * Returns the count of suborganizations of the organization.
542            *
543            * @param companyId the primary key of the organization's company
544            * @param organizationId the primary key of the organization
545            * @return the count of suborganizations of the organization
546            */
547            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
548            public int getSuborganizationsCount(long companyId, long organizationId);
549    
550            /**
551            * Returns the intersection of <code>allOrganizations</code> and
552            * <code>availableOrganizations</code>.
553            *
554            * @param allOrganizations the organizations to check for availability
555            * @param availableOrganizations the available organizations
556            * @return the intersection of <code>allOrganizations</code> and
557            <code>availableOrganizations</code>
558            */
559            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
560            public java.util.List<com.liferay.portal.model.Organization> getSubsetOrganizations(
561                    java.util.List<com.liferay.portal.model.Organization> allOrganizations,
562                    java.util.List<com.liferay.portal.model.Organization> availableOrganizations);
563    
564            /**
565            * Returns all the IDs of organizations with which the user is explicitly
566            * associated, optionally including the IDs of organizations that the user
567            * administers or owns.
568            *
569            * <p>
570            * A user is considered to be <i>explicitly</i> associated with an
571            * organization if his account is individually created within the
572            * organization or if the user is later added to it.
573            * </p>
574            *
575            * @param userId the primary key of the user
576            * @param includeAdministrative whether to include the IDs of organizations
577            that the user administers or owns, even if he's not a member of
578            the organizations
579            * @return the IDs of organizations with which the user is explicitly
580            associated, optionally including the IDs of organizations that
581            the user administers or owns
582            */
583            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
584            public long[] getUserOrganizationIds(long userId,
585                    boolean includeAdministrative) throws PortalException;
586    
587            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
588            public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
589                    long userId);
590    
591            /**
592            * Returns all the organizations with which the user is explicitly
593            * associated, optionally including the organizations that the user
594            * administers or owns.
595            *
596            * <p>
597            * A user is considered to be <i>explicitly</i> associated with an
598            * organization if his account is individually created within the
599            * organization or if the user is later added as a member.
600            * </p>
601            *
602            * @param userId the primary key of the user
603            * @param includeAdministrative whether to include the IDs of organizations
604            that the user administers or owns, even if he's not a member of
605            the organizations
606            * @return the organizations with which the user is explicitly associated,
607            optionally including the organizations that the user administers
608            or owns
609            */
610            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
611            public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
612                    long userId, boolean includeAdministrative) throws PortalException;
613    
614            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
615            public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
616                    long userId, int start, int end);
617    
618            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
619            public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
620                    long userId, int start, int end,
621                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Organization> orderByComparator);
622    
623            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
624            public int getUserOrganizationsCount(long userId);
625    
626            /**
627            * Returns the userIds of the users associated with the organization.
628            *
629            * @param organizationId the organizationId of the organization
630            * @return long[] the userIds of users associated with the organization
631            */
632            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
633            public long[] getUserPrimaryKeys(long organizationId);
634    
635            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
636            public boolean hasGroupOrganization(long groupId, long organizationId);
637    
638            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
639            public boolean hasGroupOrganizations(long groupId);
640    
641            /**
642            * Returns <code>true</code> if the password policy has been assigned to the
643            * organization.
644            *
645            * @param passwordPolicyId the primary key of the password policy
646            * @param organizationId the primary key of the organization
647            * @return <code>true</code> if the password policy has been assigned to the
648            organization; <code>false</code> otherwise
649            */
650            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
651            public boolean hasPasswordPolicyOrganization(long passwordPolicyId,
652                    long organizationId);
653    
654            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
655            public boolean hasUserOrganization(long userId, long organizationId);
656    
657            /**
658            * Returns <code>true</code> if the user is a member of the organization,
659            * optionally focusing on suborganizations or the specified organization.
660            * This method is usually called to determine if the user has view access to
661            * a resource belonging to the organization.
662            *
663            * <ol>
664            * <li>
665            * If <code>inheritSuborganizations=<code>false</code></code>:
666            * the method checks whether the user belongs to the organization specified
667            * by <code>organizationId</code>. The parameter
668            * <code>includeSpecifiedOrganization</code> is ignored.
669            * </li>
670            * <li>
671            * The parameter <code>includeSpecifiedOrganization</code> is
672            * ignored unless <code>inheritSuborganizations</code> is also
673            * <code>true</code>.
674            * </li>
675            * <li>
676            * If <code>inheritSuborganizations=<code>true</code></code> and
677            * <code>includeSpecifiedOrganization=<code>false</code></code>: the method
678            * checks
679            * whether the user belongs to one of the child organizations of the one
680            * specified by <code>organizationId</code>.
681            * </li>
682            * <li>
683            * If <code>inheritSuborganizations=<code>true</code></code> and
684            * <code>includeSpecifiedOrganization=<code>true</code></code>: the method
685            * checks whether
686            * the user belongs to the organization specified by
687            * <code>organizationId</code> or any of
688            * its child organizations.
689            * </li>
690            * </ol>
691            *
692            * @param userId the primary key of the organization's user
693            * @param organizationId the primary key of the organization
694            * @param inheritSuborganizations if <code>true</code> suborganizations are
695            considered in the determination
696            * @param includeSpecifiedOrganization if <code>true</code> the
697            organization specified by <code>organizationId</code> is
698            considered in the determination
699            * @return <code>true</code> if the user has access to the organization;
700            <code>false</code> otherwise
701            * @see com.liferay.portal.service.persistence.OrganizationFinder
702            */
703            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
704            public boolean hasUserOrganization(long userId, long organizationId,
705                    boolean inheritSuborganizations, boolean includeSpecifiedOrganization)
706                    throws PortalException;
707    
708            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
709            public boolean hasUserOrganizations(long userId);
710    
711            /**
712            * Rebuilds the organization's tree.
713            *
714            * <p>
715            * Only call this method if the tree has become stale through operations
716            * other than normal CRUD. Under normal circumstances the tree is
717            * automatically rebuilt whenever necessary.
718            * </p>
719            *
720            * @param companyId the primary key of the organization's company
721            */
722            public void rebuildTree(long companyId) throws PortalException;
723    
724            /**
725            * Returns an ordered range of all the organizations that match the
726            * keywords, using the indexer. It is preferable to use this method instead
727            * of the non-indexed version whenever possible for performance reasons.
728            *
729            * <p>
730            * Useful when paginating results. Returns a maximum of <code>end -
731            * start</code> instances. <code>start</code> and <code>end</code> are not
732            * primary keys, they are indexes in the result set. Thus, <code>0</code>
733            * refers to the first result in the set. Setting both <code>start</code>
734            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
735            * result set.
736            * </p>
737            *
738            * @param companyId the primary key of the organization's company
739            * @param parentOrganizationId the primary key of the organization's parent
740            organization
741            * @param keywords the keywords (space separated), which may occur in the
742            organization's name, street, city, zipcode, type, region or
743            country (optionally <code>null</code>)
744            * @param params the finder parameters (optionally <code>null</code>). For
745            more information see {@link
746            com.liferay.portlet.usersadmin.util.OrganizationIndexer}
747            * @param start the lower bound of the range of organizations to return
748            * @param end the upper bound of the range of organizations to return (not
749            inclusive)
750            * @param sort the field and direction by which to sort (optionally
751            <code>null</code>)
752            * @return the matching organizations ordered by name
753            * @see com.liferay.portlet.usersadmin.util.OrganizationIndexer
754            */
755            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
756            public com.liferay.portal.kernel.search.Hits search(long companyId,
757                    long parentOrganizationId, java.lang.String keywords,
758                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
759                    int start, int end, com.liferay.portal.kernel.search.Sort sort);
760    
761            /**
762            * Returns a name ordered range of all the organizations that match the
763            * keywords, type, region, and country, without using the indexer. It is
764            * preferable to use the indexed version {@link #search(long, long, String,
765            * LinkedHashMap, int, int, Sort)} instead of this method wherever possible
766            * for performance reasons.
767            *
768            * <p>
769            * Useful when paginating results. Returns a maximum of <code>end -
770            * start</code> instances. <code>start</code> and <code>end</code> are not
771            * primary keys, they are indexes in the result set. Thus, <code>0</code>
772            * refers to the first result in the set. Setting both <code>start</code>
773            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
774            * result set.
775            * </p>
776            *
777            * @param companyId the primary key of the organization's company
778            * @param parentOrganizationId the primary key of the organization's parent
779            organization
780            * @param keywords the keywords (space separated), which may occur in the
781            organization's name, street, city, or zipcode (optionally
782            <code>null</code>)
783            * @param type the organization's type (optionally <code>null</code>)
784            * @param regionId the primary key of the organization's region (optionally
785            <code>null</code>)
786            * @param countryId the primary key of the organization's country
787            (optionally <code>null</code>)
788            * @param params the finder params. For more information see {@link
789            com.liferay.portal.service.persistence.OrganizationFinder}
790            * @param start the lower bound of the range of organizations to return
791            * @param end the upper bound of the range of organizations to return (not
792            inclusive)
793            * @return the matching organizations ordered by name
794            * @see com.liferay.portal.service.persistence.OrganizationFinder
795            */
796            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
797            public java.util.List<com.liferay.portal.model.Organization> search(
798                    long companyId, long parentOrganizationId, java.lang.String keywords,
799                    java.lang.String type, java.lang.Long regionId,
800                    java.lang.Long countryId,
801                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
802                    int start, int end);
803    
804            /**
805            * Returns an ordered range of all the organizations that match the
806            * keywords, type, region, and country, without using the indexer. It is
807            * preferable to use the indexed version {@link #search(long, long, String,
808            * String, String, String, String, String, String, LinkedHashMap, boolean,
809            * int, int, Sort)} instead of this method wherever possible for performance
810            * reasons.
811            *
812            * <p>
813            * Useful when paginating results. Returns a maximum of <code>end -
814            * start</code> instances. <code>start</code> and <code>end</code> are not
815            * primary keys, they are indexes in the result set. Thus, <code>0</code>
816            * refers to the first result in the set. Setting both <code>start</code>
817            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
818            * result set.
819            * </p>
820            *
821            * @param companyId the primary key of the organization's company
822            * @param parentOrganizationId the primary key of the organization's parent
823            organization
824            * @param keywords the keywords (space separated), which may occur in the
825            organization's name, street, city, or zipcode (optionally
826            <code>null</code>)
827            * @param type the organization's type (optionally <code>null</code>)
828            * @param regionId the primary key of the organization's region (optionally
829            <code>null</code>)
830            * @param countryId the primary key of the organization's country
831            (optionally <code>null</code>)
832            * @param params the finder params. For more information see {@link
833            com.liferay.portal.service.persistence.OrganizationFinder}
834            * @param start the lower bound of the range of organizations to return
835            * @param end the upper bound of the range of organizations to return (not
836            inclusive)
837            * @param obc the comparator to order the organizations (optionally
838            <code>null</code>)
839            * @return the matching organizations ordered by comparator <code>obc</code>
840            * @see com.liferay.portal.service.persistence.OrganizationFinder
841            */
842            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
843            public java.util.List<com.liferay.portal.model.Organization> search(
844                    long companyId, long parentOrganizationId, java.lang.String keywords,
845                    java.lang.String type, java.lang.Long regionId,
846                    java.lang.Long countryId,
847                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
848                    int start, int end,
849                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Organization> obc);
850    
851            /**
852            * Returns an ordered range of all the organizations whose name, type, or
853            * location fields match the keywords specified for them, using the indexer.
854            * It is preferable to use this method instead of the non-indexed version
855            * whenever possible for performance reasons.
856            *
857            * <p>
858            * Useful when paginating results. Returns a maximum of <code>end -
859            * start</code> instances. <code>start</code> and <code>end</code> are not
860            * primary keys, they are indexes in the result set. Thus, <code>0</code>
861            * refers to the first result in the set. Setting both <code>start</code>
862            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
863            * result set.
864            * </p>
865            *
866            * @param companyId the primary key of the organization's company
867            * @param parentOrganizationId the primary key of the organization's parent
868            organization
869            * @param name the name keywords (space separated, optionally
870            <code>null</code>)
871            * @param type the type keywords (optionally <code>null</code>)
872            * @param street the street keywords (optionally <code>null</code>)
873            * @param city the city keywords (optionally <code>null</code>)
874            * @param zip the zipcode keywords (optionally <code>null</code>)
875            * @param region the region keywords (optionally <code>null</code>)
876            * @param country the country keywords (optionally <code>null</code>)
877            * @param params the finder parameters (optionally <code>null</code>). For
878            more information see {@link
879            com.liferay.portlet.usersadmin.util.OrganizationIndexer}.
880            * @param andSearch whether every field must match its keywords or just one
881            field
882            * @param start the lower bound of the range of organizations to return
883            * @param end the upper bound of the range of organizations to return (not
884            inclusive)
885            * @param sort the field and direction by which to sort (optionally
886            <code>null</code>)
887            * @return the matching organizations ordered by <code>sort</code>
888            * @see com.liferay.portlet.usersadmin.util.OrganizationIndexer
889            */
890            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
891            public com.liferay.portal.kernel.search.Hits search(long companyId,
892                    long parentOrganizationId, java.lang.String name,
893                    java.lang.String type, java.lang.String street, java.lang.String city,
894                    java.lang.String zip, java.lang.String region,
895                    java.lang.String country,
896                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
897                    boolean andSearch, int start, int end,
898                    com.liferay.portal.kernel.search.Sort sort);
899    
900            /**
901            * Returns a name ordered range of all the organizations with the type,
902            * region, and country, and whose name, street, city, and zipcode match the
903            * keywords specified for them, without using the indexer. It is preferable
904            * to use the indexed version {@link #search(long, long, String, String,
905            * String, String, String, String, String, LinkedHashMap, boolean, int, int,
906            * Sort)} instead of this method wherever possible for performance reasons.
907            *
908            * <p>
909            * Useful when paginating results. Returns a maximum of <code>end -
910            * start</code> instances. <code>start</code> and <code>end</code> are not
911            * primary keys, they are indexes in the result set. Thus, <code>0</code>
912            * refers to the first result in the set. Setting both <code>start</code>
913            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
914            * result set.
915            * </p>
916            *
917            * @param companyId the primary key of the organization's company
918            * @param parentOrganizationId the primary key of the organization's parent
919            * @param name the name keywords (space separated, optionally
920            <code>null</code>)
921            * @param type the organization's type (optionally <code>null</code>)
922            * @param street the street keywords (optionally <code>null</code>)
923            * @param city the city keywords (optionally <code>null</code>)
924            * @param zip the zipcode keywords (optionally <code>null</code>)
925            * @param regionId the primary key of the organization's region (optionally
926            <code>null</code>)
927            * @param countryId the primary key of the organization's country
928            (optionally <code>null</code>)
929            * @param params the finder parameters (optionally <code>null</code>). For
930            more information see {@link
931            com.liferay.portal.service.persistence.OrganizationFinder}
932            * @param andOperator whether every field must match its keywords, or just
933            one field. For example, &quot;organizations with the name
934            'Employees' and city 'Chicago'&quot; vs &quot;organizations with
935            the name 'Employees' or the city 'Chicago'&quot;.
936            * @param start the lower bound of the range of organizations to return
937            * @param end the upper bound of the range of organizations to return (not
938            inclusive)
939            * @return the matching organizations ordered by name
940            * @see com.liferay.portal.service.persistence.OrganizationFinder
941            */
942            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
943            public java.util.List<com.liferay.portal.model.Organization> search(
944                    long companyId, long parentOrganizationId, java.lang.String name,
945                    java.lang.String type, java.lang.String street, java.lang.String city,
946                    java.lang.String zip, java.lang.Long regionId,
947                    java.lang.Long countryId,
948                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
949                    boolean andOperator, int start, int end);
950    
951            /**
952            * Returns an ordered range of all the organizations with the type, region,
953            * and country, and whose name, street, city, and zipcode match the keywords
954            * specified for them, without using the indexer. It is preferable to use
955            * the indexed version {@link #search(long, long, String, String, String,
956            * String, String, String, String, LinkedHashMap, boolean, int, int, Sort)}
957            * instead of this method wherever possible for performance reasons.
958            *
959            * <p>
960            * Useful when paginating results. Returns a maximum of <code>end -
961            * start</code> instances. <code>start</code> and <code>end</code> are not
962            * primary keys, they are indexes in the result set. Thus, <code>0</code>
963            * refers to the first result in the set. Setting both <code>start</code>
964            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
965            * result set.
966            * </p>
967            *
968            * @param companyId the primary key of the organization's company
969            * @param parentOrganizationId the primary key of the organization's parent
970            organization
971            * @param name the name keywords (space separated, optionally
972            <code>null</code>)
973            * @param type the organization's type (optionally <code>null</code>)
974            * @param street the street keywords (optionally <code>null</code>)
975            * @param city the city keywords (optionally <code>null</code>)
976            * @param zip the zipcode keywords (optionally <code>null</code>)
977            * @param regionId the primary key of the organization's region (optionally
978            <code>null</code>)
979            * @param countryId the primary key of the organization's country
980            (optionally <code>null</code>)
981            * @param params the finder parameters (optionally <code>null</code>). For
982            more information see {@link
983            com.liferay.portal.service.persistence.OrganizationFinder}
984            * @param andOperator whether every field must match its keywords, or just
985            one field. For example, &quot;organizations with the name
986            'Employees' and city 'Chicago'&quot; vs &quot;organizations with
987            the name 'Employees' or the city 'Chicago'&quot;.
988            * @param start the lower bound of the range of organizations to return
989            * @param end the upper bound of the range of organizations to return (not
990            inclusive)
991            * @param obc the comparator to order the organizations (optionally
992            <code>null</code>)
993            * @return the matching organizations ordered by comparator <code>obc</code>
994            * @see com.liferay.portal.service.persistence.OrganizationFinder
995            */
996            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
997            public java.util.List<com.liferay.portal.model.Organization> search(
998                    long companyId, long parentOrganizationId, java.lang.String name,
999                    java.lang.String type, java.lang.String street, java.lang.String city,
1000                    java.lang.String zip, java.lang.Long regionId,
1001                    java.lang.Long countryId,
1002                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1003                    boolean andOperator, int start, int end,
1004                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Organization> obc);
1005    
1006            /**
1007            * Returns the number of organizations that match the keywords, type,
1008            * region, and country.
1009            *
1010            * @param companyId the primary key of the organization's company
1011            * @param parentOrganizationId the primary key of the organization's parent
1012            organization
1013            * @param keywords the keywords (space separated), which may occur in the
1014            organization's name, street, city, or zipcode (optionally
1015            <code>null</code>)
1016            * @param type the organization's type (optionally <code>null</code>)
1017            * @param regionId the primary key of the organization's region (optionally
1018            <code>null</code>)
1019            * @param countryId the primary key of the organization's country
1020            (optionally <code>null</code>)
1021            * @param params the finder parameters (optionally <code>null</code>). For
1022            more information see {@link
1023            com.liferay.portal.service.persistence.OrganizationFinder}
1024            * @return the number of matching organizations
1025            * @see com.liferay.portal.service.persistence.OrganizationFinder
1026            */
1027            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1028            public int searchCount(long companyId, long parentOrganizationId,
1029                    java.lang.String keywords, java.lang.String type,
1030                    java.lang.Long regionId, java.lang.Long countryId,
1031                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params);
1032    
1033            /**
1034            * Returns the number of organizations with the type, region, and country,
1035            * and whose name, street, city, and zipcode match the keywords specified
1036            * for them.
1037            *
1038            * @param companyId the primary key of the organization's company
1039            * @param parentOrganizationId the primary key of the organization's parent
1040            organization
1041            * @param name the name keywords (space separated, optionally
1042            <code>null</code>)
1043            * @param type the organization's type (optionally <code>null</code>)
1044            * @param street the street keywords (optionally <code>null</code>)
1045            * @param city the city keywords (optionally <code>null</code>)
1046            * @param zip the zipcode keywords (optionally <code>null</code>)
1047            * @param regionId the primary key of the organization's region (optionally
1048            <code>null</code>)
1049            * @param countryId the primary key of the organization's country
1050            (optionally <code>null</code>)
1051            * @param params the finder parameters (optionally <code>null</code>). For
1052            more information see {@link
1053            com.liferay.portal.service.persistence.OrganizationFinder}
1054            * @param andOperator whether every field must match its keywords, or just
1055            one field. For example, &quot;organizations with the name
1056            'Employees' and city 'Chicago'&quot; vs &quot;organizations with
1057            the name 'Employees' or the city 'Chicago'&quot;.
1058            * @return the number of matching organizations
1059            * @see com.liferay.portal.service.persistence.OrganizationFinder
1060            */
1061            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1062            public int searchCount(long companyId, long parentOrganizationId,
1063                    java.lang.String name, java.lang.String type, java.lang.String street,
1064                    java.lang.String city, java.lang.String zip, java.lang.Long regionId,
1065                    java.lang.Long countryId,
1066                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1067                    boolean andOperator);
1068    
1069            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1070            public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.Organization> searchOrganizations(
1071                    long companyId, long parentOrganizationId, java.lang.String keywords,
1072                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1073                    int start, int end, com.liferay.portal.kernel.search.Sort sort)
1074                    throws PortalException;
1075    
1076            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1077            public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.Organization> searchOrganizations(
1078                    long companyId, long parentOrganizationId, java.lang.String name,
1079                    java.lang.String type, java.lang.String street, java.lang.String city,
1080                    java.lang.String zip, java.lang.String region,
1081                    java.lang.String country,
1082                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1083                    boolean andSearch, int start, int end,
1084                    com.liferay.portal.kernel.search.Sort sort) throws PortalException;
1085    
1086            public void setGroupOrganizations(long groupId, long[] organizationIds);
1087    
1088            public void setUserOrganizations(long userId, long[] organizationIds);
1089    
1090            /**
1091            * Removes the organizations from the group.
1092            *
1093            * @param groupId the primary key of the group
1094            * @param organizationIds the primary keys of the organizations
1095            */
1096            public void unsetGroupOrganizations(long groupId, long[] organizationIds);
1097    
1098            /**
1099            * Removes the organizations from the password policy.
1100            *
1101            * @param passwordPolicyId the primary key of the password policy
1102            * @param organizationIds the primary keys of the organizations
1103            */
1104            public void unsetPasswordPolicyOrganizations(long passwordPolicyId,
1105                    long[] organizationIds);
1106    
1107            /**
1108            * Updates the organization's asset with the new asset categories and tag
1109            * names, removing and adding asset categories and tag names as necessary.
1110            *
1111            * @param userId the primary key of the user
1112            * @param organization the organization
1113            * @param assetCategoryIds the primary keys of the asset categories
1114            * @param assetTagNames the asset tag names
1115            */
1116            public void updateAsset(long userId,
1117                    com.liferay.portal.model.Organization organization,
1118                    long[] assetCategoryIds, java.lang.String[] assetTagNames)
1119                    throws PortalException;
1120    
1121            /**
1122            * Updates the organization.
1123            *
1124            * @param companyId the primary key of the organization's company
1125            * @param organizationId the primary key of the organization
1126            * @param parentOrganizationId the primary key of organization's parent
1127            organization
1128            * @param name the organization's name
1129            * @param type the organization's type
1130            * @param regionId the primary key of the organization's region
1131            * @param countryId the primary key of the organization's country
1132            * @param statusId the organization's workflow status
1133            * @param comments the comments about the organization
1134            * @param logo whether to update the ogranization's logo
1135            * @param logoBytes the new logo image data
1136            * @param site whether the organization is to be associated with a main
1137            site
1138            * @param serviceContext the service context to be applied (optionally
1139            <code>null</code>). Can set asset category IDs and asset tag
1140            names for the organization, and merge expando bridge attributes
1141            for the organization.
1142            * @return the organization
1143            */
1144            public com.liferay.portal.model.Organization updateOrganization(
1145                    long companyId, long organizationId, long parentOrganizationId,
1146                    java.lang.String name, java.lang.String type, long regionId,
1147                    long countryId, long statusId, java.lang.String comments, boolean logo,
1148                    byte[] logoBytes, boolean site,
1149                    com.liferay.portal.service.ServiceContext serviceContext)
1150                    throws PortalException;
1151    
1152            /**
1153            * Updates the organization.
1154            *
1155            * @param companyId the primary key of the organization's company
1156            * @param organizationId the primary key of the organization
1157            * @param parentOrganizationId the primary key of organization's parent
1158            organization
1159            * @param name the organization's name
1160            * @param type the organization's type
1161            * @param regionId the primary key of the organization's region
1162            * @param countryId the primary key of the organization's country
1163            * @param statusId the organization's workflow status
1164            * @param comments the comments about the organization
1165            * @param site whether the organization is to be associated with a main
1166            site
1167            * @param serviceContext the service context to be applied (optionally
1168            <code>null</code>). Can set asset category IDs and asset tag
1169            names for the organization, and merge expando bridge
1170            attributes for the organization.
1171            * @return the organization
1172            * @deprecated As of 7.0.0, replaced by {@link #updateOrganization(long,
1173            long, long, String, String, long, long, long, String, boolean,
1174            byte[], boolean, ServiceContext)}
1175            */
1176            @java.lang.Deprecated
1177            public com.liferay.portal.model.Organization updateOrganization(
1178                    long companyId, long organizationId, long parentOrganizationId,
1179                    java.lang.String name, java.lang.String type, long regionId,
1180                    long countryId, long statusId, java.lang.String comments, boolean site,
1181                    com.liferay.portal.service.ServiceContext serviceContext)
1182                    throws PortalException;
1183    
1184            /**
1185            * Updates the organization in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
1186            *
1187            * @param organization the organization
1188            * @return the organization that was updated
1189            */
1190            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
1191            public com.liferay.portal.model.Organization updateOrganization(
1192                    com.liferay.portal.model.Organization organization);
1193    }