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.journal.service;
24  
25  
26  /**
27   * <a href="JournalArticleServiceUtil.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.journal.service.JournalArticleService</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.journal.service.JournalArticleService
45   *
46   */
47  public class JournalArticleServiceUtil {
48      public static com.liferay.portlet.journal.model.JournalArticle addArticle(
49          long groupId, java.lang.String articleId, boolean autoArticleId,
50          java.lang.String title, java.lang.String description,
51          java.lang.String content, java.lang.String type,
52          java.lang.String structureId, java.lang.String templateId,
53          int displayDateMonth, int displayDateDay, int displayDateYear,
54          int displayDateHour, int displayDateMinute, int expirationDateMonth,
55          int expirationDateDay, int expirationDateYear, int expirationDateHour,
56          int expirationDateMinute, boolean neverExpire, int reviewDateMonth,
57          int reviewDateDay, int reviewDateYear, int reviewDateHour,
58          int reviewDateMinute, boolean neverReview, boolean indexable,
59          java.lang.String articleURL,
60          com.liferay.portal.service.ServiceContext serviceContext)
61          throws com.liferay.portal.PortalException,
62              com.liferay.portal.SystemException {
63          return getService()
64                     .addArticle(groupId, articleId, autoArticleId, title,
65              description, content, type, structureId, templateId,
66              displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
67              displayDateMinute, expirationDateMonth, expirationDateDay,
68              expirationDateYear, expirationDateHour, expirationDateMinute,
69              neverExpire, reviewDateMonth, reviewDateDay, reviewDateYear,
70              reviewDateHour, reviewDateMinute, neverReview, indexable,
71              articleURL, serviceContext);
72      }
73  
74      public static com.liferay.portlet.journal.model.JournalArticle addArticle(
75          long groupId, java.lang.String articleId, boolean autoArticleId,
76          java.lang.String title, java.lang.String description,
77          java.lang.String content, java.lang.String type,
78          java.lang.String structureId, java.lang.String templateId,
79          int displayDateMonth, int displayDateDay, int displayDateYear,
80          int displayDateHour, int displayDateMinute, int expirationDateMonth,
81          int expirationDateDay, int expirationDateYear, int expirationDateHour,
82          int expirationDateMinute, boolean neverExpire, int reviewDateMonth,
83          int reviewDateDay, int reviewDateYear, int reviewDateHour,
84          int reviewDateMinute, boolean neverReview, boolean indexable,
85          boolean smallImage, java.lang.String smallImageURL,
86          java.io.File smallFile, java.util.Map<String, byte[]> images,
87          java.lang.String articleURL,
88          com.liferay.portal.service.ServiceContext serviceContext)
89          throws com.liferay.portal.PortalException,
90              com.liferay.portal.SystemException {
91          return getService()
92                     .addArticle(groupId, articleId, autoArticleId, title,
93              description, content, type, structureId, templateId,
94              displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
95              displayDateMinute, expirationDateMonth, expirationDateDay,
96              expirationDateYear, expirationDateHour, expirationDateMinute,
97              neverExpire, reviewDateMonth, reviewDateDay, reviewDateYear,
98              reviewDateHour, reviewDateMinute, neverReview, indexable,
99              smallImage, smallImageURL, smallFile, images, articleURL,
100             serviceContext);
101     }
102 
103     public static com.liferay.portlet.journal.model.JournalArticle approveArticle(
104         long groupId, java.lang.String articleId, double version,
105         java.lang.String articleURL,
106         com.liferay.portal.service.ServiceContext serviceContext)
107         throws com.liferay.portal.PortalException,
108             com.liferay.portal.SystemException {
109         return getService()
110                    .approveArticle(groupId, articleId, version, articleURL,
111             serviceContext);
112     }
113 
114     public static com.liferay.portlet.journal.model.JournalArticle copyArticle(
115         long groupId, java.lang.String oldArticleId,
116         java.lang.String newArticleId, boolean autoArticleId, double version)
117         throws com.liferay.portal.PortalException,
118             com.liferay.portal.SystemException {
119         return getService()
120                    .copyArticle(groupId, oldArticleId, newArticleId,
121             autoArticleId, version);
122     }
123 
124     public static com.liferay.portlet.journal.model.JournalArticle getArticle(
125         long groupId, java.lang.String articleId)
126         throws com.liferay.portal.PortalException,
127             com.liferay.portal.SystemException {
128         return getService().getArticle(groupId, articleId);
129     }
130 
131     public static com.liferay.portlet.journal.model.JournalArticle getArticle(
132         long groupId, java.lang.String articleId, double version)
133         throws com.liferay.portal.PortalException,
134             com.liferay.portal.SystemException {
135         return getService().getArticle(groupId, articleId, version);
136     }
137 
138     public static com.liferay.portlet.journal.model.JournalArticle getArticleByUrlTitle(
139         long groupId, java.lang.String urlTitle)
140         throws com.liferay.portal.PortalException,
141             com.liferay.portal.SystemException {
142         return getService().getArticleByUrlTitle(groupId, urlTitle);
143     }
144 
145     public static java.lang.String getArticleContent(long groupId,
146         java.lang.String articleId, java.lang.String languageId,
147         com.liferay.portal.theme.ThemeDisplay themeDisplay)
148         throws com.liferay.portal.PortalException,
149             com.liferay.portal.SystemException {
150         return getService()
151                    .getArticleContent(groupId, articleId, languageId,
152             themeDisplay);
153     }
154 
155     public static java.lang.String getArticleContent(long groupId,
156         java.lang.String articleId, double version,
157         java.lang.String languageId,
158         com.liferay.portal.theme.ThemeDisplay themeDisplay)
159         throws com.liferay.portal.PortalException,
160             com.liferay.portal.SystemException {
161         return getService()
162                    .getArticleContent(groupId, articleId, version, languageId,
163             themeDisplay);
164     }
165 
166     public static void deleteArticle(long groupId, java.lang.String articleId,
167         double version, java.lang.String articleURL,
168         com.liferay.portal.service.ServiceContext serviceContext)
169         throws com.liferay.portal.PortalException,
170             com.liferay.portal.SystemException {
171         getService()
172             .deleteArticle(groupId, articleId, version, articleURL,
173             serviceContext);
174     }
175 
176     public static void expireArticle(long groupId, java.lang.String articleId,
177         double version, java.lang.String articleURL,
178         com.liferay.portal.service.ServiceContext serviceContext)
179         throws com.liferay.portal.PortalException,
180             com.liferay.portal.SystemException {
181         getService()
182             .expireArticle(groupId, articleId, version, articleURL,
183             serviceContext);
184     }
185 
186     public static void removeArticleLocale(long companyId,
187         java.lang.String languageId)
188         throws com.liferay.portal.PortalException,
189             com.liferay.portal.SystemException {
190         getService().removeArticleLocale(companyId, languageId);
191     }
192 
193     public static com.liferay.portlet.journal.model.JournalArticle removeArticleLocale(
194         long groupId, java.lang.String articleId, double version,
195         java.lang.String languageId)
196         throws com.liferay.portal.PortalException,
197             com.liferay.portal.SystemException {
198         return getService()
199                    .removeArticleLocale(groupId, articleId, version, languageId);
200     }
201 
202     public static com.liferay.portlet.journal.model.JournalArticle updateArticle(
203         long groupId, java.lang.String articleId, double version,
204         boolean incrementVersion, java.lang.String content)
205         throws com.liferay.portal.PortalException,
206             com.liferay.portal.SystemException {
207         return getService()
208                    .updateArticle(groupId, articleId, version,
209             incrementVersion, content);
210     }
211 
212     public static com.liferay.portlet.journal.model.JournalArticle updateArticle(
213         long groupId, java.lang.String articleId, double version,
214         boolean incrementVersion, java.lang.String title,
215         java.lang.String description, java.lang.String content,
216         java.lang.String type, java.lang.String structureId,
217         java.lang.String templateId, int displayDateMonth, int displayDateDay,
218         int displayDateYear, int displayDateHour, int displayDateMinute,
219         int expirationDateMonth, int expirationDateDay, int expirationDateYear,
220         int expirationDateHour, int expirationDateMinute, boolean neverExpire,
221         int reviewDateMonth, int reviewDateDay, int reviewDateYear,
222         int reviewDateHour, int reviewDateMinute, boolean neverReview,
223         boolean indexable, boolean smallImage, java.lang.String smallImageURL,
224         java.io.File smallFile, java.util.Map<String, byte[]> images,
225         java.lang.String articleURL,
226         com.liferay.portal.service.ServiceContext serviceContext)
227         throws com.liferay.portal.PortalException,
228             com.liferay.portal.SystemException {
229         return getService()
230                    .updateArticle(groupId, articleId, version,
231             incrementVersion, title, description, content, type, structureId,
232             templateId, displayDateMonth, displayDateDay, displayDateYear,
233             displayDateHour, displayDateMinute, expirationDateMonth,
234             expirationDateDay, expirationDateYear, expirationDateHour,
235             expirationDateMinute, neverExpire, reviewDateMonth, reviewDateDay,
236             reviewDateYear, reviewDateHour, reviewDateMinute, neverReview,
237             indexable, smallImage, smallImageURL, smallFile, images,
238             articleURL, serviceContext);
239     }
240 
241     public static com.liferay.portlet.journal.model.JournalArticle updateContent(
242         long groupId, java.lang.String articleId, double version,
243         java.lang.String content)
244         throws com.liferay.portal.PortalException,
245             com.liferay.portal.SystemException {
246         return getService().updateContent(groupId, articleId, version, content);
247     }
248 
249     public static JournalArticleService getService() {
250         if (_service == null) {
251             throw new RuntimeException("JournalArticleService is not set");
252         }
253 
254         return _service;
255     }
256 
257     public void setService(JournalArticleService service) {
258         _service = service;
259     }
260 
261     private static JournalArticleService _service;
262 }