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  
26  /**
27   * <a href="OrganizationServiceUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This class provides static methods for the
36   * {@link OrganizationService} bean. The static methods of
37   * this class calls the same methods of the bean instance. It's convenient to be
38   * able to just write one line to call a method on a bean instead of writing a
39   * lookup call and a method call.
40   * </p>
41   *
42   * @author    Brian Wing Shun Chan
43   * @see       OrganizationService
44   * @generated
45   */
46  public class OrganizationServiceUtil {
47      public static void addGroupOrganizations(long groupId,
48          long[] organizationIds)
49          throws com.liferay.portal.PortalException,
50              com.liferay.portal.SystemException {
51          getService().addGroupOrganizations(groupId, organizationIds);
52      }
53  
54      public static void addPasswordPolicyOrganizations(long passwordPolicyId,
55          long[] organizationIds)
56          throws com.liferay.portal.PortalException,
57              com.liferay.portal.SystemException {
58          getService()
59              .addPasswordPolicyOrganizations(passwordPolicyId, organizationIds);
60      }
61  
62      public static com.liferay.portal.model.Organization addOrganization(
63          long parentOrganizationId, java.lang.String name,
64          java.lang.String type, boolean recursable, long regionId,
65          long countryId, int statusId, java.lang.String comments,
66          com.liferay.portal.service.ServiceContext serviceContext)
67          throws com.liferay.portal.PortalException,
68              com.liferay.portal.SystemException {
69          return getService()
70                     .addOrganization(parentOrganizationId, name, type,
71              recursable, regionId, countryId, statusId, comments, serviceContext);
72      }
73  
74      public static com.liferay.portal.model.Organization addOrganization(
75          long parentOrganizationId, java.lang.String name,
76          java.lang.String type, boolean recursable, long regionId,
77          long countryId, int statusId, java.lang.String comments,
78          java.util.List<com.liferay.portal.model.Address> addresses,
79          java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
80          java.util.List<com.liferay.portal.model.OrgLabor> orgLabors,
81          java.util.List<com.liferay.portal.model.Phone> phones,
82          java.util.List<com.liferay.portal.model.Website> websites,
83          com.liferay.portal.service.ServiceContext serviceContext)
84          throws com.liferay.portal.PortalException,
85              com.liferay.portal.SystemException {
86          return getService()
87                     .addOrganization(parentOrganizationId, name, type,
88              recursable, regionId, countryId, statusId, comments, addresses,
89              emailAddresses, orgLabors, phones, websites, serviceContext);
90      }
91  
92      public static void deleteLogo(long organizationId)
93          throws com.liferay.portal.PortalException,
94              com.liferay.portal.SystemException {
95          getService().deleteLogo(organizationId);
96      }
97  
98      public static void deleteOrganization(long organizationId)
99          throws com.liferay.portal.PortalException,
100             com.liferay.portal.SystemException {
101         getService().deleteOrganization(organizationId);
102     }
103 
104     public static java.util.List<com.liferay.portal.model.Organization> getManageableOrganizations(
105         java.lang.String actionId, int max)
106         throws com.liferay.portal.PortalException,
107             com.liferay.portal.SystemException {
108         return getService().getManageableOrganizations(actionId, max);
109     }
110 
111     public static com.liferay.portal.model.Organization getOrganization(
112         long organizationId)
113         throws com.liferay.portal.PortalException,
114             com.liferay.portal.SystemException {
115         return getService().getOrganization(organizationId);
116     }
117 
118     public static long getOrganizationId(long companyId, java.lang.String name)
119         throws com.liferay.portal.SystemException {
120         return getService().getOrganizationId(companyId, name);
121     }
122 
123     public static java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
124         long userId)
125         throws com.liferay.portal.PortalException,
126             com.liferay.portal.SystemException {
127         return getService().getUserOrganizations(userId);
128     }
129 
130     public static java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
131         long userId, boolean inheritUserGroups)
132         throws com.liferay.portal.PortalException,
133             com.liferay.portal.SystemException {
134         return getService().getUserOrganizations(userId, inheritUserGroups);
135     }
136 
137     public static void setGroupOrganizations(long groupId,
138         long[] organizationIds)
139         throws com.liferay.portal.PortalException,
140             com.liferay.portal.SystemException {
141         getService().setGroupOrganizations(groupId, organizationIds);
142     }
143 
144     public static void unsetGroupOrganizations(long groupId,
145         long[] organizationIds)
146         throws com.liferay.portal.PortalException,
147             com.liferay.portal.SystemException {
148         getService().unsetGroupOrganizations(groupId, organizationIds);
149     }
150 
151     public static void unsetPasswordPolicyOrganizations(long passwordPolicyId,
152         long[] organizationIds)
153         throws com.liferay.portal.PortalException,
154             com.liferay.portal.SystemException {
155         getService()
156             .unsetPasswordPolicyOrganizations(passwordPolicyId, organizationIds);
157     }
158 
159     public static com.liferay.portal.model.Organization updateOrganization(
160         long organizationId, long parentOrganizationId, java.lang.String name,
161         java.lang.String type, boolean recursable, long regionId,
162         long countryId, int statusId, java.lang.String comments,
163         com.liferay.portal.service.ServiceContext serviceContext)
164         throws com.liferay.portal.PortalException,
165             com.liferay.portal.SystemException {
166         return getService()
167                    .updateOrganization(organizationId, parentOrganizationId,
168             name, type, recursable, regionId, countryId, statusId, comments,
169             serviceContext);
170     }
171 
172     public static com.liferay.portal.model.Organization updateOrganization(
173         long organizationId, long parentOrganizationId, java.lang.String name,
174         java.lang.String type, boolean recursable, long regionId,
175         long countryId, int statusId, java.lang.String comments,
176         java.util.List<com.liferay.portal.model.Address> addresses,
177         java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
178         java.util.List<com.liferay.portal.model.OrgLabor> orgLabors,
179         java.util.List<com.liferay.portal.model.Phone> phones,
180         java.util.List<com.liferay.portal.model.Website> websites,
181         com.liferay.portal.service.ServiceContext serviceContext)
182         throws com.liferay.portal.PortalException,
183             com.liferay.portal.SystemException {
184         return getService()
185                    .updateOrganization(organizationId, parentOrganizationId,
186             name, type, recursable, regionId, countryId, statusId, comments,
187             addresses, emailAddresses, orgLabors, phones, websites,
188             serviceContext);
189     }
190 
191     public static OrganizationService getService() {
192         if (_service == null) {
193             throw new RuntimeException("OrganizationService is not set");
194         }
195 
196         return _service;
197     }
198 
199     public void setService(OrganizationService service) {
200         _service = service;
201     }
202 
203     private static OrganizationService _service;
204 }