001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portlet.journal.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the remote service utility for JournalArticle. This utility wraps
024     * {@link com.liferay.portlet.journal.service.impl.JournalArticleServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on a remote server. Methods of this service are expected to have security
027     * checks based on the propagated JAAS credentials because this service can be
028     * accessed remotely.
029     *
030     * @author Brian Wing Shun Chan
031     * @see JournalArticleService
032     * @see com.liferay.portlet.journal.service.base.JournalArticleServiceBaseImpl
033     * @see com.liferay.portlet.journal.service.impl.JournalArticleServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class JournalArticleServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * 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.
042             */
043    
044            /**
045            * Returns the Spring bean ID for this bean.
046            *
047            * @return the Spring bean ID for this bean
048            */
049            public static java.lang.String getBeanIdentifier() {
050                    return getService().getBeanIdentifier();
051            }
052    
053            /**
054            * Sets the Spring bean ID for this bean.
055            *
056            * @param beanIdentifier the Spring bean ID for this bean
057            */
058            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
059                    getService().setBeanIdentifier(beanIdentifier);
060            }
061    
062            /**
063            * Adds a web content article with additional parameters.
064            *
065            * @param groupId the primary key of the web content article's group
066            * @param folderId the primary key of the web content article folder
067            * @param classNameId the primary key of the DDMStructure class if the web
068            content article is related to a DDM structure, the primary key of
069            the class name associated with the article, or {@link
070            JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise
071            * @param classPK the primary key of the DDM structure, if the primary key
072            of the DDMStructure class is given as the
073            <code>classNameId</code> parameter, the primary key of the class
074            associated with the web content article, or <code>0</code>
075            otherwise
076            * @param articleId the primary key of the web content article
077            * @param autoArticleId whether to auto generate the web content article ID
078            * @param titleMap the web content article's locales and localized titles
079            * @param descriptionMap the web content article's locales and localized
080            descriptions
081            * @param content the HTML content wrapped in XML. For more information,
082            see the content example in the class description for {@link
083            JournalArticleLocalServiceImpl}.
084            * @param type the structure's type, if the web content article is related
085            to a DDM structure. For more information, see {@link
086            com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}.
087            * @param ddmStructureKey the primary key of the web content article's DDM
088            structure, if the article is related to a DDM structure, or
089            <code>null</code> otherwise
090            * @param ddmTemplateKey the primary key of the web content article's DDM
091            template (optionally <code>null</code>). If the article is
092            related to a DDM structure, the template's structure must match
093            it.
094            * @param layoutUuid the unique string identifying the web content
095            article's display page
096            * @param displayDateMonth the month the web content article is set to
097            display
098            * @param displayDateDay the calendar day the web content article is set to
099            display
100            * @param displayDateYear the year the web content article is set to
101            display
102            * @param displayDateHour the hour the web content article is set to
103            display
104            * @param displayDateMinute the minute the web content article is set to
105            display
106            * @param expirationDateMonth the month the web content article is set to
107            expire
108            * @param expirationDateDay the calendar day the web content article is set
109            to expire
110            * @param expirationDateYear the year the web content article is set to
111            expire
112            * @param expirationDateHour the hour the web content article is set to
113            expire
114            * @param expirationDateMinute the minute the web content article is set to
115            expire
116            * @param neverExpire whether the web content article is not set to auto
117            expire
118            * @param reviewDateMonth the month the web content article is set for
119            review
120            * @param reviewDateDay the calendar day the web content article is set for
121            review
122            * @param reviewDateYear the year the web content article is set for review
123            * @param reviewDateHour the hour the web content article is set for review
124            * @param reviewDateMinute the minute the web content article is set for
125            review
126            * @param neverReview whether the web content article is not set for review
127            * @param indexable whether the web content article is searchable
128            * @param smallImage whether the web content article has a small image
129            * @param smallImageURL the web content article's small image URL
130            * @param smallFile the web content article's small image file
131            * @param images the web content's images
132            * @param articleURL the web content article's accessible URL
133            * @param serviceContext the service context to be applied. Can set the
134            UUID, creation date, modification date, expando bridge
135            attributes, guest permissions, group permissions, asset category
136            IDs, asset tag names, asset link entry IDs, the "urlTitle"
137            attribute, and workflow actions for the web content article. Can
138            also set whether to add the default guest and group permissions.
139            * @return the web content article
140            * @throws PortalException if the user did not have permission to add the
141            web content article or if a portal exception occurred
142            * @throws SystemException if a system exception occurred
143            */
144            public static com.liferay.portlet.journal.model.JournalArticle addArticle(
145                    long groupId, long folderId, long classNameId, long classPK,
146                    java.lang.String articleId, boolean autoArticleId,
147                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
148                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
149                    java.lang.String content, java.lang.String type,
150                    java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey,
151                    java.lang.String layoutUuid, int displayDateMonth, int displayDateDay,
152                    int displayDateYear, int displayDateHour, int displayDateMinute,
153                    int expirationDateMonth, int expirationDateDay, int expirationDateYear,
154                    int expirationDateHour, int expirationDateMinute, boolean neverExpire,
155                    int reviewDateMonth, int reviewDateDay, int reviewDateYear,
156                    int reviewDateHour, int reviewDateMinute, boolean neverReview,
157                    boolean indexable, boolean smallImage, java.lang.String smallImageURL,
158                    java.io.File smallFile, java.util.Map<java.lang.String, byte[]> images,
159                    java.lang.String articleURL,
160                    com.liferay.portal.service.ServiceContext serviceContext)
161                    throws com.liferay.portal.kernel.exception.PortalException,
162                            com.liferay.portal.kernel.exception.SystemException {
163                    return getService()
164                                       .addArticle(groupId, folderId, classNameId, classPK,
165                            articleId, autoArticleId, titleMap, descriptionMap, content, type,
166                            ddmStructureKey, ddmTemplateKey, layoutUuid, displayDateMonth,
167                            displayDateDay, displayDateYear, displayDateHour,
168                            displayDateMinute, expirationDateMonth, expirationDateDay,
169                            expirationDateYear, expirationDateHour, expirationDateMinute,
170                            neverExpire, reviewDateMonth, reviewDateDay, reviewDateYear,
171                            reviewDateHour, reviewDateMinute, neverReview, indexable,
172                            smallImage, smallImageURL, smallFile, images, articleURL,
173                            serviceContext);
174            }
175    
176            /**
177            * Adds a web content article without any images.
178            *
179            * @param groupId the primary key of the web content article's group
180            * @param folderId the primary key of the web content article folder
181            * @param classNameId the primary key of the DDMStructure class if the web
182            content article is related to a DDM structure, the primary key of
183            the class name associated with the article, or {@link
184            JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise
185            * @param classPK the primary key of the DDM structure, if the primary key
186            of the DDMStructure class is given as the
187            <code>classNameId</code> parameter, the primary key of the class
188            associated with the web content article, or <code>0</code>
189            otherwise
190            * @param articleId the primary key of the web content article
191            * @param autoArticleId whether to auto generate the web content article ID
192            * @param titleMap the web content article's locales and localized titles
193            * @param descriptionMap the web content article's locales and localized
194            descriptions
195            * @param content the HTML content wrapped in XML. For more information,
196            see the content example in the class description for {@link
197            JournalArticleLocalServiceImpl}.
198            * @param type the structure's type, if the web content article is related
199            to a DDM structure. For more information, see {@link
200            com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}.
201            * @param ddmStructureKey the primary key of the web content article's DDM
202            structure, if the article is related to a DDM structure, or
203            <code>null</code> otherwise
204            * @param ddmTemplateKey the primary key of the web content article's DDM
205            template (optionally <code>null</code>). If the article is
206            related to a DDM structure, the template's structure must match
207            it.
208            * @param layoutUuid the unique string identifying the web content
209            article's display page
210            * @param displayDateMonth the month the web content article is set to
211            display
212            * @param displayDateDay the calendar day the web content article is set to
213            display
214            * @param displayDateYear the year the web content article is set to
215            display
216            * @param displayDateHour the hour the web content article is set to
217            display
218            * @param displayDateMinute the minute the web content article is set to
219            display
220            * @param expirationDateMonth the month the web content article is set to
221            expire
222            * @param expirationDateDay the calendar day the web content article is set
223            to expire
224            * @param expirationDateYear the year the web content article is set to
225            expire
226            * @param expirationDateHour the hour the web content article is set to
227            expire
228            * @param expirationDateMinute the minute the web content article is set to
229            expire
230            * @param neverExpire whether the web content article is not set to auto
231            expire
232            * @param reviewDateMonth the month the web content article is set for
233            review
234            * @param reviewDateDay the calendar day the web content article is set for
235            review
236            * @param reviewDateYear the year the web content article is set for review
237            * @param reviewDateHour the hour the web content article is set for review
238            * @param reviewDateMinute the minute the web content article is set for
239            review
240            * @param neverReview whether the web content article is not set for review
241            * @param indexable whether the web content article is searchable
242            * @param articleURL the web content article's accessible URL
243            * @param serviceContext the service context to be applied. Can set the
244            UUID, creation date, modification date, expando bridge
245            attributes, guest permissions, group permissions, asset category
246            IDs, asset tag names, asset link entry IDs, the "urlTitle"
247            attribute, and workflow actions for the web content article. Can
248            also set whether to add the default guest and group permissions.
249            * @return the web content article
250            * @throws PortalException if the user did not have permission to add the
251            web content article or if a portal exception occurred
252            * @throws SystemException if a system exception occurred
253            */
254            public static com.liferay.portlet.journal.model.JournalArticle addArticle(
255                    long groupId, long folderId, long classNameId, long classPK,
256                    java.lang.String articleId, boolean autoArticleId,
257                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
258                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
259                    java.lang.String content, java.lang.String type,
260                    java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey,
261                    java.lang.String layoutUuid, int displayDateMonth, int displayDateDay,
262                    int displayDateYear, int displayDateHour, int displayDateMinute,
263                    int expirationDateMonth, int expirationDateDay, int expirationDateYear,
264                    int expirationDateHour, int expirationDateMinute, boolean neverExpire,
265                    int reviewDateMonth, int reviewDateDay, int reviewDateYear,
266                    int reviewDateHour, int reviewDateMinute, boolean neverReview,
267                    boolean indexable, java.lang.String articleURL,
268                    com.liferay.portal.service.ServiceContext serviceContext)
269                    throws com.liferay.portal.kernel.exception.PortalException,
270                            com.liferay.portal.kernel.exception.SystemException {
271                    return getService()
272                                       .addArticle(groupId, folderId, classNameId, classPK,
273                            articleId, autoArticleId, titleMap, descriptionMap, content, type,
274                            ddmStructureKey, ddmTemplateKey, layoutUuid, displayDateMonth,
275                            displayDateDay, displayDateYear, displayDateHour,
276                            displayDateMinute, expirationDateMonth, expirationDateDay,
277                            expirationDateYear, expirationDateHour, expirationDateMinute,
278                            neverExpire, reviewDateMonth, reviewDateDay, reviewDateYear,
279                            reviewDateHour, reviewDateMinute, neverReview, indexable,
280                            articleURL, serviceContext);
281            }
282    
283            /**
284            * Copies the web content article matching the group, article ID, and
285            * version. This method creates a new article, extracting all the values
286            * from the old one and updating its article ID.
287            *
288            * @param groupId the primary key of the web content article's group
289            * @param oldArticleId the primary key of the old web content article
290            * @param newArticleId the primary key of the new web content article
291            * @param autoArticleId whether to auto-generate the web content article ID
292            * @param version the web content article's version
293            * @return the new web content article
294            * @throws PortalException if the user did not have permission to add the
295            copy the web content article, if a matching web content article
296            could not be found, or if a portal exception occurred
297            * @throws SystemException if a system exception occurred
298            */
299            public static com.liferay.portlet.journal.model.JournalArticle copyArticle(
300                    long groupId, java.lang.String oldArticleId,
301                    java.lang.String newArticleId, boolean autoArticleId, double version)
302                    throws com.liferay.portal.kernel.exception.PortalException,
303                            com.liferay.portal.kernel.exception.SystemException {
304                    return getService()
305                                       .copyArticle(groupId, oldArticleId, newArticleId,
306                            autoArticleId, version);
307            }
308    
309            /**
310            * Deletes the web content article and its resources matching the group,
311            * article ID, and version, optionally sending email notifying denial of the
312            * web content article if it had not yet been approved.
313            *
314            * @param groupId the primary key of the web content article's group
315            * @param articleId the primary key of the web content article
316            * @param version the web content article's version
317            * @param articleURL the web content article's accessible URL
318            * @param serviceContext the service context to be applied. Can set the
319            portlet preferences that include email information to notify
320            recipients of the unapproved web content article's denial.
321            * @throws PortalException if the user did not have permission to delete the
322            web content article, if a matching web content article could not
323            be found, or if a portal exception occurred
324            * @throws SystemException if a system exception occurred
325            */
326            public static void deleteArticle(long groupId, java.lang.String articleId,
327                    double version, java.lang.String articleURL,
328                    com.liferay.portal.service.ServiceContext serviceContext)
329                    throws com.liferay.portal.kernel.exception.PortalException,
330                            com.liferay.portal.kernel.exception.SystemException {
331                    getService()
332                            .deleteArticle(groupId, articleId, version, articleURL,
333                            serviceContext);
334            }
335    
336            /**
337            * Deletes all web content articles and their resources matching the group
338            * and article ID, optionally sending email notifying denial of article if
339            * it had not yet been approved.
340            *
341            * @param groupId the primary key of the web content article's group
342            * @param articleId the primary key of the web content article
343            * @param articleURL the web content article's accessible URL
344            * @param serviceContext the service context to be applied. Can set the
345            portlet preferences that include email information to notify
346            recipients of the unapproved web content article's denial.
347            * @throws PortalException if the user did not have permission to delete the
348            web content article or if a portal exception occurred
349            * @throws SystemException if a system exception occurred
350            */
351            public static void deleteArticle(long groupId, java.lang.String articleId,
352                    java.lang.String articleURL,
353                    com.liferay.portal.service.ServiceContext serviceContext)
354                    throws com.liferay.portal.kernel.exception.PortalException,
355                            com.liferay.portal.kernel.exception.SystemException {
356                    getService()
357                            .deleteArticle(groupId, articleId, articleURL, serviceContext);
358            }
359    
360            /**
361            * Expires the web content article matching the group, article ID, and
362            * version.
363            *
364            * @param groupId the primary key of the web content article's group
365            * @param articleId the primary key of the web content article
366            * @param version the web content article's version
367            * @param articleURL the web content article's accessible URL
368            * @param serviceContext the service context to be applied. Can set the
369            modification date, status date, portlet preferences, and can set
370            whether to add the default command update for the web content
371            article. With respect to social activities, by setting the
372            service context's command to {@link
373            com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation
374            is considered a web content update activity; otherwise it is
375            considered a web content add activity.
376            * @return the web content article
377            * @throws PortalException if the user did not have permission to expire the
378            web content article, if a matching web content article could not
379            be found, or if a portal exception occurred
380            * @throws SystemException if a system exception occurred
381            */
382            public static com.liferay.portlet.journal.model.JournalArticle expireArticle(
383                    long groupId, java.lang.String articleId, double version,
384                    java.lang.String articleURL,
385                    com.liferay.portal.service.ServiceContext serviceContext)
386                    throws com.liferay.portal.kernel.exception.PortalException,
387                            com.liferay.portal.kernel.exception.SystemException {
388                    return getService()
389                                       .expireArticle(groupId, articleId, version, articleURL,
390                            serviceContext);
391            }
392    
393            /**
394            * Expires the web content article matching the group and article ID,
395            * expiring all of its versions if the
396            * <code>journal.article.expire.all.versions</code> portal property is
397            * <code>true</code>, otherwise expiring only its latest approved version.
398            *
399            * @param groupId the primary key of the web content article's group
400            * @param articleId the primary key of the web content article
401            * @param articleURL the web content article's accessible URL
402            * @param serviceContext the service context to be applied. Can set the
403            modification date, status date, portlet preferences, and can set
404            whether to add the default command update for the web content
405            article. With respect to social activities, by setting the
406            service context's command to {@link
407            com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation
408            is considered a web content update activity; otherwise it is
409            considered a web content add activity.
410            * @throws PortalException if the user did not have permission to expire the
411            web content article, if a matching web content article could not
412            be found, or if a portal exception occurred
413            * @throws SystemException if a system exception occurred
414            */
415            public static void expireArticle(long groupId, java.lang.String articleId,
416                    java.lang.String articleURL,
417                    com.liferay.portal.service.ServiceContext serviceContext)
418                    throws com.liferay.portal.kernel.exception.PortalException,
419                            com.liferay.portal.kernel.exception.SystemException {
420                    getService()
421                            .expireArticle(groupId, articleId, articleURL, serviceContext);
422            }
423    
424            public static com.liferay.portlet.journal.model.JournalArticle fetchArticle(
425                    long groupId, java.lang.String articleId)
426                    throws com.liferay.portal.kernel.exception.PortalException,
427                            com.liferay.portal.kernel.exception.SystemException {
428                    return getService().fetchArticle(groupId, articleId);
429            }
430    
431            /**
432            * Returns the web content article with the ID.
433            *
434            * @param id the primary key of the web content article
435            * @return the web content article with the ID
436            * @throws PortalException if a matching web content article could not be
437            found or if the user did not have permission to view the web
438            content article
439            * @throws SystemException if a system exception occurred
440            */
441            public static com.liferay.portlet.journal.model.JournalArticle getArticle(
442                    long id)
443                    throws com.liferay.portal.kernel.exception.PortalException,
444                            com.liferay.portal.kernel.exception.SystemException {
445                    return getService().getArticle(id);
446            }
447    
448            /**
449            * Returns the latest approved web content article, or the latest unapproved
450            * article if none are approved. Both approved and unapproved articles must
451            * match the group and article ID.
452            *
453            * @param groupId the primary key of the web content article's group
454            * @param articleId the primary key of the web content article
455            * @return the matching web content article
456            * @throws PortalException if the user did not have permission to view the
457            web content article or if a matching web content article could
458            not be found
459            * @throws SystemException if a system exception occurred
460            */
461            public static com.liferay.portlet.journal.model.JournalArticle getArticle(
462                    long groupId, java.lang.String articleId)
463                    throws com.liferay.portal.kernel.exception.PortalException,
464                            com.liferay.portal.kernel.exception.SystemException {
465                    return getService().getArticle(groupId, articleId);
466            }
467    
468            /**
469            * Returns the web content article matching the group, article ID, and
470            * version.
471            *
472            * @param groupId the primary key of the web content article's group
473            * @param articleId the primary key of the web content article
474            * @param version the web content article's version
475            * @return the matching web content article
476            * @throws PortalException if the user did not have permission to view the
477            web content article or if a matching web content article could
478            not be found
479            * @throws SystemException if a system exception occurred
480            */
481            public static com.liferay.portlet.journal.model.JournalArticle getArticle(
482                    long groupId, java.lang.String articleId, double version)
483                    throws com.liferay.portal.kernel.exception.PortalException,
484                            com.liferay.portal.kernel.exception.SystemException {
485                    return getService().getArticle(groupId, articleId, version);
486            }
487    
488            /**
489            * Returns the web content article matching the group, class name, and class
490            * PK.
491            *
492            * @param groupId the primary key of the web content article's group
493            * @param className the DDMStructure class name if the web content article
494            is related to a DDM structure, the primary key of the class name
495            associated with the article, or {@link
496            JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise
497            * @param classPK the primary key of the DDM structure, if the the
498            DDMStructure class name is given as the <code>className</code>
499            parameter, the primary key of the class associated with the web
500            content article, or <code>0</code> otherwise
501            * @return the matching web content article
502            * @throws PortalException if a matching web content article could not be
503            found or if the user did not have permission to view the web
504            content article
505            * @throws SystemException if a system exception occurred
506            */
507            public static com.liferay.portlet.journal.model.JournalArticle getArticle(
508                    long groupId, java.lang.String className, long classPK)
509                    throws com.liferay.portal.kernel.exception.PortalException,
510                            com.liferay.portal.kernel.exception.SystemException {
511                    return getService().getArticle(groupId, className, classPK);
512            }
513    
514            /**
515            * Returns the latest web content article that is approved, or the latest
516            * unapproved article if none are approved. Both approved and unapproved
517            * articles must match the group and URL title.
518            *
519            * @param groupId the primary key of the web content article's group
520            * @param urlTitle the web content article's accessible URL title
521            * @return the matching web content article
522            * @throws PortalException if the user did not have permission to view the
523            web content article or if a portal exception occurred
524            * @throws SystemException if a system exception occurred
525            */
526            public static com.liferay.portlet.journal.model.JournalArticle getArticleByUrlTitle(
527                    long groupId, java.lang.String urlTitle)
528                    throws com.liferay.portal.kernel.exception.PortalException,
529                            com.liferay.portal.kernel.exception.SystemException {
530                    return getService().getArticleByUrlTitle(groupId, urlTitle);
531            }
532    
533            /**
534            * Returns the web content matching the group, article ID, and version.
535            *
536            * @param groupId the primary key of the web content article's group
537            * @param articleId the primary key of the web content article
538            * @param version the web content article's version
539            * @param languageId the primary key of the language translation to get
540            * @param themeDisplay the theme display
541            * @return the matching web content
542            * @throws PortalException if the user did not have permission to view the
543            web content article, if a matching web content article or DDM
544            template could not be found, or if a portal exception occurred
545            * @throws SystemException if a system exception occurred
546            */
547            public static java.lang.String getArticleContent(long groupId,
548                    java.lang.String articleId, double version,
549                    java.lang.String languageId,
550                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
551                    throws com.liferay.portal.kernel.exception.PortalException,
552                            com.liferay.portal.kernel.exception.SystemException {
553                    return getService()
554                                       .getArticleContent(groupId, articleId, version, languageId,
555                            themeDisplay);
556            }
557    
558            /**
559            * Returns the latest web content matching the group and article ID.
560            *
561            * @param groupId the primary key of the web content article's group
562            * @param articleId the primary key of the web content article
563            * @param languageId the primary key of the language translation to get
564            * @param themeDisplay the theme display
565            * @return the matching web content
566            * @throws PortalException if the user did not have permission to view the
567            web content article, if a matching web content article or DDM
568            template could not be found, or if a portal exception occurred
569            * @throws SystemException if a system exception occurred
570            */
571            public static java.lang.String getArticleContent(long groupId,
572                    java.lang.String articleId, java.lang.String languageId,
573                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
574                    throws com.liferay.portal.kernel.exception.PortalException,
575                            com.liferay.portal.kernel.exception.SystemException {
576                    return getService()
577                                       .getArticleContent(groupId, articleId, languageId,
578                            themeDisplay);
579            }
580    
581            /**
582            * Returns all the web content articles matching the group and folder.
583            *
584            * @param groupId the primary key of the web content article's group
585            * @param folderId the primary key of the web content article folder
586            * @return the matching web content articles
587            * @throws SystemException if a system exception occurred
588            */
589            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles(
590                    long groupId, long folderId)
591                    throws com.liferay.portal.kernel.exception.SystemException {
592                    return getService().getArticles(groupId, folderId);
593            }
594    
595            /**
596            * Returns an ordered range of all the web content articles matching the
597            * group and folder.
598            *
599            * <p>
600            * Useful when paginating results. Returns a maximum of <code>end -
601            * start</code> instances. <code>start</code> and <code>end</code> are not
602            * primary keys, they are indexes in the result set. Thus, <code>0</code>
603            * refers to the first result in the set. Setting both <code>start</code>
604            * and <code>end</code> to {@link
605            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
606            * result set.
607            * </p>
608            *
609            * @param groupId the primary key of the web content article's group
610            * @param folderId the primary key of the web content article folder
611            * @param start the lower bound of the range of web content articles to
612            return
613            * @param end the upper bound of the range of web content articles to
614            return (not inclusive)
615            * @param obc the comparator to order the web content articles
616            * @return the matching web content articles
617            * @throws SystemException if a system exception occurred
618            */
619            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles(
620                    long groupId, long folderId, int start, int end,
621                    com.liferay.portal.kernel.util.OrderByComparator obc)
622                    throws com.liferay.portal.kernel.exception.SystemException {
623                    return getService().getArticles(groupId, folderId, start, end, obc);
624            }
625    
626            /**
627            * Returns an ordered range of all the web content articles matching the
628            * group and article ID.
629            *
630            * <p>
631            * Useful when paginating results. Returns a maximum of <code>end -
632            * start</code> instances. <code>start</code> and <code>end</code> are not
633            * primary keys, they are indexes in the result set. Thus, <code>0</code>
634            * refers to the first result in the set. Setting both <code>start</code>
635            * and <code>end</code> to {@link
636            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
637            * result set.
638            * </p>
639            *
640            * @param groupId the primary key of the web content article's group
641            * @param articleId the primary key of the web content article
642            * @param start the lower bound of the range of web content articles to
643            return
644            * @param end the upper bound of the range of web content articles to
645            return (not inclusive)
646            * @param obc the comparator to order the web content articles
647            * @return the range of matching web content articles ordered by the
648            comparator
649            * @throws SystemException if a system exception occurred
650            */
651            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticlesByArticleId(
652                    long groupId, java.lang.String articleId, int start, int end,
653                    com.liferay.portal.kernel.util.OrderByComparator obc)
654                    throws com.liferay.portal.kernel.exception.SystemException {
655                    return getService()
656                                       .getArticlesByArticleId(groupId, articleId, start, end, obc);
657            }
658    
659            /**
660            * Returns all the web content articles matching the group and layout UUID.
661            *
662            * @param groupId the primary key of the web content article's group
663            * @param layoutUuid the unique string identifying the web content
664            article's display page
665            * @return the matching web content articles
666            * @throws SystemException if a system exception occurred
667            */
668            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticlesByLayoutUuid(
669                    long groupId, java.lang.String layoutUuid)
670                    throws com.liferay.portal.kernel.exception.SystemException {
671                    return getService().getArticlesByLayoutUuid(groupId, layoutUuid);
672            }
673    
674            /**
675            * Returns an ordered range of all the web content articles matching the
676            * group, class name ID, DDM structure key, and workflow status.
677            *
678            * <p>
679            * Useful when paginating results. Returns a maximum of <code>end -
680            * start</code> instances. <code>start</code> and <code>end</code> are not
681            * primary keys, they are indexes in the result set. Thus, <code>0</code>
682            * refers to the first result in the set. Setting both <code>start</code>
683            * and <code>end</code> to {@link
684            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
685            * result set.
686            * </p>
687            *
688            * @param groupId the primary key of the web content article's group
689            * @param classNameId the primary key of the DDMStructure class if the web
690            content article is related to a DDM structure, the primary key of
691            the class name associated with the article, or {@link
692            JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise
693            * @param ddmStructureKey the primary key of the web content article's DDM
694            structure
695            * @param status the web content article's workflow status. For more
696            information see {@link WorkflowConstants} for constants starting
697            with the "STATUS_" prefix.
698            * @param start the lower bound of the range of web content articles to
699            return
700            * @param end the upper bound of the range of web content articles to
701            return (not inclusive)
702            * @param obc the comparator to order the web content articles
703            * @return the range of matching web content articles ordered by the
704            comparator
705            * @throws SystemException if a system exception occurred
706            */
707            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticlesByStructureId(
708                    long groupId, long classNameId, java.lang.String ddmStructureKey,
709                    int status, int start, int end,
710                    com.liferay.portal.kernel.util.OrderByComparator obc)
711                    throws com.liferay.portal.kernel.exception.SystemException {
712                    return getService()
713                                       .getArticlesByStructureId(groupId, classNameId,
714                            ddmStructureKey, status, start, end, obc);
715            }
716    
717            /**
718            * Returns an ordered range of all the web content articles matching the
719            * group, default class name ID, and DDM structure key.
720            *
721            * <p>
722            * Useful when paginating results. Returns a maximum of <code>end -
723            * start</code> instances. <code>start</code> and <code>end</code> are not
724            * primary keys, they are indexes in the result set. Thus, <code>0</code>
725            * refers to the first result in the set. Setting both <code>start</code>
726            * and <code>end</code> to {@link
727            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
728            * result set.
729            * </p>
730            *
731            * @param groupId the primary key of the web content article's group
732            * @param ddmStructureKey the primary key of the web content article's DDM
733            structure
734            * @param start the lower bound of the range of web content articles to
735            return
736            * @param end the upper bound of the range of web content articles to
737            return (not inclusive)
738            * @param obc the comparator to order the web content articles
739            * @return the range of matching web content articles ordered by the
740            comparator
741            * @throws SystemException if a system exception occurred
742            */
743            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticlesByStructureId(
744                    long groupId, java.lang.String ddmStructureKey, int start, int end,
745                    com.liferay.portal.kernel.util.OrderByComparator obc)
746                    throws com.liferay.portal.kernel.exception.SystemException {
747                    return getService()
748                                       .getArticlesByStructureId(groupId, ddmStructureKey, start,
749                            end, obc);
750            }
751    
752            /**
753            * Returns the number of web content articles matching the group and folder.
754            *
755            * @param groupId the primary key of the web content article's group
756            * @param folderId the primary key of the web content article folder
757            * @return the number of matching web content articles
758            * @throws SystemException if a system exception occurred
759            */
760            public static int getArticlesCount(long groupId, long folderId)
761                    throws com.liferay.portal.kernel.exception.SystemException {
762                    return getService().getArticlesCount(groupId, folderId);
763            }
764    
765            public static int getArticlesCount(long groupId, long folderId, int status)
766                    throws com.liferay.portal.kernel.exception.SystemException {
767                    return getService().getArticlesCount(groupId, folderId, status);
768            }
769    
770            /**
771            * Returns the number of web content articles matching the group and article
772            * ID.
773            *
774            * @param groupId the primary key of the web content article's group
775            * @param articleId the primary key of the web content article
776            * @return the number of matching web content articles
777            * @throws SystemException if a system exception occurred
778            */
779            public static int getArticlesCountByArticleId(long groupId,
780                    java.lang.String articleId)
781                    throws com.liferay.portal.kernel.exception.SystemException {
782                    return getService().getArticlesCountByArticleId(groupId, articleId);
783            }
784    
785            /**
786            * Returns the number of web content articles matching the group, class name
787            * ID, DDM structure key, and workflow status.
788            *
789            * @param groupId the primary key of the web content article's group
790            * @param classNameId the primary key of the DDMStructure class if the web
791            content article is related to a DDM structure, the primary key of
792            the class name associated with the article, or {@link
793            JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise
794            * @param ddmStructureKey the primary key of the web content article's DDM
795            structure
796            * @param status the web content article's workflow status. For more
797            information see {@link WorkflowConstants} for constants starting
798            with the "STATUS_" prefix.
799            * @return the number of matching web content articles
800            * @throws SystemException if a system exception occurred
801            */
802            public static int getArticlesCountByStructureId(long groupId,
803                    long classNameId, java.lang.String ddmStructureKey, int status)
804                    throws com.liferay.portal.kernel.exception.SystemException {
805                    return getService()
806                                       .getArticlesCountByStructureId(groupId, classNameId,
807                            ddmStructureKey, status);
808            }
809    
810            /**
811            * Returns the number of web content articles matching the group, default
812            * class name ID, and DDM structure key.
813            *
814            * @param groupId the primary key of the web content article's group
815            * @param ddmStructureKey the primary key of the web content article's DDM
816            structure
817            * @return the number of matching web content articles
818            * @throws SystemException if a system exception occurred
819            */
820            public static int getArticlesCountByStructureId(long groupId,
821                    java.lang.String ddmStructureKey)
822                    throws com.liferay.portal.kernel.exception.SystemException {
823                    return getService()
824                                       .getArticlesCountByStructureId(groupId, ddmStructureKey);
825            }
826    
827            /**
828            * Returns the web content article matching the URL title that is currently
829            * displayed or next to be displayed if no article is currently displayed.
830            *
831            * @param groupId the primary key of the web content article's group
832            * @param urlTitle the web content article's accessible URL title
833            * @return the web content article matching the URL title that is currently
834            displayed, or next one to be displayed if no version of the
835            article is currently displayed
836            * @throws PortalException if the user did not have permission to view the
837            web content article or if no approved matching web content
838            articles could be found
839            * @throws SystemException if a system exception occurred
840            */
841            public static com.liferay.portlet.journal.model.JournalArticle getDisplayArticleByUrlTitle(
842                    long groupId, java.lang.String urlTitle)
843                    throws com.liferay.portal.kernel.exception.PortalException,
844                            com.liferay.portal.kernel.exception.SystemException {
845                    return getService().getDisplayArticleByUrlTitle(groupId, urlTitle);
846            }
847    
848            /**
849            * Returns the number of folders containing web content articles belonging
850            * to the group.
851            *
852            * @param groupId the primary key of the web content article's group
853            * @param folderIds the primary keys of the web content article folders
854            (optionally {@link java.util.Collections#EMPTY_LIST})
855            * @return the number of matching folders containing web content articles
856            * @throws SystemException if a system exception occurred
857            */
858            public static int getFoldersAndArticlesCount(long groupId,
859                    java.util.List<java.lang.Long> folderIds)
860                    throws com.liferay.portal.kernel.exception.SystemException {
861                    return getService().getFoldersAndArticlesCount(groupId, folderIds);
862            }
863    
864            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getGroupArticles(
865                    long groupId, long userId, long rootFolderId, int status, int start,
866                    int end,
867                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
868                    throws com.liferay.portal.kernel.exception.PortalException,
869                            com.liferay.portal.kernel.exception.SystemException {
870                    return getService()
871                                       .getGroupArticles(groupId, userId, rootFolderId, status,
872                            start, end, orderByComparator);
873            }
874    
875            /**
876            * Returns an ordered range of all the web content articles matching the
877            * group, user, the root folder or any of its subfolders.
878            *
879            * @param groupId the primary key of the web content article's group
880            * @param userId the primary key of the user (optionally <code>0</code>)
881            * @param rootFolderId the primary key of the root folder to begin the
882            search
883            * @param start the lower bound of the range of web content articles to
884            return
885            * @param end the upper bound of the range of web content articles to
886            return (not inclusive)
887            * @param orderByComparator the comparator to order the web content
888            articles
889            * @return the range of matching web content articles ordered by the
890            comparator
891            * @throws PortalException if the root folder could not be found, if the
892            current user did not have permission to view the root folder, or
893            if a portal exception occurred
894            * @throws SystemException if a system exception occurred
895            */
896            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getGroupArticles(
897                    long groupId, long userId, long rootFolderId, int start, int end,
898                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
899                    throws com.liferay.portal.kernel.exception.PortalException,
900                            com.liferay.portal.kernel.exception.SystemException {
901                    return getService()
902                                       .getGroupArticles(groupId, userId, rootFolderId, start, end,
903                            orderByComparator);
904            }
905    
906            /**
907            * Returns the number of web content articles matching the group, user, and
908            * the root folder or any of its subfolders.
909            *
910            * @param groupId the primary key of the web content article's group
911            * @param userId the primary key of the user (optionally <code>0</code>)
912            * @param rootFolderId the primary key of the root folder to begin the
913            search
914            * @return the number of matching web content articles
915            * @throws PortalException if the root folder could not be found, if the
916            current user did not have permission to view the root folder, or
917            if a portal exception occurred
918            * @throws SystemException if a system exception occurred
919            */
920            public static int getGroupArticlesCount(long groupId, long userId,
921                    long rootFolderId)
922                    throws com.liferay.portal.kernel.exception.PortalException,
923                            com.liferay.portal.kernel.exception.SystemException {
924                    return getService().getGroupArticlesCount(groupId, userId, rootFolderId);
925            }
926    
927            public static int getGroupArticlesCount(long groupId, long userId,
928                    long rootFolderId, int status)
929                    throws com.liferay.portal.kernel.exception.PortalException,
930                            com.liferay.portal.kernel.exception.SystemException {
931                    return getService()
932                                       .getGroupArticlesCount(groupId, userId, rootFolderId, status);
933            }
934    
935            /**
936            * Returns the latest web content article matching the resource primary key,
937            * preferring articles with approved workflow status.
938            *
939            * @param resourcePrimKey the primary key of the resource instance
940            * @return the latest web content article matching the resource primary key,
941            preferring articles with approved workflow status
942            * @throws PortalException if the user did not have permission to view the
943            web content article or if a matching web content article could
944            not be found
945            * @throws SystemException if a system exception occurred
946            */
947            public static com.liferay.portlet.journal.model.JournalArticle getLatestArticle(
948                    long resourcePrimKey)
949                    throws com.liferay.portal.kernel.exception.PortalException,
950                            com.liferay.portal.kernel.exception.SystemException {
951                    return getService().getLatestArticle(resourcePrimKey);
952            }
953    
954            /**
955            * Returns the latest web content article matching the group, article ID,
956            * and workflow status.
957            *
958            * @param groupId the primary key of the web content article's group
959            * @param articleId the primary key of the web content article
960            * @param status the web content article's workflow status. For more
961            information see {@link WorkflowConstants} for constants starting
962            with the "STATUS_" prefix.
963            * @return the latest matching web content article
964            * @throws PortalException if the user did not have permission to view the
965            web content article or if a matching web content article could
966            not be found
967            * @throws SystemException if a system exception occurred
968            */
969            public static com.liferay.portlet.journal.model.JournalArticle getLatestArticle(
970                    long groupId, java.lang.String articleId, int status)
971                    throws com.liferay.portal.kernel.exception.PortalException,
972                            com.liferay.portal.kernel.exception.SystemException {
973                    return getService().getLatestArticle(groupId, articleId, status);
974            }
975    
976            /**
977            * Returns the latest web content article matching the group, class name ID,
978            * and class PK.
979            *
980            * @param groupId the primary key of the web content article's group
981            * @param className the DDMStructure class name if the web content article
982            is related to a DDM structure, the class name associated with the
983            article, or {@link JournalArticleConstants#CLASSNAME_ID_DEFAULT}
984            otherwise
985            * @param classPK the primary key of the DDM structure, if the DDMStructure
986            class name is given as the <code>className</code> parameter, the
987            primary key of the class associated with the web content article,
988            or <code>0</code> otherwise
989            * @return the latest matching web content article
990            * @throws PortalException if a matching web content article could not be
991            found or if the user did not have permission to view the web
992            content article
993            * @throws SystemException if a system exception occurred
994            */
995            public static com.liferay.portlet.journal.model.JournalArticle getLatestArticle(
996                    long groupId, java.lang.String className, long classPK)
997                    throws com.liferay.portal.kernel.exception.PortalException,
998                            com.liferay.portal.kernel.exception.SystemException {
999                    return getService().getLatestArticle(groupId, className, classPK);
1000            }
1001    
1002            /**
1003            * Moves all versions of the the web content article matching the group and
1004            * article ID to the folder.
1005            *
1006            * @param groupId the primary key of the web content article's group
1007            * @param articleId the primary key of the web content article
1008            * @param newFolderId the primary key of the web content article's new
1009            folder
1010            * @throws PortalException if the user did not have permission to update any
1011            one of the versions of the web content article or if any one of
1012            the versions of the web content article could not be moved to the
1013            folder
1014            * @throws SystemException if a system exception occurred
1015            */
1016            public static void moveArticle(long groupId, java.lang.String articleId,
1017                    long newFolderId)
1018                    throws com.liferay.portal.kernel.exception.PortalException,
1019                            com.liferay.portal.kernel.exception.SystemException {
1020                    getService().moveArticle(groupId, articleId, newFolderId);
1021            }
1022    
1023            /**
1024            * Moves the web content article from the Recycle Bin to the folder.
1025            *
1026            * @param groupId the primary key of the web content article's group
1027            * @param resourcePrimKey the primary key of the resource instance
1028            * @param newFolderId the primary key of the web content article's new
1029            folder
1030            * @param serviceContext the service context to be applied. Can set the
1031            modification date, portlet preferences, and can set whether to
1032            add the default command update for the web content article. With
1033            respect to social activities, by setting the service context's
1034            command to {@link
1035            com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation
1036            is considered a web content update activity; otherwise it is
1037            considered a web content add activity.
1038            * @return the updated web content article, which was moved from the Recycle
1039            Bin to the folder
1040            * @throws PortalException if the user did not have permission to view or
1041            update the web content article, if a matching trashed web content
1042            article could not be found, or if a portal exception occurred
1043            * @throws SystemException if a system exception occurred
1044            */
1045            public static com.liferay.portlet.journal.model.JournalArticle moveArticleFromTrash(
1046                    long groupId, long resourcePrimKey, long newFolderId,
1047                    com.liferay.portal.service.ServiceContext serviceContext)
1048                    throws com.liferay.portal.kernel.exception.PortalException,
1049                            com.liferay.portal.kernel.exception.SystemException {
1050                    return getService()
1051                                       .moveArticleFromTrash(groupId, resourcePrimKey, newFolderId,
1052                            serviceContext);
1053            }
1054    
1055            /**
1056            * Moves the web content article from the Recycle Bin to the folder.
1057            *
1058            * @param groupId the primary key of the web content article's group
1059            * @param articleId the primary key of the web content article
1060            * @param newFolderId the primary key of the web content article's new
1061            folder
1062            * @param serviceContext the service context to be applied. Can set the
1063            modification date, portlet preferences, and can set whether to
1064            add the default command update for the web content article. With
1065            respect to social activities, by setting the service context's
1066            command to {@link
1067            com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation
1068            is considered a web content update activity; otherwise it is
1069            considered a web content add activity.
1070            * @return the updated web content article, which was moved from the Recycle
1071            Bin to the folder
1072            * @throws PortalException if the user did not have permission to view or
1073            update the web content article, if a trashed web content article
1074            with the primary key could not be found, or if a portal exception
1075            occurred
1076            * @throws SystemException if a system exception occurred
1077            */
1078            public static com.liferay.portlet.journal.model.JournalArticle moveArticleFromTrash(
1079                    long groupId, java.lang.String articleId, long newFolderId,
1080                    com.liferay.portal.service.ServiceContext serviceContext)
1081                    throws com.liferay.portal.kernel.exception.PortalException,
1082                            com.liferay.portal.kernel.exception.SystemException {
1083                    return getService()
1084                                       .moveArticleFromTrash(groupId, articleId, newFolderId,
1085                            serviceContext);
1086            }
1087    
1088            /**
1089            * Moves the latest version of the web content article matching the group
1090            * and article ID to the recycle bin.
1091            *
1092            * @param groupId the primary key of the web content article's group
1093            * @param articleId the primary key of the web content article
1094            * @return the moved web content article or <code>null</code> if no matching
1095            article was found
1096            * @throws PortalException if the user did not have permission to move the
1097            article to the Recycle Bin or if a portal exception occurred
1098            * @throws SystemException if a system exception occurred
1099            */
1100            public static com.liferay.portlet.journal.model.JournalArticle moveArticleToTrash(
1101                    long groupId, java.lang.String articleId)
1102                    throws com.liferay.portal.kernel.exception.PortalException,
1103                            com.liferay.portal.kernel.exception.SystemException {
1104                    return getService().moveArticleToTrash(groupId, articleId);
1105            }
1106    
1107            /**
1108            * Removes the web content of all the company's web content articles
1109            * matching the language.
1110            *
1111            * @param companyId the primary key of the web content article's company
1112            * @param languageId the primary key of the language locale to remove
1113            * @throws PortalException if the user did not have permission to update any
1114            one of the the web content articles or if web content matching
1115            the language could not be found for any one of the articles
1116            * @throws SystemException if a system exception occurred
1117            */
1118            public static void removeArticleLocale(long companyId,
1119                    java.lang.String languageId)
1120                    throws com.liferay.portal.kernel.exception.PortalException,
1121                            com.liferay.portal.kernel.exception.SystemException {
1122                    getService().removeArticleLocale(companyId, languageId);
1123            }
1124    
1125            /**
1126            * Removes the web content of the web content article matching the group,
1127            * article ID, and version, and language.
1128            *
1129            * @param groupId the primary key of the web content article's group
1130            * @param articleId the primary key of the web content article
1131            * @param version the web content article's version
1132            * @param languageId the primary key of the language locale to remove
1133            * @return the updated web content article with the locale removed
1134            * @throws PortalException if the user did not have permission to update the
1135            web content article or if a matching web content article could
1136            not be found
1137            * @throws SystemException if a system exception occurred
1138            */
1139            public static com.liferay.portlet.journal.model.JournalArticle removeArticleLocale(
1140                    long groupId, java.lang.String articleId, double version,
1141                    java.lang.String languageId)
1142                    throws com.liferay.portal.kernel.exception.PortalException,
1143                            com.liferay.portal.kernel.exception.SystemException {
1144                    return getService()
1145                                       .removeArticleLocale(groupId, articleId, version, languageId);
1146            }
1147    
1148            /**
1149            * Restores the web content article associated with the resource primary key
1150            * from the Recycle Bin.
1151            *
1152            * @param resourcePrimKey the primary key of the resource instance
1153            * @throws PortalException if a matching web content article could not be
1154            found in the Recycle Bin, if the user did not have permission to
1155            view or restore the article, or if a portal exception occurred
1156            * @throws SystemException if a system exception occurred
1157            */
1158            public static void restoreArticleFromTrash(long resourcePrimKey)
1159                    throws com.liferay.portal.kernel.exception.PortalException,
1160                            com.liferay.portal.kernel.exception.SystemException {
1161                    getService().restoreArticleFromTrash(resourcePrimKey);
1162            }
1163    
1164            /**
1165            * Restores the web content article from the Recycle Bin.
1166            *
1167            * @param groupId the primary key of the web content article's group
1168            * @param articleId the primary key of the web content article
1169            * @throws PortalException if the web content article with the primary key
1170            could not be found in the Recycle Bin, if the user did not have
1171            permission to restore the article, or if a portal exception
1172            occurred
1173            * @throws SystemException if a system exception occurred
1174            */
1175            public static void restoreArticleFromTrash(long groupId,
1176                    java.lang.String articleId)
1177                    throws com.liferay.portal.kernel.exception.PortalException,
1178                            com.liferay.portal.kernel.exception.SystemException {
1179                    getService().restoreArticleFromTrash(groupId, articleId);
1180            }
1181    
1182            public static com.liferay.portal.kernel.search.Hits search(long groupId,
1183                    long creatorUserId, int status, int start, int end)
1184                    throws com.liferay.portal.kernel.exception.PortalException,
1185                            com.liferay.portal.kernel.exception.SystemException {
1186                    return getService().search(groupId, creatorUserId, status, start, end);
1187            }
1188    
1189            /**
1190            * Returns an ordered range of all the web content articles matching the
1191            * parameters, including a keywords parameter for matching with the
1192            * article's ID, title, description, and content, a DDM structure key
1193            * parameter, and a DDM template key parameter.
1194            *
1195            * <p>
1196            * Useful when paginating results. Returns a maximum of <code>end -
1197            * start</code> instances. <code>start</code> and <code>end</code> are not
1198            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1199            * refers to the first result in the set. Setting both <code>start</code>
1200            * and <code>end</code> to {@link
1201            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1202            * result set.
1203            * </p>
1204            *
1205            * @param companyId the primary key of the web content article's company
1206            * @param groupId the primary key of the group (optionally <code>0</code>)
1207            * @param folderIds the primary keys of the web content article folders
1208            (optionally {@link java.util.Collections#EMPTY_LIST})
1209            * @param classNameId the primary key of the DDMStructure class if the web
1210            content article is related to a DDM structure, the primary key of
1211            the class name associated with the article, or {@link
1212            JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise
1213            * @param keywords the keywords (space separated), which may occur in the
1214            web content article ID, title, description, or content
1215            (optionally <code>null</code>). If the keywords value is not
1216            <code>null</code>, the search uses the OR operator in connecting
1217            query criteria; otherwise it uses the AND operator.
1218            * @param version the web content article's version (optionally
1219            <code>null</code>)
1220            * @param type the web content article's type (optionally
1221            <code>null</code>)
1222            * @param ddmStructureKey the primary key of the web content article's DDM
1223            structure, if the article is related to a DDM structure, or
1224            <code>null</code> otherwise
1225            * @param ddmTemplateKey the primary key of the web content article's DDM
1226            template (optionally <code>null</code>). If the article is
1227            related to a DDM structure, the template's structure must match
1228            it.
1229            * @param displayDateGT the date after which a matching web content
1230            article's display date must be after (optionally
1231            <code>null</code>)
1232            * @param displayDateLT the date before which a matching web content
1233            article's display date must be before (optionally
1234            <code>null</code>)
1235            * @param status the web content article's workflow status. For more
1236            information see {@link WorkflowConstants} for constants starting
1237            with the "STATUS_" prefix.
1238            * @param reviewDate the web content article's scheduled review date
1239            (optionally <code>null</code>)
1240            * @param start the lower bound of the range of web content articles to
1241            return
1242            * @param end the upper bound of the range of web content articles to
1243            return (not inclusive)
1244            * @param obc the comparator to order the web content articles
1245            * @return the range of matching web content articles ordered by the
1246            comparator
1247            * @throws SystemException if a system exception occurred
1248            */
1249            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> search(
1250                    long companyId, long groupId, java.util.List<java.lang.Long> folderIds,
1251                    long classNameId, java.lang.String keywords, java.lang.Double version,
1252                    java.lang.String type, java.lang.String ddmStructureKey,
1253                    java.lang.String ddmTemplateKey, java.util.Date displayDateGT,
1254                    java.util.Date displayDateLT, int status, java.util.Date reviewDate,
1255                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
1256                    throws com.liferay.portal.kernel.exception.SystemException {
1257                    return getService()
1258                                       .search(companyId, groupId, folderIds, classNameId,
1259                            keywords, version, type, ddmStructureKey, ddmTemplateKey,
1260                            displayDateGT, displayDateLT, status, reviewDate, start, end, obc);
1261            }
1262    
1263            /**
1264            * Returns an ordered range of all the web content articles matching the
1265            * parameters, including keyword parameters for article ID, title,
1266            * description, and content, a DDM structure key parameter, a DDM template
1267            * key parameter, and an AND operator switch.
1268            *
1269            * <p>
1270            * Useful when paginating results. Returns a maximum of <code>end -
1271            * start</code> instances. <code>start</code> and <code>end</code> are not
1272            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1273            * refers to the first result in the set. Setting both <code>start</code>
1274            * and <code>end</code> to {@link
1275            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1276            * result set.
1277            * </p>
1278            *
1279            * @param companyId the primary key of the web content article's company
1280            * @param groupId the primary key of the group (optionally <code>0</code>)
1281            * @param folderIds the primary keys of the web content article folders
1282            (optionally {@link java.util.Collections#EMPTY_LIST})
1283            * @param classNameId the primary key of the DDMStructure class if the web
1284            content article is related to a DDM structure, the primary key of
1285            the class name associated with the article, or {@link
1286            JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise
1287            * @param articleId the article ID keywords (space separated, optionally
1288            <code>null</code>)
1289            * @param version the web content article's version (optionally
1290            <code>null</code>)
1291            * @param title the title keywords (space separated, optionally
1292            <code>null</code>)
1293            * @param description the description keywords (space separated, optionally
1294            <code>null</code>)
1295            * @param content the content keywords (space separated, optionally
1296            <code>null</code>)
1297            * @param type the web content article's type (optionally
1298            <code>null</code>)
1299            * @param ddmStructureKey the primary key of the web content article's DDM
1300            structure, if the article is related to a DDM structure, or
1301            <code>null</code> otherwise
1302            * @param ddmTemplateKey the primary key of the web content article's DDM
1303            template (optionally <code>null</code>). If the article is
1304            related to a DDM structure, the template's structure must match
1305            it.
1306            * @param displayDateGT the date after which a matching web content
1307            article's display date must be after (optionally
1308            <code>null</code>)
1309            * @param displayDateLT the date before which a matching web content
1310            article's display date must be before (optionally
1311            <code>null</code>)
1312            * @param status the web content article's workflow status. For more
1313            information see {@link WorkflowConstants} for constants starting
1314            with the "STATUS_" prefix.
1315            * @param reviewDate the web content article's scheduled review date
1316            (optionally <code>null</code>)
1317            * @param andOperator whether every field must match its value or keywords,
1318            or just one field must match. Company, group, folder IDs, class
1319            name ID, and status must all match their values.
1320            * @param start the lower bound of the range of web content articles to
1321            return
1322            * @param end the upper bound of the range of web content articles to
1323            return (not inclusive)
1324            * @param obc the comparator to order the web content articles
1325            * @return the range of matching web content articles ordered by the
1326            comparator
1327            * @throws SystemException if a system exception occurred
1328            */
1329            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> search(
1330                    long companyId, long groupId, java.util.List<java.lang.Long> folderIds,
1331                    long classNameId, java.lang.String articleId, java.lang.Double version,
1332                    java.lang.String title, java.lang.String description,
1333                    java.lang.String content, java.lang.String type,
1334                    java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey,
1335                    java.util.Date displayDateGT, java.util.Date displayDateLT, int status,
1336                    java.util.Date reviewDate, boolean andOperator, int start, int end,
1337                    com.liferay.portal.kernel.util.OrderByComparator obc)
1338                    throws com.liferay.portal.kernel.exception.SystemException {
1339                    return getService()
1340                                       .search(companyId, groupId, folderIds, classNameId,
1341                            articleId, version, title, description, content, type,
1342                            ddmStructureKey, ddmTemplateKey, displayDateGT, displayDateLT,
1343                            status, reviewDate, andOperator, start, end, obc);
1344            }
1345    
1346            /**
1347            * Returns an ordered range of all the web content articles matching the
1348            * parameters, including keyword parameters for article ID, title,
1349            * description, and content, a DDM structure keys (plural) parameter, a DDM
1350            * template keys (plural) parameter, and an AND operator switch.
1351            *
1352            * <p>
1353            * Useful when paginating results. Returns a maximum of <code>end -
1354            * start</code> instances. <code>start</code> and <code>end</code> are not
1355            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1356            * refers to the first result in the set. Setting both <code>start</code>
1357            * and <code>end</code> to {@link
1358            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1359            * result set.
1360            * </p>
1361            *
1362            * @param companyId the primary key of the web content article's company
1363            * @param groupId the primary key of the group (optionally <code>0</code>)
1364            * @param folderIds the primary keys of the web content article folders
1365            (optionally {@link java.util.Collections#EMPTY_LIST})
1366            * @param classNameId the primary key of the DDMStructure class if the web
1367            content article is related to a DDM structure, the primary key of
1368            the class name associated with the article, or {@link
1369            JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise
1370            * @param articleId the article ID keywords (space separated, optionally
1371            <code>null</code>)
1372            * @param version the web content article's version (optionally
1373            <code>null</code>)
1374            * @param title the title keywords (space separated, optionally
1375            <code>null</code>)
1376            * @param description the description keywords (space separated, optionally
1377            <code>null</code>)
1378            * @param content the content keywords (space separated, optionally
1379            <code>null</code>)
1380            * @param type the web content article's type (optionally
1381            <code>null</code>)
1382            * @param ddmStructureKeys the primary keys of the web content article's
1383            DDM structures, if the article is related to a DDM structure, or
1384            <code>null</code> otherwise
1385            * @param ddmTemplateKeys the primary keys of the web content article's DDM
1386            templates (originally <code>null</code>). If the articles are
1387            related to a DDM structure, the template's structure must match
1388            it.
1389            * @param displayDateGT the date after which a matching web content
1390            article's display date must be after (optionally
1391            <code>null</code>)
1392            * @param displayDateLT the date before which a matching web content
1393            article's display date must be before (optionally
1394            <code>null</code>)
1395            * @param status the web content article's workflow status. For more
1396            information see {@link WorkflowConstants} for constants starting
1397            with the "STATUS_" prefix.
1398            * @param reviewDate the web content article's scheduled review date
1399            (optionally <code>null</code>)
1400            * @param andOperator whether every field must match its value or keywords,
1401            or just one field must match.  Company, group, folder IDs, class
1402            name ID, and status must all match their values.
1403            * @param start the lower bound of the range of web content articles to
1404            return
1405            * @param end the upper bound of the range of web content articles to
1406            return (not inclusive)
1407            * @param obc the comparator to order the web content articles
1408            * @return the range of matching web content articles ordered by the
1409            comparator
1410            * @throws SystemException if a system exception occurred
1411            */
1412            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> search(
1413                    long companyId, long groupId, java.util.List<java.lang.Long> folderIds,
1414                    long classNameId, java.lang.String articleId, java.lang.Double version,
1415                    java.lang.String title, java.lang.String description,
1416                    java.lang.String content, java.lang.String type,
1417                    java.lang.String[] ddmStructureKeys,
1418                    java.lang.String[] ddmTemplateKeys, java.util.Date displayDateGT,
1419                    java.util.Date displayDateLT, int status, java.util.Date reviewDate,
1420                    boolean andOperator, int start, int end,
1421                    com.liferay.portal.kernel.util.OrderByComparator obc)
1422                    throws com.liferay.portal.kernel.exception.SystemException {
1423                    return getService()
1424                                       .search(companyId, groupId, folderIds, classNameId,
1425                            articleId, version, title, description, content, type,
1426                            ddmStructureKeys, ddmTemplateKeys, displayDateGT, displayDateLT,
1427                            status, reviewDate, andOperator, start, end, obc);
1428            }
1429    
1430            /**
1431            * Returns the number of web content articles matching the parameters,
1432            * including a keywords parameter for matching with the article's ID, title,
1433            * description, and content, a DDM structure key parameter, and a DDM
1434            * template key parameter.
1435            *
1436            * @param companyId the primary key of the web content article's company
1437            * @param groupId the primary key of the group (optionally <code>0</code>)
1438            * @param folderIds the primary keys of the web content article folders
1439            (optionally {@link java.util.Collections#EMPTY_LIST})
1440            * @param classNameId the primary key of the DDMStructure class if the web
1441            content article is related to a DDM structure, the primary key of
1442            the class name associated with the article, or {@link
1443            JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise
1444            * @param keywords the keywords (space separated), which may occur in the
1445            web content article ID, title, description, or content
1446            (optionally <code>null</code>). If the keywords value is not
1447            <code>null</code>, the search uses the OR operator in connecting
1448            query criteria; otherwise it uses the AND operator.
1449            * @param version the web content article's version (optionally
1450            <code>null</code>)
1451            * @param type the web content article's type (optionally
1452            <code>null</code>)
1453            * @param ddmStructureKey the primary key of the web content article's DDM
1454            structure, if the article is related to a DDM structure, or
1455            <code>null</code> otherwise
1456            * @param ddmTemplateKey the primary key of the web content article's DDM
1457            template (optionally <code>null</code>). If the article is
1458            related to a DDM structure, the template's structure must match
1459            it.
1460            * @param displayDateGT the date after which a matching web content
1461            article's display date must be after (optionally
1462            <code>null</code>)
1463            * @param displayDateLT the date before which a matching web content
1464            article's display date must be before (optionally
1465            <code>null</code>)
1466            * @param status the web content article's workflow status. For more
1467            information see {@link WorkflowConstants} for constants starting
1468            with the "STATUS_" prefix.
1469            * @param reviewDate the web content article's scheduled review date
1470            (optionally <code>null</code>)
1471            * @return the number of matching web content articles
1472            * @throws SystemException if a system exception occurred
1473            */
1474            public static int searchCount(long companyId, long groupId,
1475                    java.util.List<java.lang.Long> folderIds, long classNameId,
1476                    java.lang.String keywords, java.lang.Double version,
1477                    java.lang.String type, java.lang.String ddmStructureKey,
1478                    java.lang.String ddmTemplateKey, java.util.Date displayDateGT,
1479                    java.util.Date displayDateLT, int status, java.util.Date reviewDate)
1480                    throws com.liferay.portal.kernel.exception.SystemException {
1481                    return getService()
1482                                       .searchCount(companyId, groupId, folderIds, classNameId,
1483                            keywords, version, type, ddmStructureKey, ddmTemplateKey,
1484                            displayDateGT, displayDateLT, status, reviewDate);
1485            }
1486    
1487            /**
1488            * Returns the number of web content articles matching the parameters,
1489            * including keyword parameters for article ID, title, description, and
1490            * content, a DDM structure key parameter, a DDM template key parameter, and
1491            * an AND operator switch.
1492            *
1493            * @param companyId the primary key of the web content article's company
1494            * @param groupId the primary key of the group (optionally <code>0</code>)
1495            * @param folderIds the primary keys of the web content article folders
1496            (optionally {@link java.util.Collections#EMPTY_LIST})
1497            * @param classNameId the primary key of the DDMStructure class if the web
1498            content article is related to a DDM structure, the primary key of
1499            the class name associated with the article, or {@link
1500            JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise
1501            * @param articleId the article ID keywords (space separated, optionally
1502            <code>null</code>)
1503            * @param version the web content article's version (optionally
1504            <code>null</code>)
1505            * @param title the title keywords (space separated, optionally
1506            <code>null</code>)
1507            * @param description the description keywords (space separated, optionally
1508            <code>null</code>)
1509            * @param content the content keywords (space separated, optionally
1510            <code>null</code>)
1511            * @param type the web content article's type (optionally
1512            <code>null</code>)
1513            * @param ddmStructureKey the primary key of the web content article's DDM
1514            structure, if the article is related to a DDM structure, or
1515            <code>null</code> otherwise
1516            * @param ddmTemplateKey the primary key of the web content article's DDM
1517            template (optionally <code>null</code>). If the article is
1518            related to a DDM structure, the template's structure must match
1519            it.
1520            * @param displayDateGT the date after which a matching web content
1521            article's display date must be after (optionally
1522            <code>null</code>)
1523            * @param displayDateLT the date before which a matching web content
1524            article's display date must be before (optionally
1525            <code>null</code>)
1526            * @param status the web content article's workflow status. For more
1527            information see {@link WorkflowConstants} for constants starting
1528            with the "STATUS_" prefix.
1529            * @param reviewDate the web content article's scheduled review date
1530            (optionally <code>null</code>)
1531            * @param andOperator whether every field must match its value or keywords,
1532            or just one field must match. Group, folder IDs, class name ID,
1533            and status must all match their values.
1534            * @return the number of matching web content articles
1535            * @throws SystemException if a system exception occurred
1536            */
1537            public static int searchCount(long companyId, long groupId,
1538                    java.util.List<java.lang.Long> folderIds, long classNameId,
1539                    java.lang.String articleId, java.lang.Double version,
1540                    java.lang.String title, java.lang.String description,
1541                    java.lang.String content, java.lang.String type,
1542                    java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey,
1543                    java.util.Date displayDateGT, java.util.Date displayDateLT, int status,
1544                    java.util.Date reviewDate, boolean andOperator)
1545                    throws com.liferay.portal.kernel.exception.SystemException {
1546                    return getService()
1547                                       .searchCount(companyId, groupId, folderIds, classNameId,
1548                            articleId, version, title, description, content, type,
1549                            ddmStructureKey, ddmTemplateKey, displayDateGT, displayDateLT,
1550                            status, reviewDate, andOperator);
1551            }
1552    
1553            /**
1554            * Returns the number of web content articles matching the parameters,
1555            * including keyword parameters for article ID, title, description, and
1556            * content, a DDM structure keys (plural) parameter, a DDM template keys
1557            * (plural) parameter, and an AND operator switch.
1558            *
1559            * @param companyId the primary key of the web content article's company
1560            * @param groupId the primary key of the group (optionally <code>0</code>)
1561            * @param folderIds the primary keys of the web content article folders
1562            (optionally {@link java.util.Collections#EMPTY_LIST})
1563            * @param classNameId the primary key of the DDMStructure class if the web
1564            content article is related to a DDM structure, the primary key of
1565            the class name associated with the article, or {@link
1566            JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise
1567            * @param articleId the article ID keywords (space separated, optionally
1568            <code>null</code>)
1569            * @param version the web content article's version (optionally
1570            <code>null</code>)
1571            * @param title the title keywords (space separated, optionally
1572            <code>null</code>)
1573            * @param description the description keywords (space separated, optionally
1574            <code>null</code>)
1575            * @param content the content keywords (space separated, optionally
1576            <code>null</code>)
1577            * @param type the web content article's type (optionally
1578            <code>null</code>)
1579            * @param ddmStructureKeys the primary keys of the web content article's
1580            DDM structures, if the article is related to a DDM structure, or
1581            <code>null</code> otherwise
1582            * @param ddmTemplateKeys the primary keys of the web content article's DDM
1583            templates (originally <code>null</code>). If the articles are
1584            related to a DDM structure, the template's structure must match
1585            it.
1586            * @param displayDateGT the date after which a matching web content
1587            article's display date must be after (optionally
1588            <code>null</code>)
1589            * @param displayDateLT the date before which a matching web content
1590            article's display date must be before (optionally
1591            <code>null</code>)
1592            * @param status the web content article's workflow status. For more
1593            information see {@link WorkflowConstants} for constants starting
1594            with the "STATUS_" prefix.
1595            * @param reviewDate the web content article's scheduled review date
1596            (optionally <code>null</code>)
1597            * @param andOperator whether every field must match its value or keywords,
1598            or just one field must match.  Group, folder IDs, class name ID,
1599            and status must all match their values.
1600            * @return the number of matching web content articles
1601            * @throws SystemException if a system exception occurred
1602            */
1603            public static int searchCount(long companyId, long groupId,
1604                    java.util.List<java.lang.Long> folderIds, long classNameId,
1605                    java.lang.String articleId, java.lang.Double version,
1606                    java.lang.String title, java.lang.String description,
1607                    java.lang.String content, java.lang.String type,
1608                    java.lang.String[] ddmStructureKeys,
1609                    java.lang.String[] ddmTemplateKeys, java.util.Date displayDateGT,
1610                    java.util.Date displayDateLT, int status, java.util.Date reviewDate,
1611                    boolean andOperator)
1612                    throws com.liferay.portal.kernel.exception.SystemException {
1613                    return getService()
1614                                       .searchCount(companyId, groupId, folderIds, classNameId,
1615                            articleId, version, title, description, content, type,
1616                            ddmStructureKeys, ddmTemplateKeys, displayDateGT, displayDateLT,
1617                            status, reviewDate, andOperator);
1618            }
1619    
1620            /**
1621            * Subscribes the user to notifications for the web content article matching
1622            * the group, notifying him the instant versions of the article are created,
1623            * deleted, or modified.
1624            *
1625            * @param groupId the primary key of the group
1626            * @throws PortalException if the user did not have permission to subscribe
1627            to the web content article or if a matching user or group could
1628            not be found
1629            * @throws SystemException if a system exception occurred
1630            */
1631            public static void subscribe(long groupId)
1632                    throws com.liferay.portal.kernel.exception.PortalException,
1633                            com.liferay.portal.kernel.exception.SystemException {
1634                    getService().subscribe(groupId);
1635            }
1636    
1637            /**
1638            * Unsubscribes the user from notifications for the web content article
1639            * matching the group.
1640            *
1641            * @param groupId the primary key of the group
1642            * @throws PortalException if the user did not have permission to subscribe
1643            to the web content article or if a matching user or subscription
1644            could not be found
1645            * @throws SystemException if a system exception occurred
1646            */
1647            public static void unsubscribe(long groupId)
1648                    throws com.liferay.portal.kernel.exception.PortalException,
1649                            com.liferay.portal.kernel.exception.SystemException {
1650                    getService().unsubscribe(groupId);
1651            }
1652    
1653            /**
1654            * Updates the web content article matching the version, replacing its
1655            * folder, title, description, content, and layout UUID.
1656            *
1657            * @param userId the primary key of the user updating the web content
1658            article
1659            * @param groupId the primary key of the web content article's group
1660            * @param folderId the primary key of the web content article folder
1661            * @param articleId the primary key of the web content article
1662            * @param version the web content article's version
1663            * @param titleMap the web content article's locales and localized titles
1664            * @param descriptionMap the web content article's locales and localized
1665            descriptions
1666            * @param content the HTML content wrapped in XML. For more information,
1667            see the content example in the class description for {@link
1668            JournalArticleLocalServiceImpl}.
1669            * @param layoutUuid the unique string identifying the web content
1670            article's display page
1671            * @param serviceContext the service context to be applied. Can set the
1672            modification date, expando bridge attributes, asset category IDs,
1673            asset tag names, asset link entry IDs, workflow actions, the
1674            "defaultLanguageId" and "urlTitle" attributes, and can set
1675            whether to add the default command update for the web content
1676            article. With respect to social activities, by setting the
1677            service context's command to {@link
1678            com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation
1679            is considered a web content update activity; otherwise it is
1680            considered a web content add activity.
1681            * @return the updated web content article
1682            * @throws PortalException if a user with the primary key or a matching web
1683            content article could not be found, or if a portal exception
1684            occurred
1685            * @throws SystemException if a system exception occurred
1686            */
1687            public static com.liferay.portlet.journal.model.JournalArticle updateArticle(
1688                    long userId, long groupId, long folderId, java.lang.String articleId,
1689                    double version,
1690                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
1691                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
1692                    java.lang.String content, java.lang.String layoutUuid,
1693                    com.liferay.portal.service.ServiceContext serviceContext)
1694                    throws com.liferay.portal.kernel.exception.PortalException,
1695                            com.liferay.portal.kernel.exception.SystemException {
1696                    return getService()
1697                                       .updateArticle(userId, groupId, folderId, articleId,
1698                            version, titleMap, descriptionMap, content, layoutUuid,
1699                            serviceContext);
1700            }
1701    
1702            /**
1703            * Updates the web content article with additional parameters.
1704            *
1705            * @param groupId the primary key of the web content article's group
1706            * @param folderId the primary key of the web content article folder
1707            * @param articleId the primary key of the web content article
1708            * @param version the web content article's version
1709            * @param titleMap the web content article's locales and localized titles
1710            * @param descriptionMap the web content article's locales and localized
1711            descriptions
1712            * @param content the HTML content wrapped in XML. For more information,
1713            see the content example in the class description for {@link
1714            JournalArticleLocalServiceImpl}.
1715            * @param type the structure's type, if the web content article is related
1716            to a DDM structure. For more information, see {@link
1717            com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}.
1718            * @param ddmStructureKey the primary key of the web content article's DDM
1719            structure, if the article is related to a DDM structure, or
1720            <code>null</code> otherwise
1721            * @param ddmTemplateKey the primary key of the web content article's DDM
1722            template (optionally <code>null</code>). If the article is
1723            related to a DDM structure, the template's structure must match
1724            it.
1725            * @param layoutUuid the unique string identifying the web content
1726            article's display page
1727            * @param displayDateMonth the month the web content article is set to
1728            display
1729            * @param displayDateDay the calendar day the web content article is set to
1730            display
1731            * @param displayDateYear the year the web content article is set to
1732            display
1733            * @param displayDateHour the hour the web content article is set to
1734            display
1735            * @param displayDateMinute the minute the web content article is set to
1736            display
1737            * @param expirationDateMonth the month the web content article is set to
1738            expire
1739            * @param expirationDateDay the calendar day the web content article is set
1740            to expire
1741            * @param expirationDateYear the year the web content article is set to
1742            expire
1743            * @param expirationDateHour the hour the web content article is set to
1744            expire
1745            * @param expirationDateMinute the minute the web content article is set to
1746            expire
1747            * @param neverExpire whether the web content article is not set to auto
1748            expire
1749            * @param reviewDateMonth the month the web content article is set for
1750            review
1751            * @param reviewDateDay the calendar day the web content article is set for
1752            review
1753            * @param reviewDateYear the year the web content article is set for review
1754            * @param reviewDateHour the hour the web content article is set for review
1755            * @param reviewDateMinute the minute the web content article is set for
1756            review
1757            * @param neverReview whether the web content article is not set for review
1758            * @param indexable whether the web content is searchable
1759            * @param smallImage whether to update web content article's a small image.
1760            A file must be passed in as <code>smallImageFile</code> value,
1761            otherwise the current small image is deleted.
1762            * @param smallImageURL the web content article's small image URL
1763            (optionally <code>null</code>)
1764            * @param smallFile the web content article's new small image file
1765            (optionally <code>null</code>). Must pass in
1766            <code>smallImage</code> value of <code>true</code> to replace the
1767            article's small image file.
1768            * @param images the web content's images (optionally <code>null</code>)
1769            * @param articleURL the web content article's accessible URL (optionally
1770            <code>null</code>)
1771            * @param serviceContext the service context to be applied. Can set the
1772            modification date, expando bridge attributes, asset category IDs,
1773            asset tag names, asset link entry IDs, workflow actions, the
1774            "defaultLanguageId" and "urlTitle" attributes, and can set
1775            whether to add the default command update for the web content
1776            article. With respect to social activities, by setting the
1777            service context's command to {@link
1778            com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation
1779            is considered a web content update activity; otherwise it is
1780            considered a web content add activity.
1781            * @return the updated web content article
1782            * @throws PortalException if the user did not have permission to update the
1783            web content article, if a user with the primary key or a matching
1784            web content article could not be found, or if a portal exception
1785            occurred
1786            * @throws SystemException if a system exception occurred
1787            */
1788            public static com.liferay.portlet.journal.model.JournalArticle updateArticle(
1789                    long groupId, long folderId, java.lang.String articleId,
1790                    double version,
1791                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
1792                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
1793                    java.lang.String content, java.lang.String type,
1794                    java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey,
1795                    java.lang.String layoutUuid, int displayDateMonth, int displayDateDay,
1796                    int displayDateYear, int displayDateHour, int displayDateMinute,
1797                    int expirationDateMonth, int expirationDateDay, int expirationDateYear,
1798                    int expirationDateHour, int expirationDateMinute, boolean neverExpire,
1799                    int reviewDateMonth, int reviewDateDay, int reviewDateYear,
1800                    int reviewDateHour, int reviewDateMinute, boolean neverReview,
1801                    boolean indexable, boolean smallImage, java.lang.String smallImageURL,
1802                    java.io.File smallFile, java.util.Map<java.lang.String, byte[]> images,
1803                    java.lang.String articleURL,
1804                    com.liferay.portal.service.ServiceContext serviceContext)
1805                    throws com.liferay.portal.kernel.exception.PortalException,
1806                            com.liferay.portal.kernel.exception.SystemException {
1807                    return getService()
1808                                       .updateArticle(groupId, folderId, articleId, version,
1809                            titleMap, descriptionMap, content, type, ddmStructureKey,
1810                            ddmTemplateKey, layoutUuid, displayDateMonth, displayDateDay,
1811                            displayDateYear, displayDateHour, displayDateMinute,
1812                            expirationDateMonth, expirationDateDay, expirationDateYear,
1813                            expirationDateHour, expirationDateMinute, neverExpire,
1814                            reviewDateMonth, reviewDateDay, reviewDateYear, reviewDateHour,
1815                            reviewDateMinute, neverReview, indexable, smallImage,
1816                            smallImageURL, smallFile, images, articleURL, serviceContext);
1817            }
1818    
1819            /**
1820            * Updates the web content article matching the version, replacing its
1821            * folder and content.
1822            *
1823            * @param groupId the primary key of the web content article's group
1824            * @param folderId the primary key of the web content article folder
1825            * @param articleId the primary key of the web content article
1826            * @param version the web content article's version
1827            * @param content the HTML content wrapped in XML. For more information,
1828            see the content example in the class description for {@link
1829            JournalArticleLocalServiceImpl}.
1830            * @param serviceContext the service context to be applied. Can set the
1831            modification date, expando bridge attributes, asset category IDs,
1832            asset tag names, asset link entry IDs, workflow actions, the
1833            "defaultLanguageId" and "urlTitle" attributes, and can set
1834            whether to add the default command update for the web content
1835            article. With respect to social activities, by setting the
1836            service context's command to {@link
1837            com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation
1838            is considered a web content update activity; otherwise it is
1839            considered a web content add activity.
1840            * @return the updated web content article
1841            * @throws PortalException if the user did not have permission to update the
1842            web content article, if a user with the primary key or a matching
1843            web content article could not be found, or if a portal exception
1844            occurred
1845            * @throws SystemException if a system exception occurred
1846            */
1847            public static com.liferay.portlet.journal.model.JournalArticle updateArticle(
1848                    long groupId, long folderId, java.lang.String articleId,
1849                    double version, java.lang.String content,
1850                    com.liferay.portal.service.ServiceContext serviceContext)
1851                    throws com.liferay.portal.kernel.exception.PortalException,
1852                            com.liferay.portal.kernel.exception.SystemException {
1853                    return getService()
1854                                       .updateArticle(groupId, folderId, articleId, version,
1855                            content, serviceContext);
1856            }
1857    
1858            /**
1859            * @deprecated As of 6.2.0, replaced by {@link
1860            #updateArticleTranslation(long, String, double, Locale,
1861            String, String, String, Map, ServiceContext)}
1862            */
1863            public static com.liferay.portlet.journal.model.JournalArticle updateArticleTranslation(
1864                    long groupId, java.lang.String articleId, double version,
1865                    java.util.Locale locale, java.lang.String title,
1866                    java.lang.String description, java.lang.String content,
1867                    java.util.Map<java.lang.String, byte[]> images)
1868                    throws com.liferay.portal.kernel.exception.PortalException,
1869                            com.liferay.portal.kernel.exception.SystemException {
1870                    return getService()
1871                                       .updateArticleTranslation(groupId, articleId, version,
1872                            locale, title, description, content, images);
1873            }
1874    
1875            /**
1876            * Updates the translation of the web content article.
1877            *
1878            * @param groupId the primary key of the web content article's group
1879            * @param articleId the primary key of the web content article
1880            * @param version the web content article's version
1881            * @param locale the locale of the web content article's display template
1882            * @param title the translated web content article title
1883            * @param description the translated web content article description
1884            * @param content the HTML content wrapped in XML. For more information,
1885            see the content example in the class description for {@link
1886            JournalArticleLocalServiceImpl}.
1887            * @param images the web content's images
1888            * @param serviceContext the service context to be applied. Can set the
1889            modification date and "urlTitle" attribute for the web content
1890            article.
1891            * @return the updated web content article
1892            * @throws PortalException if the user did not have permission to update the
1893            web content article, if a user with the primary key or a matching
1894            web content article could not be found, or if a portal exception
1895            occurred
1896            * @throws SystemException if a system exception occurred
1897            */
1898            public static com.liferay.portlet.journal.model.JournalArticle updateArticleTranslation(
1899                    long groupId, java.lang.String articleId, double version,
1900                    java.util.Locale locale, java.lang.String title,
1901                    java.lang.String description, java.lang.String content,
1902                    java.util.Map<java.lang.String, byte[]> images,
1903                    com.liferay.portal.service.ServiceContext serviceContext)
1904                    throws com.liferay.portal.kernel.exception.PortalException,
1905                            com.liferay.portal.kernel.exception.SystemException {
1906                    return getService()
1907                                       .updateArticleTranslation(groupId, articleId, version,
1908                            locale, title, description, content, images, serviceContext);
1909            }
1910    
1911            /**
1912            * Updates the web content article matching the group, article ID, and
1913            * version, replacing its content.
1914            *
1915            * @param groupId the primary key of the web content article's group
1916            * @param articleId the primary key of the web content article
1917            * @param version the web content article's version
1918            * @param content the HTML content wrapped in XML. For more information,
1919            see the content example in the class description for {@link
1920            JournalArticleLocalServiceImpl}.
1921            * @return the updated web content article
1922            * @throws PortalException if the user did not have permission to update the
1923            web content article or if a matching web content article could
1924            not be found
1925            * @throws SystemException if a system exception occurred
1926            */
1927            public static com.liferay.portlet.journal.model.JournalArticle updateContent(
1928                    long groupId, java.lang.String articleId, double version,
1929                    java.lang.String content)
1930                    throws com.liferay.portal.kernel.exception.PortalException,
1931                            com.liferay.portal.kernel.exception.SystemException {
1932                    return getService().updateContent(groupId, articleId, version, content);
1933            }
1934    
1935            /**
1936            * Updates the workflow status of the web content article matching the
1937            * group, article ID, and version.
1938            *
1939            * @param groupId the primary key of the web content article's group
1940            * @param articleId the primary key of the web content article
1941            * @param version the web content article's version
1942            * @param status the web content article's workflow status. For more
1943            information see {@link WorkflowConstants} for constants starting
1944            with the "STATUS_" prefix.
1945            * @param articleURL the web content article's accessible URL
1946            * @param serviceContext the service context to be applied. Can set the
1947            modification date, portlet preferences, and can set whether to
1948            add the default command update for the web content article.
1949            * @return the updated web content article
1950            * @throws PortalException if the user did not have permission to update the
1951            web content article, if a matching web content article could not
1952            be found, or if a portal exception occurred
1953            * @throws SystemException if a system exception occurred
1954            */
1955            public static com.liferay.portlet.journal.model.JournalArticle updateStatus(
1956                    long groupId, java.lang.String articleId, double version, int status,
1957                    java.lang.String articleURL,
1958                    com.liferay.portal.service.ServiceContext serviceContext)
1959                    throws com.liferay.portal.kernel.exception.PortalException,
1960                            com.liferay.portal.kernel.exception.SystemException {
1961                    return getService()
1962                                       .updateStatus(groupId, articleId, version, status,
1963                            articleURL, serviceContext);
1964            }
1965    
1966            public static JournalArticleService getService() {
1967                    if (_service == null) {
1968                            _service = (JournalArticleService)PortalBeanLocatorUtil.locate(JournalArticleService.class.getName());
1969    
1970                            ReferenceRegistry.registerReference(JournalArticleServiceUtil.class,
1971                                    "_service");
1972                    }
1973    
1974                    return _service;
1975            }
1976    
1977            /**
1978             * @deprecated As of 6.2.0
1979             */
1980            public void setService(JournalArticleService service) {
1981            }
1982    
1983            private static JournalArticleService _service;
1984    }