1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="OrganizationServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link OrganizationService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       OrganizationService
37   * @generated
38   */
39  public class OrganizationServiceUtil {
40      public static void addGroupOrganizations(long groupId,
41          long[] organizationIds)
42          throws com.liferay.portal.kernel.exception.PortalException,
43              com.liferay.portal.kernel.exception.SystemException {
44          getService().addGroupOrganizations(groupId, organizationIds);
45      }
46  
47      public static void addPasswordPolicyOrganizations(long passwordPolicyId,
48          long[] organizationIds)
49          throws com.liferay.portal.kernel.exception.PortalException,
50              com.liferay.portal.kernel.exception.SystemException {
51          getService()
52              .addPasswordPolicyOrganizations(passwordPolicyId, organizationIds);
53      }
54  
55      public static com.liferay.portal.model.Organization addOrganization(
56          long parentOrganizationId, java.lang.String name,
57          java.lang.String type, boolean recursable, long regionId,
58          long countryId, int statusId, java.lang.String comments,
59          com.liferay.portal.service.ServiceContext serviceContext)
60          throws com.liferay.portal.kernel.exception.PortalException,
61              com.liferay.portal.kernel.exception.SystemException {
62          return getService()
63                     .addOrganization(parentOrganizationId, name, type,
64              recursable, regionId, countryId, statusId, comments, serviceContext);
65      }
66  
67      public static com.liferay.portal.model.Organization addOrganization(
68          long parentOrganizationId, java.lang.String name,
69          java.lang.String type, boolean recursable, long regionId,
70          long countryId, int statusId, java.lang.String comments,
71          java.util.List<com.liferay.portal.model.Address> addresses,
72          java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
73          java.util.List<com.liferay.portal.model.OrgLabor> orgLabors,
74          java.util.List<com.liferay.portal.model.Phone> phones,
75          java.util.List<com.liferay.portal.model.Website> websites,
76          com.liferay.portal.service.ServiceContext serviceContext)
77          throws com.liferay.portal.kernel.exception.PortalException,
78              com.liferay.portal.kernel.exception.SystemException {
79          return getService()
80                     .addOrganization(parentOrganizationId, name, type,
81              recursable, regionId, countryId, statusId, comments, addresses,
82              emailAddresses, orgLabors, phones, websites, serviceContext);
83      }
84  
85      public static void deleteLogo(long organizationId)
86          throws com.liferay.portal.kernel.exception.PortalException,
87              com.liferay.portal.kernel.exception.SystemException {
88          getService().deleteLogo(organizationId);
89      }
90  
91      public static void deleteOrganization(long organizationId)
92          throws com.liferay.portal.kernel.exception.PortalException,
93              com.liferay.portal.kernel.exception.SystemException {
94          getService().deleteOrganization(organizationId);
95      }
96  
97      public static java.util.List<com.liferay.portal.model.Organization> getManageableOrganizations(
98          java.lang.String actionId, int max)
99          throws com.liferay.portal.kernel.exception.PortalException,
100             com.liferay.portal.kernel.exception.SystemException {
101         return getService().getManageableOrganizations(actionId, max);
102     }
103 
104     public static com.liferay.portal.model.Organization getOrganization(
105         long organizationId)
106         throws com.liferay.portal.kernel.exception.PortalException,
107             com.liferay.portal.kernel.exception.SystemException {
108         return getService().getOrganization(organizationId);
109     }
110 
111     public static long getOrganizationId(long companyId, java.lang.String name)
112         throws com.liferay.portal.kernel.exception.SystemException {
113         return getService().getOrganizationId(companyId, name);
114     }
115 
116     public static java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
117         long userId)
118         throws com.liferay.portal.kernel.exception.PortalException,
119             com.liferay.portal.kernel.exception.SystemException {
120         return getService().getUserOrganizations(userId);
121     }
122 
123     public static java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
124         long userId, boolean inheritUserGroups)
125         throws com.liferay.portal.kernel.exception.PortalException,
126             com.liferay.portal.kernel.exception.SystemException {
127         return getService().getUserOrganizations(userId, inheritUserGroups);
128     }
129 
130     public static void setGroupOrganizations(long groupId,
131         long[] organizationIds)
132         throws com.liferay.portal.kernel.exception.PortalException,
133             com.liferay.portal.kernel.exception.SystemException {
134         getService().setGroupOrganizations(groupId, organizationIds);
135     }
136 
137     public static void unsetGroupOrganizations(long groupId,
138         long[] organizationIds)
139         throws com.liferay.portal.kernel.exception.PortalException,
140             com.liferay.portal.kernel.exception.SystemException {
141         getService().unsetGroupOrganizations(groupId, organizationIds);
142     }
143 
144     public static void unsetPasswordPolicyOrganizations(long passwordPolicyId,
145         long[] organizationIds)
146         throws com.liferay.portal.kernel.exception.PortalException,
147             com.liferay.portal.kernel.exception.SystemException {
148         getService()
149             .unsetPasswordPolicyOrganizations(passwordPolicyId, organizationIds);
150     }
151 
152     public static com.liferay.portal.model.Organization updateOrganization(
153         long organizationId, long parentOrganizationId, java.lang.String name,
154         java.lang.String type, boolean recursable, long regionId,
155         long countryId, int statusId, java.lang.String comments,
156         com.liferay.portal.service.ServiceContext serviceContext)
157         throws com.liferay.portal.kernel.exception.PortalException,
158             com.liferay.portal.kernel.exception.SystemException {
159         return getService()
160                    .updateOrganization(organizationId, parentOrganizationId,
161             name, type, recursable, regionId, countryId, statusId, comments,
162             serviceContext);
163     }
164 
165     public static com.liferay.portal.model.Organization updateOrganization(
166         long organizationId, long parentOrganizationId, java.lang.String name,
167         java.lang.String type, boolean recursable, long regionId,
168         long countryId, int statusId, java.lang.String comments,
169         java.util.List<com.liferay.portal.model.Address> addresses,
170         java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
171         java.util.List<com.liferay.portal.model.OrgLabor> orgLabors,
172         java.util.List<com.liferay.portal.model.Phone> phones,
173         java.util.List<com.liferay.portal.model.Website> websites,
174         com.liferay.portal.service.ServiceContext serviceContext)
175         throws com.liferay.portal.kernel.exception.PortalException,
176             com.liferay.portal.kernel.exception.SystemException {
177         return getService()
178                    .updateOrganization(organizationId, parentOrganizationId,
179             name, type, recursable, regionId, countryId, statusId, comments,
180             addresses, emailAddresses, orgLabors, phones, websites,
181             serviceContext);
182     }
183 
184     public static OrganizationService getService() {
185         if (_service == null) {
186             _service = (OrganizationService)PortalBeanLocatorUtil.locate(OrganizationService.class.getName());
187         }
188 
189         return _service;
190     }
191 
192     public void setService(OrganizationService service) {
193         _service = service;
194     }
195 
196     private static OrganizationService _service;
197 }