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  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
26  
27  /**
28   * <a href="BlogsEntryServiceUtil.java.html"><b><i>View Source</i></b></a>
29   *
30   * <p>
31   * ServiceBuilder generated this class. Modifications in this class will be
32   * overwritten the next time is generated.
33   * </p>
34   *
35   * <p>
36   * This class provides static methods for the
37   * {@link BlogsEntryService} bean. The static methods of
38   * this class calls the same methods of the bean instance. It's convenient to be
39   * able to just write one line to call a method on a bean instead of writing a
40   * lookup call and a method call.
41   * </p>
42   *
43   * @author    Brian Wing Shun Chan
44   * @see       BlogsEntryService
45   * @generated
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             _service = (BlogsEntryService)PortalBeanLocatorUtil.locate(BlogsEntryService.class.getName());
156         }
157 
158         return _service;
159     }
160 
161     public void setService(BlogsEntryService service) {
162         _service = service;
163     }
164 
165     private static BlogsEntryService _service;
166 }