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.impl;
016    
017    import com.liferay.portal.kernel.exception.PortalException;
018    import com.liferay.portal.kernel.exception.SystemException;
019    import com.liferay.portal.kernel.util.ArrayUtil;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.security.permission.ActionKeys;
022    import com.liferay.portal.service.ServiceContext;
023    import com.liferay.portal.theme.ThemeDisplay;
024    import com.liferay.portlet.journal.model.JournalArticle;
025    import com.liferay.portlet.journal.model.JournalArticleConstants;
026    import com.liferay.portlet.journal.service.base.JournalArticleServiceBaseImpl;
027    import com.liferay.portlet.journal.service.permission.JournalArticlePermission;
028    import com.liferay.portlet.journal.service.permission.JournalPermission;
029    
030    import java.io.File;
031    
032    import java.util.Date;
033    import java.util.List;
034    import java.util.Locale;
035    import java.util.Map;
036    
037    /**
038     * @author Brian Wing Shun Chan
039     * @author Raymond Augé
040     */
041    public class JournalArticleServiceImpl extends JournalArticleServiceBaseImpl {
042    
043            public JournalArticle addArticle(
044                            long groupId, long folderId, long classNameId, long classPK,
045                            String articleId, boolean autoArticleId,
046                            Map<Locale, String> titleMap, Map<Locale, String> descriptionMap,
047                            String content, String type, String structureId, String templateId,
048                            String layoutUuid, int displayDateMonth, int displayDateDay,
049                            int displayDateYear, int displayDateHour, int displayDateMinute,
050                            int expirationDateMonth, int expirationDateDay,
051                            int expirationDateYear, int expirationDateHour,
052                            int expirationDateMinute, boolean neverExpire, int reviewDateMonth,
053                            int reviewDateDay, int reviewDateYear, int reviewDateHour,
054                            int reviewDateMinute, boolean neverReview, boolean indexable,
055                            boolean smallImage, String smallImageURL, File smallFile,
056                            Map<String, byte[]> images, String articleURL,
057                            ServiceContext serviceContext)
058                    throws PortalException, SystemException {
059    
060                    JournalPermission.check(
061                            getPermissionChecker(), groupId, ActionKeys.ADD_ARTICLE);
062    
063                    return journalArticleLocalService.addArticle(
064                            getUserId(), groupId, folderId, classNameId, classPK, articleId,
065                            autoArticleId, JournalArticleConstants.VERSION_DEFAULT, titleMap,
066                            descriptionMap, content, type, structureId, templateId, layoutUuid,
067                            displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
068                            displayDateMinute, expirationDateMonth, expirationDateDay,
069                            expirationDateYear, expirationDateHour, expirationDateMinute,
070                            neverExpire, reviewDateMonth, reviewDateDay, reviewDateYear,
071                            reviewDateHour, reviewDateMinute, neverReview, indexable,
072                            smallImage, smallImageURL, smallFile, images, articleURL,
073                            serviceContext);
074            }
075    
076            public JournalArticle addArticle(
077                            long groupId, long folderId, long classNameId, long classPK,
078                            String articleId, boolean autoArticleId,
079                            Map<Locale, String> titleMap, Map<Locale, String> descriptionMap,
080                            String content, String type, String structureId, String templateId,
081                            String layoutUuid, int displayDateMonth, int displayDateDay,
082                            int displayDateYear, int displayDateHour, int displayDateMinute,
083                            int expirationDateMonth, int expirationDateDay,
084                            int expirationDateYear, int expirationDateHour,
085                            int expirationDateMinute, boolean neverExpire, int reviewDateMonth,
086                            int reviewDateDay, int reviewDateYear, int reviewDateHour,
087                            int reviewDateMinute, boolean neverReview, boolean indexable,
088                            String articleURL, ServiceContext serviceContext)
089                    throws PortalException, SystemException {
090    
091                    JournalPermission.check(
092                            getPermissionChecker(), groupId, ActionKeys.ADD_ARTICLE);
093    
094                    return journalArticleLocalService.addArticle(
095                            getUserId(), groupId, folderId, classNameId, classPK, articleId,
096                            autoArticleId, JournalArticleConstants.VERSION_DEFAULT, titleMap,
097                            descriptionMap, content, type, structureId, templateId, layoutUuid,
098                            displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
099                            displayDateMinute, expirationDateMonth, expirationDateDay,
100                            expirationDateYear, expirationDateHour, expirationDateMinute,
101                            neverExpire, reviewDateMonth, reviewDateDay, reviewDateYear,
102                            reviewDateHour, reviewDateMinute, neverReview, indexable, false,
103                            null, null, null, articleURL, serviceContext);
104            }
105    
106            public JournalArticle copyArticle(
107                            long groupId, String oldArticleId, String newArticleId,
108                            boolean autoArticleId, double version)
109                    throws PortalException, SystemException {
110    
111                    JournalPermission.check(
112                            getPermissionChecker(), groupId, ActionKeys.ADD_ARTICLE);
113    
114                    return journalArticleLocalService.copyArticle(
115                            getUserId(), groupId, oldArticleId, newArticleId, autoArticleId,
116                            version);
117            }
118    
119            public void deleteArticle(
120                            long groupId, String articleId, double version, String articleURL,
121                            ServiceContext serviceContext)
122                    throws PortalException, SystemException {
123    
124                    JournalArticlePermission.check(
125                            getPermissionChecker(), groupId, articleId, version,
126                            ActionKeys.DELETE);
127    
128                    journalArticleLocalService.deleteArticle(
129                            groupId, articleId, version, articleURL, serviceContext);
130            }
131    
132            public void deleteArticle(
133                            long groupId, String articleId, String articleURL,
134                            ServiceContext serviceContext)
135                    throws PortalException, SystemException {
136    
137                    JournalArticlePermission.check(
138                            getPermissionChecker(), groupId, articleId, ActionKeys.DELETE);
139    
140                    journalArticleLocalService.deleteArticle(
141                            groupId, articleId, serviceContext);
142            }
143    
144            public JournalArticle expireArticle(
145                            long groupId, String articleId, double version, String articleURL,
146                            ServiceContext serviceContext)
147                    throws PortalException, SystemException {
148    
149                    JournalArticlePermission.check(
150                            getPermissionChecker(), groupId, articleId, version,
151                            ActionKeys.EXPIRE);
152    
153                    return journalArticleLocalService.expireArticle(
154                            getUserId(), groupId, articleId, version, articleURL,
155                            serviceContext);
156            }
157    
158            public void expireArticle(
159                            long groupId, String articleId, String articleURL,
160                            ServiceContext serviceContext)
161                    throws PortalException, SystemException {
162    
163                    JournalArticlePermission.check(
164                            getPermissionChecker(), groupId, articleId, ActionKeys.EXPIRE);
165    
166                    journalArticleLocalService.expireArticle(
167                            getUserId(), groupId, articleId, articleURL, serviceContext);
168            }
169    
170            public JournalArticle getArticle(long id)
171                    throws PortalException, SystemException {
172    
173                    JournalArticle article = journalArticleLocalService.getArticle(id);
174    
175                    JournalArticlePermission.check(
176                            getPermissionChecker(), article, ActionKeys.VIEW);
177    
178                    return article;
179            }
180    
181            public JournalArticle getArticle(long groupId, String articleId)
182                    throws PortalException, SystemException {
183    
184                    JournalArticlePermission.check(
185                            getPermissionChecker(), groupId, articleId, ActionKeys.VIEW);
186    
187                    return journalArticleLocalService.getArticle(groupId, articleId);
188            }
189    
190            public JournalArticle getArticle(
191                            long groupId, String articleId, double version)
192                    throws PortalException, SystemException {
193    
194                    JournalArticlePermission.check(
195                            getPermissionChecker(), groupId, articleId, version,
196                            ActionKeys.VIEW);
197    
198                    return journalArticleLocalService.getArticle(
199                            groupId, articleId, version);
200            }
201    
202            public JournalArticle getArticle(
203                            long groupId, String className, long classPK)
204                    throws PortalException, SystemException {
205    
206                    JournalArticle article = journalArticleLocalService.getArticle(
207                            groupId, className, classPK);
208    
209                    JournalArticlePermission.check(
210                            getPermissionChecker(), groupId, article.getArticleId(),
211                            article.getVersion(), ActionKeys.VIEW);
212    
213                    return article;
214            }
215    
216            public JournalArticle getArticleByUrlTitle(long groupId, String urlTitle)
217                    throws PortalException, SystemException {
218    
219                    JournalArticle article =
220                            journalArticleLocalService.getArticleByUrlTitle(groupId, urlTitle);
221    
222                    JournalArticlePermission.check(
223                            getPermissionChecker(), article, ActionKeys.VIEW);
224    
225                    return article;
226            }
227    
228            public String getArticleContent(
229                            long groupId, String articleId, double version, String languageId,
230                            ThemeDisplay themeDisplay)
231                    throws PortalException, SystemException {
232    
233                    JournalArticlePermission.check(
234                            getPermissionChecker(), groupId, articleId, version,
235                            ActionKeys.VIEW);
236    
237                    return journalArticleLocalService.getArticleContent(
238                            groupId, articleId, version, null, languageId, themeDisplay);
239            }
240    
241            public String getArticleContent(
242                            long groupId, String articleId, String languageId,
243                            ThemeDisplay themeDisplay)
244                    throws PortalException, SystemException {
245    
246                    JournalArticlePermission.check(
247                            getPermissionChecker(), groupId, articleId, ActionKeys.VIEW);
248    
249                    return journalArticleLocalService.getArticleContent(
250                            groupId, articleId, null, languageId, themeDisplay);
251            }
252    
253            public List<JournalArticle> getArticles(long groupId, long folderId)
254                    throws SystemException {
255    
256                    return journalArticlePersistence.filterFindByG_F(groupId, folderId);
257            }
258    
259            public List<JournalArticle> getArticles(
260                            long groupId, long folderId, int start, int end,
261                            OrderByComparator obc)
262                    throws SystemException {
263    
264                    return journalArticlePersistence.filterFindByG_F(
265                            groupId, folderId, start, end, obc);
266            }
267    
268            public List<JournalArticle> getArticlesByArticleId(
269                            long groupId, String articleId, int start, int end,
270                            OrderByComparator obc)
271                    throws SystemException {
272    
273                    return journalArticlePersistence.filterFindByG_A(
274                            groupId, articleId, start, end, obc);
275            }
276    
277            public List<JournalArticle> getArticlesByLayoutUuid(
278                            long groupId, String layoutUuid)
279                    throws SystemException {
280    
281                    return journalArticlePersistence.filterFindByG_L(groupId, layoutUuid);
282            }
283    
284            public List<JournalArticle> getArticlesByStructureId(
285                            long groupId, String structureId, int start, int end,
286                            OrderByComparator obc)
287                    throws SystemException {
288    
289                    return journalArticlePersistence.filterFindByG_S(
290                            groupId, structureId, start, end, obc);
291            }
292    
293            public List<JournalArticle> getArticlesByUserId(
294                            long groupId, long userId, int start, int end,
295                            OrderByComparator obc)
296                    throws SystemException {
297    
298                    return journalArticlePersistence.filterFindByG_U(
299                            groupId, userId, start, end, obc);
300            }
301    
302            public int getArticlesCount(long groupId, long folderId)
303                    throws SystemException {
304    
305                    return journalArticlePersistence.filterCountByG_F(groupId, folderId);
306            }
307    
308            public int getArticlesCountByArticleId(long groupId, String articleId)
309                    throws SystemException {
310    
311                    return journalArticlePersistence.filterCountByG_A(groupId, articleId);
312            }
313    
314            public int getArticlesCountByStructureId(long groupId, String structureId)
315                    throws SystemException {
316    
317                    return journalArticlePersistence.filterCountByG_S(groupId, structureId);
318            }
319    
320            public int getArticlesCountByUserId(long groupId, long userId)
321                    throws SystemException {
322    
323                    return journalArticlePersistence.filterCountByG_U(groupId, userId);
324            }
325    
326            public JournalArticle getDisplayArticleByUrlTitle(
327                            long groupId, String urlTitle)
328                    throws PortalException, SystemException {
329    
330                    JournalArticle article =
331                            journalArticleLocalService.getDisplayArticleByUrlTitle(
332                                    groupId, urlTitle);
333    
334                    JournalArticlePermission.check(
335                            getPermissionChecker(), article, ActionKeys.VIEW);
336    
337                    return article;
338            }
339    
340            public int getFoldersAndArticlesCount(long groupId, List<Long> folderIds)
341                    throws SystemException {
342    
343                    return journalArticlePersistence.filterCountByG_F(
344                            groupId,
345                            ArrayUtil.toArray(folderIds.toArray(new Long[folderIds.size()])));
346            }
347    
348            public JournalArticle getLatestArticle(long resourcePrimKey)
349                    throws PortalException, SystemException {
350    
351                    JournalArticlePermission.check(
352                            getPermissionChecker(), resourcePrimKey, ActionKeys.VIEW);
353    
354                    return journalArticleLocalService.getLatestArticle(resourcePrimKey);
355            }
356    
357            public JournalArticle getLatestArticle(
358                            long groupId, String articleId, int status)
359                    throws PortalException, SystemException {
360    
361                    JournalArticlePermission.check(
362                            getPermissionChecker(), groupId, articleId, status,
363                            ActionKeys.VIEW);
364    
365                    return journalArticleLocalService.getLatestArticle(
366                            groupId, articleId, status);
367            }
368    
369            public JournalArticle getLatestArticle(
370                            long groupId, String className, long classPK)
371                    throws PortalException, SystemException {
372    
373                    JournalArticle article = journalArticleLocalService.getLatestArticle(
374                            groupId, className, classPK);
375    
376                    JournalArticlePermission.check(
377                            getPermissionChecker(), groupId, article.getArticleId(),
378                            article.getVersion(), ActionKeys.VIEW);
379    
380                    return article;
381            }
382    
383            public void moveArticle(long groupId, String articleId, long newFolderId)
384                    throws PortalException, SystemException {
385    
386                    List<JournalArticle> articles = journalArticlePersistence.findByG_A(
387                            groupId, articleId);
388    
389                    for (JournalArticle article : articles) {
390                            JournalArticlePermission.check(
391                                    getPermissionChecker(), article, ActionKeys.UPDATE);
392    
393                            journalArticleLocalService.moveArticle(
394                                    groupId, articleId, newFolderId);
395                    }
396            }
397    
398            public void removeArticleLocale(long companyId, String languageId)
399                    throws PortalException, SystemException {
400    
401                    for (JournalArticle article :
402                                    journalArticlePersistence.findByCompanyId(companyId)) {
403    
404                            removeArticleLocale(
405                                    article.getGroupId(), article.getArticleId(),
406                                    article.getVersion(), languageId);
407                    }
408            }
409    
410            public JournalArticle removeArticleLocale(
411                            long groupId, String articleId, double version, String languageId)
412                    throws PortalException, SystemException {
413    
414                    JournalArticlePermission.check(
415                            getPermissionChecker(), groupId, articleId, version,
416                            ActionKeys.UPDATE);
417    
418                    return journalArticleLocalService.removeArticleLocale(
419                            groupId, articleId, version, languageId);
420            }
421    
422            public List<JournalArticle> search(
423                            long companyId, long groupId, List<Long> folderIds,
424                            long classNameId, String keywords, Double version, String type,
425                            String structureId, String templateId, Date displayDateGT,
426                            Date displayDateLT, int status, Date reviewDate, int start, int end,
427                            OrderByComparator obc)
428                    throws SystemException {
429    
430                    return journalArticleFinder.filterFindByKeywords(
431                            companyId, groupId, folderIds, classNameId, keywords, version, type,
432                            structureId, templateId, displayDateGT, displayDateLT, status,
433                            reviewDate, start, end, obc);
434            }
435    
436            public List<JournalArticle> search(
437                            long companyId, long groupId, List<Long> folderIds,
438                            long classNameId, String articleId, Double version, String title,
439                            String description, String content, String type, String structureId,
440                            String templateId, Date displayDateGT, Date displayDateLT,
441                            int status, Date reviewDate, boolean andOperator, int start,
442                            int end, OrderByComparator obc)
443                    throws SystemException {
444    
445                    return journalArticleFinder.filterFindByC_G_F_C_A_V_T_D_C_T_S_T_D_S_R(
446                            companyId, groupId, folderIds, classNameId, articleId, version,
447                            title, description, content, type, structureId, templateId,
448                            displayDateGT, displayDateLT, status, reviewDate, andOperator,
449                            start, end, obc);
450            }
451    
452            public List<JournalArticle> search(
453                            long companyId, long groupId, List<Long> folderIds,
454                            long classNameId, String articleId, Double version, String title,
455                            String description, String content, String type,
456                            String[] structureIds, String[] templateIds, Date displayDateGT,
457                            Date displayDateLT, int status, Date reviewDate,
458                            boolean andOperator, int start, int end, OrderByComparator obc)
459                    throws SystemException {
460    
461                    return journalArticleFinder.filterFindByC_G_F_C_A_V_T_D_C_T_S_T_D_S_R(
462                            companyId, groupId, folderIds, classNameId, articleId, version,
463                            title, description, content, type, structureIds, templateIds,
464                            displayDateGT, displayDateLT, status, reviewDate, andOperator,
465                            start, end, obc);
466            }
467    
468            public int searchCount(
469                            long companyId, long groupId, List<Long> folderIds,
470                            long classNameId, String keywords, Double version, String type,
471                            String structureId, String templateId, Date displayDateGT,
472                            Date displayDateLT, int status, Date reviewDate)
473                    throws SystemException {
474    
475                    return journalArticleFinder.filterCountByKeywords(
476                            companyId, groupId, folderIds, classNameId, keywords, version, type,
477                            structureId, templateId, displayDateGT, displayDateLT, status,
478                            reviewDate);
479            }
480    
481            public int searchCount(
482                            long companyId, long groupId, List<Long> folderIds,
483                            long classNameId, String articleId, Double version, String title,
484                            String description, String content, String type, String structureId,
485                            String templateId, Date displayDateGT, Date displayDateLT,
486                            int status, Date reviewDate, boolean andOperator)
487                    throws SystemException {
488    
489                    return journalArticleFinder.filterCountByC_G_F_C_A_V_T_D_C_T_S_T_D_S_R(
490                            companyId, groupId, folderIds, classNameId, articleId, version,
491                            title, description, content, type, structureId, templateId,
492                            displayDateGT, displayDateLT, status, reviewDate, andOperator);
493            }
494    
495            public int searchCount(
496                            long companyId, long groupId, List<Long> folderIds,
497                            long classNameId, String articleId, Double version, String title,
498                            String description, String content, String type,
499                            String[] structureIds, String[] templateIds, Date displayDateGT,
500                            Date displayDateLT, int status, Date reviewDate,
501                            boolean andOperator)
502                    throws SystemException {
503    
504                    return journalArticleFinder.filterCountByC_G_F_C_A_V_T_D_C_T_S_T_D_S_R(
505                            companyId, groupId, folderIds, classNameId, articleId, version,
506                            title, description, content, type, structureIds, templateIds,
507                            displayDateGT, displayDateLT, status, reviewDate, andOperator);
508            }
509    
510            public void subscribe(long groupId)
511                    throws PortalException, SystemException {
512    
513                    JournalPermission.check(
514                            getPermissionChecker(), groupId, ActionKeys.SUBSCRIBE);
515    
516                    journalArticleLocalService.subscribe(getUserId(), groupId);
517            }
518    
519            public void unsubscribe(long groupId)
520                    throws PortalException, SystemException {
521    
522                    JournalPermission.check(
523                            getPermissionChecker(), groupId, ActionKeys.SUBSCRIBE);
524    
525                    journalArticleLocalService.unsubscribe(getUserId(), groupId);
526            }
527    
528            public JournalArticle updateArticle(
529                            long userId, long groupId, long folderId, String articleId,
530                            double version, Map<Locale, String> titleMap,
531                            Map<Locale, String> descriptionMap, String content,
532                            String layoutUuid, ServiceContext serviceContext)
533                    throws PortalException, SystemException {
534    
535                    return journalArticleLocalService.updateArticle(
536                            userId, groupId, folderId, articleId, version, titleMap,
537                            descriptionMap, content, layoutUuid, serviceContext);
538            }
539    
540            public JournalArticle updateArticle(
541                            long groupId, long folderId, String articleId, double version,
542                            Map<Locale, String> titleMap, Map<Locale, String> descriptionMap,
543                            String content, String type, String structureId, String templateId,
544                            String layoutUuid, int displayDateMonth, int displayDateDay,
545                            int displayDateYear, int displayDateHour, int displayDateMinute,
546                            int expirationDateMonth, int expirationDateDay,
547                            int expirationDateYear, int expirationDateHour,
548                            int expirationDateMinute, boolean neverExpire, int reviewDateMonth,
549                            int reviewDateDay, int reviewDateYear, int reviewDateHour,
550                            int reviewDateMinute, boolean neverReview, boolean indexable,
551                            boolean smallImage, String smallImageURL, File smallFile,
552                            Map<String, byte[]> images, String articleURL,
553                            ServiceContext serviceContext)
554                    throws PortalException, SystemException {
555    
556                    JournalArticlePermission.check(
557                            getPermissionChecker(), groupId, articleId, version,
558                            ActionKeys.UPDATE);
559    
560                    return journalArticleLocalService.updateArticle(
561                            getUserId(), groupId, folderId, articleId, version, titleMap,
562                            descriptionMap, content, type, structureId, templateId, layoutUuid,
563                            displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
564                            displayDateMinute, expirationDateMonth, expirationDateDay,
565                            expirationDateYear, expirationDateHour, expirationDateMinute,
566                            neverExpire, reviewDateMonth, reviewDateDay, reviewDateYear,
567                            reviewDateHour, reviewDateMinute, neverReview, indexable,
568                            smallImage, smallImageURL, smallFile, images, articleURL,
569                            serviceContext);
570            }
571    
572            public JournalArticle updateArticle(
573                            long groupId, long folderId, String articleId, double version,
574                            String content, ServiceContext serviceContext)
575                    throws PortalException, SystemException {
576    
577                    JournalArticlePermission.check(
578                            getPermissionChecker(), groupId, articleId, version,
579                            ActionKeys.UPDATE);
580    
581                    return journalArticleLocalService.updateArticle(
582                            getUserId(), groupId, folderId, articleId, version, content,
583                            serviceContext);
584            }
585    
586            /**
587             * @deprecated {@link #updateArticleTranslation(long, String, double,
588             *             Locale, String, String, String, Map, ServiceContext)}
589             */
590            public JournalArticle updateArticleTranslation(
591                            long groupId, String articleId, double version, Locale locale,
592                            String title, String description, String content,
593                            Map<String, byte[]> images)
594                    throws PortalException, SystemException {
595    
596                    return updateArticleTranslation(
597                            groupId, articleId, version, locale, title, description, content,
598                            images, null);
599            }
600    
601            public JournalArticle updateArticleTranslation(
602                            long groupId, String articleId, double version, Locale locale,
603                            String title, String description, String content,
604                            Map<String, byte[]> images, ServiceContext serviceContext)
605                    throws PortalException, SystemException {
606    
607                    JournalArticlePermission.check(
608                            getPermissionChecker(), groupId, articleId, version,
609                            ActionKeys.UPDATE);
610    
611                    return journalArticleLocalService.updateArticleTranslation(
612                            groupId, articleId, version, locale, title, description, content,
613                            images, serviceContext);
614            }
615    
616            public JournalArticle updateContent(
617                            long groupId, String articleId, double version, String content)
618                    throws PortalException, SystemException {
619    
620                    JournalArticlePermission.check(
621                            getPermissionChecker(), groupId, articleId, version,
622                            ActionKeys.UPDATE);
623    
624                    return journalArticleLocalService.updateContent(
625                            groupId, articleId, version, content);
626            }
627    
628            public JournalArticle updateStatus(
629                            long groupId, String articleId, double version, int status,
630                            String articleURL, ServiceContext serviceContext)
631                    throws PortalException, SystemException {
632    
633                    JournalArticlePermission.check(
634                            getPermissionChecker(), groupId, articleId, version,
635                            ActionKeys.UPDATE);
636    
637                    return journalArticleLocalService.updateStatus(
638                            getUserId(), groupId, articleId, version, status, articleURL,
639                            serviceContext);
640            }
641    
642    }