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.blogs.service;
24  
25  
26  /**
27   * <a href="BlogsEntryServiceUtil.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 BlogsEntryService} 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       BlogsEntryService
44   * @generated
45   */
46  public class BlogsEntryServiceUtil {
47      public static com.liferay.portlet.blogs.model.BlogsEntry addEntry(
48          java.lang.String title, java.lang.String content, int displayDateMonth,
49          int displayDateDay, int displayDateYear, int displayDateHour,
50          int displayDateMinute, boolean draft, boolean allowTrackbacks,
51          java.lang.String[] trackbacks,
52          com.liferay.portal.service.ServiceContext serviceContext)
53          throws com.liferay.portal.PortalException,
54              com.liferay.portal.SystemException {
55          return getService()
56                     .addEntry(title, content, displayDateMonth, displayDateDay,
57              displayDateYear, displayDateHour, displayDateMinute, draft,
58              allowTrackbacks, trackbacks, serviceContext);
59      }
60  
61      public static void deleteEntry(long entryId)
62          throws com.liferay.portal.PortalException,
63              com.liferay.portal.SystemException {
64          getService().deleteEntry(entryId);
65      }
66  
67      public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getCompanyEntries(
68          long companyId, int max)
69          throws com.liferay.portal.PortalException,
70              com.liferay.portal.SystemException {
71          return getService().getCompanyEntries(companyId, max);
72      }
73  
74      public static java.lang.String getCompanyEntriesRSS(long companyId,
75          int max, java.lang.String type, double version,
76          java.lang.String displayStyle, java.lang.String feedURL,
77          java.lang.String entryURL,
78          com.liferay.portal.theme.ThemeDisplay themeDisplay)
79          throws com.liferay.portal.PortalException,
80              com.liferay.portal.SystemException {
81          return getService()
82                     .getCompanyEntriesRSS(companyId, max, type, version,
83              displayStyle, feedURL, entryURL, themeDisplay);
84      }
85  
86      public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
87          long entryId)
88          throws com.liferay.portal.PortalException,
89              com.liferay.portal.SystemException {
90          return getService().getEntry(entryId);
91      }
92  
93      public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
94          long groupId, java.lang.String urlTitle)
95          throws com.liferay.portal.PortalException,
96              com.liferay.portal.SystemException {
97          return getService().getEntry(groupId, urlTitle);
98      }
99  
100     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupEntries(
101         long groupId, int max)
102         throws com.liferay.portal.PortalException,
103             com.liferay.portal.SystemException {
104         return getService().getGroupEntries(groupId, max);
105     }
106 
107     public static java.lang.String getGroupEntriesRSS(long groupId, int max,
108         java.lang.String type, double version, java.lang.String displayStyle,
109         java.lang.String feedURL, java.lang.String entryURL,
110         com.liferay.portal.theme.ThemeDisplay themeDisplay)
111         throws com.liferay.portal.PortalException,
112             com.liferay.portal.SystemException {
113         return getService()
114                    .getGroupEntriesRSS(groupId, max, type, version,
115             displayStyle, feedURL, entryURL, themeDisplay);
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             throw new RuntimeException("BlogsEntryService is not set");
155         }
156 
157         return _service;
158     }
159 
160     public void setService(BlogsEntryService service) {
161         _service = service;
162     }
163 
164     private static BlogsEntryService _service;
165 }