1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions 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   * <code>com.liferay.portlet.blogs.service.BlogsEntryService</code>
37   * bean. The static methods of this class calls the same methods of the bean
38   * instance. It's convenient to be able to just write one line to call a method
39   * on a bean instead of writing a lookup call and a method call.
40   * </p>
41   *
42   * @author Brian Wing Shun Chan
43   *
44   * @see com.liferay.portlet.blogs.service.BlogsEntryService
45   *
46   */
47  public class BlogsEntryServiceUtil {
48      public static com.liferay.portlet.blogs.model.BlogsEntry addEntry(
49          java.lang.String title, java.lang.String content, int displayDateMonth,
50          int displayDateDay, int displayDateYear, int displayDateHour,
51          int displayDateMinute, boolean draft, boolean allowTrackbacks,
52          java.lang.String[] trackbacks,
53          com.liferay.portal.service.ServiceContext serviceContext)
54          throws com.liferay.portal.PortalException,
55              com.liferay.portal.SystemException {
56          return getService()
57                     .addEntry(title, content, displayDateMonth, displayDateDay,
58              displayDateYear, displayDateHour, displayDateMinute, draft,
59              allowTrackbacks, trackbacks, serviceContext);
60      }
61  
62      public static void deleteEntry(long entryId)
63          throws com.liferay.portal.PortalException,
64              com.liferay.portal.SystemException {
65          getService().deleteEntry(entryId);
66      }
67  
68      public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getCompanyEntries(
69          long companyId, int max)
70          throws com.liferay.portal.PortalException,
71              com.liferay.portal.SystemException {
72          return getService().getCompanyEntries(companyId, max);
73      }
74  
75      public static java.lang.String getCompanyEntriesRSS(long companyId,
76          int max, java.lang.String type, double version,
77          java.lang.String displayStyle, java.lang.String feedURL,
78          java.lang.String entryURL,
79          com.liferay.portal.theme.ThemeDisplay themeDisplay)
80          throws com.liferay.portal.PortalException,
81              com.liferay.portal.SystemException {
82          return getService()
83                     .getCompanyEntriesRSS(companyId, max, type, version,
84              displayStyle, feedURL, entryURL, themeDisplay);
85      }
86  
87      public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
88          long entryId)
89          throws com.liferay.portal.PortalException,
90              com.liferay.portal.SystemException {
91          return getService().getEntry(entryId);
92      }
93  
94      public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
95          long groupId, java.lang.String urlTitle)
96          throws com.liferay.portal.PortalException,
97              com.liferay.portal.SystemException {
98          return getService().getEntry(groupId, urlTitle);
99      }
100 
101     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupEntries(
102         long groupId, int max)
103         throws com.liferay.portal.PortalException,
104             com.liferay.portal.SystemException {
105         return getService().getGroupEntries(groupId, max);
106     }
107 
108     public static java.lang.String getGroupEntriesRSS(long groupId, int max,
109         java.lang.String type, double version, java.lang.String displayStyle,
110         java.lang.String feedURL, java.lang.String entryURL,
111         com.liferay.portal.theme.ThemeDisplay themeDisplay)
112         throws com.liferay.portal.PortalException,
113             com.liferay.portal.SystemException {
114         return getService()
115                    .getGroupEntriesRSS(groupId, max, type, version,
116             displayStyle, feedURL, entryURL, themeDisplay);
117     }
118 
119     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getOrganizationEntries(
120         long organizationId, int max)
121         throws com.liferay.portal.PortalException,
122             com.liferay.portal.SystemException {
123         return getService().getOrganizationEntries(organizationId, max);
124     }
125 
126     public static java.lang.String getOrganizationEntriesRSS(
127         long organizationId, int max, java.lang.String type, double version,
128         java.lang.String displayStyle, java.lang.String feedURL,
129         java.lang.String entryURL,
130         com.liferay.portal.theme.ThemeDisplay themeDisplay)
131         throws com.liferay.portal.PortalException,
132             com.liferay.portal.SystemException {
133         return getService()
134                    .getOrganizationEntriesRSS(organizationId, max, type,
135             version, displayStyle, feedURL, entryURL, themeDisplay);
136     }
137 
138     public static com.liferay.portlet.blogs.model.BlogsEntry updateEntry(
139         long entryId, java.lang.String title, java.lang.String content,
140         int displayDateMonth, int displayDateDay, int displayDateYear,
141         int displayDateHour, int displayDateMinute, boolean draft,
142         boolean allowTrackbacks, java.lang.String[] trackbacks,
143         com.liferay.portal.service.ServiceContext serviceContext)
144         throws com.liferay.portal.PortalException,
145             com.liferay.portal.SystemException {
146         return getService()
147                    .updateEntry(entryId, title, content, displayDateMonth,
148             displayDateDay, displayDateYear, displayDateHour,
149             displayDateMinute, draft, allowTrackbacks, trackbacks,
150             serviceContext);
151     }
152 
153     public static BlogsEntryService getService() {
154         if (_service == null) {
155             throw new RuntimeException("BlogsEntryService is not set");
156         }
157 
158         return _service;
159     }
160 
161     public void setService(BlogsEntryService service) {
162         _service = service;
163     }
164 
165     private static BlogsEntryService _service;
166 }