1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.blogs.service;
21  
22  
23  /**
24   * <a href="BlogsEntryServiceUtil.java.html"><b><i>View Source</i></b></a>
25   *
26   * <p>
27   * ServiceBuilder generated this class. Modifications in this class will be
28   * overwritten the next time is generated.
29   * </p>
30   *
31   * <p>
32   * This class provides static methods for the
33   * <code>com.liferay.portlet.blogs.service.BlogsEntryService</code>
34   * bean. The static methods of this class calls the same methods of the bean
35   * instance. It's convenient to be able to just write one line to call a method
36   * on a bean instead of writing a lookup call and a method call.
37   * </p>
38   *
39   * @author Brian Wing Shun Chan
40   *
41   * @see com.liferay.portlet.blogs.service.BlogsEntryService
42   *
43   */
44  public class BlogsEntryServiceUtil {
45      public static com.liferay.portlet.blogs.model.BlogsEntry addEntry(
46          long plid, java.lang.String title, java.lang.String content,
47          int displayDateMonth, int displayDateDay, int displayDateYear,
48          int displayDateHour, int displayDateMinute, boolean draft,
49          boolean allowTrackbacks, java.lang.String[] trackbacks,
50          java.lang.String[] tagsEntries, boolean addCommunityPermissions,
51          boolean addGuestPermissions,
52          com.liferay.portal.theme.ThemeDisplay themeDisplay)
53          throws com.liferay.portal.PortalException,
54              com.liferay.portal.SystemException, java.rmi.RemoteException {
55          return getService()
56                     .addEntry(plid, title, content, displayDateMonth,
57              displayDateDay, displayDateYear, displayDateHour,
58              displayDateMinute, draft, allowTrackbacks, trackbacks, tagsEntries,
59              addCommunityPermissions, addGuestPermissions, themeDisplay);
60      }
61  
62      public static com.liferay.portlet.blogs.model.BlogsEntry addEntry(
63          long plid, java.lang.String title, java.lang.String content,
64          int displayDateMonth, int displayDateDay, int displayDateYear,
65          int displayDateHour, int displayDateMinute, boolean draft,
66          boolean allowTrackbacks, java.lang.String[] trackbacks,
67          java.lang.String[] tagsEntries,
68          java.lang.String[] communityPermissions,
69          java.lang.String[] guestPermissions,
70          com.liferay.portal.theme.ThemeDisplay themeDisplay)
71          throws com.liferay.portal.PortalException,
72              com.liferay.portal.SystemException, java.rmi.RemoteException {
73          return getService()
74                     .addEntry(plid, title, content, displayDateMonth,
75              displayDateDay, displayDateYear, displayDateHour,
76              displayDateMinute, draft, allowTrackbacks, trackbacks, tagsEntries,
77              communityPermissions, guestPermissions, themeDisplay);
78      }
79  
80      public static void deleteEntry(long entryId)
81          throws com.liferay.portal.PortalException,
82              com.liferay.portal.SystemException, java.rmi.RemoteException {
83          getService().deleteEntry(entryId);
84      }
85  
86      public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getCompanyEntries(
87          long companyId, int max)
88          throws com.liferay.portal.PortalException,
89              com.liferay.portal.SystemException, java.rmi.RemoteException {
90          return getService().getCompanyEntries(companyId, max);
91      }
92  
93      public static java.lang.String getCompanyEntriesRSS(long companyId,
94          int max, java.lang.String type, double version,
95          java.lang.String displayStyle, java.lang.String feedURL,
96          java.lang.String entryURL,
97          com.liferay.portal.theme.ThemeDisplay themeDisplay)
98          throws com.liferay.portal.PortalException,
99              com.liferay.portal.SystemException, java.rmi.RemoteException {
100         return getService()
101                    .getCompanyEntriesRSS(companyId, max, type, version,
102             displayStyle, feedURL, entryURL, themeDisplay);
103     }
104 
105     public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
106         long entryId)
107         throws com.liferay.portal.PortalException,
108             com.liferay.portal.SystemException, java.rmi.RemoteException {
109         return getService().getEntry(entryId);
110     }
111 
112     public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
113         long groupId, java.lang.String urlTitle)
114         throws com.liferay.portal.PortalException,
115             com.liferay.portal.SystemException, java.rmi.RemoteException {
116         return getService().getEntry(groupId, urlTitle);
117     }
118 
119     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupEntries(
120         long groupId, int max)
121         throws com.liferay.portal.PortalException,
122             com.liferay.portal.SystemException, java.rmi.RemoteException {
123         return getService().getGroupEntries(groupId, max);
124     }
125 
126     public static java.lang.String getGroupEntriesRSS(long groupId, int max,
127         java.lang.String type, double version, java.lang.String displayStyle,
128         java.lang.String feedURL, java.lang.String entryURL,
129         com.liferay.portal.theme.ThemeDisplay themeDisplay)
130         throws com.liferay.portal.PortalException,
131             com.liferay.portal.SystemException, java.rmi.RemoteException {
132         return getService()
133                    .getGroupEntriesRSS(groupId, max, type, version,
134             displayStyle, feedURL, entryURL, themeDisplay);
135     }
136 
137     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getOrganizationEntries(
138         long organizationId, int max)
139         throws com.liferay.portal.PortalException,
140             com.liferay.portal.SystemException, java.rmi.RemoteException {
141         return getService().getOrganizationEntries(organizationId, max);
142     }
143 
144     public static java.lang.String getOrganizationEntriesRSS(
145         long organizationId, int max, java.lang.String type, double version,
146         java.lang.String displayStyle, java.lang.String feedURL,
147         java.lang.String entryURL,
148         com.liferay.portal.theme.ThemeDisplay themeDisplay)
149         throws com.liferay.portal.PortalException,
150             com.liferay.portal.SystemException, java.rmi.RemoteException {
151         return getService()
152                    .getOrganizationEntriesRSS(organizationId, max, type,
153             version, displayStyle, feedURL, entryURL, themeDisplay);
154     }
155 
156     public static com.liferay.portlet.blogs.model.BlogsEntry updateEntry(
157         long entryId, java.lang.String title, java.lang.String content,
158         int displayDateMonth, int displayDateDay, int displayDateYear,
159         int displayDateHour, int displayDateMinute, boolean draft,
160         boolean allowTrackbacks, java.lang.String[] trackbacks,
161         java.lang.String[] tagsEntries,
162         com.liferay.portal.theme.ThemeDisplay themeDisplay)
163         throws com.liferay.portal.PortalException,
164             com.liferay.portal.SystemException, java.rmi.RemoteException {
165         return getService()
166                    .updateEntry(entryId, title, content, displayDateMonth,
167             displayDateDay, displayDateYear, displayDateHour,
168             displayDateMinute, draft, allowTrackbacks, trackbacks, tagsEntries,
169             themeDisplay);
170     }
171 
172     public static BlogsEntryService getService() {
173         if (_service == null) {
174             throw new RuntimeException("BlogsEntryService is not set");
175         }
176 
177         return _service;
178     }
179 
180     public void setService(BlogsEntryService service) {
181         _service = service;
182     }
183 
184     private static BlogsEntryService _service;
185 }