1   /**
2    * Copyright (c) 2000-2008 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  /**
27   * <a href="BlogsEntryLocalServiceUtil.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   * <code>com.liferay.portlet.blogs.service.BlogsEntryLocalService</code>
37   * bean. The static methods of this class calls the same methods of the bean
38   * instance. It's convenient to be able to just write one line to call a method
39   * on a bean instead of writing a lookup call and a method call.
40   * </p>
41   *
42   * <p>
43   * <code>com.liferay.portlet.blogs.service.BlogsEntryLocalServiceFactory</code>
44   * is responsible for the lookup of the bean.
45   * </p>
46   *
47   * @author Brian Wing Shun Chan
48   *
49   * @see com.liferay.portlet.blogs.service.BlogsEntryLocalService
50   * @see com.liferay.portlet.blogs.service.BlogsEntryLocalServiceFactory
51   *
52   */
53  public class BlogsEntryLocalServiceUtil {
54      public static com.liferay.portlet.blogs.model.BlogsEntry addBlogsEntry(
55          com.liferay.portlet.blogs.model.BlogsEntry blogsEntry)
56          throws com.liferay.portal.SystemException {
57          BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
58  
59          return blogsEntryLocalService.addBlogsEntry(blogsEntry);
60      }
61  
62      public static void deleteBlogsEntry(long entryId)
63          throws com.liferay.portal.PortalException,
64              com.liferay.portal.SystemException {
65          BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
66  
67          blogsEntryLocalService.deleteBlogsEntry(entryId);
68      }
69  
70      public static void deleteBlogsEntry(
71          com.liferay.portlet.blogs.model.BlogsEntry blogsEntry)
72          throws com.liferay.portal.SystemException {
73          BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
74  
75          blogsEntryLocalService.deleteBlogsEntry(blogsEntry);
76      }
77  
78      public static java.util.List<Object> dynamicQuery(
79          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
80          throws com.liferay.portal.SystemException {
81          BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
82  
83          return blogsEntryLocalService.dynamicQuery(dynamicQuery);
84      }
85  
86      public static java.util.List<Object> dynamicQuery(
87          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
88          int end) throws com.liferay.portal.SystemException {
89          BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
90  
91          return blogsEntryLocalService.dynamicQuery(dynamicQuery, start, end);
92      }
93  
94      public static com.liferay.portlet.blogs.model.BlogsEntry getBlogsEntry(
95          long entryId)
96          throws com.liferay.portal.PortalException,
97              com.liferay.portal.SystemException {
98          BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
99  
100         return blogsEntryLocalService.getBlogsEntry(entryId);
101     }
102 
103     public static com.liferay.portlet.blogs.model.BlogsEntry updateBlogsEntry(
104         com.liferay.portlet.blogs.model.BlogsEntry blogsEntry)
105         throws com.liferay.portal.SystemException {
106         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
107 
108         return blogsEntryLocalService.updateBlogsEntry(blogsEntry);
109     }
110 
111     public static com.liferay.portlet.blogs.model.BlogsEntry addEntry(
112         long userId, long plid, java.lang.String title,
113         java.lang.String content, int displayDateMonth, int displayDateDay,
114         int displayDateYear, int displayDateHour, int displayDateMinute,
115         boolean draft, boolean allowTrackbacks, java.lang.String[] trackbacks,
116         java.lang.String[] tagsEntries, boolean addCommunityPermissions,
117         boolean addGuestPermissions,
118         com.liferay.portal.theme.ThemeDisplay themeDisplay)
119         throws com.liferay.portal.PortalException,
120             com.liferay.portal.SystemException {
121         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
122 
123         return blogsEntryLocalService.addEntry(userId, plid, title, content,
124             displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
125             displayDateMinute, draft, allowTrackbacks, trackbacks, tagsEntries,
126             addCommunityPermissions, addGuestPermissions, themeDisplay);
127     }
128 
129     public static com.liferay.portlet.blogs.model.BlogsEntry addEntry(
130         java.lang.String uuid, long userId, long plid, java.lang.String title,
131         java.lang.String content, int displayDateMonth, int displayDateDay,
132         int displayDateYear, int displayDateHour, int displayDateMinute,
133         boolean draft, boolean allowTrackbacks, java.lang.String[] trackbacks,
134         java.lang.String[] tagsEntries, boolean addCommunityPermissions,
135         boolean addGuestPermissions,
136         com.liferay.portal.theme.ThemeDisplay themeDisplay)
137         throws com.liferay.portal.PortalException,
138             com.liferay.portal.SystemException {
139         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
140 
141         return blogsEntryLocalService.addEntry(uuid, userId, plid, title,
142             content, displayDateMonth, displayDateDay, displayDateYear,
143             displayDateHour, displayDateMinute, draft, allowTrackbacks,
144             trackbacks, tagsEntries, addCommunityPermissions,
145             addGuestPermissions, themeDisplay);
146     }
147 
148     public static com.liferay.portlet.blogs.model.BlogsEntry addEntry(
149         long userId, long plid, java.lang.String title,
150         java.lang.String content, int displayDateMonth, int displayDateDay,
151         int displayDateYear, int displayDateHour, int displayDateMinute,
152         boolean draft, boolean allowTrackbacks, java.lang.String[] trackbacks,
153         java.lang.String[] tagsEntries,
154         java.lang.String[] communityPermissions,
155         java.lang.String[] guestPermissions,
156         com.liferay.portal.theme.ThemeDisplay themeDisplay)
157         throws com.liferay.portal.PortalException,
158             com.liferay.portal.SystemException {
159         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
160 
161         return blogsEntryLocalService.addEntry(userId, plid, title, content,
162             displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
163             displayDateMinute, draft, allowTrackbacks, trackbacks, tagsEntries,
164             communityPermissions, guestPermissions, themeDisplay);
165     }
166 
167     public static com.liferay.portlet.blogs.model.BlogsEntry addEntry(
168         java.lang.String uuid, long userId, long plid, java.lang.String title,
169         java.lang.String content, int displayDateMonth, int displayDateDay,
170         int displayDateYear, int displayDateHour, int displayDateMinute,
171         boolean draft, boolean allowTrackbacks, java.lang.String[] trackbacks,
172         java.lang.String[] tagsEntries,
173         java.lang.Boolean addCommunityPermissions,
174         java.lang.Boolean addGuestPermissions,
175         java.lang.String[] communityPermissions,
176         java.lang.String[] guestPermissions,
177         com.liferay.portal.theme.ThemeDisplay themeDisplay)
178         throws com.liferay.portal.PortalException,
179             com.liferay.portal.SystemException {
180         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
181 
182         return blogsEntryLocalService.addEntry(uuid, userId, plid, title,
183             content, displayDateMonth, displayDateDay, displayDateYear,
184             displayDateHour, displayDateMinute, draft, allowTrackbacks,
185             trackbacks, tagsEntries, addCommunityPermissions,
186             addGuestPermissions, communityPermissions, guestPermissions,
187             themeDisplay);
188     }
189 
190     public static void addEntryResources(long entryId,
191         boolean addCommunityPermissions, boolean addGuestPermissions)
192         throws com.liferay.portal.PortalException,
193             com.liferay.portal.SystemException {
194         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
195 
196         blogsEntryLocalService.addEntryResources(entryId,
197             addCommunityPermissions, addGuestPermissions);
198     }
199 
200     public static void addEntryResources(
201         com.liferay.portlet.blogs.model.BlogsEntry entry,
202         boolean addCommunityPermissions, boolean addGuestPermissions)
203         throws com.liferay.portal.PortalException,
204             com.liferay.portal.SystemException {
205         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
206 
207         blogsEntryLocalService.addEntryResources(entry,
208             addCommunityPermissions, addGuestPermissions);
209     }
210 
211     public static void addEntryResources(long entryId,
212         java.lang.String[] communityPermissions,
213         java.lang.String[] guestPermissions)
214         throws com.liferay.portal.PortalException,
215             com.liferay.portal.SystemException {
216         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
217 
218         blogsEntryLocalService.addEntryResources(entryId, communityPermissions,
219             guestPermissions);
220     }
221 
222     public static void addEntryResources(
223         com.liferay.portlet.blogs.model.BlogsEntry entry,
224         java.lang.String[] communityPermissions,
225         java.lang.String[] guestPermissions)
226         throws com.liferay.portal.PortalException,
227             com.liferay.portal.SystemException {
228         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
229 
230         blogsEntryLocalService.addEntryResources(entry, communityPermissions,
231             guestPermissions);
232     }
233 
234     public static void deleteEntries(long groupId)
235         throws com.liferay.portal.PortalException,
236             com.liferay.portal.SystemException {
237         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
238 
239         blogsEntryLocalService.deleteEntries(groupId);
240     }
241 
242     public static void deleteEntry(long entryId)
243         throws com.liferay.portal.PortalException,
244             com.liferay.portal.SystemException {
245         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
246 
247         blogsEntryLocalService.deleteEntry(entryId);
248     }
249 
250     public static void deleteEntry(
251         com.liferay.portlet.blogs.model.BlogsEntry entry)
252         throws com.liferay.portal.PortalException,
253             com.liferay.portal.SystemException {
254         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
255 
256         blogsEntryLocalService.deleteEntry(entry);
257     }
258 
259     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getCompanyEntries(
260         long companyId, int start, int end)
261         throws com.liferay.portal.SystemException {
262         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
263 
264         return blogsEntryLocalService.getCompanyEntries(companyId, start, end);
265     }
266 
267     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getCompanyEntries(
268         long companyId, int start, int end,
269         com.liferay.portal.kernel.util.OrderByComparator obc)
270         throws com.liferay.portal.SystemException {
271         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
272 
273         return blogsEntryLocalService.getCompanyEntries(companyId, start, end,
274             obc);
275     }
276 
277     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getCompanyEntries(
278         long companyId, boolean draft, int start, int end)
279         throws com.liferay.portal.SystemException {
280         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
281 
282         return blogsEntryLocalService.getCompanyEntries(companyId, draft,
283             start, end);
284     }
285 
286     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getCompanyEntries(
287         long companyId, boolean draft, int start, int end,
288         com.liferay.portal.kernel.util.OrderByComparator obc)
289         throws com.liferay.portal.SystemException {
290         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
291 
292         return blogsEntryLocalService.getCompanyEntries(companyId, draft,
293             start, end, obc);
294     }
295 
296     public static int getCompanyEntriesCount(long companyId)
297         throws com.liferay.portal.SystemException {
298         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
299 
300         return blogsEntryLocalService.getCompanyEntriesCount(companyId);
301     }
302 
303     public static int getCompanyEntriesCount(long companyId, boolean draft)
304         throws com.liferay.portal.SystemException {
305         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
306 
307         return blogsEntryLocalService.getCompanyEntriesCount(companyId, draft);
308     }
309 
310     public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
311         long entryId)
312         throws com.liferay.portal.PortalException,
313             com.liferay.portal.SystemException {
314         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
315 
316         return blogsEntryLocalService.getEntry(entryId);
317     }
318 
319     public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
320         long groupId, java.lang.String urlTitle)
321         throws com.liferay.portal.PortalException,
322             com.liferay.portal.SystemException {
323         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
324 
325         return blogsEntryLocalService.getEntry(groupId, urlTitle);
326     }
327 
328     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupEntries(
329         long groupId, int start, int end)
330         throws com.liferay.portal.SystemException {
331         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
332 
333         return blogsEntryLocalService.getGroupEntries(groupId, start, end);
334     }
335 
336     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupEntries(
337         long groupId, int start, int end,
338         com.liferay.portal.kernel.util.OrderByComparator obc)
339         throws com.liferay.portal.SystemException {
340         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
341 
342         return blogsEntryLocalService.getGroupEntries(groupId, start, end, obc);
343     }
344 
345     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupEntries(
346         long groupId, boolean draft, int start, int end)
347         throws com.liferay.portal.SystemException {
348         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
349 
350         return blogsEntryLocalService.getGroupEntries(groupId, draft, start, end);
351     }
352 
353     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupEntries(
354         long groupId, boolean draft, int start, int end,
355         com.liferay.portal.kernel.util.OrderByComparator obc)
356         throws com.liferay.portal.SystemException {
357         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
358 
359         return blogsEntryLocalService.getGroupEntries(groupId, draft, start,
360             end, obc);
361     }
362 
363     public static int getGroupEntriesCount(long groupId)
364         throws com.liferay.portal.SystemException {
365         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
366 
367         return blogsEntryLocalService.getGroupEntriesCount(groupId);
368     }
369 
370     public static int getGroupEntriesCount(long groupId, boolean draft)
371         throws com.liferay.portal.SystemException {
372         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
373 
374         return blogsEntryLocalService.getGroupEntriesCount(groupId, draft);
375     }
376 
377     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupUserEntries(
378         long groupId, long userId, int start, int end)
379         throws com.liferay.portal.SystemException {
380         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
381 
382         return blogsEntryLocalService.getGroupUserEntries(groupId, userId,
383             start, end);
384     }
385 
386     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupUserEntries(
387         long groupId, long userId, int start, int end,
388         com.liferay.portal.kernel.util.OrderByComparator obc)
389         throws com.liferay.portal.SystemException {
390         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
391 
392         return blogsEntryLocalService.getGroupUserEntries(groupId, userId,
393             start, end, obc);
394     }
395 
396     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupUserEntries(
397         long groupId, long userId, boolean draft, int start, int end)
398         throws com.liferay.portal.SystemException {
399         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
400 
401         return blogsEntryLocalService.getGroupUserEntries(groupId, userId,
402             draft, start, end);
403     }
404 
405     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupUserEntries(
406         long groupId, long userId, boolean draft, int start, int end,
407         com.liferay.portal.kernel.util.OrderByComparator obc)
408         throws com.liferay.portal.SystemException {
409         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
410 
411         return blogsEntryLocalService.getGroupUserEntries(groupId, userId,
412             draft, start, end, obc);
413     }
414 
415     public static int getGroupUserEntriesCount(long groupId, long userId)
416         throws com.liferay.portal.SystemException {
417         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
418 
419         return blogsEntryLocalService.getGroupUserEntriesCount(groupId, userId);
420     }
421 
422     public static int getGroupUserEntriesCount(long groupId, long userId,
423         boolean draft) throws com.liferay.portal.SystemException {
424         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
425 
426         return blogsEntryLocalService.getGroupUserEntriesCount(groupId, userId,
427             draft);
428     }
429 
430     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getNoAssetEntries()
431         throws com.liferay.portal.SystemException {
432         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
433 
434         return blogsEntryLocalService.getNoAssetEntries();
435     }
436 
437     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getOrganizationEntries(
438         long organizationId, boolean draft, int start, int end)
439         throws com.liferay.portal.SystemException {
440         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
441 
442         return blogsEntryLocalService.getOrganizationEntries(organizationId,
443             draft, start, end);
444     }
445 
446     public static int getOrganizationEntriesCount(long organizationId,
447         boolean draft) throws com.liferay.portal.SystemException {
448         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
449 
450         return blogsEntryLocalService.getOrganizationEntriesCount(organizationId,
451             draft);
452     }
453 
454     public static java.lang.String getUrlTitle(long entryId,
455         java.lang.String title) {
456         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
457 
458         return blogsEntryLocalService.getUrlTitle(entryId, title);
459     }
460 
461     public static void reIndex(java.lang.String[] ids)
462         throws com.liferay.portal.SystemException {
463         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
464 
465         blogsEntryLocalService.reIndex(ids);
466     }
467 
468     public static com.liferay.portal.kernel.search.Hits search(long companyId,
469         long groupId, long userId, java.lang.String keywords, int start, int end)
470         throws com.liferay.portal.SystemException {
471         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
472 
473         return blogsEntryLocalService.search(companyId, groupId, userId,
474             keywords, start, end);
475     }
476 
477     public static com.liferay.portlet.blogs.model.BlogsEntry updateEntry(
478         long userId, long entryId, java.lang.String title,
479         java.lang.String content, int displayDateMonth, int displayDateDay,
480         int displayDateYear, int displayDateHour, int displayDateMinute,
481         boolean draft, boolean allowTrackbacks, java.lang.String[] trackbacks,
482         java.lang.String[] tagsEntries,
483         com.liferay.portal.theme.ThemeDisplay themeDisplay)
484         throws com.liferay.portal.PortalException,
485             com.liferay.portal.SystemException {
486         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
487 
488         return blogsEntryLocalService.updateEntry(userId, entryId, title,
489             content, displayDateMonth, displayDateDay, displayDateYear,
490             displayDateHour, displayDateMinute, draft, allowTrackbacks,
491             trackbacks, tagsEntries, themeDisplay);
492     }
493 
494     public static void updateTagsAsset(long userId,
495         com.liferay.portlet.blogs.model.BlogsEntry entry,
496         java.lang.String[] tagsEntries)
497         throws com.liferay.portal.PortalException,
498             com.liferay.portal.SystemException {
499         BlogsEntryLocalService blogsEntryLocalService = BlogsEntryLocalServiceFactory.getService();
500 
501         blogsEntryLocalService.updateTagsAsset(userId, entry, tagsEntries);
502     }
503 }