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="OrganizationLocalServiceUtil.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 OrganizationLocalService} 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       OrganizationLocalService
44   * @generated
45   */
46  public class OrganizationLocalServiceUtil {
47      public static com.liferay.portal.model.Organization addOrganization(
48          com.liferay.portal.model.Organization organization)
49          throws com.liferay.portal.SystemException {
50          return getService().addOrganization(organization);
51      }
52  
53      public static com.liferay.portal.model.Organization createOrganization(
54          long organizationId) {
55          return getService().createOrganization(organizationId);
56      }
57  
58      public static void deleteOrganization(long organizationId)
59          throws com.liferay.portal.PortalException,
60              com.liferay.portal.SystemException {
61          getService().deleteOrganization(organizationId);
62      }
63  
64      public static void deleteOrganization(
65          com.liferay.portal.model.Organization organization)
66          throws com.liferay.portal.SystemException {
67          getService().deleteOrganization(organization);
68      }
69  
70      public static java.util.List<Object> dynamicQuery(
71          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
72          throws com.liferay.portal.SystemException {
73          return getService().dynamicQuery(dynamicQuery);
74      }
75  
76      public static java.util.List<Object> dynamicQuery(
77          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
78          int end) throws com.liferay.portal.SystemException {
79          return getService().dynamicQuery(dynamicQuery, start, end);
80      }
81  
82      public static com.liferay.portal.model.Organization getOrganization(
83          long organizationId)
84          throws com.liferay.portal.PortalException,
85              com.liferay.portal.SystemException {
86          return getService().getOrganization(organizationId);
87      }
88  
89      public static java.util.List<com.liferay.portal.model.Organization> getOrganizations(
90          int start, int end) throws com.liferay.portal.SystemException {
91          return getService().getOrganizations(start, end);
92      }
93  
94      public static int getOrganizationsCount()
95          throws com.liferay.portal.SystemException {
96          return getService().getOrganizationsCount();
97      }
98  
99      public static com.liferay.portal.model.Organization updateOrganization(
100         com.liferay.portal.model.Organization organization)
101         throws com.liferay.portal.SystemException {
102         return getService().updateOrganization(organization);
103     }
104 
105     public static com.liferay.portal.model.Organization updateOrganization(
106         com.liferay.portal.model.Organization organization, boolean merge)
107         throws com.liferay.portal.SystemException {
108         return getService().updateOrganization(organization, merge);
109     }
110 
111     public static void addGroupOrganizations(long groupId,
112         long[] organizationIds) throws com.liferay.portal.SystemException {
113         getService().addGroupOrganizations(groupId, organizationIds);
114     }
115 
116     public static com.liferay.portal.model.Organization addOrganization(
117         long userId, long parentOrganizationId, java.lang.String name,
118         java.lang.String type, boolean recursable, long regionId,
119         long countryId, int statusId, java.lang.String comments,
120         com.liferay.portal.service.ServiceContext serviceContext)
121         throws com.liferay.portal.PortalException,
122             com.liferay.portal.SystemException {
123         return getService()
124                    .addOrganization(userId, parentOrganizationId, name, type,
125             recursable, regionId, countryId, statusId, comments, serviceContext);
126     }
127 
128     public static void addOrganizationResources(long userId,
129         com.liferay.portal.model.Organization organization)
130         throws com.liferay.portal.PortalException,
131             com.liferay.portal.SystemException {
132         getService().addOrganizationResources(userId, organization);
133     }
134 
135     public static void addPasswordPolicyOrganizations(long passwordPolicyId,
136         long[] organizationIds) throws com.liferay.portal.SystemException {
137         getService()
138             .addPasswordPolicyOrganizations(passwordPolicyId, organizationIds);
139     }
140 
141     public static void deleteLogo(long organizationId)
142         throws com.liferay.portal.PortalException,
143             com.liferay.portal.SystemException {
144         getService().deleteLogo(organizationId);
145     }
146 
147     public static java.util.List<com.liferay.portal.model.Organization> getGroupOrganizations(
148         long groupId) throws com.liferay.portal.SystemException {
149         return getService().getGroupOrganizations(groupId);
150     }
151 
152     public static com.liferay.portal.model.Organization getOrganization(
153         long companyId, java.lang.String name)
154         throws com.liferay.portal.PortalException,
155             com.liferay.portal.SystemException {
156         return getService().getOrganization(companyId, name);
157     }
158 
159     public static long getOrganizationId(long companyId, java.lang.String name)
160         throws com.liferay.portal.SystemException {
161         return getService().getOrganizationId(companyId, name);
162     }
163 
164     public static java.util.List<com.liferay.portal.model.Organization> getOrganizations(
165         long[] organizationIds)
166         throws com.liferay.portal.PortalException,
167             com.liferay.portal.SystemException {
168         return getService().getOrganizations(organizationIds);
169     }
170 
171     public static java.util.List<com.liferay.portal.model.Organization> getParentOrganizations(
172         long organizationId)
173         throws com.liferay.portal.PortalException,
174             com.liferay.portal.SystemException {
175         return getService().getParentOrganizations(organizationId);
176     }
177 
178     public static java.util.List<com.liferay.portal.model.Organization> getSuborganizations(
179         java.util.List<com.liferay.portal.model.Organization> organizations)
180         throws com.liferay.portal.SystemException {
181         return getService().getSuborganizations(organizations);
182     }
183 
184     public static java.util.List<com.liferay.portal.model.Organization> getSubsetOrganizations(
185         java.util.List<com.liferay.portal.model.Organization> allOrganizations,
186         java.util.List<com.liferay.portal.model.Organization> availableOrganizations) {
187         return getService()
188                    .getSubsetOrganizations(allOrganizations,
189             availableOrganizations);
190     }
191 
192     public static java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
193         long userId)
194         throws com.liferay.portal.PortalException,
195             com.liferay.portal.SystemException {
196         return getService().getUserOrganizations(userId);
197     }
198 
199     public static java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
200         long userId, boolean inheritUserGroups)
201         throws com.liferay.portal.PortalException,
202             com.liferay.portal.SystemException {
203         return getService().getUserOrganizations(userId, inheritUserGroups);
204     }
205 
206     public static java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
207         long userId, int start, int end)
208         throws com.liferay.portal.PortalException,
209             com.liferay.portal.SystemException {
210         return getService().getUserOrganizations(userId, start, end);
211     }
212 
213     public static java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
214         long userId, boolean inheritUserGroups, int start, int end)
215         throws com.liferay.portal.PortalException,
216             com.liferay.portal.SystemException {
217         return getService()
218                    .getUserOrganizations(userId, inheritUserGroups, start, end);
219     }
220 
221     public static int getUserOrganizationsCount(long userId)
222         throws com.liferay.portal.SystemException {
223         return getService().getUserOrganizationsCount(userId);
224     }
225 
226     public static boolean hasGroupOrganization(long groupId, long organizationId)
227         throws com.liferay.portal.SystemException {
228         return getService().hasGroupOrganization(groupId, organizationId);
229     }
230 
231     public static boolean hasUserOrganization(long userId, long organizationId)
232         throws com.liferay.portal.SystemException {
233         return getService().hasUserOrganization(userId, organizationId);
234     }
235 
236     public static boolean hasUserOrganization(long userId, long organizationId,
237         boolean inheritSuborganizations, boolean inheritUserGroups,
238         boolean includeSpecifiedOrganization)
239         throws com.liferay.portal.PortalException,
240             com.liferay.portal.SystemException {
241         return getService()
242                    .hasUserOrganization(userId, organizationId,
243             inheritSuborganizations, inheritUserGroups,
244             includeSpecifiedOrganization);
245     }
246 
247     public static boolean hasPasswordPolicyOrganization(long passwordPolicyId,
248         long organizationId) throws com.liferay.portal.SystemException {
249         return getService()
250                    .hasPasswordPolicyOrganization(passwordPolicyId,
251             organizationId);
252     }
253 
254     public static void rebuildTree(long companyId, boolean force)
255         throws com.liferay.portal.SystemException {
256         getService().rebuildTree(companyId, force);
257     }
258 
259     public static java.util.List<com.liferay.portal.model.Organization> search(
260         long companyId, long parentOrganizationId, java.lang.String keywords,
261         java.lang.String type, java.lang.Long regionId,
262         java.lang.Long countryId,
263         java.util.LinkedHashMap<String, Object> params, int start, int end)
264         throws com.liferay.portal.SystemException {
265         return getService()
266                    .search(companyId, parentOrganizationId, keywords, type,
267             regionId, countryId, params, start, end);
268     }
269 
270     public static java.util.List<com.liferay.portal.model.Organization> search(
271         long companyId, long parentOrganizationId, java.lang.String keywords,
272         java.lang.String type, java.lang.Long regionId,
273         java.lang.Long countryId,
274         java.util.LinkedHashMap<String, Object> params, int start, int end,
275         com.liferay.portal.kernel.util.OrderByComparator obc)
276         throws com.liferay.portal.SystemException {
277         return getService()
278                    .search(companyId, parentOrganizationId, keywords, type,
279             regionId, countryId, params, start, end, obc);
280     }
281 
282     public static java.util.List<com.liferay.portal.model.Organization> search(
283         long companyId, long parentOrganizationId, java.lang.String name,
284         java.lang.String type, java.lang.String street, java.lang.String city,
285         java.lang.String zip, java.lang.Long regionId,
286         java.lang.Long countryId,
287         java.util.LinkedHashMap<String, Object> params, boolean andOperator,
288         int start, int end) throws com.liferay.portal.SystemException {
289         return getService()
290                    .search(companyId, parentOrganizationId, name, type, street,
291             city, zip, regionId, countryId, params, andOperator, start, end);
292     }
293 
294     public static java.util.List<com.liferay.portal.model.Organization> search(
295         long companyId, long parentOrganizationId, java.lang.String name,
296         java.lang.String type, java.lang.String street, java.lang.String city,
297         java.lang.String zip, java.lang.Long regionId,
298         java.lang.Long countryId,
299         java.util.LinkedHashMap<String, Object> params, boolean andOperator,
300         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
301         throws com.liferay.portal.SystemException {
302         return getService()
303                    .search(companyId, parentOrganizationId, name, type, street,
304             city, zip, regionId, countryId, params, andOperator, start, end, obc);
305     }
306 
307     public static int searchCount(long companyId, long parentOrganizationId,
308         java.lang.String keywords, java.lang.String type,
309         java.lang.Long regionId, java.lang.Long countryId,
310         java.util.LinkedHashMap<String, Object> params)
311         throws com.liferay.portal.SystemException {
312         return getService()
313                    .searchCount(companyId, parentOrganizationId, keywords,
314             type, regionId, countryId, params);
315     }
316 
317     public static int searchCount(long companyId, long parentOrganizationId,
318         java.lang.String name, java.lang.String type, java.lang.String street,
319         java.lang.String city, java.lang.String zip, java.lang.Long regionId,
320         java.lang.Long countryId,
321         java.util.LinkedHashMap<String, Object> params, boolean andOperator)
322         throws com.liferay.portal.SystemException {
323         return getService()
324                    .searchCount(companyId, parentOrganizationId, name, type,
325             street, city, zip, regionId, countryId, params, andOperator);
326     }
327 
328     public static void setGroupOrganizations(long groupId,
329         long[] organizationIds) throws com.liferay.portal.SystemException {
330         getService().setGroupOrganizations(groupId, organizationIds);
331     }
332 
333     public static void unsetGroupOrganizations(long groupId,
334         long[] organizationIds) throws com.liferay.portal.SystemException {
335         getService().unsetGroupOrganizations(groupId, organizationIds);
336     }
337 
338     public static void unsetPasswordPolicyOrganizations(long passwordPolicyId,
339         long[] organizationIds) throws com.liferay.portal.SystemException {
340         getService()
341             .unsetPasswordPolicyOrganizations(passwordPolicyId, organizationIds);
342     }
343 
344     public static com.liferay.portal.model.Organization updateOrganization(
345         long companyId, long organizationId, long parentOrganizationId,
346         java.lang.String name, java.lang.String type, boolean recursable,
347         long regionId, long countryId, int statusId, java.lang.String comments,
348         com.liferay.portal.service.ServiceContext serviceContext)
349         throws com.liferay.portal.PortalException,
350             com.liferay.portal.SystemException {
351         return getService()
352                    .updateOrganization(companyId, organizationId,
353             parentOrganizationId, name, type, recursable, regionId, countryId,
354             statusId, comments, serviceContext);
355     }
356 
357     public static void updateTagsAsset(long userId,
358         com.liferay.portal.model.Organization organization,
359         java.lang.String[] tagsCategories, java.lang.String[] tagsEntries)
360         throws com.liferay.portal.PortalException,
361             com.liferay.portal.SystemException {
362         getService()
363             .updateTagsAsset(userId, organization, tagsCategories, tagsEntries);
364     }
365 
366     public static OrganizationLocalService getService() {
367         if (_service == null) {
368             throw new RuntimeException("OrganizationLocalService is not set");
369         }
370 
371         return _service;
372     }
373 
374     public void setService(OrganizationLocalService service) {
375         _service = service;
376     }
377 
378     private static OrganizationLocalService _service;
379 }