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.blogs.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="BlogsEntryServiceUtil.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 BlogsEntryService} 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       BlogsEntryService
39   * @generated
40   */
41  public class BlogsEntryServiceUtil {
42      public static com.liferay.portlet.blogs.model.BlogsEntry addEntry(
43          java.lang.String title, java.lang.String content, int displayDateMonth,
44          int displayDateDay, int displayDateYear, int displayDateHour,
45          int displayDateMinute, boolean draft, boolean allowTrackbacks,
46          java.lang.String[] trackbacks,
47          com.liferay.portal.service.ServiceContext serviceContext)
48          throws com.liferay.portal.PortalException,
49              com.liferay.portal.SystemException {
50          return getService()
51                     .addEntry(title, content, displayDateMonth, displayDateDay,
52              displayDateYear, displayDateHour, displayDateMinute, draft,
53              allowTrackbacks, trackbacks, serviceContext);
54      }
55  
56      public static void deleteEntry(long entryId)
57          throws com.liferay.portal.PortalException,
58              com.liferay.portal.SystemException {
59          getService().deleteEntry(entryId);
60      }
61  
62      public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getCompanyEntries(
63          long companyId, int max)
64          throws com.liferay.portal.PortalException,
65              com.liferay.portal.SystemException {
66          return getService().getCompanyEntries(companyId, max);
67      }
68  
69      public static java.lang.String getCompanyEntriesRSS(long companyId,
70          int max, java.lang.String type, double version,
71          java.lang.String displayStyle, java.lang.String feedURL,
72          java.lang.String entryURL,
73          com.liferay.portal.theme.ThemeDisplay themeDisplay)
74          throws com.liferay.portal.PortalException,
75              com.liferay.portal.SystemException {
76          return getService()
77                     .getCompanyEntriesRSS(companyId, max, type, version,
78              displayStyle, feedURL, entryURL, themeDisplay);
79      }
80  
81      public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
82          long entryId)
83          throws com.liferay.portal.PortalException,
84              com.liferay.portal.SystemException {
85          return getService().getEntry(entryId);
86      }
87  
88      public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
89          long groupId, java.lang.String urlTitle)
90          throws com.liferay.portal.PortalException,
91              com.liferay.portal.SystemException {
92          return getService().getEntry(groupId, urlTitle);
93      }
94  
95      public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupEntries(
96          long groupId, int max)
97          throws com.liferay.portal.PortalException,
98              com.liferay.portal.SystemException {
99          return getService().getGroupEntries(groupId, max);
100     }
101 
102     public static java.lang.String getGroupEntriesRSS(long groupId, int max,
103         java.lang.String type, double version, java.lang.String displayStyle,
104         java.lang.String feedURL, java.lang.String entryURL,
105         com.liferay.portal.theme.ThemeDisplay themeDisplay)
106         throws com.liferay.portal.PortalException,
107             com.liferay.portal.SystemException {
108         return getService()
109                    .getGroupEntriesRSS(groupId, max, type, version,
110             displayStyle, feedURL, entryURL, themeDisplay);
111     }
112 
113     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupsEntries(
114         long companyId, long groupId, int max)
115         throws com.liferay.portal.PortalException,
116             com.liferay.portal.SystemException {
117         return getService().getGroupsEntries(companyId, groupId, max);
118     }
119 
120     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getOrganizationEntries(
121         long organizationId, int max)
122         throws com.liferay.portal.PortalException,
123             com.liferay.portal.SystemException {
124         return getService().getOrganizationEntries(organizationId, max);
125     }
126 
127     public static java.lang.String getOrganizationEntriesRSS(
128         long organizationId, int max, java.lang.String type, double version,
129         java.lang.String displayStyle, java.lang.String feedURL,
130         java.lang.String entryURL,
131         com.liferay.portal.theme.ThemeDisplay themeDisplay)
132         throws com.liferay.portal.PortalException,
133             com.liferay.portal.SystemException {
134         return getService()
135                    .getOrganizationEntriesRSS(organizationId, max, type,
136             version, displayStyle, feedURL, entryURL, themeDisplay);
137     }
138 
139     public static com.liferay.portlet.blogs.model.BlogsEntry updateEntry(
140         long entryId, java.lang.String title, java.lang.String content,
141         int displayDateMonth, int displayDateDay, int displayDateYear,
142         int displayDateHour, int displayDateMinute, boolean draft,
143         boolean allowTrackbacks, java.lang.String[] trackbacks,
144         com.liferay.portal.service.ServiceContext serviceContext)
145         throws com.liferay.portal.PortalException,
146             com.liferay.portal.SystemException {
147         return getService()
148                    .updateEntry(entryId, title, content, displayDateMonth,
149             displayDateDay, displayDateYear, displayDateHour,
150             displayDateMinute, draft, allowTrackbacks, trackbacks,
151             serviceContext);
152     }
153 
154     public static BlogsEntryService getService() {
155         if (_service == null) {
156             _service = (BlogsEntryService)PortalBeanLocatorUtil.locate(BlogsEntryService.class.getName());
157 
158             ReferenceRegistry.registerReference(BlogsEntryServiceUtil.class,
159                 "_service");
160             MethodCache.remove(BlogsEntryService.class);
161         }
162 
163         return _service;
164     }
165 
166     public void setService(BlogsEntryService service) {
167         MethodCache.remove(BlogsEntryService.class);
168 
169         _service = service;
170 
171         ReferenceRegistry.registerReference(BlogsEntryServiceUtil.class,
172             "_service");
173         MethodCache.remove(BlogsEntryService.class);
174     }
175 
176     private static BlogsEntryService _service;
177 }