1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portlet.journal.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.util.MethodCache;
19  import com.liferay.portal.kernel.util.ReferenceRegistry;
20  
21  /**
22   * <a href="JournalFeedServiceUtil.java.html"><b><i>View Source</i></b></a>
23   *
24   * <p>
25   * ServiceBuilder generated this class. Modifications in this class will be
26   * overwritten the next time is generated.
27   * </p>
28   *
29   * <p>
30   * This class provides static methods for the
31   * {@link JournalFeedService} bean. The static methods of
32   * this class calls the same methods of the bean instance. It's convenient to be
33   * able to just write one line to call a method on a bean instead of writing a
34   * lookup call and a method call.
35   * </p>
36   *
37   * @author    Brian Wing Shun Chan
38   * @see       JournalFeedService
39   * @generated
40   */
41  public class JournalFeedServiceUtil {
42      public static com.liferay.portlet.journal.model.JournalFeed addFeed(
43          long groupId, java.lang.String feedId, boolean autoFeedId,
44          java.lang.String name, java.lang.String description,
45          java.lang.String type, java.lang.String structureId,
46          java.lang.String templateId, java.lang.String rendererTemplateId,
47          int delta, java.lang.String orderByCol, java.lang.String orderByType,
48          java.lang.String targetLayoutFriendlyUrl,
49          java.lang.String targetPortletId, java.lang.String contentField,
50          java.lang.String feedType, double feedVersion,
51          com.liferay.portal.service.ServiceContext serviceContext)
52          throws com.liferay.portal.PortalException,
53              com.liferay.portal.SystemException {
54          return getService()
55                     .addFeed(groupId, feedId, autoFeedId, name, description,
56              type, structureId, templateId, rendererTemplateId, delta,
57              orderByCol, orderByType, targetLayoutFriendlyUrl, targetPortletId,
58              contentField, feedType, feedVersion, serviceContext);
59      }
60  
61      public static void deleteFeed(long groupId, long feedId)
62          throws com.liferay.portal.PortalException,
63              com.liferay.portal.SystemException {
64          getService().deleteFeed(groupId, feedId);
65      }
66  
67      public static void deleteFeed(long groupId, java.lang.String feedId)
68          throws com.liferay.portal.PortalException,
69              com.liferay.portal.SystemException {
70          getService().deleteFeed(groupId, feedId);
71      }
72  
73      public static com.liferay.portlet.journal.model.JournalFeed getFeed(
74          long groupId, long feedId)
75          throws com.liferay.portal.PortalException,
76              com.liferay.portal.SystemException {
77          return getService().getFeed(groupId, feedId);
78      }
79  
80      public static com.liferay.portlet.journal.model.JournalFeed getFeed(
81          long groupId, java.lang.String feedId)
82          throws com.liferay.portal.PortalException,
83              com.liferay.portal.SystemException {
84          return getService().getFeed(groupId, feedId);
85      }
86  
87      public static com.liferay.portlet.journal.model.JournalFeed updateFeed(
88          long groupId, java.lang.String feedId, java.lang.String name,
89          java.lang.String description, java.lang.String type,
90          java.lang.String structureId, java.lang.String templateId,
91          java.lang.String rendererTemplateId, int delta,
92          java.lang.String orderByCol, java.lang.String orderByType,
93          java.lang.String targetLayoutFriendlyUrl,
94          java.lang.String targetPortletId, java.lang.String contentField,
95          java.lang.String feedType, double feedVersion,
96          com.liferay.portal.service.ServiceContext serviceContext)
97          throws com.liferay.portal.PortalException,
98              com.liferay.portal.SystemException {
99          return getService()
100                    .updateFeed(groupId, feedId, name, description, type,
101             structureId, templateId, rendererTemplateId, delta, orderByCol,
102             orderByType, targetLayoutFriendlyUrl, targetPortletId,
103             contentField, feedType, feedVersion, serviceContext);
104     }
105 
106     public static JournalFeedService getService() {
107         if (_service == null) {
108             _service = (JournalFeedService)PortalBeanLocatorUtil.locate(JournalFeedService.class.getName());
109 
110             ReferenceRegistry.registerReference(JournalFeedServiceUtil.class,
111                 "_service");
112             MethodCache.remove(JournalFeedService.class);
113         }
114 
115         return _service;
116     }
117 
118     public void setService(JournalFeedService service) {
119         MethodCache.remove(JournalFeedService.class);
120 
121         _service = service;
122 
123         ReferenceRegistry.registerReference(JournalFeedServiceUtil.class,
124             "_service");
125         MethodCache.remove(JournalFeedService.class);
126     }
127 
128     private static JournalFeedService _service;
129 }