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