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.journal.service;
24  
25  
26  /**
27   * <a href="JournalFeedLocalServiceUtil.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.journal.service.JournalFeedLocalService</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.journal.service.JournalFeedLocalServiceFactory</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.journal.service.JournalFeedLocalService
50   * @see com.liferay.portlet.journal.service.JournalFeedLocalServiceFactory
51   *
52   */
53  public class JournalFeedLocalServiceUtil {
54      public static com.liferay.portlet.journal.model.JournalFeed addJournalFeed(
55          com.liferay.portlet.journal.model.JournalFeed journalFeed)
56          throws com.liferay.portal.SystemException {
57          JournalFeedLocalService journalFeedLocalService = JournalFeedLocalServiceFactory.getService();
58  
59          return journalFeedLocalService.addJournalFeed(journalFeed);
60      }
61  
62      public static void deleteJournalFeed(long id)
63          throws com.liferay.portal.PortalException,
64              com.liferay.portal.SystemException {
65          JournalFeedLocalService journalFeedLocalService = JournalFeedLocalServiceFactory.getService();
66  
67          journalFeedLocalService.deleteJournalFeed(id);
68      }
69  
70      public static void deleteJournalFeed(
71          com.liferay.portlet.journal.model.JournalFeed journalFeed)
72          throws com.liferay.portal.PortalException,
73              com.liferay.portal.SystemException {
74          JournalFeedLocalService journalFeedLocalService = JournalFeedLocalServiceFactory.getService();
75  
76          journalFeedLocalService.deleteJournalFeed(journalFeed);
77      }
78  
79      public static java.util.List<com.liferay.portlet.journal.model.JournalFeed> dynamicQuery(
80          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
81          throws com.liferay.portal.SystemException {
82          JournalFeedLocalService journalFeedLocalService = JournalFeedLocalServiceFactory.getService();
83  
84          return journalFeedLocalService.dynamicQuery(queryInitializer);
85      }
86  
87      public static java.util.List<com.liferay.portlet.journal.model.JournalFeed> dynamicQuery(
88          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
89          int begin, int end) throws com.liferay.portal.SystemException {
90          JournalFeedLocalService journalFeedLocalService = JournalFeedLocalServiceFactory.getService();
91  
92          return journalFeedLocalService.dynamicQuery(queryInitializer, begin, end);
93      }
94  
95      public static com.liferay.portlet.journal.model.JournalFeed updateJournalFeed(
96          com.liferay.portlet.journal.model.JournalFeed journalFeed)
97          throws com.liferay.portal.SystemException {
98          JournalFeedLocalService journalFeedLocalService = JournalFeedLocalServiceFactory.getService();
99  
100         return journalFeedLocalService.updateJournalFeed(journalFeed);
101     }
102 
103     public static com.liferay.portlet.journal.model.JournalFeed addFeed(
104         long userId, long plid, java.lang.String feedId, boolean autoFeedId,
105         java.lang.String name, java.lang.String description,
106         java.lang.String type, java.lang.String structureId,
107         java.lang.String templateId, java.lang.String rendererTemplateId,
108         int delta, java.lang.String orderByCol, java.lang.String orderByType,
109         java.lang.String targetLayoutFriendlyUrl,
110         java.lang.String targetPortletId, java.lang.String contentField,
111         java.lang.String feedType, double feedVersion,
112         boolean addCommunityPermissions, boolean addGuestPermissions)
113         throws com.liferay.portal.PortalException,
114             com.liferay.portal.SystemException {
115         JournalFeedLocalService journalFeedLocalService = JournalFeedLocalServiceFactory.getService();
116 
117         return journalFeedLocalService.addFeed(userId, plid, feedId,
118             autoFeedId, name, description, type, structureId, templateId,
119             rendererTemplateId, delta, orderByCol, orderByType,
120             targetLayoutFriendlyUrl, targetPortletId, contentField, feedType,
121             feedVersion, addCommunityPermissions, addGuestPermissions);
122     }
123 
124     public static com.liferay.portlet.journal.model.JournalFeed addFeed(
125         long userId, long plid, java.lang.String feedId, boolean autoFeedId,
126         java.lang.String name, java.lang.String description,
127         java.lang.String type, java.lang.String structureId,
128         java.lang.String templateId, java.lang.String rendererTemplateId,
129         int delta, java.lang.String orderByCol, java.lang.String orderByType,
130         java.lang.String targetLayoutFriendlyUrl,
131         java.lang.String targetPortletId, java.lang.String contentField,
132         java.lang.String feedType, double feedVersion,
133         java.lang.String[] communityPermissions,
134         java.lang.String[] guestPermissions)
135         throws com.liferay.portal.PortalException,
136             com.liferay.portal.SystemException {
137         JournalFeedLocalService journalFeedLocalService = JournalFeedLocalServiceFactory.getService();
138 
139         return journalFeedLocalService.addFeed(userId, plid, feedId,
140             autoFeedId, name, description, type, structureId, templateId,
141             rendererTemplateId, delta, orderByCol, orderByType,
142             targetLayoutFriendlyUrl, targetPortletId, contentField, feedType,
143             feedVersion, communityPermissions, guestPermissions);
144     }
145 
146     public static com.liferay.portlet.journal.model.JournalFeed addFeed(
147         java.lang.String uuid, long userId, long plid, java.lang.String feedId,
148         boolean autoFeedId, java.lang.String name,
149         java.lang.String description, java.lang.String type,
150         java.lang.String structureId, java.lang.String templateId,
151         java.lang.String rendererTemplateId, int delta,
152         java.lang.String orderByCol, java.lang.String orderByType,
153         java.lang.String targetLayoutFriendlyUrl,
154         java.lang.String targetPortletId, java.lang.String contentField,
155         java.lang.String feedType, double feedVersion,
156         boolean addCommunityPermissions, boolean addGuestPermissions)
157         throws com.liferay.portal.PortalException,
158             com.liferay.portal.SystemException {
159         JournalFeedLocalService journalFeedLocalService = JournalFeedLocalServiceFactory.getService();
160 
161         return journalFeedLocalService.addFeed(uuid, userId, plid, feedId,
162             autoFeedId, name, description, type, structureId, templateId,
163             rendererTemplateId, delta, orderByCol, orderByType,
164             targetLayoutFriendlyUrl, targetPortletId, contentField, feedType,
165             feedVersion, addCommunityPermissions, addGuestPermissions);
166     }
167 
168     public static com.liferay.portlet.journal.model.JournalFeed addFeed(
169         java.lang.String uuid, long userId, long plid, java.lang.String feedId,
170         boolean autoFeedId, java.lang.String name,
171         java.lang.String description, java.lang.String type,
172         java.lang.String structureId, java.lang.String templateId,
173         java.lang.String rendererTemplateId, int delta,
174         java.lang.String orderByCol, java.lang.String orderByType,
175         java.lang.String targetLayoutFriendlyUrl,
176         java.lang.String targetPortletId, java.lang.String contentField,
177         java.lang.String feedType, double feedVersion,
178         java.lang.String[] communityPermissions,
179         java.lang.String[] guestPermissions)
180         throws com.liferay.portal.PortalException,
181             com.liferay.portal.SystemException {
182         JournalFeedLocalService journalFeedLocalService = JournalFeedLocalServiceFactory.getService();
183 
184         return journalFeedLocalService.addFeed(uuid, userId, plid, feedId,
185             autoFeedId, name, description, type, structureId, templateId,
186             rendererTemplateId, delta, orderByCol, orderByType,
187             targetLayoutFriendlyUrl, targetPortletId, contentField, feedType,
188             feedVersion, communityPermissions, guestPermissions);
189     }
190 
191     public static com.liferay.portlet.journal.model.JournalFeed addFeed(
192         java.lang.String uuid, long userId, long plid, java.lang.String feedId,
193         boolean autoFeedId, java.lang.String name,
194         java.lang.String description, java.lang.String type,
195         java.lang.String structureId, java.lang.String templateId,
196         java.lang.String rendererTemplateId, int delta,
197         java.lang.String orderByCol, java.lang.String orderByType,
198         java.lang.String targetLayoutFriendlyUrl,
199         java.lang.String targetPortletId, java.lang.String contentField,
200         java.lang.String feedType, double feedVersion,
201         java.lang.Boolean addCommunityPermissions,
202         java.lang.Boolean addGuestPermissions,
203         java.lang.String[] communityPermissions,
204         java.lang.String[] guestPermissions)
205         throws com.liferay.portal.PortalException,
206             com.liferay.portal.SystemException {
207         JournalFeedLocalService journalFeedLocalService = JournalFeedLocalServiceFactory.getService();
208 
209         return journalFeedLocalService.addFeed(uuid, userId, plid, feedId,
210             autoFeedId, name, description, type, structureId, templateId,
211             rendererTemplateId, delta, orderByCol, orderByType,
212             targetLayoutFriendlyUrl, targetPortletId, contentField, feedType,
213             feedVersion, addCommunityPermissions, addGuestPermissions,
214             communityPermissions, guestPermissions);
215     }
216 
217     public static com.liferay.portlet.journal.model.JournalFeed addFeedToGroup(
218         java.lang.String uuid, long userId, long groupId,
219         java.lang.String feedId, boolean autoFeedId, java.lang.String name,
220         java.lang.String description, java.lang.String type,
221         java.lang.String structureId, java.lang.String templateId,
222         java.lang.String rendererTemplateId, int delta,
223         java.lang.String orderByCol, java.lang.String orderByType,
224         java.lang.String targetLayoutFriendlyUrl,
225         java.lang.String targetPortletId, java.lang.String contentField,
226         java.lang.String feedType, double feedVersion,
227         java.lang.Boolean addCommunityPermissions,
228         java.lang.Boolean addGuestPermissions,
229         java.lang.String[] communityPermissions,
230         java.lang.String[] guestPermissions)
231         throws com.liferay.portal.PortalException,
232             com.liferay.portal.SystemException {
233         JournalFeedLocalService journalFeedLocalService = JournalFeedLocalServiceFactory.getService();
234 
235         return journalFeedLocalService.addFeedToGroup(uuid, userId, groupId,
236             feedId, autoFeedId, name, description, type, structureId,
237             templateId, rendererTemplateId, delta, orderByCol, orderByType,
238             targetLayoutFriendlyUrl, targetPortletId, contentField, feedType,
239             feedVersion, addCommunityPermissions, addGuestPermissions,
240             communityPermissions, guestPermissions);
241     }
242 
243     public static void addFeedResources(long feedId,
244         boolean addCommunityPermissions, boolean addGuestPermissions)
245         throws com.liferay.portal.PortalException,
246             com.liferay.portal.SystemException {
247         JournalFeedLocalService journalFeedLocalService = JournalFeedLocalServiceFactory.getService();
248 
249         journalFeedLocalService.addFeedResources(feedId,
250             addCommunityPermissions, addGuestPermissions);
251     }
252 
253     public static void addFeedResources(
254         com.liferay.portlet.journal.model.JournalFeed feed,
255         boolean addCommunityPermissions, boolean addGuestPermissions)
256         throws com.liferay.portal.PortalException,
257             com.liferay.portal.SystemException {
258         JournalFeedLocalService journalFeedLocalService = JournalFeedLocalServiceFactory.getService();
259 
260         journalFeedLocalService.addFeedResources(feed, addCommunityPermissions,
261             addGuestPermissions);
262     }
263 
264     public static void addFeedResources(long feedId,
265         java.lang.String[] communityPermissions,
266         java.lang.String[] guestPermissions)
267         throws com.liferay.portal.PortalException,
268             com.liferay.portal.SystemException {
269         JournalFeedLocalService journalFeedLocalService = JournalFeedLocalServiceFactory.getService();
270 
271         journalFeedLocalService.addFeedResources(feedId, communityPermissions,
272             guestPermissions);
273     }
274 
275     public static void addFeedResources(
276         com.liferay.portlet.journal.model.JournalFeed feed,
277         java.lang.String[] communityPermissions,
278         java.lang.String[] guestPermissions)
279         throws com.liferay.portal.PortalException,
280             com.liferay.portal.SystemException {
281         JournalFeedLocalService journalFeedLocalService = JournalFeedLocalServiceFactory.getService();
282 
283         journalFeedLocalService.addFeedResources(feed, communityPermissions,
284             guestPermissions);
285     }
286 
287     public static void deleteFeed(long feedId)
288         throws com.liferay.portal.PortalException,
289             com.liferay.portal.SystemException {
290         JournalFeedLocalService journalFeedLocalService = JournalFeedLocalServiceFactory.getService();
291 
292         journalFeedLocalService.deleteFeed(feedId);
293     }
294 
295     public static void deleteFeed(long groupId, java.lang.String feedId)
296         throws com.liferay.portal.PortalException,
297             com.liferay.portal.SystemException {
298         JournalFeedLocalService journalFeedLocalService = JournalFeedLocalServiceFactory.getService();
299 
300         journalFeedLocalService.deleteFeed(groupId, feedId);
301     }
302 
303     public static void deleteFeed(
304         com.liferay.portlet.journal.model.JournalFeed feed)
305         throws com.liferay.portal.PortalException,
306             com.liferay.portal.SystemException {
307         JournalFeedLocalService journalFeedLocalService = JournalFeedLocalServiceFactory.getService();
308 
309         journalFeedLocalService.deleteFeed(feed);
310     }
311 
312     public static com.liferay.portlet.journal.model.JournalFeed getFeed(
313         long feedId)
314         throws com.liferay.portal.PortalException,
315             com.liferay.portal.SystemException {
316         JournalFeedLocalService journalFeedLocalService = JournalFeedLocalServiceFactory.getService();
317 
318         return journalFeedLocalService.getFeed(feedId);
319     }
320 
321     public static com.liferay.portlet.journal.model.JournalFeed getFeed(
322         long groupId, java.lang.String feedId)
323         throws com.liferay.portal.PortalException,
324             com.liferay.portal.SystemException {
325         JournalFeedLocalService journalFeedLocalService = JournalFeedLocalServiceFactory.getService();
326 
327         return journalFeedLocalService.getFeed(groupId, feedId);
328     }
329 
330     public static java.util.List<com.liferay.portlet.journal.model.JournalFeed> getFeeds()
331         throws com.liferay.portal.SystemException {
332         JournalFeedLocalService journalFeedLocalService = JournalFeedLocalServiceFactory.getService();
333 
334         return journalFeedLocalService.getFeeds();
335     }
336 
337     public static java.util.List<com.liferay.portlet.journal.model.JournalFeed> getFeeds(
338         long groupId) throws com.liferay.portal.SystemException {
339         JournalFeedLocalService journalFeedLocalService = JournalFeedLocalServiceFactory.getService();
340 
341         return journalFeedLocalService.getFeeds(groupId);
342     }
343 
344     public static java.util.List<com.liferay.portlet.journal.model.JournalFeed> getFeeds(
345         long groupId, int begin, int end)
346         throws com.liferay.portal.SystemException {
347         JournalFeedLocalService journalFeedLocalService = JournalFeedLocalServiceFactory.getService();
348 
349         return journalFeedLocalService.getFeeds(groupId, begin, end);
350     }
351 
352     public static int getFeedsCount(long groupId)
353         throws com.liferay.portal.SystemException {
354         JournalFeedLocalService journalFeedLocalService = JournalFeedLocalServiceFactory.getService();
355 
356         return journalFeedLocalService.getFeedsCount(groupId);
357     }
358 
359     public static java.util.List<com.liferay.portlet.journal.model.JournalFeed> search(
360         long companyId, long groupId, java.lang.String keywords, int begin,
361         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
362         throws com.liferay.portal.SystemException {
363         JournalFeedLocalService journalFeedLocalService = JournalFeedLocalServiceFactory.getService();
364 
365         return journalFeedLocalService.search(companyId, groupId, keywords,
366             begin, end, obc);
367     }
368 
369     public static java.util.List<com.liferay.portlet.journal.model.JournalFeed> search(
370         long companyId, long groupId, java.lang.String feedId,
371         java.lang.String name, java.lang.String description,
372         boolean andOperator, int begin, int end,
373         com.liferay.portal.kernel.util.OrderByComparator obc)
374         throws com.liferay.portal.SystemException {
375         JournalFeedLocalService journalFeedLocalService = JournalFeedLocalServiceFactory.getService();
376 
377         return journalFeedLocalService.search(companyId, groupId, feedId, name,
378             description, andOperator, begin, end, obc);
379     }
380 
381     public static int searchCount(long companyId, long groupId,
382         java.lang.String keywords) throws com.liferay.portal.SystemException {
383         JournalFeedLocalService journalFeedLocalService = JournalFeedLocalServiceFactory.getService();
384 
385         return journalFeedLocalService.searchCount(companyId, groupId, keywords);
386     }
387 
388     public static int searchCount(long companyId, long groupId,
389         java.lang.String feedId, java.lang.String name,
390         java.lang.String description, boolean andOperator)
391         throws com.liferay.portal.SystemException {
392         JournalFeedLocalService journalFeedLocalService = JournalFeedLocalServiceFactory.getService();
393 
394         return journalFeedLocalService.searchCount(companyId, groupId, feedId,
395             name, description, andOperator);
396     }
397 
398     public static com.liferay.portlet.journal.model.JournalFeed updateFeed(
399         long groupId, java.lang.String feedId, java.lang.String name,
400         java.lang.String description, java.lang.String type,
401         java.lang.String structureId, java.lang.String templateId,
402         java.lang.String rendererTemplateId, int delta,
403         java.lang.String orderByCol, java.lang.String orderByType,
404         java.lang.String targetLayoutFriendlyUrl,
405         java.lang.String targetPortletId, java.lang.String contentField,
406         java.lang.String feedType, double feedVersion)
407         throws com.liferay.portal.PortalException,
408             com.liferay.portal.SystemException {
409         JournalFeedLocalService journalFeedLocalService = JournalFeedLocalServiceFactory.getService();
410 
411         return journalFeedLocalService.updateFeed(groupId, feedId, name,
412             description, type, structureId, templateId, rendererTemplateId,
413             delta, orderByCol, orderByType, targetLayoutFriendlyUrl,
414             targetPortletId, contentField, feedType, feedVersion);
415     }
416 }