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.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   * {@link JournalFeedService} 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       JournalFeedService
44   * @generated
45   */
46  public class JournalFeedServiceUtil {
47      public static com.liferay.portlet.journal.model.JournalFeed addFeed(
48          long groupId, java.lang.String feedId, boolean autoFeedId,
49          java.lang.String name, java.lang.String description,
50          java.lang.String type, java.lang.String structureId,
51          java.lang.String templateId, java.lang.String rendererTemplateId,
52          int delta, java.lang.String orderByCol, java.lang.String orderByType,
53          java.lang.String targetLayoutFriendlyUrl,
54          java.lang.String targetPortletId, java.lang.String contentField,
55          java.lang.String feedType, double feedVersion,
56          com.liferay.portal.service.ServiceContext serviceContext)
57          throws com.liferay.portal.PortalException,
58              com.liferay.portal.SystemException {
59          return getService()
60                     .addFeed(groupId, feedId, autoFeedId, name, description,
61              type, structureId, templateId, rendererTemplateId, delta,
62              orderByCol, orderByType, targetLayoutFriendlyUrl, targetPortletId,
63              contentField, feedType, feedVersion, serviceContext);
64      }
65  
66      public static void deleteFeed(long groupId, long feedId)
67          throws com.liferay.portal.PortalException,
68              com.liferay.portal.SystemException {
69          getService().deleteFeed(groupId, feedId);
70      }
71  
72      public static void deleteFeed(long groupId, java.lang.String feedId)
73          throws com.liferay.portal.PortalException,
74              com.liferay.portal.SystemException {
75          getService().deleteFeed(groupId, feedId);
76      }
77  
78      public static com.liferay.portlet.journal.model.JournalFeed getFeed(
79          long groupId, long feedId)
80          throws com.liferay.portal.PortalException,
81              com.liferay.portal.SystemException {
82          return getService().getFeed(groupId, feedId);
83      }
84  
85      public static com.liferay.portlet.journal.model.JournalFeed getFeed(
86          long groupId, java.lang.String feedId)
87          throws com.liferay.portal.PortalException,
88              com.liferay.portal.SystemException {
89          return getService().getFeed(groupId, feedId);
90      }
91  
92      public static com.liferay.portlet.journal.model.JournalFeed updateFeed(
93          long groupId, java.lang.String feedId, java.lang.String name,
94          java.lang.String description, java.lang.String type,
95          java.lang.String structureId, java.lang.String templateId,
96          java.lang.String rendererTemplateId, int delta,
97          java.lang.String orderByCol, java.lang.String orderByType,
98          java.lang.String targetLayoutFriendlyUrl,
99          java.lang.String targetPortletId, java.lang.String contentField,
100         java.lang.String feedType, double feedVersion,
101         com.liferay.portal.service.ServiceContext serviceContext)
102         throws com.liferay.portal.PortalException,
103             com.liferay.portal.SystemException {
104         return getService()
105                    .updateFeed(groupId, feedId, name, description, type,
106             structureId, templateId, rendererTemplateId, delta, orderByCol,
107             orderByType, targetLayoutFriendlyUrl, targetPortletId,
108             contentField, feedType, feedVersion, serviceContext);
109     }
110 
111     public static JournalFeedService getService() {
112         if (_service == null) {
113             throw new RuntimeException("JournalFeedService is not set");
114         }
115 
116         return _service;
117     }
118 
119     public void setService(JournalFeedService service) {
120         _service = service;
121     }
122 
123     private static JournalFeedService _service;
124 }