001    /**
002     * Copyright (c) 2000-2013 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    /**
018     * <p>
019     * This class is a wrapper for {@link OrganizationService}.
020     * </p>
021     *
022     * @author    Brian Wing Shun Chan
023     * @see       OrganizationService
024     * @generated
025     */
026    public class OrganizationServiceWrapper implements OrganizationService,
027            ServiceWrapper<OrganizationService> {
028            public OrganizationServiceWrapper(OrganizationService organizationService) {
029                    _organizationService = organizationService;
030            }
031    
032            /**
033            * Returns the Spring bean ID for this bean.
034            *
035            * @return the Spring bean ID for this bean
036            */
037            public java.lang.String getBeanIdentifier() {
038                    return _organizationService.getBeanIdentifier();
039            }
040    
041            /**
042            * Sets the Spring bean ID for this bean.
043            *
044            * @param beanIdentifier the Spring bean ID for this bean
045            */
046            public void setBeanIdentifier(java.lang.String beanIdentifier) {
047                    _organizationService.setBeanIdentifier(beanIdentifier);
048            }
049    
050            /**
051            * Adds the organizations to the group.
052            *
053            * @param groupId the primary key of the group
054            * @param organizationIds the primary keys of the organizations
055            * @throws PortalException if a group or organization with the primary key
056            could not be found or if the user did not have permission to
057            assign group members
058            * @throws SystemException if a system exception occurred
059            */
060            public void addGroupOrganizations(long groupId, long[] organizationIds)
061                    throws com.liferay.portal.kernel.exception.PortalException,
062                            com.liferay.portal.kernel.exception.SystemException {
063                    _organizationService.addGroupOrganizations(groupId, organizationIds);
064            }
065    
066            /**
067            * Adds an organization with additional parameters.
068            *
069            * <p>
070            * This method handles the creation and bookkeeping of the organization
071            * including its resources, metadata, and internal data structures.
072            * </p>
073            *
074            * @param parentOrganizationId the primary key of the organization's parent
075            organization
076            * @param name the organization's name
077            * @param type the organization's type
078            * @param recursable whether the permissions of the organization are to be
079            inherited by its suborganizations
080            * @param regionId the primary key of the organization's region
081            * @param countryId the primary key of the organization's country
082            * @param statusId the organization's workflow status
083            * @param comments the comments about the organization
084            * @param site whether the organization is to be associated with a main
085            site
086            * @param addresses the organization's addresses
087            * @param emailAddresses the organization's email addresses
088            * @param orgLabors the organization's hours of operation
089            * @param phones the organization's phone numbers
090            * @param websites the organization's websites
091            * @param serviceContext the organization's service context (optionally
092            <code>null</code>). Can set asset category IDs, asset tag names,
093            and expando bridge attributes for the organization.
094            * @return the organization
095            * @throws PortalException if a parent organization with the primary key
096            could not be found, if the organization's information was
097            invalid, or if the user did not have permission to add the
098            organization
099            * @throws SystemException if a system exception occurred
100            */
101            public com.liferay.portal.model.Organization addOrganization(
102                    long parentOrganizationId, java.lang.String name,
103                    java.lang.String type, boolean recursable, long regionId,
104                    long countryId, int statusId, java.lang.String comments, boolean site,
105                    java.util.List<com.liferay.portal.model.Address> addresses,
106                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
107                    java.util.List<com.liferay.portal.model.OrgLabor> orgLabors,
108                    java.util.List<com.liferay.portal.model.Phone> phones,
109                    java.util.List<com.liferay.portal.model.Website> websites,
110                    com.liferay.portal.service.ServiceContext serviceContext)
111                    throws com.liferay.portal.kernel.exception.PortalException,
112                            com.liferay.portal.kernel.exception.SystemException {
113                    return _organizationService.addOrganization(parentOrganizationId, name,
114                            type, recursable, regionId, countryId, statusId, comments, site,
115                            addresses, emailAddresses, orgLabors, phones, websites,
116                            serviceContext);
117            }
118    
119            /**
120            * Adds an organization.
121            *
122            * <p>
123            * This method handles the creation and bookkeeping of the organization
124            * including its resources, metadata, and internal data structures.
125            * </p>
126            *
127            * @param parentOrganizationId the primary key of the organization's parent
128            organization
129            * @param name the organization's name
130            * @param type the organization's type
131            * @param recursable whether the permissions of the organization are to be
132            inherited by its suborganizations
133            * @param regionId the primary key of the organization's region
134            * @param countryId the primary key of the organization's country
135            * @param statusId the organization's workflow status
136            * @param comments the comments about the organization
137            * @param site whether the organization is to be associated with a main
138            site
139            * @param serviceContext the organization's service context (optionally
140            <code>null</code>). Can set asset category IDs, asset tag names,
141            and expando bridge attributes for the organization.
142            * @return the organization
143            * @throws PortalException if the parent organization with the primary key
144            could not be found, if the organization information was invalid,
145            or if the user did not have permission to add the organization
146            * @throws SystemException if a system exception occurred
147            */
148            public com.liferay.portal.model.Organization addOrganization(
149                    long parentOrganizationId, java.lang.String name,
150                    java.lang.String type, boolean recursable, long regionId,
151                    long countryId, int statusId, java.lang.String comments, boolean site,
152                    com.liferay.portal.service.ServiceContext serviceContext)
153                    throws com.liferay.portal.kernel.exception.PortalException,
154                            com.liferay.portal.kernel.exception.SystemException {
155                    return _organizationService.addOrganization(parentOrganizationId, name,
156                            type, recursable, regionId, countryId, statusId, comments, site,
157                            serviceContext);
158            }
159    
160            /**
161            * Assigns the password policy to the organizations, removing any other
162            * currently assigned password policies.
163            *
164            * @param passwordPolicyId the primary key of the password policy
165            * @param organizationIds the primary keys of the organizations
166            * @throws PortalException if the user did not have permission to update the
167            password policy
168            * @throws SystemException if a system exception occurred
169            */
170            public void addPasswordPolicyOrganizations(long passwordPolicyId,
171                    long[] organizationIds)
172                    throws com.liferay.portal.kernel.exception.PortalException,
173                            com.liferay.portal.kernel.exception.SystemException {
174                    _organizationService.addPasswordPolicyOrganizations(passwordPolicyId,
175                            organizationIds);
176            }
177    
178            /**
179            * Deletes the logo of the organization.
180            *
181            * @param organizationId the primary key of the organization
182            * @throws PortalException if an organization with the primary key could not
183            be found, if the organization's logo could not be found, or if
184            the user did not have permission to update the organization
185            * @throws SystemException if a system exception occurred
186            */
187            public void deleteLogo(long organizationId)
188                    throws com.liferay.portal.kernel.exception.PortalException,
189                            com.liferay.portal.kernel.exception.SystemException {
190                    _organizationService.deleteLogo(organizationId);
191            }
192    
193            /**
194            * Deletes the organization. The organization's associated resources and
195            * assets are also deleted.
196            *
197            * @param organizationId the primary key of the organization
198            * @throws PortalException if an organization with the primary key could not
199            be found, if the user did not have permission to delete the
200            organization, if the organization had a workflow in approved
201            status, or if the organization was a parent organization
202            * @throws SystemException if a system exception occurred
203            */
204            public void deleteOrganization(long organizationId)
205                    throws com.liferay.portal.kernel.exception.PortalException,
206                            com.liferay.portal.kernel.exception.SystemException {
207                    _organizationService.deleteOrganization(organizationId);
208            }
209    
210            /**
211            * Returns all the organizations which the user has permission to manage.
212            *
213            * @param actionId the permitted action
214            * @param max the maximum number of the organizations to be considered
215            * @return the organizations which the user has permission to manage
216            * @throws PortalException if a portal exception occurred
217            * @throws SystemException if a system exception occurred
218            * @deprecated Replaced by {@link #getOrganizations(long, long, int, int)}
219            */
220            public java.util.List<com.liferay.portal.model.Organization> getManageableOrganizations(
221                    java.lang.String actionId, int max)
222                    throws com.liferay.portal.kernel.exception.PortalException,
223                            com.liferay.portal.kernel.exception.SystemException {
224                    return _organizationService.getManageableOrganizations(actionId, max);
225            }
226    
227            /**
228            * Returns the organization with the primary key.
229            *
230            * @param organizationId the primary key of the organization
231            * @return the organization with the primary key
232            * @throws PortalException if an organization with the primary key could not
233            be found or if the user did not have permission to view the
234            organization
235            * @throws SystemException if a system exception occurred
236            */
237            public com.liferay.portal.model.Organization getOrganization(
238                    long organizationId)
239                    throws com.liferay.portal.kernel.exception.PortalException,
240                            com.liferay.portal.kernel.exception.SystemException {
241                    return _organizationService.getOrganization(organizationId);
242            }
243    
244            /**
245            * Returns the primary key of the organization with the name.
246            *
247            * @param companyId the primary key of the organization's company
248            * @param name the organization's name
249            * @return the primary key of the organization with the name, or
250            <code>0</code> if the organization could not be found
251            * @throws PortalException if the user did not have permission to view the
252            organization
253            * @throws SystemException if a system exception occurred
254            */
255            public long getOrganizationId(long companyId, java.lang.String name)
256                    throws com.liferay.portal.kernel.exception.PortalException,
257                            com.liferay.portal.kernel.exception.SystemException {
258                    return _organizationService.getOrganizationId(companyId, name);
259            }
260    
261            /**
262            * Returns all the organizations belonging to the parent organization.
263            *
264            * @param companyId the primary key of the organizations' company
265            * @param parentOrganizationId the primary key of the organizations' parent
266            organization
267            * @return the organizations belonging to the parent organization
268            * @throws SystemException if a system exception occurred
269            */
270            public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
271                    long companyId, long parentOrganizationId)
272                    throws com.liferay.portal.kernel.exception.SystemException {
273                    return _organizationService.getOrganizations(companyId,
274                            parentOrganizationId);
275            }
276    
277            /**
278            * Returns a range of all the organizations belonging to the parent
279            * organization.
280            *
281            * <p>
282            * Useful when paginating results. Returns a maximum of <code>end -
283            * start</code> instances. <code>start</code> and <code>end</code> are not
284            * primary keys, they are indexes in the result set. Thus, <code>0</code>
285            * refers to the first result in the set. Setting both <code>start</code>
286            * and <code>end</code> to {@link
287            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
288            * result set.
289            * </p>
290            *
291            * @param companyId the primary key of the organizations' company
292            * @param parentOrganizationId the primary key of the organizations' parent
293            organization
294            * @param start the lower bound of the range of organizations to return
295            * @param end the upper bound of the range of organizations to return (not
296            inclusive)
297            * @return the range of organizations belonging to the parent organization
298            * @throws SystemException if a system exception occurred
299            */
300            public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
301                    long companyId, long parentOrganizationId, int start, int end)
302                    throws com.liferay.portal.kernel.exception.SystemException {
303                    return _organizationService.getOrganizations(companyId,
304                            parentOrganizationId, start, end);
305            }
306    
307            /**
308            * Returns the number of organizations belonging to the parent organization.
309            *
310            * @param companyId the primary key of the organizations' company
311            * @param parentOrganizationId the primary key of the organizations' parent
312            organization
313            * @return the number of organizations belonging to the parent organization
314            * @throws SystemException if a system exception occurred
315            */
316            public int getOrganizationsCount(long companyId, long parentOrganizationId)
317                    throws com.liferay.portal.kernel.exception.SystemException {
318                    return _organizationService.getOrganizationsCount(companyId,
319                            parentOrganizationId);
320            }
321    
322            /**
323            * Returns all the organizations associated with the user.
324            *
325            * @param userId the primary key of the user
326            * @return the organizations associated with the user
327            * @throws PortalException if a user with the primary key could not be found
328            * @throws SystemException if a system exception occurred
329            */
330            public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
331                    long userId)
332                    throws com.liferay.portal.kernel.exception.PortalException,
333                            com.liferay.portal.kernel.exception.SystemException {
334                    return _organizationService.getUserOrganizations(userId);
335            }
336    
337            /**
338            * Sets the organizations in the group, removing and adding organizations to
339            * the group as necessary.
340            *
341            * @param groupId the primary key of the group
342            * @param organizationIds the primary keys of the organizations
343            * @throws PortalException if a group or organization with the primary key
344            could not be found or if the user did not have permission to
345            assign group members
346            * @throws SystemException if a system exception occurred
347            */
348            public void setGroupOrganizations(long groupId, long[] organizationIds)
349                    throws com.liferay.portal.kernel.exception.PortalException,
350                            com.liferay.portal.kernel.exception.SystemException {
351                    _organizationService.setGroupOrganizations(groupId, organizationIds);
352            }
353    
354            /**
355            * Removes the organizations from the group.
356            *
357            * @param groupId the primary key of the group
358            * @param organizationIds the primary keys of the organizations
359            * @throws PortalException if a group or organization with the primary key
360            could not be found or if the user did not have permission to
361            assign group members
362            * @throws SystemException if a system exception occurred
363            */
364            public void unsetGroupOrganizations(long groupId, long[] organizationIds)
365                    throws com.liferay.portal.kernel.exception.PortalException,
366                            com.liferay.portal.kernel.exception.SystemException {
367                    _organizationService.unsetGroupOrganizations(groupId, organizationIds);
368            }
369    
370            /**
371            * Removes the organizations from the password policy.
372            *
373            * @param passwordPolicyId the primary key of the password policy
374            * @param organizationIds the primary keys of the organizations
375            * @throws PortalException if a password policy or organization with the
376            primary key could not be found, or if the user did not have
377            permission to update the password policy
378            * @throws SystemException if a system exception occurred
379            */
380            public void unsetPasswordPolicyOrganizations(long passwordPolicyId,
381                    long[] organizationIds)
382                    throws com.liferay.portal.kernel.exception.PortalException,
383                            com.liferay.portal.kernel.exception.SystemException {
384                    _organizationService.unsetPasswordPolicyOrganizations(passwordPolicyId,
385                            organizationIds);
386            }
387    
388            /**
389            * Updates the organization with additional parameters.
390            *
391            * @param organizationId the primary key of the organization
392            * @param parentOrganizationId the primary key of the organization's parent
393            organization
394            * @param name the organization's name
395            * @param type the organization's type
396            * @param recursable whether the permissions of the organization are to be
397            inherited by its suborganizations
398            * @param regionId the primary key of the organization's region
399            * @param countryId the primary key of the organization's country
400            * @param statusId the organization's workflow status
401            * @param comments the comments about the organization
402            * @param site whether the organization is to be associated with a main
403            site
404            * @param addresses the organization's addresses
405            * @param emailAddresses the organization's email addresses
406            * @param orgLabors the organization's hours of operation
407            * @param phones the organization's phone numbers
408            * @param websites the organization's websites
409            * @param serviceContext the organization's service context (optionally
410            <code>null</code>). Can set asset category IDs and asset tag
411            names for the organization, and merge expando bridge attributes
412            for the organization.
413            * @return the organization
414            * @throws PortalException if an organization or parent organization with
415            the primary key could not be found, if the user did not have
416            permission to update the organization information, or if the new
417            information was invalid
418            * @throws SystemException if a system exception occurred
419            */
420            public com.liferay.portal.model.Organization updateOrganization(
421                    long organizationId, long parentOrganizationId, java.lang.String name,
422                    java.lang.String type, boolean recursable, long regionId,
423                    long countryId, int statusId, java.lang.String comments, boolean site,
424                    java.util.List<com.liferay.portal.model.Address> addresses,
425                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
426                    java.util.List<com.liferay.portal.model.OrgLabor> orgLabors,
427                    java.util.List<com.liferay.portal.model.Phone> phones,
428                    java.util.List<com.liferay.portal.model.Website> websites,
429                    com.liferay.portal.service.ServiceContext serviceContext)
430                    throws com.liferay.portal.kernel.exception.PortalException,
431                            com.liferay.portal.kernel.exception.SystemException {
432                    return _organizationService.updateOrganization(organizationId,
433                            parentOrganizationId, name, type, recursable, regionId, countryId,
434                            statusId, comments, site, addresses, emailAddresses, orgLabors,
435                            phones, websites, serviceContext);
436            }
437    
438            /**
439            * Updates the organization.
440            *
441            * @param organizationId the primary key of the organization
442            * @param parentOrganizationId the primary key of the organization's parent
443            organization
444            * @param name the organization's name
445            * @param type the organization's type
446            * @param recursable whether permissions of the organization are to be
447            inherited by its suborganizations
448            * @param regionId the primary key of the organization's region
449            * @param countryId the primary key of the organization's country
450            * @param statusId the organization's workflow status
451            * @param comments the comments about the organization
452            * @param site whether the organization is to be associated with a main
453            site
454            * @param serviceContext the organization's service context (optionally
455            <code>null</code>). Can set asset category IDs and asset tag
456            names for the organization, and merge expando bridge attributes
457            for the organization.
458            * @return the organization
459            * @throws PortalException if an organization or parent organization with
460            the primary key could not be found, if the user did not have
461            permission to update the organization, or if the new information
462            was invalid
463            * @throws SystemException if a system exception occurred
464            */
465            public com.liferay.portal.model.Organization updateOrganization(
466                    long organizationId, long parentOrganizationId, java.lang.String name,
467                    java.lang.String type, boolean recursable, long regionId,
468                    long countryId, int statusId, java.lang.String comments, boolean site,
469                    com.liferay.portal.service.ServiceContext serviceContext)
470                    throws com.liferay.portal.kernel.exception.PortalException,
471                            com.liferay.portal.kernel.exception.SystemException {
472                    return _organizationService.updateOrganization(organizationId,
473                            parentOrganizationId, name, type, recursable, regionId, countryId,
474                            statusId, comments, site, serviceContext);
475            }
476    
477            /**
478             * @deprecated Renamed to {@link #getWrappedService}
479             */
480            public OrganizationService getWrappedOrganizationService() {
481                    return _organizationService;
482            }
483    
484            /**
485             * @deprecated Renamed to {@link #setWrappedService}
486             */
487            public void setWrappedOrganizationService(
488                    OrganizationService organizationService) {
489                    _organizationService = organizationService;
490            }
491    
492            public OrganizationService getWrappedService() {
493                    return _organizationService;
494            }
495    
496            public void setWrappedService(OrganizationService organizationService) {
497                    _organizationService = organizationService;
498            }
499    
500            private OrganizationService _organizationService;
501    }