001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * The utility for the organization remote service. This utility wraps {@link com.liferay.portal.service.impl.OrganizationServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
021     *
022     * <p>
023     * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.OrganizationServiceImpl} and rerun ServiceBuilder to regenerate this class.
024     * </p>
025     *
026     * <p>
027     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see OrganizationService
032     * @see com.liferay.portal.service.base.OrganizationServiceBaseImpl
033     * @see com.liferay.portal.service.impl.OrganizationServiceImpl
034     * @generated
035     */
036    public class OrganizationServiceUtil {
037            public static void addGroupOrganizations(long groupId,
038                    long[] organizationIds)
039                    throws com.liferay.portal.kernel.exception.PortalException,
040                            com.liferay.portal.kernel.exception.SystemException {
041                    getService().addGroupOrganizations(groupId, organizationIds);
042            }
043    
044            public static void addPasswordPolicyOrganizations(long passwordPolicyId,
045                    long[] organizationIds)
046                    throws com.liferay.portal.kernel.exception.PortalException,
047                            com.liferay.portal.kernel.exception.SystemException {
048                    getService()
049                            .addPasswordPolicyOrganizations(passwordPolicyId, organizationIds);
050            }
051    
052            public static com.liferay.portal.model.Organization addOrganization(
053                    long parentOrganizationId, java.lang.String name,
054                    java.lang.String type, boolean recursable, long regionId,
055                    long countryId, int statusId, java.lang.String comments,
056                    com.liferay.portal.service.ServiceContext serviceContext)
057                    throws com.liferay.portal.kernel.exception.PortalException,
058                            com.liferay.portal.kernel.exception.SystemException {
059                    return getService()
060                                       .addOrganization(parentOrganizationId, name, type,
061                            recursable, regionId, countryId, statusId, comments, serviceContext);
062            }
063    
064            public static com.liferay.portal.model.Organization addOrganization(
065                    long parentOrganizationId, java.lang.String name,
066                    java.lang.String type, boolean recursable, long regionId,
067                    long countryId, int statusId, java.lang.String comments,
068                    java.util.List<com.liferay.portal.model.Address> addresses,
069                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
070                    java.util.List<com.liferay.portal.model.OrgLabor> orgLabors,
071                    java.util.List<com.liferay.portal.model.Phone> phones,
072                    java.util.List<com.liferay.portal.model.Website> websites,
073                    com.liferay.portal.service.ServiceContext serviceContext)
074                    throws com.liferay.portal.kernel.exception.PortalException,
075                            com.liferay.portal.kernel.exception.SystemException {
076                    return getService()
077                                       .addOrganization(parentOrganizationId, name, type,
078                            recursable, regionId, countryId, statusId, comments, addresses,
079                            emailAddresses, orgLabors, phones, websites, serviceContext);
080            }
081    
082            public static void deleteLogo(long organizationId)
083                    throws com.liferay.portal.kernel.exception.PortalException,
084                            com.liferay.portal.kernel.exception.SystemException {
085                    getService().deleteLogo(organizationId);
086            }
087    
088            public static void deleteOrganization(long organizationId)
089                    throws com.liferay.portal.kernel.exception.PortalException,
090                            com.liferay.portal.kernel.exception.SystemException {
091                    getService().deleteOrganization(organizationId);
092            }
093    
094            public static java.util.List<com.liferay.portal.model.Organization> getManageableOrganizations(
095                    java.lang.String actionId, int max)
096                    throws com.liferay.portal.kernel.exception.PortalException,
097                            com.liferay.portal.kernel.exception.SystemException {
098                    return getService().getManageableOrganizations(actionId, max);
099            }
100    
101            public static com.liferay.portal.model.Organization getOrganization(
102                    long organizationId)
103                    throws com.liferay.portal.kernel.exception.PortalException,
104                            com.liferay.portal.kernel.exception.SystemException {
105                    return getService().getOrganization(organizationId);
106            }
107    
108            public static long getOrganizationId(long companyId, java.lang.String name)
109                    throws com.liferay.portal.kernel.exception.SystemException {
110                    return getService().getOrganizationId(companyId, name);
111            }
112    
113            public static java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
114                    long userId)
115                    throws com.liferay.portal.kernel.exception.PortalException,
116                            com.liferay.portal.kernel.exception.SystemException {
117                    return getService().getUserOrganizations(userId);
118            }
119    
120            public static java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
121                    long userId, boolean inheritUserGroups)
122                    throws com.liferay.portal.kernel.exception.PortalException,
123                            com.liferay.portal.kernel.exception.SystemException {
124                    return getService().getUserOrganizations(userId, inheritUserGroups);
125            }
126    
127            public static void setGroupOrganizations(long groupId,
128                    long[] organizationIds)
129                    throws com.liferay.portal.kernel.exception.PortalException,
130                            com.liferay.portal.kernel.exception.SystemException {
131                    getService().setGroupOrganizations(groupId, organizationIds);
132            }
133    
134            public static void unsetGroupOrganizations(long groupId,
135                    long[] organizationIds)
136                    throws com.liferay.portal.kernel.exception.PortalException,
137                            com.liferay.portal.kernel.exception.SystemException {
138                    getService().unsetGroupOrganizations(groupId, organizationIds);
139            }
140    
141            public static void unsetPasswordPolicyOrganizations(long passwordPolicyId,
142                    long[] organizationIds)
143                    throws com.liferay.portal.kernel.exception.PortalException,
144                            com.liferay.portal.kernel.exception.SystemException {
145                    getService()
146                            .unsetPasswordPolicyOrganizations(passwordPolicyId, organizationIds);
147            }
148    
149            public static com.liferay.portal.model.Organization updateOrganization(
150                    long organizationId, long parentOrganizationId, java.lang.String name,
151                    java.lang.String type, boolean recursable, long regionId,
152                    long countryId, int statusId, java.lang.String comments,
153                    com.liferay.portal.service.ServiceContext serviceContext)
154                    throws com.liferay.portal.kernel.exception.PortalException,
155                            com.liferay.portal.kernel.exception.SystemException {
156                    return getService()
157                                       .updateOrganization(organizationId, parentOrganizationId,
158                            name, type, recursable, regionId, countryId, statusId, comments,
159                            serviceContext);
160            }
161    
162            public static com.liferay.portal.model.Organization updateOrganization(
163                    long organizationId, long parentOrganizationId, java.lang.String name,
164                    java.lang.String type, boolean recursable, long regionId,
165                    long countryId, int statusId, java.lang.String comments,
166                    java.util.List<com.liferay.portal.model.Address> addresses,
167                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
168                    java.util.List<com.liferay.portal.model.OrgLabor> orgLabors,
169                    java.util.List<com.liferay.portal.model.Phone> phones,
170                    java.util.List<com.liferay.portal.model.Website> websites,
171                    com.liferay.portal.service.ServiceContext serviceContext)
172                    throws com.liferay.portal.kernel.exception.PortalException,
173                            com.liferay.portal.kernel.exception.SystemException {
174                    return getService()
175                                       .updateOrganization(organizationId, parentOrganizationId,
176                            name, type, recursable, regionId, countryId, statusId, comments,
177                            addresses, emailAddresses, orgLabors, phones, websites,
178                            serviceContext);
179            }
180    
181            public static OrganizationService getService() {
182                    if (_service == null) {
183                            _service = (OrganizationService)PortalBeanLocatorUtil.locate(OrganizationService.class.getName());
184                    }
185    
186                    return _service;
187            }
188    
189            public void setService(OrganizationService service) {
190                    _service = service;
191            }
192    
193            private static OrganizationService _service;
194    }