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.journal.service;
24  
25  /**
26   * <a href="JournalArticleServiceUtil.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.journal.service.JournalArticleService</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.journal.service.JournalArticleServiceFactory</code>
42   * is responsible for the lookup of the bean.
43   * </p>
44   *
45   * @author Brian Wing Shun Chan
46   *
47   * @see com.liferay.portlet.journal.service.JournalArticleService
48   * @see com.liferay.portlet.journal.service.JournalArticleServiceFactory
49   *
50   */
51  public class JournalArticleServiceUtil {
52      public static com.liferay.portlet.journal.model.JournalArticle addArticle(
53          java.lang.String articleId, boolean autoArticleId, long plid,
54          java.lang.String title, java.lang.String description,
55          java.lang.String content, java.lang.String type,
56          java.lang.String structureId, java.lang.String templateId,
57          int displayDateMonth, int displayDateDay, int displayDateYear,
58          int displayDateHour, int displayDateMinute, int expirationDateMonth,
59          int expirationDateDay, int expirationDateYear, int expirationDateHour,
60          int expirationDateMinute, boolean neverExpire, int reviewDateMonth,
61          int reviewDateDay, int reviewDateYear, int reviewDateHour,
62          int reviewDateMinute, boolean neverReview, boolean indexable,
63          java.util.Map images, java.lang.String articleURL,
64          javax.portlet.PortletPreferences prefs, java.lang.String[] tagsEntries,
65          boolean addCommunityPermissions, boolean addGuestPermissions)
66          throws com.liferay.portal.PortalException, 
67              com.liferay.portal.SystemException, java.rmi.RemoteException {
68          JournalArticleService journalArticleService = JournalArticleServiceFactory.getService();
69  
70          return journalArticleService.addArticle(articleId, autoArticleId, plid,
71              title, description, content, type, structureId, templateId,
72              displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
73              displayDateMinute, expirationDateMonth, expirationDateDay,
74              expirationDateYear, expirationDateHour, expirationDateMinute,
75              neverExpire, reviewDateMonth, reviewDateDay, reviewDateYear,
76              reviewDateHour, reviewDateMinute, neverReview, indexable, images,
77              articleURL, prefs, tagsEntries, addCommunityPermissions,
78              addGuestPermissions);
79      }
80  
81      public static com.liferay.portlet.journal.model.JournalArticle addArticle(
82          java.lang.String articleId, boolean autoArticleId, long plid,
83          java.lang.String title, java.lang.String description,
84          java.lang.String content, java.lang.String type,
85          java.lang.String structureId, java.lang.String templateId,
86          int displayDateMonth, int displayDateDay, int displayDateYear,
87          int displayDateHour, int displayDateMinute, int expirationDateMonth,
88          int expirationDateDay, int expirationDateYear, int expirationDateHour,
89          int expirationDateMinute, boolean neverExpire, int reviewDateMonth,
90          int reviewDateDay, int reviewDateYear, int reviewDateHour,
91          int reviewDateMinute, boolean neverReview, boolean indexable,
92          java.util.Map images, java.lang.String articleURL,
93          javax.portlet.PortletPreferences prefs, java.lang.String[] tagsEntries,
94          java.lang.String[] communityPermissions,
95          java.lang.String[] guestPermissions)
96          throws com.liferay.portal.PortalException, 
97              com.liferay.portal.SystemException, java.rmi.RemoteException {
98          JournalArticleService journalArticleService = JournalArticleServiceFactory.getService();
99  
100         return journalArticleService.addArticle(articleId, autoArticleId, plid,
101             title, description, content, type, structureId, templateId,
102             displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
103             displayDateMinute, expirationDateMonth, expirationDateDay,
104             expirationDateYear, expirationDateHour, expirationDateMinute,
105             neverExpire, reviewDateMonth, reviewDateDay, reviewDateYear,
106             reviewDateHour, reviewDateMinute, neverReview, indexable, images,
107             articleURL, prefs, tagsEntries, communityPermissions,
108             guestPermissions);
109     }
110 
111     public static com.liferay.portlet.journal.model.JournalArticle approveArticle(
112         long groupId, java.lang.String articleId, double version, long plid,
113         java.lang.String articleURL, javax.portlet.PortletPreferences prefs)
114         throws com.liferay.portal.PortalException, 
115             com.liferay.portal.SystemException, java.rmi.RemoteException {
116         JournalArticleService journalArticleService = JournalArticleServiceFactory.getService();
117 
118         return journalArticleService.approveArticle(groupId, articleId,
119             version, plid, articleURL, prefs);
120     }
121 
122     public static com.liferay.portlet.journal.model.JournalArticle getArticle(
123         long groupId, java.lang.String articleId, double version)
124         throws com.liferay.portal.PortalException, 
125             com.liferay.portal.SystemException, java.rmi.RemoteException {
126         JournalArticleService journalArticleService = JournalArticleServiceFactory.getService();
127 
128         return journalArticleService.getArticle(groupId, articleId, version);
129     }
130 
131     public static java.lang.String getArticleContent(long groupId,
132         java.lang.String articleId, java.lang.String languageId,
133         com.liferay.portal.theme.ThemeDisplay themeDisplay)
134         throws com.liferay.portal.PortalException, 
135             com.liferay.portal.SystemException, java.rmi.RemoteException {
136         JournalArticleService journalArticleService = JournalArticleServiceFactory.getService();
137 
138         return journalArticleService.getArticleContent(groupId, articleId,
139             languageId, themeDisplay);
140     }
141 
142     public static java.lang.String getArticleContent(long groupId,
143         java.lang.String articleId, double version,
144         java.lang.String languageId,
145         com.liferay.portal.theme.ThemeDisplay themeDisplay)
146         throws com.liferay.portal.PortalException, 
147             com.liferay.portal.SystemException, java.rmi.RemoteException {
148         JournalArticleService journalArticleService = JournalArticleServiceFactory.getService();
149 
150         return journalArticleService.getArticleContent(groupId, articleId,
151             version, languageId, themeDisplay);
152     }
153 
154     public static void deleteArticle(long groupId, java.lang.String articleId,
155         double version, java.lang.String articleURL,
156         javax.portlet.PortletPreferences prefs)
157         throws com.liferay.portal.PortalException, 
158             com.liferay.portal.SystemException, java.rmi.RemoteException {
159         JournalArticleService journalArticleService = JournalArticleServiceFactory.getService();
160         journalArticleService.deleteArticle(groupId, articleId, version,
161             articleURL, prefs);
162     }
163 
164     public static void expireArticle(long groupId, java.lang.String articleId,
165         double version, java.lang.String articleURL,
166         javax.portlet.PortletPreferences prefs)
167         throws com.liferay.portal.PortalException, 
168             com.liferay.portal.SystemException, java.rmi.RemoteException {
169         JournalArticleService journalArticleService = JournalArticleServiceFactory.getService();
170         journalArticleService.expireArticle(groupId, articleId, version,
171             articleURL, prefs);
172     }
173 
174     public static void removeArticleLocale(long companyId,
175         java.lang.String languageId)
176         throws com.liferay.portal.PortalException, 
177             com.liferay.portal.SystemException, java.rmi.RemoteException {
178         JournalArticleService journalArticleService = JournalArticleServiceFactory.getService();
179         journalArticleService.removeArticleLocale(companyId, languageId);
180     }
181 
182     public static com.liferay.portlet.journal.model.JournalArticle removeArticleLocale(
183         long groupId, java.lang.String articleId, double version,
184         java.lang.String languageId)
185         throws com.liferay.portal.PortalException, 
186             com.liferay.portal.SystemException, java.rmi.RemoteException {
187         JournalArticleService journalArticleService = JournalArticleServiceFactory.getService();
188 
189         return journalArticleService.removeArticleLocale(groupId, articleId,
190             version, languageId);
191     }
192 
193     public static com.liferay.portlet.journal.model.JournalArticle updateArticle(
194         long groupId, java.lang.String articleId, double version,
195         boolean incrementVersion, java.lang.String title,
196         java.lang.String description, java.lang.String content,
197         java.lang.String type, java.lang.String structureId,
198         java.lang.String templateId, int displayDateMonth, int displayDateDay,
199         int displayDateYear, int displayDateHour, int displayDateMinute,
200         int expirationDateMonth, int expirationDateDay, int expirationDateYear,
201         int expirationDateHour, int expirationDateMinute, boolean neverExpire,
202         int reviewDateMonth, int reviewDateDay, int reviewDateYear,
203         int reviewDateHour, int reviewDateMinute, boolean neverReview,
204         boolean indexable, java.util.Map images, java.lang.String articleURL,
205         javax.portlet.PortletPreferences prefs, java.lang.String[] tagsEntries)
206         throws com.liferay.portal.PortalException, 
207             com.liferay.portal.SystemException, java.rmi.RemoteException {
208         JournalArticleService journalArticleService = JournalArticleServiceFactory.getService();
209 
210         return journalArticleService.updateArticle(groupId, articleId, version,
211             incrementVersion, title, description, content, type, structureId,
212             templateId, displayDateMonth, displayDateDay, displayDateYear,
213             displayDateHour, displayDateMinute, expirationDateMonth,
214             expirationDateDay, expirationDateYear, expirationDateHour,
215             expirationDateMinute, neverExpire, reviewDateMonth, reviewDateDay,
216             reviewDateYear, reviewDateHour, reviewDateMinute, neverReview,
217             indexable, images, articleURL, prefs, tagsEntries);
218     }
219 
220     public static com.liferay.portlet.journal.model.JournalArticle updateContent(
221         long groupId, java.lang.String articleId, double version,
222         java.lang.String content)
223         throws com.liferay.portal.PortalException, 
224             com.liferay.portal.SystemException, java.rmi.RemoteException {
225         JournalArticleService journalArticleService = JournalArticleServiceFactory.getService();
226 
227         return journalArticleService.updateContent(groupId, articleId, version,
228             content);
229     }
230 }