1   /**
2    * Copyright (c) 2000-2007 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   * <a href="BlogsEntryServiceUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be overwritten
30   * the next time is generated.
31   * </p>
32   *
33   * <p>
34   * This class provides static methods for the <code>com.liferay.portlet.blogs.service.BlogsEntryService</code>
35   * bean. The static methods of this class calls the same methods of the bean instance.
36   * It's convenient to be able to just write one line to call a method on a bean
37   * instead of writing a lookup call and a method call.
38   * </p>
39   *
40   * <p>
41   * <code>com.liferay.portlet.blogs.service.BlogsEntryServiceFactory</code> is responsible
42   * for the lookup of the bean.
43   * </p>
44   *
45   * @author Brian Wing Shun Chan
46   *
47   * @see com.liferay.portlet.blogs.service.BlogsEntryService
48   * @see com.liferay.portlet.blogs.service.BlogsEntryServiceFactory
49   *
50   */
51  public class BlogsEntryServiceUtil {
52      public static com.liferay.portlet.blogs.model.BlogsEntry addEntry(
53          long plid, long categoryId, java.lang.String title,
54          java.lang.String content, int displayDateMonth, int displayDateDay,
55          int displayDateYear, int displayDateHour, int displayDateMinute,
56          com.liferay.portal.theme.ThemeDisplay themeDisplay,
57          java.lang.String[] tagsEntries, boolean addCommunityPermissions,
58          boolean addGuestPermissions)
59          throws com.liferay.portal.PortalException, 
60              com.liferay.portal.SystemException, java.rmi.RemoteException {
61          BlogsEntryService blogsEntryService = BlogsEntryServiceFactory.getService();
62  
63          return blogsEntryService.addEntry(plid, categoryId, title, content,
64              displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
65              displayDateMinute, themeDisplay, tagsEntries,
66              addCommunityPermissions, addGuestPermissions);
67      }
68  
69      public static com.liferay.portlet.blogs.model.BlogsEntry addEntry(
70          long plid, long categoryId, java.lang.String title,
71          java.lang.String content, int displayDateMonth, int displayDateDay,
72          int displayDateYear, int displayDateHour, int displayDateMinute,
73          com.liferay.portal.theme.ThemeDisplay themeDisplay,
74          java.lang.String[] tagsEntries,
75          java.lang.String[] communityPermissions,
76          java.lang.String[] guestPermissions)
77          throws com.liferay.portal.PortalException, 
78              com.liferay.portal.SystemException, java.rmi.RemoteException {
79          BlogsEntryService blogsEntryService = BlogsEntryServiceFactory.getService();
80  
81          return blogsEntryService.addEntry(plid, categoryId, title, content,
82              displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
83              displayDateMinute, themeDisplay, tagsEntries, communityPermissions,
84              guestPermissions);
85      }
86  
87      public static void deleteEntry(long entryId)
88          throws com.liferay.portal.PortalException, 
89              com.liferay.portal.SystemException, java.rmi.RemoteException {
90          BlogsEntryService blogsEntryService = BlogsEntryServiceFactory.getService();
91          blogsEntryService.deleteEntry(entryId);
92      }
93  
94      public static java.lang.String getCategoryBlogsRSS(long categoryId,
95          int max, java.lang.String type, double version,
96          java.lang.String feedURL, java.lang.String entryURL)
97          throws com.liferay.portal.PortalException, 
98              com.liferay.portal.SystemException, java.rmi.RemoteException {
99          BlogsEntryService blogsEntryService = BlogsEntryServiceFactory.getService();
100 
101         return blogsEntryService.getCategoryBlogsRSS(categoryId, max, type,
102             version, feedURL, entryURL);
103     }
104 
105     public static java.util.List getCompanyEntries(long companyId, int max)
106         throws com.liferay.portal.PortalException, 
107             com.liferay.portal.SystemException, java.rmi.RemoteException {
108         BlogsEntryService blogsEntryService = BlogsEntryServiceFactory.getService();
109 
110         return blogsEntryService.getCompanyEntries(companyId, max);
111     }
112 
113     public static java.lang.String getCompanyEntriesRSS(long companyId,
114         int max, java.lang.String type, double version,
115         java.lang.String feedURL, java.lang.String entryURL)
116         throws com.liferay.portal.PortalException, 
117             com.liferay.portal.SystemException, java.rmi.RemoteException {
118         BlogsEntryService blogsEntryService = BlogsEntryServiceFactory.getService();
119 
120         return blogsEntryService.getCompanyEntriesRSS(companyId, max, type,
121             version, feedURL, entryURL);
122     }
123 
124     public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
125         long entryId)
126         throws com.liferay.portal.PortalException, 
127             com.liferay.portal.SystemException, java.rmi.RemoteException {
128         BlogsEntryService blogsEntryService = BlogsEntryServiceFactory.getService();
129 
130         return blogsEntryService.getEntry(entryId);
131     }
132 
133     public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
134         long groupId, java.lang.String urlTitle)
135         throws com.liferay.portal.PortalException, 
136             com.liferay.portal.SystemException, java.rmi.RemoteException {
137         BlogsEntryService blogsEntryService = BlogsEntryServiceFactory.getService();
138 
139         return blogsEntryService.getEntry(groupId, urlTitle);
140     }
141 
142     public static java.util.List getGroupEntries(long groupId, int max)
143         throws com.liferay.portal.PortalException, 
144             com.liferay.portal.SystemException, java.rmi.RemoteException {
145         BlogsEntryService blogsEntryService = BlogsEntryServiceFactory.getService();
146 
147         return blogsEntryService.getGroupEntries(groupId, max);
148     }
149 
150     public static java.lang.String getGroupEntriesRSS(long groupId, int max,
151         java.lang.String type, double version, java.lang.String feedURL,
152         java.lang.String entryURL)
153         throws com.liferay.portal.PortalException, 
154             com.liferay.portal.SystemException, java.rmi.RemoteException {
155         BlogsEntryService blogsEntryService = BlogsEntryServiceFactory.getService();
156 
157         return blogsEntryService.getGroupEntriesRSS(groupId, max, type,
158             version, feedURL, entryURL);
159     }
160 
161     public static java.util.List getOrganizationEntries(long organizationId,
162         int max)
163         throws com.liferay.portal.PortalException, 
164             com.liferay.portal.SystemException, java.rmi.RemoteException {
165         BlogsEntryService blogsEntryService = BlogsEntryServiceFactory.getService();
166 
167         return blogsEntryService.getOrganizationEntries(organizationId, max);
168     }
169 
170     public static java.lang.String getOrganizationEntriesRSS(
171         long organizationId, int max, java.lang.String type, double version,
172         java.lang.String feedURL, java.lang.String entryURL)
173         throws com.liferay.portal.PortalException, 
174             com.liferay.portal.SystemException, java.rmi.RemoteException {
175         BlogsEntryService blogsEntryService = BlogsEntryServiceFactory.getService();
176 
177         return blogsEntryService.getOrganizationEntriesRSS(organizationId, max,
178             type, version, feedURL, entryURL);
179     }
180 
181     public static com.liferay.portlet.blogs.model.BlogsEntry updateEntry(
182         long entryId, long categoryId, java.lang.String title,
183         java.lang.String content, int displayDateMonth, int displayDateDay,
184         int displayDateYear, int displayDateHour, int displayDateMinute,
185         com.liferay.portal.theme.ThemeDisplay themeDisplay,
186         java.lang.String[] tagsEntries)
187         throws com.liferay.portal.PortalException, 
188             com.liferay.portal.SystemException, java.rmi.RemoteException {
189         BlogsEntryService blogsEntryService = BlogsEntryServiceFactory.getService();
190 
191         return blogsEntryService.updateEntry(entryId, categoryId, title,
192             content, displayDateMonth, displayDateDay, displayDateYear,
193             displayDateHour, displayDateMinute, themeDisplay, tagsEntries);
194     }
195 }