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          long plid, java.lang.String title, java.lang.String content,
50          int displayDateMonth, int displayDateDay, int displayDateYear,
51          int displayDateHour, int displayDateMinute, boolean draft,
52          boolean allowTrackbacks, java.lang.String[] trackbacks,
53          java.lang.String[] tagsEntries, boolean addCommunityPermissions,
54          boolean addGuestPermissions,
55          com.liferay.portal.theme.ThemeDisplay themeDisplay)
56          throws com.liferay.portal.PortalException,
57              com.liferay.portal.SystemException, java.rmi.RemoteException {
58          return getService()
59                     .addEntry(plid, title, content, displayDateMonth,
60              displayDateDay, displayDateYear, displayDateHour,
61              displayDateMinute, draft, allowTrackbacks, trackbacks, tagsEntries,
62              addCommunityPermissions, addGuestPermissions, themeDisplay);
63      }
64  
65      public static com.liferay.portlet.blogs.model.BlogsEntry addEntry(
66          long plid, java.lang.String title, java.lang.String content,
67          int displayDateMonth, int displayDateDay, int displayDateYear,
68          int displayDateHour, int displayDateMinute, boolean draft,
69          boolean allowTrackbacks, java.lang.String[] trackbacks,
70          java.lang.String[] tagsEntries,
71          java.lang.String[] communityPermissions,
72          java.lang.String[] guestPermissions,
73          com.liferay.portal.theme.ThemeDisplay themeDisplay)
74          throws com.liferay.portal.PortalException,
75              com.liferay.portal.SystemException, java.rmi.RemoteException {
76          return getService()
77                     .addEntry(plid, title, content, displayDateMonth,
78              displayDateDay, displayDateYear, displayDateHour,
79              displayDateMinute, draft, allowTrackbacks, trackbacks, tagsEntries,
80              communityPermissions, guestPermissions, themeDisplay);
81      }
82  
83      public static void deleteEntry(long entryId)
84          throws com.liferay.portal.PortalException,
85              com.liferay.portal.SystemException, java.rmi.RemoteException {
86          getService().deleteEntry(entryId);
87      }
88  
89      public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getCompanyEntries(
90          long companyId, int max)
91          throws com.liferay.portal.PortalException,
92              com.liferay.portal.SystemException, java.rmi.RemoteException {
93          return getService().getCompanyEntries(companyId, max);
94      }
95  
96      public static java.lang.String getCompanyEntriesRSS(long companyId,
97          int max, java.lang.String type, double version,
98          java.lang.String displayStyle, java.lang.String feedURL,
99          java.lang.String entryURL,
100         com.liferay.portal.theme.ThemeDisplay themeDisplay)
101         throws com.liferay.portal.PortalException,
102             com.liferay.portal.SystemException, java.rmi.RemoteException {
103         return getService()
104                    .getCompanyEntriesRSS(companyId, max, type, version,
105             displayStyle, feedURL, entryURL, themeDisplay);
106     }
107 
108     public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
109         long entryId)
110         throws com.liferay.portal.PortalException,
111             com.liferay.portal.SystemException, java.rmi.RemoteException {
112         return getService().getEntry(entryId);
113     }
114 
115     public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
116         long groupId, java.lang.String urlTitle)
117         throws com.liferay.portal.PortalException,
118             com.liferay.portal.SystemException, java.rmi.RemoteException {
119         return getService().getEntry(groupId, urlTitle);
120     }
121 
122     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupEntries(
123         long groupId, int max)
124         throws com.liferay.portal.PortalException,
125             com.liferay.portal.SystemException, java.rmi.RemoteException {
126         return getService().getGroupEntries(groupId, max);
127     }
128 
129     public static java.lang.String getGroupEntriesRSS(long groupId, int max,
130         java.lang.String type, double version, java.lang.String displayStyle,
131         java.lang.String feedURL, java.lang.String entryURL,
132         com.liferay.portal.theme.ThemeDisplay themeDisplay)
133         throws com.liferay.portal.PortalException,
134             com.liferay.portal.SystemException, java.rmi.RemoteException {
135         return getService()
136                    .getGroupEntriesRSS(groupId, max, type, version,
137             displayStyle, feedURL, entryURL, themeDisplay);
138     }
139 
140     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getOrganizationEntries(
141         long organizationId, int max)
142         throws com.liferay.portal.PortalException,
143             com.liferay.portal.SystemException, java.rmi.RemoteException {
144         return getService().getOrganizationEntries(organizationId, max);
145     }
146 
147     public static java.lang.String getOrganizationEntriesRSS(
148         long organizationId, int max, java.lang.String type, double version,
149         java.lang.String displayStyle, java.lang.String feedURL,
150         java.lang.String entryURL,
151         com.liferay.portal.theme.ThemeDisplay themeDisplay)
152         throws com.liferay.portal.PortalException,
153             com.liferay.portal.SystemException, java.rmi.RemoteException {
154         return getService()
155                    .getOrganizationEntriesRSS(organizationId, max, type,
156             version, displayStyle, feedURL, entryURL, themeDisplay);
157     }
158 
159     public static com.liferay.portlet.blogs.model.BlogsEntry updateEntry(
160         long entryId, java.lang.String title, java.lang.String content,
161         int displayDateMonth, int displayDateDay, int displayDateYear,
162         int displayDateHour, int displayDateMinute, boolean draft,
163         boolean allowTrackbacks, java.lang.String[] trackbacks,
164         java.lang.String[] tagsEntries,
165         com.liferay.portal.theme.ThemeDisplay themeDisplay)
166         throws com.liferay.portal.PortalException,
167             com.liferay.portal.SystemException, java.rmi.RemoteException {
168         return getService()
169                    .updateEntry(entryId, title, content, displayDateMonth,
170             displayDateDay, displayDateYear, displayDateHour,
171             displayDateMinute, draft, allowTrackbacks, trackbacks, tagsEntries,
172             themeDisplay);
173     }
174 
175     public static BlogsEntryService getService() {
176         if (_service == null) {
177             throw new RuntimeException("BlogsEntryService is not set");
178         }
179 
180         return _service;
181     }
182 
183     public void setService(BlogsEntryService service) {
184         _service = service;
185     }
186 
187     private static BlogsEntryService _service;
188 }