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