1   /**
2    * Copyright (c) 2000-2009 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="JournalFeedServiceUtil.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.JournalFeedService</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   * @author Brian Wing Shun Chan
43   *
44   * @see com.liferay.portlet.journal.service.JournalFeedService
45   *
46   */
47  public class JournalFeedServiceUtil {
48      public static com.liferay.portlet.journal.model.JournalFeed addFeed(
49          long groupId, java.lang.String feedId, boolean autoFeedId,
50          java.lang.String name, java.lang.String description,
51          java.lang.String type, java.lang.String structureId,
52          java.lang.String templateId, java.lang.String rendererTemplateId,
53          int delta, java.lang.String orderByCol, java.lang.String orderByType,
54          java.lang.String targetLayoutFriendlyUrl,
55          java.lang.String targetPortletId, java.lang.String contentField,
56          java.lang.String feedType, double feedVersion,
57          boolean addCommunityPermissions, boolean addGuestPermissions)
58          throws com.liferay.portal.PortalException,
59              com.liferay.portal.SystemException {
60          return getService()
61                     .addFeed(groupId, feedId, autoFeedId, name, description,
62              type, structureId, templateId, rendererTemplateId, delta,
63              orderByCol, orderByType, targetLayoutFriendlyUrl, targetPortletId,
64              contentField, feedType, feedVersion, addCommunityPermissions,
65              addGuestPermissions);
66      }
67  
68      public static com.liferay.portlet.journal.model.JournalFeed addFeed(
69          long groupId, java.lang.String feedId, boolean autoFeedId,
70          java.lang.String name, java.lang.String description,
71          java.lang.String type, java.lang.String structureId,
72          java.lang.String templateId, java.lang.String rendererTemplateId,
73          int delta, java.lang.String orderByCol, java.lang.String orderByType,
74          java.lang.String targetLayoutFriendlyUrl,
75          java.lang.String targetPortletId, java.lang.String contentField,
76          java.lang.String feedType, double feedVersion,
77          java.lang.String[] communityPermissions,
78          java.lang.String[] guestPermissions)
79          throws com.liferay.portal.PortalException,
80              com.liferay.portal.SystemException {
81          return getService()
82                     .addFeed(groupId, feedId, autoFeedId, name, description,
83              type, structureId, templateId, rendererTemplateId, delta,
84              orderByCol, orderByType, targetLayoutFriendlyUrl, targetPortletId,
85              contentField, feedType, feedVersion, communityPermissions,
86              guestPermissions);
87      }
88  
89      public static void deleteFeed(long groupId, long feedId)
90          throws com.liferay.portal.PortalException,
91              com.liferay.portal.SystemException {
92          getService().deleteFeed(groupId, feedId);
93      }
94  
95      public static void deleteFeed(long groupId, java.lang.String feedId)
96          throws com.liferay.portal.PortalException,
97              com.liferay.portal.SystemException {
98          getService().deleteFeed(groupId, feedId);
99      }
100 
101     public static com.liferay.portlet.journal.model.JournalFeed getFeed(
102         long groupId, long feedId)
103         throws com.liferay.portal.PortalException,
104             com.liferay.portal.SystemException {
105         return getService().getFeed(groupId, feedId);
106     }
107 
108     public static com.liferay.portlet.journal.model.JournalFeed getFeed(
109         long groupId, java.lang.String feedId)
110         throws com.liferay.portal.PortalException,
111             com.liferay.portal.SystemException {
112         return getService().getFeed(groupId, feedId);
113     }
114 
115     public static com.liferay.portlet.journal.model.JournalFeed updateFeed(
116         long groupId, java.lang.String feedId, java.lang.String name,
117         java.lang.String description, java.lang.String type,
118         java.lang.String structureId, java.lang.String templateId,
119         java.lang.String rendererTemplateId, int delta,
120         java.lang.String orderByCol, java.lang.String orderByType,
121         java.lang.String targetLayoutFriendlyUrl,
122         java.lang.String targetPortletId, java.lang.String contentField,
123         java.lang.String feedType, double feedVersion)
124         throws com.liferay.portal.PortalException,
125             com.liferay.portal.SystemException {
126         return getService()
127                    .updateFeed(groupId, feedId, name, description, type,
128             structureId, templateId, rendererTemplateId, delta, orderByCol,
129             orderByType, targetLayoutFriendlyUrl, targetPortletId,
130             contentField, feedType, feedVersion);
131     }
132 
133     public static JournalFeedService getService() {
134         if (_service == null) {
135             throw new RuntimeException("JournalFeedService is not set");
136         }
137 
138         return _service;
139     }
140 
141     public void setService(JournalFeedService service) {
142         _service = service;
143     }
144 
145     private static JournalFeedService _service;
146 }