1   /**
2    * Copyright (c) 2000-2007 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions 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.portlet.blogs.service;
24  
25  /**
26   * <a href="BlogsEntryLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be overwritten
30   * the next time is generated.
31   * </p>
32   *
33   * <p>
34   * This class provides static methods for the <code>com.liferay.portlet.blogs.service.BlogsEntryLocalService</code>
35   * bean. The static methods of this class calls the same methods of the bean instance.
36   * It's convenient to be able to just write one line to call a method on a bean
37   * instead of writing a lookup call and a method call.
38   * </p>
39   *
40   * <p>
41   * <code>com.liferay.portlet.blogs.service.BlogsEntryLocalServiceFactory</code>
42   * is responsible for the lookup of the bean.
43   * </p>
44   *
45   * @author Brian Wing Shun Chan
46   *
47   * @see com.liferay.portlet.blogs.service.BlogsEntryLocalService
48   * @see com.liferay.portlet.blogs.service.BlogsEntryLocalServiceFactory
49   *
50   */
51  public class BlogsEntryLocalServiceUtil {
52      public static com.liferay.portlet.blogs.model.BlogsEntry addBlogsEntry(
53          com.liferay.portlet.blogs.model.BlogsEntry model)
54          throws com.liferay.portal.SystemException {
55          BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
56  
57          return blogsEntryLocalService.addBlogsEntry(model);
58      }
59  
60      public static java.util.List dynamicQuery(
61          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
62          throws com.liferay.portal.SystemException {
63          BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
64  
65          return blogsEntryLocalService.dynamicQuery(queryInitializer);
66      }
67  
68      public static java.util.List dynamicQuery(
69          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
70          int begin, int end) throws com.liferay.portal.SystemException {
71          BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
72  
73          return blogsEntryLocalService.dynamicQuery(queryInitializer, begin, end);
74      }
75  
76      public static com.liferay.portlet.blogs.model.BlogsEntry updateBlogsEntry(
77          com.liferay.portlet.blogs.model.BlogsEntry model)
78          throws com.liferay.portal.SystemException {
79          BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
80  
81          return blogsEntryLocalService.updateBlogsEntry(model);
82      }
83  
84      public static com.liferay.portlet.blogs.model.BlogsEntry addEntry(
85          long userId, long plid, long categoryId, java.lang.String title,
86          java.lang.String content, int displayDateMonth, int displayDateDay,
87          int displayDateYear, int displayDateHour, int displayDateMinute,
88          com.liferay.portal.theme.ThemeDisplay themeDisplay,
89          java.lang.String[] tagsEntries, boolean addCommunityPermissions,
90          boolean addGuestPermissions)
91          throws com.liferay.portal.PortalException, 
92              com.liferay.portal.SystemException {
93          BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
94  
95          return blogsEntryLocalService.addEntry(userId, plid, categoryId, title,
96              content, displayDateMonth, displayDateDay, displayDateYear,
97              displayDateHour, displayDateMinute, themeDisplay, tagsEntries,
98              addCommunityPermissions, addGuestPermissions);
99      }
100 
101     public static com.liferay.portlet.blogs.model.BlogsEntry addEntry(
102         long userId, long plid, long categoryId, java.lang.String title,
103         java.lang.String content, int displayDateMonth, int displayDateDay,
104         int displayDateYear, int displayDateHour, int displayDateMinute,
105         com.liferay.portal.theme.ThemeDisplay themeDisplay,
106         java.lang.String[] tagsEntries,
107         java.lang.String[] communityPermissions,
108         java.lang.String[] guestPermissions)
109         throws com.liferay.portal.PortalException, 
110             com.liferay.portal.SystemException {
111         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
112 
113         return blogsEntryLocalService.addEntry(userId, plid, categoryId, title,
114             content, displayDateMonth, displayDateDay, displayDateYear,
115             displayDateHour, displayDateMinute, themeDisplay, tagsEntries,
116             communityPermissions, guestPermissions);
117     }
118 
119     public static com.liferay.portlet.blogs.model.BlogsEntry addEntry(
120         long userId, long plid, long categoryId, java.lang.String title,
121         java.lang.String content, int displayDateMonth, int displayDateDay,
122         int displayDateYear, int displayDateHour, int displayDateMinute,
123         com.liferay.portal.theme.ThemeDisplay themeDisplay,
124         java.lang.String[] tagsEntries,
125         java.lang.Boolean addCommunityPermissions,
126         java.lang.Boolean addGuestPermissions,
127         java.lang.String[] communityPermissions,
128         java.lang.String[] guestPermissions)
129         throws com.liferay.portal.PortalException, 
130             com.liferay.portal.SystemException {
131         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
132 
133         return blogsEntryLocalService.addEntry(userId, plid, categoryId, title,
134             content, displayDateMonth, displayDateDay, displayDateYear,
135             displayDateHour, displayDateMinute, themeDisplay, tagsEntries,
136             addCommunityPermissions, addGuestPermissions, communityPermissions,
137             guestPermissions);
138     }
139 
140     public static void addEntryResources(long entryId,
141         boolean addCommunityPermissions, boolean addGuestPermissions)
142         throws com.liferay.portal.PortalException, 
143             com.liferay.portal.SystemException {
144         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
145         blogsEntryLocalService.addEntryResources(entryId,
146             addCommunityPermissions, addGuestPermissions);
147     }
148 
149     public static void addEntryResources(
150         com.liferay.portlet.blogs.model.BlogsEntry entry,
151         boolean addCommunityPermissions, boolean addGuestPermissions)
152         throws com.liferay.portal.PortalException, 
153             com.liferay.portal.SystemException {
154         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
155         blogsEntryLocalService.addEntryResources(entry,
156             addCommunityPermissions, addGuestPermissions);
157     }
158 
159     public static void addEntryResources(long entryId,
160         java.lang.String[] communityPermissions,
161         java.lang.String[] guestPermissions)
162         throws com.liferay.portal.PortalException, 
163             com.liferay.portal.SystemException {
164         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
165         blogsEntryLocalService.addEntryResources(entryId, communityPermissions,
166             guestPermissions);
167     }
168 
169     public static void addEntryResources(
170         com.liferay.portlet.blogs.model.BlogsEntry entry,
171         java.lang.String[] communityPermissions,
172         java.lang.String[] guestPermissions)
173         throws com.liferay.portal.PortalException, 
174             com.liferay.portal.SystemException {
175         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
176         blogsEntryLocalService.addEntryResources(entry, communityPermissions,
177             guestPermissions);
178     }
179 
180     public static void deleteEntries(long groupId)
181         throws com.liferay.portal.PortalException, 
182             com.liferay.portal.SystemException {
183         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
184         blogsEntryLocalService.deleteEntries(groupId);
185     }
186 
187     public static void deleteEntry(long entryId)
188         throws com.liferay.portal.PortalException, 
189             com.liferay.portal.SystemException {
190         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
191         blogsEntryLocalService.deleteEntry(entryId);
192     }
193 
194     public static void deleteEntry(
195         com.liferay.portlet.blogs.model.BlogsEntry entry)
196         throws com.liferay.portal.PortalException, 
197             com.liferay.portal.SystemException {
198         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
199         blogsEntryLocalService.deleteEntry(entry);
200     }
201 
202     public static int getCategoriesEntriesCount(java.util.List categoryIds)
203         throws com.liferay.portal.SystemException {
204         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
205 
206         return blogsEntryLocalService.getCategoriesEntriesCount(categoryIds);
207     }
208 
209     public static java.util.List getCompanyEntries(long companyId, int begin,
210         int end) throws com.liferay.portal.SystemException {
211         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
212 
213         return blogsEntryLocalService.getCompanyEntries(companyId, begin, end);
214     }
215 
216     public static java.util.List getCompanyEntries(long companyId, int begin,
217         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
218         throws com.liferay.portal.SystemException {
219         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
220 
221         return blogsEntryLocalService.getCompanyEntries(companyId, begin, end,
222             obc);
223     }
224 
225     public static int getCompanyEntriesCount(long companyId)
226         throws com.liferay.portal.SystemException {
227         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
228 
229         return blogsEntryLocalService.getCompanyEntriesCount(companyId);
230     }
231 
232     public static java.util.List getEntries(long categoryId, int begin, int end)
233         throws com.liferay.portal.SystemException {
234         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
235 
236         return blogsEntryLocalService.getEntries(categoryId, begin, end);
237     }
238 
239     public static int getEntriesCount(long categoryId)
240         throws com.liferay.portal.SystemException {
241         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
242 
243         return blogsEntryLocalService.getEntriesCount(categoryId);
244     }
245 
246     public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
247         long entryId)
248         throws com.liferay.portal.PortalException, 
249             com.liferay.portal.SystemException {
250         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
251 
252         return blogsEntryLocalService.getEntry(entryId);
253     }
254 
255     public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
256         long groupId, java.lang.String urlTitle)
257         throws com.liferay.portal.PortalException, 
258             com.liferay.portal.SystemException {
259         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
260 
261         return blogsEntryLocalService.getEntry(groupId, urlTitle);
262     }
263 
264     public static java.util.List getGroupEntries(long groupId, int begin,
265         int end) throws com.liferay.portal.SystemException {
266         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
267 
268         return blogsEntryLocalService.getGroupEntries(groupId, begin, end);
269     }
270 
271     public static java.util.List getGroupEntries(long groupId, int begin,
272         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
273         throws com.liferay.portal.SystemException {
274         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
275 
276         return blogsEntryLocalService.getGroupEntries(groupId, begin, end, obc);
277     }
278 
279     public static int getGroupEntriesCount(long groupId)
280         throws com.liferay.portal.SystemException {
281         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
282 
283         return blogsEntryLocalService.getGroupEntriesCount(groupId);
284     }
285 
286     public static java.util.List getGroupUserEntries(long groupId, long userId,
287         int begin, int end) throws com.liferay.portal.SystemException {
288         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
289 
290         return blogsEntryLocalService.getGroupUserEntries(groupId, userId,
291             begin, end);
292     }
293 
294     public static int getGroupUserEntriesCount(long groupId, long userId)
295         throws com.liferay.portal.SystemException {
296         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
297 
298         return blogsEntryLocalService.getGroupUserEntriesCount(groupId, userId);
299     }
300 
301     public static java.util.List getNoAssetEntries()
302         throws com.liferay.portal.SystemException {
303         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
304 
305         return blogsEntryLocalService.getNoAssetEntries();
306     }
307 
308     public static java.util.List getOrganizationEntries(long organizationId,
309         int begin, int end) throws com.liferay.portal.SystemException {
310         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
311 
312         return blogsEntryLocalService.getOrganizationEntries(organizationId,
313             begin, end);
314     }
315 
316     public static int getOrganizationEntriesCount(long organizationId)
317         throws com.liferay.portal.SystemException {
318         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
319 
320         return blogsEntryLocalService.getOrganizationEntriesCount(organizationId);
321     }
322 
323     public static java.lang.String getUrlTitle(long entryId,
324         java.lang.String title) {
325         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
326 
327         return blogsEntryLocalService.getUrlTitle(entryId, title);
328     }
329 
330     public static void reIndex(java.lang.String[] ids)
331         throws com.liferay.portal.SystemException {
332         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
333         blogsEntryLocalService.reIndex(ids);
334     }
335 
336     public static com.liferay.portal.kernel.search.Hits search(long companyId,
337         long groupId, long userId, long[] categoryIds, java.lang.String keywords)
338         throws com.liferay.portal.SystemException {
339         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
340 
341         return blogsEntryLocalService.search(companyId, groupId, userId,
342             categoryIds, keywords);
343     }
344 
345     public static com.liferay.portlet.blogs.model.BlogsEntry updateEntry(
346         long userId, long entryId, long categoryId, java.lang.String title,
347         java.lang.String content, int displayDateMonth, int displayDateDay,
348         int displayDateYear, int displayDateHour, int displayDateMinute,
349         com.liferay.portal.theme.ThemeDisplay themeDisplay,
350         java.lang.String[] tagsEntries)
351         throws com.liferay.portal.PortalException, 
352             com.liferay.portal.SystemException {
353         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
354 
355         return blogsEntryLocalService.updateEntry(userId, entryId, categoryId,
356             title, content, displayDateMonth, displayDateDay, displayDateYear,
357             displayDateHour, displayDateMinute, themeDisplay, tagsEntries);
358     }
359 
360     public static void updateTagsAsset(long userId,
361         com.liferay.portlet.blogs.model.BlogsEntry entry,
362         java.lang.String[] tagsEntries)
363         throws com.liferay.portal.PortalException, 
364             com.liferay.portal.SystemException {
365         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
366         blogsEntryLocalService.updateTagsAsset(userId, entry, tagsEntries);
367     }
368 }