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