1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.service;
24  
25  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
26  
27  /**
28   * <a href="OrganizationServiceUtil.java.html"><b><i>View Source</i></b></a>
29   *
30   * <p>
31   * ServiceBuilder generated this class. Modifications in this class will be
32   * overwritten the next time is generated.
33   * </p>
34   *
35   * <p>
36   * This class provides static methods for the
37   * {@link OrganizationService} bean. The static methods of
38   * this class calls the same methods of the bean instance. It's convenient to be
39   * able to just write one line to call a method on a bean instead of writing a
40   * lookup call and a method call.
41   * </p>
42   *
43   * @author    Brian Wing Shun Chan
44   * @see       OrganizationService
45   * @generated
46   */
47  public class OrganizationServiceUtil {
48      public static void addGroupOrganizations(long groupId,
49          long[] organizationIds)
50          throws com.liferay.portal.PortalException,
51              com.liferay.portal.SystemException {
52          getService().addGroupOrganizations(groupId, organizationIds);
53      }
54  
55      public static void addPasswordPolicyOrganizations(long passwordPolicyId,
56          long[] organizationIds)
57          throws com.liferay.portal.PortalException,
58              com.liferay.portal.SystemException {
59          getService()
60              .addPasswordPolicyOrganizations(passwordPolicyId, organizationIds);
61      }
62  
63      public static com.liferay.portal.model.Organization addOrganization(
64          long parentOrganizationId, java.lang.String name,
65          java.lang.String type, boolean recursable, long regionId,
66          long countryId, int statusId, java.lang.String comments,
67          com.liferay.portal.service.ServiceContext serviceContext)
68          throws com.liferay.portal.PortalException,
69              com.liferay.portal.SystemException {
70          return getService()
71                     .addOrganization(parentOrganizationId, name, type,
72              recursable, regionId, countryId, statusId, comments, serviceContext);
73      }
74  
75      public static com.liferay.portal.model.Organization addOrganization(
76          long parentOrganizationId, java.lang.String name,
77          java.lang.String type, boolean recursable, long regionId,
78          long countryId, int statusId, java.lang.String comments,
79          java.util.List<com.liferay.portal.model.Address> addresses,
80          java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
81          java.util.List<com.liferay.portal.model.OrgLabor> orgLabors,
82          java.util.List<com.liferay.portal.model.Phone> phones,
83          java.util.List<com.liferay.portal.model.Website> websites,
84          com.liferay.portal.service.ServiceContext serviceContext)
85          throws com.liferay.portal.PortalException,
86              com.liferay.portal.SystemException {
87          return getService()
88                     .addOrganization(parentOrganizationId, name, type,
89              recursable, regionId, countryId, statusId, comments, addresses,
90              emailAddresses, orgLabors, phones, websites, serviceContext);
91      }
92  
93      public static void deleteLogo(long organizationId)
94          throws com.liferay.portal.PortalException,
95              com.liferay.portal.SystemException {
96          getService().deleteLogo(organizationId);
97      }
98  
99      public static void deleteOrganization(long organizationId)
100         throws com.liferay.portal.PortalException,
101             com.liferay.portal.SystemException {
102         getService().deleteOrganization(organizationId);
103     }
104 
105     public static java.util.List<com.liferay.portal.model.Organization> getManageableOrganizations(
106         java.lang.String actionId, int max)
107         throws com.liferay.portal.PortalException,
108             com.liferay.portal.SystemException {
109         return getService().getManageableOrganizations(actionId, max);
110     }
111 
112     public static com.liferay.portal.model.Organization getOrganization(
113         long organizationId)
114         throws com.liferay.portal.PortalException,
115             com.liferay.portal.SystemException {
116         return getService().getOrganization(organizationId);
117     }
118 
119     public static long getOrganizationId(long companyId, java.lang.String name)
120         throws com.liferay.portal.SystemException {
121         return getService().getOrganizationId(companyId, name);
122     }
123 
124     public static java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
125         long userId)
126         throws com.liferay.portal.PortalException,
127             com.liferay.portal.SystemException {
128         return getService().getUserOrganizations(userId);
129     }
130 
131     public static java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
132         long userId, boolean inheritUserGroups)
133         throws com.liferay.portal.PortalException,
134             com.liferay.portal.SystemException {
135         return getService().getUserOrganizations(userId, inheritUserGroups);
136     }
137 
138     public static void setGroupOrganizations(long groupId,
139         long[] organizationIds)
140         throws com.liferay.portal.PortalException,
141             com.liferay.portal.SystemException {
142         getService().setGroupOrganizations(groupId, organizationIds);
143     }
144 
145     public static void unsetGroupOrganizations(long groupId,
146         long[] organizationIds)
147         throws com.liferay.portal.PortalException,
148             com.liferay.portal.SystemException {
149         getService().unsetGroupOrganizations(groupId, organizationIds);
150     }
151 
152     public static void unsetPasswordPolicyOrganizations(long passwordPolicyId,
153         long[] organizationIds)
154         throws com.liferay.portal.PortalException,
155             com.liferay.portal.SystemException {
156         getService()
157             .unsetPasswordPolicyOrganizations(passwordPolicyId, organizationIds);
158     }
159 
160     public static com.liferay.portal.model.Organization updateOrganization(
161         long organizationId, long parentOrganizationId, java.lang.String name,
162         java.lang.String type, boolean recursable, long regionId,
163         long countryId, int statusId, java.lang.String comments,
164         com.liferay.portal.service.ServiceContext serviceContext)
165         throws com.liferay.portal.PortalException,
166             com.liferay.portal.SystemException {
167         return getService()
168                    .updateOrganization(organizationId, parentOrganizationId,
169             name, type, recursable, regionId, countryId, statusId, comments,
170             serviceContext);
171     }
172 
173     public static com.liferay.portal.model.Organization updateOrganization(
174         long organizationId, long parentOrganizationId, java.lang.String name,
175         java.lang.String type, boolean recursable, long regionId,
176         long countryId, int statusId, java.lang.String comments,
177         java.util.List<com.liferay.portal.model.Address> addresses,
178         java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
179         java.util.List<com.liferay.portal.model.OrgLabor> orgLabors,
180         java.util.List<com.liferay.portal.model.Phone> phones,
181         java.util.List<com.liferay.portal.model.Website> websites,
182         com.liferay.portal.service.ServiceContext serviceContext)
183         throws com.liferay.portal.PortalException,
184             com.liferay.portal.SystemException {
185         return getService()
186                    .updateOrganization(organizationId, parentOrganizationId,
187             name, type, recursable, regionId, countryId, statusId, comments,
188             addresses, emailAddresses, orgLabors, phones, websites,
189             serviceContext);
190     }
191 
192     public static OrganizationService getService() {
193         if (_service == null) {
194             _service = (OrganizationService)PortalBeanLocatorUtil.locate(OrganizationService.class.getName());
195         }
196 
197         return _service;
198     }
199 
200     public void setService(OrganizationService service) {
201         _service = service;
202     }
203 
204     private static OrganizationService _service;
205 }