001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.journal.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.MethodCache;
019    import com.liferay.portal.kernel.util.ReferenceRegistry;
020    
021    /**
022     * The utility for the journal article remote service. This utility wraps {@link com.liferay.portlet.journal.service.impl.JournalArticleServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
023     *
024     * <p>
025     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see JournalArticleService
030     * @see com.liferay.portlet.journal.service.base.JournalArticleServiceBaseImpl
031     * @see com.liferay.portlet.journal.service.impl.JournalArticleServiceImpl
032     * @generated
033     */
034    public class JournalArticleServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.journal.service.impl.JournalArticleServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040            public static com.liferay.portlet.journal.model.JournalArticle addArticle(
041                    long groupId, long classNameId, long classPK,
042                    java.lang.String articleId, boolean autoArticleId,
043                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
044                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
045                    java.lang.String content, java.lang.String type,
046                    java.lang.String structureId, java.lang.String templateId,
047                    java.lang.String layoutUuid, int displayDateMonth, int displayDateDay,
048                    int displayDateYear, int displayDateHour, int displayDateMinute,
049                    int expirationDateMonth, int expirationDateDay, int expirationDateYear,
050                    int expirationDateHour, int expirationDateMinute, boolean neverExpire,
051                    int reviewDateMonth, int reviewDateDay, int reviewDateYear,
052                    int reviewDateHour, int reviewDateMinute, boolean neverReview,
053                    boolean indexable, boolean smallImage, java.lang.String smallImageURL,
054                    java.io.File smallFile, java.util.Map<java.lang.String, byte[]> images,
055                    java.lang.String articleURL,
056                    com.liferay.portal.service.ServiceContext serviceContext)
057                    throws com.liferay.portal.kernel.exception.PortalException,
058                            com.liferay.portal.kernel.exception.SystemException {
059                    return getService()
060                                       .addArticle(groupId, classNameId, classPK, articleId,
061                            autoArticleId, titleMap, descriptionMap, content, type,
062                            structureId, templateId, layoutUuid, displayDateMonth,
063                            displayDateDay, displayDateYear, displayDateHour,
064                            displayDateMinute, expirationDateMonth, expirationDateDay,
065                            expirationDateYear, expirationDateHour, expirationDateMinute,
066                            neverExpire, reviewDateMonth, reviewDateDay, reviewDateYear,
067                            reviewDateHour, reviewDateMinute, neverReview, indexable,
068                            smallImage, smallImageURL, smallFile, images, articleURL,
069                            serviceContext);
070            }
071    
072            public static com.liferay.portlet.journal.model.JournalArticle addArticle(
073                    long groupId, long classNameId, long classPK,
074                    java.lang.String articleId, boolean autoArticleId,
075                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
076                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
077                    java.lang.String content, java.lang.String type,
078                    java.lang.String structureId, java.lang.String templateId,
079                    java.lang.String layoutUuid, int displayDateMonth, int displayDateDay,
080                    int displayDateYear, int displayDateHour, int displayDateMinute,
081                    int expirationDateMonth, int expirationDateDay, int expirationDateYear,
082                    int expirationDateHour, int expirationDateMinute, boolean neverExpire,
083                    int reviewDateMonth, int reviewDateDay, int reviewDateYear,
084                    int reviewDateHour, int reviewDateMinute, boolean neverReview,
085                    boolean indexable, java.lang.String articleURL,
086                    com.liferay.portal.service.ServiceContext serviceContext)
087                    throws com.liferay.portal.kernel.exception.PortalException,
088                            com.liferay.portal.kernel.exception.SystemException {
089                    return getService()
090                                       .addArticle(groupId, classNameId, classPK, articleId,
091                            autoArticleId, titleMap, descriptionMap, content, type,
092                            structureId, templateId, layoutUuid, displayDateMonth,
093                            displayDateDay, displayDateYear, displayDateHour,
094                            displayDateMinute, expirationDateMonth, expirationDateDay,
095                            expirationDateYear, expirationDateHour, expirationDateMinute,
096                            neverExpire, reviewDateMonth, reviewDateDay, reviewDateYear,
097                            reviewDateHour, reviewDateMinute, neverReview, indexable,
098                            articleURL, serviceContext);
099            }
100    
101            public static com.liferay.portlet.journal.model.JournalArticle copyArticle(
102                    long groupId, java.lang.String oldArticleId,
103                    java.lang.String newArticleId, boolean autoArticleId, double version)
104                    throws com.liferay.portal.kernel.exception.PortalException,
105                            com.liferay.portal.kernel.exception.SystemException {
106                    return getService()
107                                       .copyArticle(groupId, oldArticleId, newArticleId,
108                            autoArticleId, version);
109            }
110    
111            public static void deleteArticle(long groupId, java.lang.String articleId,
112                    double version, java.lang.String articleURL,
113                    com.liferay.portal.service.ServiceContext serviceContext)
114                    throws com.liferay.portal.kernel.exception.PortalException,
115                            com.liferay.portal.kernel.exception.SystemException {
116                    getService()
117                            .deleteArticle(groupId, articleId, version, articleURL,
118                            serviceContext);
119            }
120    
121            public static void deleteArticle(long groupId, java.lang.String articleId,
122                    java.lang.String articleURL,
123                    com.liferay.portal.service.ServiceContext serviceContext)
124                    throws com.liferay.portal.kernel.exception.PortalException,
125                            com.liferay.portal.kernel.exception.SystemException {
126                    getService()
127                            .deleteArticle(groupId, articleId, articleURL, serviceContext);
128            }
129    
130            public static com.liferay.portlet.journal.model.JournalArticle expireArticle(
131                    long groupId, java.lang.String articleId, double version,
132                    java.lang.String articleURL,
133                    com.liferay.portal.service.ServiceContext serviceContext)
134                    throws com.liferay.portal.kernel.exception.PortalException,
135                            com.liferay.portal.kernel.exception.SystemException {
136                    return getService()
137                                       .expireArticle(groupId, articleId, version, articleURL,
138                            serviceContext);
139            }
140    
141            public static void expireArticle(long groupId, java.lang.String articleId,
142                    java.lang.String articleURL,
143                    com.liferay.portal.service.ServiceContext serviceContext)
144                    throws com.liferay.portal.kernel.exception.PortalException,
145                            com.liferay.portal.kernel.exception.SystemException {
146                    getService()
147                            .expireArticle(groupId, articleId, articleURL, serviceContext);
148            }
149    
150            public static com.liferay.portlet.journal.model.JournalArticle getArticle(
151                    long id)
152                    throws com.liferay.portal.kernel.exception.PortalException,
153                            com.liferay.portal.kernel.exception.SystemException {
154                    return getService().getArticle(id);
155            }
156    
157            public static com.liferay.portlet.journal.model.JournalArticle getArticle(
158                    long groupId, java.lang.String articleId)
159                    throws com.liferay.portal.kernel.exception.PortalException,
160                            com.liferay.portal.kernel.exception.SystemException {
161                    return getService().getArticle(groupId, articleId);
162            }
163    
164            public static com.liferay.portlet.journal.model.JournalArticle getArticle(
165                    long groupId, java.lang.String articleId, double version)
166                    throws com.liferay.portal.kernel.exception.PortalException,
167                            com.liferay.portal.kernel.exception.SystemException {
168                    return getService().getArticle(groupId, articleId, version);
169            }
170    
171            public static com.liferay.portlet.journal.model.JournalArticle getArticle(
172                    long groupId, java.lang.String className, long classPK)
173                    throws com.liferay.portal.kernel.exception.PortalException,
174                            com.liferay.portal.kernel.exception.SystemException {
175                    return getService().getArticle(groupId, className, classPK);
176            }
177    
178            public static com.liferay.portlet.journal.model.JournalArticle getArticleByUrlTitle(
179                    long groupId, java.lang.String urlTitle)
180                    throws com.liferay.portal.kernel.exception.PortalException,
181                            com.liferay.portal.kernel.exception.SystemException {
182                    return getService().getArticleByUrlTitle(groupId, urlTitle);
183            }
184    
185            public static java.lang.String getArticleContent(long groupId,
186                    java.lang.String articleId, double version,
187                    java.lang.String languageId,
188                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
189                    throws com.liferay.portal.kernel.exception.PortalException,
190                            com.liferay.portal.kernel.exception.SystemException {
191                    return getService()
192                                       .getArticleContent(groupId, articleId, version, languageId,
193                            themeDisplay);
194            }
195    
196            public static java.lang.String getArticleContent(long groupId,
197                    java.lang.String articleId, java.lang.String languageId,
198                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
199                    throws com.liferay.portal.kernel.exception.PortalException,
200                            com.liferay.portal.kernel.exception.SystemException {
201                    return getService()
202                                       .getArticleContent(groupId, articleId, languageId,
203                            themeDisplay);
204            }
205    
206            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticlesByLayoutUuid(
207                    long groupId, java.lang.String layoutUuid)
208                    throws com.liferay.portal.kernel.exception.SystemException {
209                    return getService().getArticlesByLayoutUuid(groupId, layoutUuid);
210            }
211    
212            public static com.liferay.portlet.journal.model.JournalArticle getLatestArticle(
213                    long resourcePrimKey)
214                    throws com.liferay.portal.kernel.exception.PortalException,
215                            com.liferay.portal.kernel.exception.SystemException {
216                    return getService().getLatestArticle(resourcePrimKey);
217            }
218    
219            public static com.liferay.portlet.journal.model.JournalArticle getLatestArticle(
220                    long groupId, java.lang.String articleId, int status)
221                    throws com.liferay.portal.kernel.exception.PortalException,
222                            com.liferay.portal.kernel.exception.SystemException {
223                    return getService().getLatestArticle(groupId, articleId, status);
224            }
225    
226            public static com.liferay.portlet.journal.model.JournalArticle getLatestArticle(
227                    long groupId, java.lang.String className, long classPK)
228                    throws com.liferay.portal.kernel.exception.PortalException,
229                            com.liferay.portal.kernel.exception.SystemException {
230                    return getService().getLatestArticle(groupId, className, classPK);
231            }
232    
233            public static void removeArticleLocale(long companyId,
234                    java.lang.String languageId)
235                    throws com.liferay.portal.kernel.exception.PortalException,
236                            com.liferay.portal.kernel.exception.SystemException {
237                    getService().removeArticleLocale(companyId, languageId);
238            }
239    
240            public static com.liferay.portlet.journal.model.JournalArticle removeArticleLocale(
241                    long groupId, java.lang.String articleId, double version,
242                    java.lang.String languageId)
243                    throws com.liferay.portal.kernel.exception.PortalException,
244                            com.liferay.portal.kernel.exception.SystemException {
245                    return getService()
246                                       .removeArticleLocale(groupId, articleId, version, languageId);
247            }
248    
249            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> search(
250                    long companyId, long groupId, long classNameId,
251                    java.lang.String keywords, java.lang.Double version,
252                    java.lang.String type, java.lang.String structureId,
253                    java.lang.String templateId, java.util.Date displayDateGT,
254                    java.util.Date displayDateLT, int status, java.util.Date reviewDate,
255                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
256                    throws com.liferay.portal.kernel.exception.SystemException {
257                    return getService()
258                                       .search(companyId, groupId, classNameId, keywords, version,
259                            type, structureId, templateId, displayDateGT, displayDateLT,
260                            status, reviewDate, start, end, obc);
261            }
262    
263            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> search(
264                    long companyId, long groupId, long classNameId,
265                    java.lang.String articleId, java.lang.Double version,
266                    java.lang.String title, java.lang.String description,
267                    java.lang.String content, java.lang.String type,
268                    java.lang.String structureId, java.lang.String templateId,
269                    java.util.Date displayDateGT, java.util.Date displayDateLT, int status,
270                    java.util.Date reviewDate, boolean andOperator, int start, int end,
271                    com.liferay.portal.kernel.util.OrderByComparator obc)
272                    throws com.liferay.portal.kernel.exception.SystemException {
273                    return getService()
274                                       .search(companyId, groupId, classNameId, articleId, version,
275                            title, description, content, type, structureId, templateId,
276                            displayDateGT, displayDateLT, status, reviewDate, andOperator,
277                            start, end, obc);
278            }
279    
280            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> search(
281                    long companyId, long groupId, long classNameId,
282                    java.lang.String articleId, java.lang.Double version,
283                    java.lang.String title, java.lang.String description,
284                    java.lang.String content, java.lang.String type,
285                    java.lang.String[] structureIds, java.lang.String[] templateIds,
286                    java.util.Date displayDateGT, java.util.Date displayDateLT, int status,
287                    java.util.Date reviewDate, boolean andOperator, int start, int end,
288                    com.liferay.portal.kernel.util.OrderByComparator obc)
289                    throws com.liferay.portal.kernel.exception.SystemException {
290                    return getService()
291                                       .search(companyId, groupId, classNameId, articleId, version,
292                            title, description, content, type, structureIds, templateIds,
293                            displayDateGT, displayDateLT, status, reviewDate, andOperator,
294                            start, end, obc);
295            }
296    
297            public static int searchCount(long companyId, long groupId,
298                    long classNameId, java.lang.String keywords, java.lang.Double version,
299                    java.lang.String type, java.lang.String structureId,
300                    java.lang.String templateId, java.util.Date displayDateGT,
301                    java.util.Date displayDateLT, int status, java.util.Date reviewDate)
302                    throws com.liferay.portal.kernel.exception.SystemException {
303                    return getService()
304                                       .searchCount(companyId, groupId, classNameId, keywords,
305                            version, type, structureId, templateId, displayDateGT,
306                            displayDateLT, status, reviewDate);
307            }
308    
309            public static int searchCount(long companyId, long groupId,
310                    long classNameId, java.lang.String articleId, java.lang.Double version,
311                    java.lang.String title, java.lang.String description,
312                    java.lang.String content, java.lang.String type,
313                    java.lang.String structureId, java.lang.String templateId,
314                    java.util.Date displayDateGT, java.util.Date displayDateLT, int status,
315                    java.util.Date reviewDate, boolean andOperator)
316                    throws com.liferay.portal.kernel.exception.SystemException {
317                    return getService()
318                                       .searchCount(companyId, groupId, classNameId, articleId,
319                            version, title, description, content, type, structureId,
320                            templateId, displayDateGT, displayDateLT, status, reviewDate,
321                            andOperator);
322            }
323    
324            public static int searchCount(long companyId, long groupId,
325                    long classNameId, java.lang.String articleId, java.lang.Double version,
326                    java.lang.String title, java.lang.String description,
327                    java.lang.String content, java.lang.String type,
328                    java.lang.String[] structureIds, java.lang.String[] templateIds,
329                    java.util.Date displayDateGT, java.util.Date displayDateLT, int status,
330                    java.util.Date reviewDate, boolean andOperator)
331                    throws com.liferay.portal.kernel.exception.SystemException {
332                    return getService()
333                                       .searchCount(companyId, groupId, classNameId, articleId,
334                            version, title, description, content, type, structureIds,
335                            templateIds, displayDateGT, displayDateLT, status, reviewDate,
336                            andOperator);
337            }
338    
339            public static void subscribe(long groupId)
340                    throws com.liferay.portal.kernel.exception.PortalException,
341                            com.liferay.portal.kernel.exception.SystemException {
342                    getService().subscribe(groupId);
343            }
344    
345            public static void unsubscribe(long groupId)
346                    throws com.liferay.portal.kernel.exception.PortalException,
347                            com.liferay.portal.kernel.exception.SystemException {
348                    getService().unsubscribe(groupId);
349            }
350    
351            public static com.liferay.portlet.journal.model.JournalArticle updateArticle(
352                    long userId, long groupId, java.lang.String articleId, double version,
353                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
354                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
355                    java.lang.String content, java.lang.String layoutUuid,
356                    com.liferay.portal.service.ServiceContext serviceContext)
357                    throws com.liferay.portal.kernel.exception.PortalException,
358                            com.liferay.portal.kernel.exception.SystemException {
359                    return getService()
360                                       .updateArticle(userId, groupId, articleId, version,
361                            titleMap, descriptionMap, content, layoutUuid, serviceContext);
362            }
363    
364            public static com.liferay.portlet.journal.model.JournalArticle updateArticle(
365                    long groupId, java.lang.String articleId, double version,
366                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
367                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
368                    java.lang.String content, java.lang.String type,
369                    java.lang.String structureId, java.lang.String templateId,
370                    java.lang.String layoutUuid, int displayDateMonth, int displayDateDay,
371                    int displayDateYear, int displayDateHour, int displayDateMinute,
372                    int expirationDateMonth, int expirationDateDay, int expirationDateYear,
373                    int expirationDateHour, int expirationDateMinute, boolean neverExpire,
374                    int reviewDateMonth, int reviewDateDay, int reviewDateYear,
375                    int reviewDateHour, int reviewDateMinute, boolean neverReview,
376                    boolean indexable, boolean smallImage, java.lang.String smallImageURL,
377                    java.io.File smallFile, java.util.Map<java.lang.String, byte[]> images,
378                    java.lang.String articleURL,
379                    com.liferay.portal.service.ServiceContext serviceContext)
380                    throws com.liferay.portal.kernel.exception.PortalException,
381                            com.liferay.portal.kernel.exception.SystemException {
382                    return getService()
383                                       .updateArticle(groupId, articleId, version, titleMap,
384                            descriptionMap, content, type, structureId, templateId, layoutUuid,
385                            displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
386                            displayDateMinute, expirationDateMonth, expirationDateDay,
387                            expirationDateYear, expirationDateHour, expirationDateMinute,
388                            neverExpire, reviewDateMonth, reviewDateDay, reviewDateYear,
389                            reviewDateHour, reviewDateMinute, neverReview, indexable,
390                            smallImage, smallImageURL, smallFile, images, articleURL,
391                            serviceContext);
392            }
393    
394            public static com.liferay.portlet.journal.model.JournalArticle updateArticle(
395                    long groupId, java.lang.String articleId, double version,
396                    java.lang.String content,
397                    com.liferay.portal.service.ServiceContext serviceContext)
398                    throws com.liferay.portal.kernel.exception.PortalException,
399                            com.liferay.portal.kernel.exception.SystemException {
400                    return getService()
401                                       .updateArticle(groupId, articleId, version, content,
402                            serviceContext);
403            }
404    
405            public static com.liferay.portlet.journal.model.JournalArticle updateArticleTranslation(
406                    long groupId, java.lang.String articleId, double version,
407                    java.util.Locale locale, java.lang.String title,
408                    java.lang.String description, java.lang.String content)
409                    throws com.liferay.portal.kernel.exception.PortalException,
410                            com.liferay.portal.kernel.exception.SystemException {
411                    return getService()
412                                       .updateArticleTranslation(groupId, articleId, version,
413                            locale, title, description, content);
414            }
415    
416            public static com.liferay.portlet.journal.model.JournalArticle updateContent(
417                    long groupId, java.lang.String articleId, double version,
418                    java.lang.String content)
419                    throws com.liferay.portal.kernel.exception.PortalException,
420                            com.liferay.portal.kernel.exception.SystemException {
421                    return getService().updateContent(groupId, articleId, version, content);
422            }
423    
424            public static JournalArticleService getService() {
425                    if (_service == null) {
426                            _service = (JournalArticleService)PortalBeanLocatorUtil.locate(JournalArticleService.class.getName());
427    
428                            ReferenceRegistry.registerReference(JournalArticleServiceUtil.class,
429                                    "_service");
430                            MethodCache.remove(JournalArticleService.class);
431                    }
432    
433                    return _service;
434            }
435    
436            public void setService(JournalArticleService service) {
437                    MethodCache.remove(JournalArticleService.class);
438    
439                    _service = service;
440    
441                    ReferenceRegistry.registerReference(JournalArticleServiceUtil.class,
442                            "_service");
443                    MethodCache.remove(JournalArticleService.class);
444            }
445    
446            private static JournalArticleService _service;
447    }