1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.blogs.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="BlogsEntryServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link BlogsEntryService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       BlogsEntryService
37   * @generated
38   */
39  public class BlogsEntryServiceUtil {
40      public static com.liferay.portlet.blogs.model.BlogsEntry addEntry(
41          java.lang.String title, java.lang.String content, int displayDateMonth,
42          int displayDateDay, int displayDateYear, int displayDateHour,
43          int displayDateMinute, boolean draft, boolean allowTrackbacks,
44          java.lang.String[] trackbacks,
45          com.liferay.portal.service.ServiceContext serviceContext)
46          throws com.liferay.portal.PortalException,
47              com.liferay.portal.SystemException {
48          return getService()
49                     .addEntry(title, content, displayDateMonth, displayDateDay,
50              displayDateYear, displayDateHour, displayDateMinute, draft,
51              allowTrackbacks, trackbacks, serviceContext);
52      }
53  
54      public static void deleteEntry(long entryId)
55          throws com.liferay.portal.PortalException,
56              com.liferay.portal.SystemException {
57          getService().deleteEntry(entryId);
58      }
59  
60      public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getCompanyEntries(
61          long companyId, int max)
62          throws com.liferay.portal.PortalException,
63              com.liferay.portal.SystemException {
64          return getService().getCompanyEntries(companyId, max);
65      }
66  
67      public static java.lang.String getCompanyEntriesRSS(long companyId,
68          int max, java.lang.String type, double version,
69          java.lang.String displayStyle, java.lang.String feedURL,
70          java.lang.String entryURL,
71          com.liferay.portal.theme.ThemeDisplay themeDisplay)
72          throws com.liferay.portal.PortalException,
73              com.liferay.portal.SystemException {
74          return getService()
75                     .getCompanyEntriesRSS(companyId, max, type, version,
76              displayStyle, feedURL, entryURL, themeDisplay);
77      }
78  
79      public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
80          long entryId)
81          throws com.liferay.portal.PortalException,
82              com.liferay.portal.SystemException {
83          return getService().getEntry(entryId);
84      }
85  
86      public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
87          long groupId, java.lang.String urlTitle)
88          throws com.liferay.portal.PortalException,
89              com.liferay.portal.SystemException {
90          return getService().getEntry(groupId, urlTitle);
91      }
92  
93      public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupEntries(
94          long groupId, int max)
95          throws com.liferay.portal.PortalException,
96              com.liferay.portal.SystemException {
97          return getService().getGroupEntries(groupId, max);
98      }
99  
100     public static java.lang.String getGroupEntriesRSS(long groupId, int max,
101         java.lang.String type, double version, java.lang.String displayStyle,
102         java.lang.String feedURL, java.lang.String entryURL,
103         com.liferay.portal.theme.ThemeDisplay themeDisplay)
104         throws com.liferay.portal.PortalException,
105             com.liferay.portal.SystemException {
106         return getService()
107                    .getGroupEntriesRSS(groupId, max, type, version,
108             displayStyle, feedURL, entryURL, themeDisplay);
109     }
110 
111     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupsEntries(
112         long companyId, long groupId, int max)
113         throws com.liferay.portal.PortalException,
114             com.liferay.portal.SystemException {
115         return getService().getGroupsEntries(companyId, groupId, max);
116     }
117 
118     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getOrganizationEntries(
119         long organizationId, int max)
120         throws com.liferay.portal.PortalException,
121             com.liferay.portal.SystemException {
122         return getService().getOrganizationEntries(organizationId, max);
123     }
124 
125     public static java.lang.String getOrganizationEntriesRSS(
126         long organizationId, int max, java.lang.String type, double version,
127         java.lang.String displayStyle, java.lang.String feedURL,
128         java.lang.String entryURL,
129         com.liferay.portal.theme.ThemeDisplay themeDisplay)
130         throws com.liferay.portal.PortalException,
131             com.liferay.portal.SystemException {
132         return getService()
133                    .getOrganizationEntriesRSS(organizationId, max, type,
134             version, displayStyle, feedURL, entryURL, themeDisplay);
135     }
136 
137     public static com.liferay.portlet.blogs.model.BlogsEntry updateEntry(
138         long entryId, java.lang.String title, java.lang.String content,
139         int displayDateMonth, int displayDateDay, int displayDateYear,
140         int displayDateHour, int displayDateMinute, boolean draft,
141         boolean allowTrackbacks, java.lang.String[] trackbacks,
142         com.liferay.portal.service.ServiceContext serviceContext)
143         throws com.liferay.portal.PortalException,
144             com.liferay.portal.SystemException {
145         return getService()
146                    .updateEntry(entryId, title, content, displayDateMonth,
147             displayDateDay, displayDateYear, displayDateHour,
148             displayDateMinute, draft, allowTrackbacks, trackbacks,
149             serviceContext);
150     }
151 
152     public static BlogsEntryService getService() {
153         if (_service == null) {
154             _service = (BlogsEntryService)PortalBeanLocatorUtil.locate(BlogsEntryService.class.getName());
155         }
156 
157         return _service;
158     }
159 
160     public void setService(BlogsEntryService service) {
161         _service = service;
162     }
163 
164     private static BlogsEntryService _service;
165 }