001    /**
002     * Copyright (c) 2000-2012 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> getArticlesByArticleId(
207                    long groupId, java.lang.String articleId, int start, int end,
208                    com.liferay.portal.kernel.util.OrderByComparator obc)
209                    throws com.liferay.portal.kernel.exception.SystemException {
210                    return getService()
211                                       .getArticlesByArticleId(groupId, articleId, start, end, obc);
212            }
213    
214            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticlesByLayoutUuid(
215                    long groupId, java.lang.String layoutUuid)
216                    throws com.liferay.portal.kernel.exception.SystemException {
217                    return getService().getArticlesByLayoutUuid(groupId, layoutUuid);
218            }
219    
220            public static int getArticlesCountByArticleId(long groupId,
221                    java.lang.String articleId)
222                    throws com.liferay.portal.kernel.exception.SystemException {
223                    return getService().getArticlesCountByArticleId(groupId, articleId);
224            }
225    
226            public static com.liferay.portlet.journal.model.JournalArticle getDisplayArticleByUrlTitle(
227                    long groupId, java.lang.String urlTitle)
228                    throws com.liferay.portal.kernel.exception.PortalException,
229                            com.liferay.portal.kernel.exception.SystemException {
230                    return getService().getDisplayArticleByUrlTitle(groupId, urlTitle);
231            }
232    
233            public static com.liferay.portlet.journal.model.JournalArticle getLatestArticle(
234                    long resourcePrimKey)
235                    throws com.liferay.portal.kernel.exception.PortalException,
236                            com.liferay.portal.kernel.exception.SystemException {
237                    return getService().getLatestArticle(resourcePrimKey);
238            }
239    
240            public static com.liferay.portlet.journal.model.JournalArticle getLatestArticle(
241                    long groupId, java.lang.String articleId, int status)
242                    throws com.liferay.portal.kernel.exception.PortalException,
243                            com.liferay.portal.kernel.exception.SystemException {
244                    return getService().getLatestArticle(groupId, articleId, status);
245            }
246    
247            public static com.liferay.portlet.journal.model.JournalArticle getLatestArticle(
248                    long groupId, java.lang.String className, long classPK)
249                    throws com.liferay.portal.kernel.exception.PortalException,
250                            com.liferay.portal.kernel.exception.SystemException {
251                    return getService().getLatestArticle(groupId, className, classPK);
252            }
253    
254            public static void removeArticleLocale(long companyId,
255                    java.lang.String languageId)
256                    throws com.liferay.portal.kernel.exception.PortalException,
257                            com.liferay.portal.kernel.exception.SystemException {
258                    getService().removeArticleLocale(companyId, languageId);
259            }
260    
261            public static com.liferay.portlet.journal.model.JournalArticle removeArticleLocale(
262                    long groupId, java.lang.String articleId, double version,
263                    java.lang.String languageId)
264                    throws com.liferay.portal.kernel.exception.PortalException,
265                            com.liferay.portal.kernel.exception.SystemException {
266                    return getService()
267                                       .removeArticleLocale(groupId, articleId, version, languageId);
268            }
269    
270            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> search(
271                    long companyId, long groupId, long classNameId,
272                    java.lang.String keywords, java.lang.Double version,
273                    java.lang.String type, java.lang.String structureId,
274                    java.lang.String templateId, java.util.Date displayDateGT,
275                    java.util.Date displayDateLT, int status, java.util.Date reviewDate,
276                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
277                    throws com.liferay.portal.kernel.exception.SystemException {
278                    return getService()
279                                       .search(companyId, groupId, classNameId, keywords, version,
280                            type, structureId, templateId, displayDateGT, displayDateLT,
281                            status, reviewDate, start, end, obc);
282            }
283    
284            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> search(
285                    long companyId, long groupId, long classNameId,
286                    java.lang.String articleId, java.lang.Double version,
287                    java.lang.String title, java.lang.String description,
288                    java.lang.String content, java.lang.String type,
289                    java.lang.String structureId, java.lang.String templateId,
290                    java.util.Date displayDateGT, java.util.Date displayDateLT, int status,
291                    java.util.Date reviewDate, boolean andOperator, int start, int end,
292                    com.liferay.portal.kernel.util.OrderByComparator obc)
293                    throws com.liferay.portal.kernel.exception.SystemException {
294                    return getService()
295                                       .search(companyId, groupId, classNameId, articleId, version,
296                            title, description, content, type, structureId, templateId,
297                            displayDateGT, displayDateLT, status, reviewDate, andOperator,
298                            start, end, obc);
299            }
300    
301            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> search(
302                    long companyId, long groupId, long classNameId,
303                    java.lang.String articleId, java.lang.Double version,
304                    java.lang.String title, java.lang.String description,
305                    java.lang.String content, java.lang.String type,
306                    java.lang.String[] structureIds, java.lang.String[] templateIds,
307                    java.util.Date displayDateGT, java.util.Date displayDateLT, int status,
308                    java.util.Date reviewDate, boolean andOperator, int start, int end,
309                    com.liferay.portal.kernel.util.OrderByComparator obc)
310                    throws com.liferay.portal.kernel.exception.SystemException {
311                    return getService()
312                                       .search(companyId, groupId, classNameId, articleId, version,
313                            title, description, content, type, structureIds, templateIds,
314                            displayDateGT, displayDateLT, status, reviewDate, andOperator,
315                            start, end, obc);
316            }
317    
318            public static int searchCount(long companyId, long groupId,
319                    long classNameId, java.lang.String keywords, java.lang.Double version,
320                    java.lang.String type, java.lang.String structureId,
321                    java.lang.String templateId, java.util.Date displayDateGT,
322                    java.util.Date displayDateLT, int status, java.util.Date reviewDate)
323                    throws com.liferay.portal.kernel.exception.SystemException {
324                    return getService()
325                                       .searchCount(companyId, groupId, classNameId, keywords,
326                            version, type, structureId, templateId, displayDateGT,
327                            displayDateLT, status, reviewDate);
328            }
329    
330            public static int searchCount(long companyId, long groupId,
331                    long classNameId, java.lang.String articleId, java.lang.Double version,
332                    java.lang.String title, java.lang.String description,
333                    java.lang.String content, java.lang.String type,
334                    java.lang.String structureId, java.lang.String templateId,
335                    java.util.Date displayDateGT, java.util.Date displayDateLT, int status,
336                    java.util.Date reviewDate, boolean andOperator)
337                    throws com.liferay.portal.kernel.exception.SystemException {
338                    return getService()
339                                       .searchCount(companyId, groupId, classNameId, articleId,
340                            version, title, description, content, type, structureId,
341                            templateId, displayDateGT, displayDateLT, status, reviewDate,
342                            andOperator);
343            }
344    
345            public static int searchCount(long companyId, long groupId,
346                    long classNameId, java.lang.String articleId, java.lang.Double version,
347                    java.lang.String title, java.lang.String description,
348                    java.lang.String content, java.lang.String type,
349                    java.lang.String[] structureIds, java.lang.String[] templateIds,
350                    java.util.Date displayDateGT, java.util.Date displayDateLT, int status,
351                    java.util.Date reviewDate, boolean andOperator)
352                    throws com.liferay.portal.kernel.exception.SystemException {
353                    return getService()
354                                       .searchCount(companyId, groupId, classNameId, articleId,
355                            version, title, description, content, type, structureIds,
356                            templateIds, displayDateGT, displayDateLT, status, reviewDate,
357                            andOperator);
358            }
359    
360            public static void subscribe(long groupId)
361                    throws com.liferay.portal.kernel.exception.PortalException,
362                            com.liferay.portal.kernel.exception.SystemException {
363                    getService().subscribe(groupId);
364            }
365    
366            public static void unsubscribe(long groupId)
367                    throws com.liferay.portal.kernel.exception.PortalException,
368                            com.liferay.portal.kernel.exception.SystemException {
369                    getService().unsubscribe(groupId);
370            }
371    
372            public static com.liferay.portlet.journal.model.JournalArticle updateArticle(
373                    long userId, long groupId, java.lang.String articleId, double version,
374                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
375                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
376                    java.lang.String content, java.lang.String layoutUuid,
377                    com.liferay.portal.service.ServiceContext serviceContext)
378                    throws com.liferay.portal.kernel.exception.PortalException,
379                            com.liferay.portal.kernel.exception.SystemException {
380                    return getService()
381                                       .updateArticle(userId, groupId, articleId, version,
382                            titleMap, descriptionMap, content, layoutUuid, serviceContext);
383            }
384    
385            public static com.liferay.portlet.journal.model.JournalArticle updateArticle(
386                    long groupId, java.lang.String articleId, double version,
387                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
388                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
389                    java.lang.String content, java.lang.String type,
390                    java.lang.String structureId, java.lang.String templateId,
391                    java.lang.String layoutUuid, int displayDateMonth, int displayDateDay,
392                    int displayDateYear, int displayDateHour, int displayDateMinute,
393                    int expirationDateMonth, int expirationDateDay, int expirationDateYear,
394                    int expirationDateHour, int expirationDateMinute, boolean neverExpire,
395                    int reviewDateMonth, int reviewDateDay, int reviewDateYear,
396                    int reviewDateHour, int reviewDateMinute, boolean neverReview,
397                    boolean indexable, boolean smallImage, java.lang.String smallImageURL,
398                    java.io.File smallFile, java.util.Map<java.lang.String, byte[]> images,
399                    java.lang.String articleURL,
400                    com.liferay.portal.service.ServiceContext serviceContext)
401                    throws com.liferay.portal.kernel.exception.PortalException,
402                            com.liferay.portal.kernel.exception.SystemException {
403                    return getService()
404                                       .updateArticle(groupId, articleId, version, titleMap,
405                            descriptionMap, content, type, structureId, templateId, layoutUuid,
406                            displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
407                            displayDateMinute, expirationDateMonth, expirationDateDay,
408                            expirationDateYear, expirationDateHour, expirationDateMinute,
409                            neverExpire, reviewDateMonth, reviewDateDay, reviewDateYear,
410                            reviewDateHour, reviewDateMinute, neverReview, indexable,
411                            smallImage, smallImageURL, smallFile, images, articleURL,
412                            serviceContext);
413            }
414    
415            public static com.liferay.portlet.journal.model.JournalArticle updateArticle(
416                    long groupId, java.lang.String articleId, double version,
417                    java.lang.String content,
418                    com.liferay.portal.service.ServiceContext serviceContext)
419                    throws com.liferay.portal.kernel.exception.PortalException,
420                            com.liferay.portal.kernel.exception.SystemException {
421                    return getService()
422                                       .updateArticle(groupId, articleId, version, content,
423                            serviceContext);
424            }
425    
426            /**
427            * @deprecated {@link #updateArticleTranslation(long, String, double,
428            Locale, String, String, String, Map, ServiceContext)}
429            */
430            public static com.liferay.portlet.journal.model.JournalArticle updateArticleTranslation(
431                    long groupId, java.lang.String articleId, double version,
432                    java.util.Locale locale, java.lang.String title,
433                    java.lang.String description, java.lang.String content,
434                    java.util.Map<java.lang.String, byte[]> images)
435                    throws com.liferay.portal.kernel.exception.PortalException,
436                            com.liferay.portal.kernel.exception.SystemException {
437                    return getService()
438                                       .updateArticleTranslation(groupId, articleId, version,
439                            locale, title, description, content, images);
440            }
441    
442            public static com.liferay.portlet.journal.model.JournalArticle updateArticleTranslation(
443                    long groupId, java.lang.String articleId, double version,
444                    java.util.Locale locale, java.lang.String title,
445                    java.lang.String description, java.lang.String content,
446                    java.util.Map<java.lang.String, byte[]> images,
447                    com.liferay.portal.service.ServiceContext serviceContext)
448                    throws com.liferay.portal.kernel.exception.PortalException,
449                            com.liferay.portal.kernel.exception.SystemException {
450                    return getService()
451                                       .updateArticleTranslation(groupId, articleId, version,
452                            locale, title, description, content, images, serviceContext);
453            }
454    
455            public static com.liferay.portlet.journal.model.JournalArticle updateContent(
456                    long groupId, java.lang.String articleId, double version,
457                    java.lang.String content)
458                    throws com.liferay.portal.kernel.exception.PortalException,
459                            com.liferay.portal.kernel.exception.SystemException {
460                    return getService().updateContent(groupId, articleId, version, content);
461            }
462    
463            public static JournalArticleService getService() {
464                    if (_service == null) {
465                            _service = (JournalArticleService)PortalBeanLocatorUtil.locate(JournalArticleService.class.getName());
466    
467                            ReferenceRegistry.registerReference(JournalArticleServiceUtil.class,
468                                    "_service");
469                            MethodCache.remove(JournalArticleService.class);
470                    }
471    
472                    return _service;
473            }
474    
475            public void setService(JournalArticleService service) {
476                    MethodCache.remove(JournalArticleService.class);
477    
478                    _service = service;
479    
480                    ReferenceRegistry.registerReference(JournalArticleServiceUtil.class,
481                            "_service");
482                    MethodCache.remove(JournalArticleService.class);
483            }
484    
485            private static JournalArticleService _service;
486    }