001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.journal.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.ReferenceRegistry;
019    
020    /**
021     * The utility for the journal article local service. This utility wraps {@link com.liferay.portlet.journal.service.impl.JournalArticleLocalServiceImpl} and is the primary access point for service operations in application layer code running on the local server.
022     *
023     * <p>
024     * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
025     * </p>
026     *
027     * @author Brian Wing Shun Chan
028     * @see JournalArticleLocalService
029     * @see com.liferay.portlet.journal.service.base.JournalArticleLocalServiceBaseImpl
030     * @see com.liferay.portlet.journal.service.impl.JournalArticleLocalServiceImpl
031     * @generated
032     */
033    public class JournalArticleLocalServiceUtil {
034            /*
035             * NOTE FOR DEVELOPERS:
036             *
037             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.journal.service.impl.JournalArticleLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
038             */
039    
040            /**
041            * Adds the journal article to the database. Also notifies the appropriate model listeners.
042            *
043            * @param journalArticle the journal article
044            * @return the journal article that was added
045            * @throws SystemException if a system exception occurred
046            */
047            public static com.liferay.portlet.journal.model.JournalArticle addJournalArticle(
048                    com.liferay.portlet.journal.model.JournalArticle journalArticle)
049                    throws com.liferay.portal.kernel.exception.SystemException {
050                    return getService().addJournalArticle(journalArticle);
051            }
052    
053            /**
054            * Creates a new journal article with the primary key. Does not add the journal article to the database.
055            *
056            * @param id the primary key for the new journal article
057            * @return the new journal article
058            */
059            public static com.liferay.portlet.journal.model.JournalArticle createJournalArticle(
060                    long id) {
061                    return getService().createJournalArticle(id);
062            }
063    
064            /**
065            * Deletes the journal article with the primary key from the database. Also notifies the appropriate model listeners.
066            *
067            * @param id the primary key of the journal article
068            * @return the journal article that was removed
069            * @throws PortalException if a journal article with the primary key could not be found
070            * @throws SystemException if a system exception occurred
071            */
072            public static com.liferay.portlet.journal.model.JournalArticle deleteJournalArticle(
073                    long id)
074                    throws com.liferay.portal.kernel.exception.PortalException,
075                            com.liferay.portal.kernel.exception.SystemException {
076                    return getService().deleteJournalArticle(id);
077            }
078    
079            /**
080            * Deletes the journal article from the database. Also notifies the appropriate model listeners.
081            *
082            * @param journalArticle the journal article
083            * @return the journal article that was removed
084            * @throws SystemException if a system exception occurred
085            */
086            public static com.liferay.portlet.journal.model.JournalArticle deleteJournalArticle(
087                    com.liferay.portlet.journal.model.JournalArticle journalArticle)
088                    throws com.liferay.portal.kernel.exception.SystemException {
089                    return getService().deleteJournalArticle(journalArticle);
090            }
091    
092            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
093                    return getService().dynamicQuery();
094            }
095    
096            /**
097            * Performs a dynamic query on the database and returns the matching rows.
098            *
099            * @param dynamicQuery the dynamic query
100            * @return the matching rows
101            * @throws SystemException if a system exception occurred
102            */
103            @SuppressWarnings("rawtypes")
104            public static java.util.List dynamicQuery(
105                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
106                    throws com.liferay.portal.kernel.exception.SystemException {
107                    return getService().dynamicQuery(dynamicQuery);
108            }
109    
110            /**
111            * Performs a dynamic query on the database and returns a range of the matching rows.
112            *
113            * <p>
114            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.journal.model.impl.JournalArticleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
115            * </p>
116            *
117            * @param dynamicQuery the dynamic query
118            * @param start the lower bound of the range of model instances
119            * @param end the upper bound of the range of model instances (not inclusive)
120            * @return the range of matching rows
121            * @throws SystemException if a system exception occurred
122            */
123            @SuppressWarnings("rawtypes")
124            public static java.util.List dynamicQuery(
125                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
126                    int end) throws com.liferay.portal.kernel.exception.SystemException {
127                    return getService().dynamicQuery(dynamicQuery, start, end);
128            }
129    
130            /**
131            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
132            *
133            * <p>
134            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.journal.model.impl.JournalArticleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
135            * </p>
136            *
137            * @param dynamicQuery the dynamic query
138            * @param start the lower bound of the range of model instances
139            * @param end the upper bound of the range of model instances (not inclusive)
140            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
141            * @return the ordered range of matching rows
142            * @throws SystemException if a system exception occurred
143            */
144            @SuppressWarnings("rawtypes")
145            public static java.util.List dynamicQuery(
146                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
147                    int end,
148                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
149                    throws com.liferay.portal.kernel.exception.SystemException {
150                    return getService()
151                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
152            }
153    
154            /**
155            * Returns the number of rows that match the dynamic query.
156            *
157            * @param dynamicQuery the dynamic query
158            * @return the number of rows that match the dynamic query
159            * @throws SystemException if a system exception occurred
160            */
161            public static long dynamicQueryCount(
162                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
163                    throws com.liferay.portal.kernel.exception.SystemException {
164                    return getService().dynamicQueryCount(dynamicQuery);
165            }
166    
167            public static com.liferay.portlet.journal.model.JournalArticle fetchJournalArticle(
168                    long id) throws com.liferay.portal.kernel.exception.SystemException {
169                    return getService().fetchJournalArticle(id);
170            }
171    
172            /**
173            * Returns the journal article with the primary key.
174            *
175            * @param id the primary key of the journal article
176            * @return the journal article
177            * @throws PortalException if a journal article with the primary key could not be found
178            * @throws SystemException if a system exception occurred
179            */
180            public static com.liferay.portlet.journal.model.JournalArticle getJournalArticle(
181                    long id)
182                    throws com.liferay.portal.kernel.exception.PortalException,
183                            com.liferay.portal.kernel.exception.SystemException {
184                    return getService().getJournalArticle(id);
185            }
186    
187            public static com.liferay.portal.model.PersistedModel getPersistedModel(
188                    java.io.Serializable primaryKeyObj)
189                    throws com.liferay.portal.kernel.exception.PortalException,
190                            com.liferay.portal.kernel.exception.SystemException {
191                    return getService().getPersistedModel(primaryKeyObj);
192            }
193    
194            /**
195            * Returns the journal article matching the UUID and group.
196            *
197            * @param uuid the journal article's UUID
198            * @param groupId the primary key of the group
199            * @return the matching journal article
200            * @throws PortalException if a matching journal article could not be found
201            * @throws SystemException if a system exception occurred
202            */
203            public static com.liferay.portlet.journal.model.JournalArticle getJournalArticleByUuidAndGroupId(
204                    java.lang.String uuid, long groupId)
205                    throws com.liferay.portal.kernel.exception.PortalException,
206                            com.liferay.portal.kernel.exception.SystemException {
207                    return getService().getJournalArticleByUuidAndGroupId(uuid, groupId);
208            }
209    
210            /**
211            * Returns a range of all the journal articles.
212            *
213            * <p>
214            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.journal.model.impl.JournalArticleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
215            * </p>
216            *
217            * @param start the lower bound of the range of journal articles
218            * @param end the upper bound of the range of journal articles (not inclusive)
219            * @return the range of journal articles
220            * @throws SystemException if a system exception occurred
221            */
222            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getJournalArticles(
223                    int start, int end)
224                    throws com.liferay.portal.kernel.exception.SystemException {
225                    return getService().getJournalArticles(start, end);
226            }
227    
228            /**
229            * Returns the number of journal articles.
230            *
231            * @return the number of journal articles
232            * @throws SystemException if a system exception occurred
233            */
234            public static int getJournalArticlesCount()
235                    throws com.liferay.portal.kernel.exception.SystemException {
236                    return getService().getJournalArticlesCount();
237            }
238    
239            /**
240            * Updates the journal article in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
241            *
242            * @param journalArticle the journal article
243            * @return the journal article that was updated
244            * @throws SystemException if a system exception occurred
245            */
246            public static com.liferay.portlet.journal.model.JournalArticle updateJournalArticle(
247                    com.liferay.portlet.journal.model.JournalArticle journalArticle)
248                    throws com.liferay.portal.kernel.exception.SystemException {
249                    return getService().updateJournalArticle(journalArticle);
250            }
251    
252            /**
253            * Returns the Spring bean ID for this bean.
254            *
255            * @return the Spring bean ID for this bean
256            */
257            public static java.lang.String getBeanIdentifier() {
258                    return getService().getBeanIdentifier();
259            }
260    
261            /**
262            * Sets the Spring bean ID for this bean.
263            *
264            * @param beanIdentifier the Spring bean ID for this bean
265            */
266            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
267                    getService().setBeanIdentifier(beanIdentifier);
268            }
269    
270            /**
271            * Adds a web content article with additional parameters.
272            *
273            * @param userId the primary key of the web content article's creator/owner
274            * @param groupId the primary key of the web content article's group
275            * @param folderId the primary key of the web content article folder
276            * @param classNameId the primary key of the DDMStructure class if the web
277            content article is related to a DDM structure, the primary key of
278            the class name associated with the article, or {@link
279            JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise
280            * @param classPK the primary key of the DDM structure, if the primary key
281            of the DDMStructure class is given as the
282            <code>classNameId</code> parameter, the primary key of the class
283            associated with the web content article, or <code>0</code>
284            otherwise
285            * @param articleId the primary key of the web content article
286            * @param autoArticleId whether to auto generate the web content article ID
287            * @param version the web content article's version
288            * @param titleMap the web content article's locales and localized titles
289            * @param descriptionMap the web content article's locales and localized
290            descriptions
291            * @param content the HTML content wrapped in XML. For more information,
292            see the content example in the class description for {@link
293            JournalArticleLocalServiceImpl}.
294            * @param type the structure's type, if the web content article is related
295            to a DDM structure. For more information, see {@link
296            com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}.
297            * @param ddmStructureKey the primary key of the web content article's DDM
298            structure, if the article is related to a DDM structure, or
299            <code>null</code> otherwise
300            * @param ddmTemplateKey the primary key of the web content article's DDM
301            template (optionally <code>null</code>). If the article is
302            related to a DDM structure, the template's structure must match
303            it.
304            * @param layoutUuid the unique string identifying the web content
305            article's display page
306            * @param displayDateMonth the month the web content article is set to
307            display
308            * @param displayDateDay the calendar day the web content article is set to
309            display
310            * @param displayDateYear the year the web content article is set to
311            display
312            * @param displayDateHour the hour the web content article is set to
313            display
314            * @param displayDateMinute the minute the web content article is set to
315            display
316            * @param expirationDateMonth the month the web content article is set to
317            expire
318            * @param expirationDateDay the calendar day the web content article is set
319            to expire
320            * @param expirationDateYear the year the web content article is set to
321            expire
322            * @param expirationDateHour the hour the web content article is set to
323            expire
324            * @param expirationDateMinute the minute the web content article is set to
325            expire
326            * @param neverExpire whether the web content article is not set to auto
327            expire
328            * @param reviewDateMonth the month the web content article is set for
329            review
330            * @param reviewDateDay the calendar day the web content article is set for
331            review
332            * @param reviewDateYear the year the web content article is set for review
333            * @param reviewDateHour the hour the web content article is set for review
334            * @param reviewDateMinute the minute the web content article is set for
335            review
336            * @param neverReview whether the web content article is not set for review
337            * @param indexable whether the web content article is searchable
338            * @param smallImage whether the web content article has a small image
339            * @param smallImageURL the web content article's small image URL
340            * @param smallImageFile the web content article's small image file
341            * @param images the web content's images
342            * @param articleURL the web content article's accessible URL
343            * @param serviceContext the service context to be applied. Can set the
344            UUID, creation date, modification date, expando bridge
345            attributes, guest permissions, group permissions, asset category
346            IDs, asset tag names, asset link entry IDs, the "urlTitle"
347            attribute, and workflow actions for the web content article. Can
348            also set whether to add the default guest and group permissions.
349            * @return the web content article
350            * @throws PortalException if a portal exception occurred
351            * @throws SystemException if a system exception occurred
352            */
353            public static com.liferay.portlet.journal.model.JournalArticle addArticle(
354                    long userId, long groupId, long folderId, long classNameId,
355                    long classPK, java.lang.String articleId, boolean autoArticleId,
356                    double version,
357                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
358                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
359                    java.lang.String content, java.lang.String type,
360                    java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey,
361                    java.lang.String layoutUuid, int displayDateMonth, int displayDateDay,
362                    int displayDateYear, int displayDateHour, int displayDateMinute,
363                    int expirationDateMonth, int expirationDateDay, int expirationDateYear,
364                    int expirationDateHour, int expirationDateMinute, boolean neverExpire,
365                    int reviewDateMonth, int reviewDateDay, int reviewDateYear,
366                    int reviewDateHour, int reviewDateMinute, boolean neverReview,
367                    boolean indexable, boolean smallImage, java.lang.String smallImageURL,
368                    java.io.File smallImageFile,
369                    java.util.Map<java.lang.String, byte[]> images,
370                    java.lang.String articleURL,
371                    com.liferay.portal.service.ServiceContext serviceContext)
372                    throws com.liferay.portal.kernel.exception.PortalException,
373                            com.liferay.portal.kernel.exception.SystemException {
374                    return getService()
375                                       .addArticle(userId, groupId, folderId, classNameId, classPK,
376                            articleId, autoArticleId, version, titleMap, descriptionMap,
377                            content, type, ddmStructureKey, ddmTemplateKey, layoutUuid,
378                            displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
379                            displayDateMinute, expirationDateMonth, expirationDateDay,
380                            expirationDateYear, expirationDateHour, expirationDateMinute,
381                            neverExpire, reviewDateMonth, reviewDateDay, reviewDateYear,
382                            reviewDateHour, reviewDateMinute, neverReview, indexable,
383                            smallImage, smallImageURL, smallImageFile, images, articleURL,
384                            serviceContext);
385            }
386    
387            /**
388            * Adds a web content article.
389            *
390            * @param userId the primary key of the web content article's creator/owner
391            * @param groupId the primary key of the web content article's group
392            * @param folderId the primary key of the web content article folder
393            * @param titleMap the web content article's locales and localized titles
394            * @param descriptionMap the web content article's locales and localized
395            descriptions
396            * @param content the HTML content wrapped in XML. For more information,
397            see the content example in the class description for {@link
398            JournalArticleLocalServiceImpl}.
399            * @param ddmStructureKey the primary key of the web content article's DDM
400            structure, if the article is related to a DDM structure, or
401            <code>null</code> otherwise
402            * @param ddmTemplateKey the primary key of the web content article's DDM
403            template (optionally <code>null</code>). If the article is
404            related to a DDM structure, the template's structure must match
405            it.
406            * @param serviceContext the service context to be applied. Can set the
407            UUID, creation date, modification date, expando bridge
408            attributes, guest permissions, group permissions, asset category
409            IDs, asset tag names, asset link entry IDs, the "urlTitle"
410            attribute, and workflow actions for the web content article. Can
411            also set whether to add the default guest and group permissions.
412            * @return the web content article
413            * @throws PortalException if a portal exception occurred
414            * @throws SystemException if a system exception occurred
415            */
416            public static com.liferay.portlet.journal.model.JournalArticle addArticle(
417                    long userId, long groupId, long folderId,
418                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
419                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
420                    java.lang.String content, java.lang.String ddmStructureKey,
421                    java.lang.String ddmTemplateKey,
422                    com.liferay.portal.service.ServiceContext serviceContext)
423                    throws com.liferay.portal.kernel.exception.PortalException,
424                            com.liferay.portal.kernel.exception.SystemException {
425                    return getService()
426                                       .addArticle(userId, groupId, folderId, titleMap,
427                            descriptionMap, content, ddmStructureKey, ddmTemplateKey,
428                            serviceContext);
429            }
430    
431            /**
432            * Adds the resources to the web content article.
433            *
434            * @param article the web content article
435            * @param addGroupPermissions whether to add group permissions
436            * @param addGuestPermissions whether to add guest permissions
437            * @throws PortalException if no portal actions could be found associated
438            with the web content article or if a portal exception occurred
439            * @throws SystemException if a system exception occurred
440            */
441            public static void addArticleResources(
442                    com.liferay.portlet.journal.model.JournalArticle article,
443                    boolean addGroupPermissions, boolean addGuestPermissions)
444                    throws com.liferay.portal.kernel.exception.PortalException,
445                            com.liferay.portal.kernel.exception.SystemException {
446                    getService()
447                            .addArticleResources(article, addGroupPermissions,
448                            addGuestPermissions);
449            }
450    
451            /**
452            * Adds the model resources with the permissions to the web content article.
453            *
454            * @param article the web content article to add resources to
455            * @param groupPermissions the group permissions to be added
456            * @param guestPermissions the guest permissions to be added
457            * @throws PortalException if a portal exception occurred
458            * @throws SystemException if a system exception occurred
459            */
460            public static void addArticleResources(
461                    com.liferay.portlet.journal.model.JournalArticle article,
462                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
463                    throws com.liferay.portal.kernel.exception.PortalException,
464                            com.liferay.portal.kernel.exception.SystemException {
465                    getService()
466                            .addArticleResources(article, groupPermissions, guestPermissions);
467            }
468    
469            /**
470            * Adds the resources to the most recently created web content article.
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 addGroupPermissions whether to add group permissions
475            * @param addGuestPermissions whether to add guest permissions
476            * @throws PortalException if a portal exception occurred
477            * @throws SystemException if a system exception occurred
478            */
479            public static void addArticleResources(long groupId,
480                    java.lang.String articleId, boolean addGroupPermissions,
481                    boolean addGuestPermissions)
482                    throws com.liferay.portal.kernel.exception.PortalException,
483                            com.liferay.portal.kernel.exception.SystemException {
484                    getService()
485                            .addArticleResources(groupId, articleId, addGroupPermissions,
486                            addGuestPermissions);
487            }
488    
489            /**
490            * Adds the resources with the permissions to the most recently created web
491            * content article.
492            *
493            * @param groupId the primary key of the web content article's group
494            * @param articleId the primary key of the web content article
495            * @param groupPermissions the group permissions to be added
496            * @param guestPermissions the guest permissions to be added
497            * @throws PortalException if a portal exception occurred
498            * @throws SystemException if a system exception occurred
499            */
500            public static void addArticleResources(long groupId,
501                    java.lang.String articleId, java.lang.String[] groupPermissions,
502                    java.lang.String[] guestPermissions)
503                    throws com.liferay.portal.kernel.exception.PortalException,
504                            com.liferay.portal.kernel.exception.SystemException {
505                    getService()
506                            .addArticleResources(groupId, articleId, groupPermissions,
507                            guestPermissions);
508            }
509    
510            /**
511            * Returns the web content article with the group, article ID, and version.
512            * This method checks for the article's resource primary key and, if not
513            * found, creates a new one.
514            *
515            * @param groupId the primary key of the web content article's group
516            * @param articleId the primary key of the web content article
517            * @param version the web content article's version
518            * @return the matching web content article
519            * @throws PortalException if a matching web content article could not be
520            found
521            * @throws SystemException if a system exception occurred
522            */
523            public static com.liferay.portlet.journal.model.JournalArticle checkArticleResourcePrimKey(
524                    long groupId, java.lang.String articleId, double version)
525                    throws com.liferay.portal.kernel.exception.PortalException,
526                            com.liferay.portal.kernel.exception.SystemException {
527                    return getService()
528                                       .checkArticleResourcePrimKey(groupId, articleId, version);
529            }
530    
531            /**
532            * Checks all web content articles by handling their expirations and sending
533            * review notifications based on their current workflow.
534            *
535            * @throws PortalException if a portal exception occurred
536            * @throws SystemException if a system exception occurred
537            */
538            public static void checkArticles()
539                    throws com.liferay.portal.kernel.exception.PortalException,
540                            com.liferay.portal.kernel.exception.SystemException {
541                    getService().checkArticles();
542            }
543    
544            /**
545            * Checks the web content article matching the group, article ID, and
546            * version, replacing escaped newline and return characters with non-escaped
547            * newline and return characters.
548            *
549            * @param groupId the primary key of the web content article's group
550            * @param articleId the primary key of the web content article
551            * @param version the web content article's version
552            * @throws PortalException if a matching web content article could not be
553            found
554            * @throws SystemException if a system exception occurred
555            */
556            public static void checkNewLine(long groupId, java.lang.String articleId,
557                    double version)
558                    throws com.liferay.portal.kernel.exception.PortalException,
559                            com.liferay.portal.kernel.exception.SystemException {
560                    getService().checkNewLine(groupId, articleId, version);
561            }
562    
563            /**
564            * Checks the web content article matching the group, article ID, and
565            * version for an associated structure. If no structure is associated,
566            * return; otherwise check that the article and structure match.
567            *
568            * @param groupId the primary key of the web content article's group
569            * @param articleId the primary key of the web content article
570            * @param version the web content article's version
571            * @throws PortalException if a matching web content article could not be
572            found, if the article's structure does not match it, or if a
573            portal exception occurred
574            * @throws SystemException if a system exception occurred
575            */
576            public static void checkStructure(long groupId, java.lang.String articleId,
577                    double version)
578                    throws com.liferay.portal.kernel.exception.PortalException,
579                            com.liferay.portal.kernel.exception.SystemException {
580                    getService().checkStructure(groupId, articleId, version);
581            }
582    
583            /**
584            * Copies the web content article matching the group, article ID, and
585            * version. This method creates a new article, extracting all the values
586            * from the old one and updating its article ID.
587            *
588            * @param userId the primary key of the web content article's creator/owner
589            * @param groupId the primary key of the web content article's group
590            * @param oldArticleId the primary key of the old web content article
591            * @param newArticleId the primary key of the new web content article
592            * @param autoArticleId whether to auto-generate the web content article ID
593            * @param version the web content article's version
594            * @return the new web content article
595            * @throws PortalException if a matching web content article could not be
596            found or if a portal exception occurred
597            * @throws SystemException if a system exception occurred
598            */
599            public static com.liferay.portlet.journal.model.JournalArticle copyArticle(
600                    long userId, long groupId, java.lang.String oldArticleId,
601                    java.lang.String newArticleId, boolean autoArticleId, double version)
602                    throws com.liferay.portal.kernel.exception.PortalException,
603                            com.liferay.portal.kernel.exception.SystemException {
604                    return getService()
605                                       .copyArticle(userId, groupId, oldArticleId, newArticleId,
606                            autoArticleId, version);
607            }
608    
609            /**
610            * Deletes the web content article and its resources.
611            *
612            * @param article the web content article
613            * @throws PortalException if a portal exception occurred
614            * @throws SystemException if a system exception occurred
615            */
616            public static void deleteArticle(
617                    com.liferay.portlet.journal.model.JournalArticle article)
618                    throws com.liferay.portal.kernel.exception.PortalException,
619                            com.liferay.portal.kernel.exception.SystemException {
620                    getService().deleteArticle(article);
621            }
622    
623            /**
624            * Deletes the web content article and its resources, optionally sending
625            * email notifying denial of the article if it had not yet been approved.
626            *
627            * @param article the web content article
628            * @param articleURL the web content article's accessible URL to include in
629            email notifications (optionally <code>null</code>)
630            * @param serviceContext the service context to be applied (optionally
631            <code>null</code>). Can set the portlet preferences that include
632            email information to notify recipients of the unapproved web
633            content's denial.
634            * @throws PortalException if a portal exception occurred
635            * @throws SystemException if a system exception occurred
636            */
637            public static void deleteArticle(
638                    com.liferay.portlet.journal.model.JournalArticle article,
639                    java.lang.String articleURL,
640                    com.liferay.portal.service.ServiceContext serviceContext)
641                    throws com.liferay.portal.kernel.exception.PortalException,
642                            com.liferay.portal.kernel.exception.SystemException {
643                    getService().deleteArticle(article, articleURL, serviceContext);
644            }
645    
646            /**
647            * Deletes the web content article and its resources matching the group,
648            * article ID, and version, optionally sending email notifying denial of the
649            * web content article if it had not yet been approved.
650            *
651            * @param groupId the primary key of the web content article's group
652            * @param articleId the primary key of the web content article
653            * @param version the web content article's version
654            * @param articleURL the web content article's accessible URL
655            * @param serviceContext the service context to be applied. Can set the
656            portlet preferences that include email information to notify
657            recipients of the unapproved web content article's denial.
658            * @throws PortalException if a matching web content article could not be
659            found or if a portal exception occurred
660            * @throws SystemException if a system exception occurred
661            */
662            public static void deleteArticle(long groupId, java.lang.String articleId,
663                    double version, java.lang.String articleURL,
664                    com.liferay.portal.service.ServiceContext serviceContext)
665                    throws com.liferay.portal.kernel.exception.PortalException,
666                            com.liferay.portal.kernel.exception.SystemException {
667                    getService()
668                            .deleteArticle(groupId, articleId, version, articleURL,
669                            serviceContext);
670            }
671    
672            /**
673            * Deletes all web content articles and their resources matching the group
674            * and article ID, optionally sending email notifying denial of article if
675            * it had not yet been approved.
676            *
677            * @param groupId the primary key of the web content article's group
678            * @param articleId the primary key of the web content article
679            * @param serviceContext the service context to be applied. Can set the
680            portlet preferences that include email information to notify
681            recipients of the unapproved web content article's denial.
682            * @throws PortalException if a portal exception occurred
683            * @throws SystemException if a system exception occurred
684            */
685            public static void deleteArticle(long groupId, java.lang.String articleId,
686                    com.liferay.portal.service.ServiceContext serviceContext)
687                    throws com.liferay.portal.kernel.exception.PortalException,
688                            com.liferay.portal.kernel.exception.SystemException {
689                    getService().deleteArticle(groupId, articleId, serviceContext);
690            }
691    
692            /**
693            * Deletes all the group's web content articles and resources.
694            *
695            * @param groupId the primary key of the web content article's group
696            * @throws PortalException if a portal exception occurred
697            * @throws SystemException if a system exception occurred
698            */
699            public static void deleteArticles(long groupId)
700                    throws com.liferay.portal.kernel.exception.PortalException,
701                            com.liferay.portal.kernel.exception.SystemException {
702                    getService().deleteArticles(groupId);
703            }
704    
705            /**
706            * Deletes all the group's web content articles and resources in the folder,
707            * including recycled articles.
708            *
709            * @param groupId the primary key of the web content article's group
710            * @param folderId the primary key of the web content article folder
711            * @throws PortalException if a portal exception occurred
712            * @throws SystemException if a system exception occurred
713            */
714            public static void deleteArticles(long groupId, long folderId)
715                    throws com.liferay.portal.kernel.exception.PortalException,
716                            com.liferay.portal.kernel.exception.SystemException {
717                    getService().deleteArticles(groupId, folderId);
718            }
719    
720            /**
721            * Deletes all the group's web content articles and resources in the folder,
722            * optionally including recycled articles.
723            *
724            * @param groupId the primary key of the web content article's group
725            * @param folderId the primary key of the web content article folder
726            * @param includeTrashedEntries whether to include recycled web content
727            articles
728            * @throws PortalException if a portal exception occurred
729            * @throws SystemException if a system exception occurred
730            */
731            public static void deleteArticles(long groupId, long folderId,
732                    boolean includeTrashedEntries)
733                    throws com.liferay.portal.kernel.exception.PortalException,
734                            com.liferay.portal.kernel.exception.SystemException {
735                    getService().deleteArticles(groupId, folderId, includeTrashedEntries);
736            }
737    
738            /**
739            * Deletes the layout's association with the web content articles for the
740            * group.
741            *
742            * @param groupId the primary key of the web content article's group
743            * @param layoutUuid the unique string identifying the web content
744            article's display page
745            * @throws SystemException if a system exception occurred
746            */
747            public static void deleteLayoutArticleReferences(long groupId,
748                    java.lang.String layoutUuid)
749                    throws com.liferay.portal.kernel.exception.SystemException {
750                    getService().deleteLayoutArticleReferences(groupId, layoutUuid);
751            }
752    
753            /**
754            * Expires the web content article matching the group, article ID, and
755            * version.
756            *
757            * @param userId the primary key of the user updating the web content
758            article
759            * @param groupId the primary key of the web content article's group
760            * @param articleId the primary key of the web content article
761            * @param version the web content article's version
762            * @param articleURL the web content article's accessible URL
763            * @param serviceContext the service context to be applied. Can set the
764            modification date, status date, portlet preferences, and can set
765            whether to add the default command update for the web content
766            article. With respect to social activities, by setting the
767            service context's command to {@link
768            com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation
769            is considered a web content update activity; otherwise it is
770            considered a web content add activity.
771            * @return the web content article
772            * @throws PortalException if a matching web content article could not be
773            found or if a portal exception occurred
774            * @throws SystemException if a system exception occurred
775            */
776            public static com.liferay.portlet.journal.model.JournalArticle expireArticle(
777                    long userId, long groupId, java.lang.String articleId, double version,
778                    java.lang.String articleURL,
779                    com.liferay.portal.service.ServiceContext serviceContext)
780                    throws com.liferay.portal.kernel.exception.PortalException,
781                            com.liferay.portal.kernel.exception.SystemException {
782                    return getService()
783                                       .expireArticle(userId, groupId, articleId, version,
784                            articleURL, serviceContext);
785            }
786    
787            /**
788            * Expires the web content article matching the group and article ID,
789            * expiring all of its versions if the
790            * <code>journal.article.expire.all.versions</code> portal property is
791            * <code>true</code>, otherwise expiring only its latest approved version.
792            *
793            * @param userId the primary key of the user updating the web content
794            article
795            * @param groupId the primary key of the web content article's group
796            * @param articleId the primary key of the web content article
797            * @param articleURL the web content article's accessible URL
798            * @param serviceContext the service context to be applied. Can set the
799            modification date, status date, portlet preferences, and can set
800            whether to add the default command update for the web content
801            article. With respect to social activities, by setting the
802            service context's command to {@link
803            com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation
804            is considered a web content update activity; otherwise it is
805            considered a web content add activity.
806            * @throws PortalException if a matching web content article could not be
807            found or if a portal exception occurred
808            * @throws SystemException if a system exception occurred
809            */
810            public static void expireArticle(long userId, long groupId,
811                    java.lang.String articleId, java.lang.String articleURL,
812                    com.liferay.portal.service.ServiceContext serviceContext)
813                    throws com.liferay.portal.kernel.exception.PortalException,
814                            com.liferay.portal.kernel.exception.SystemException {
815                    getService()
816                            .expireArticle(userId, groupId, articleId, articleURL,
817                            serviceContext);
818            }
819    
820            /**
821            * Returns the web content article matching the UUID and group.
822            *
823            * @param uuid the web content article's UUID
824            * @param groupId the primary key of the web content article's group
825            * @return the matching web content article
826            * @throws SystemException if a system exception occurred
827            */
828            public static com.liferay.portlet.journal.model.JournalArticle fetchArticle(
829                    java.lang.String uuid, long groupId)
830                    throws com.liferay.portal.kernel.exception.SystemException {
831                    return getService().fetchArticle(uuid, groupId);
832            }
833    
834            /**
835            * Returns the web content article with the ID.
836            *
837            * @param id the primary key of the web content article
838            * @return the web content article with the ID
839            * @throws PortalException if a matching web content article could not be
840            found
841            * @throws SystemException if a system exception occurred
842            */
843            public static com.liferay.portlet.journal.model.JournalArticle getArticle(
844                    long id)
845                    throws com.liferay.portal.kernel.exception.PortalException,
846                            com.liferay.portal.kernel.exception.SystemException {
847                    return getService().getArticle(id);
848            }
849    
850            /**
851            * Returns the latest approved web content article, or the latest unapproved
852            * article if none are approved. Both approved and unapproved articles must
853            * match the group and article ID.
854            *
855            * @param groupId the primary key of the web content article's group
856            * @param articleId the primary key of the web content article
857            * @return the matching web content article
858            * @throws PortalException if a matching web content article could not be
859            found
860            * @throws SystemException if a system exception occurred
861            */
862            public static com.liferay.portlet.journal.model.JournalArticle getArticle(
863                    long groupId, java.lang.String articleId)
864                    throws com.liferay.portal.kernel.exception.PortalException,
865                            com.liferay.portal.kernel.exception.SystemException {
866                    return getService().getArticle(groupId, articleId);
867            }
868    
869            /**
870            * Returns the web content article matching the group, article ID, and
871            * version.
872            *
873            * @param groupId the primary key of the web content article's group
874            * @param articleId the primary key of the web content article
875            * @param version the web content article's version
876            * @return the matching web content article
877            * @throws PortalException if a matching web content article could not be
878            found
879            * @throws SystemException if a system exception occurred
880            */
881            public static com.liferay.portlet.journal.model.JournalArticle getArticle(
882                    long groupId, java.lang.String articleId, double version)
883                    throws com.liferay.portal.kernel.exception.PortalException,
884                            com.liferay.portal.kernel.exception.SystemException {
885                    return getService().getArticle(groupId, articleId, version);
886            }
887    
888            /**
889            * Returns the web content article matching the group, class name, and class
890            * PK.
891            *
892            * @param groupId the primary key of the web content article's group
893            * @param className the DDMStructure class name if the web content article
894            is related to a DDM structure, the primary key of the class name
895            associated with the article, or {@link
896            JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise
897            * @param classPK the primary key of the DDM structure, if the the
898            DDMStructure class name is given as the <code>className</code>
899            parameter, the primary key of the class associated with the web
900            content article, or <code>0</code> otherwise
901            * @return the matching web content article
902            * @throws PortalException if a matching web content article could not be
903            found
904            * @throws SystemException if a system exception occurred
905            */
906            public static com.liferay.portlet.journal.model.JournalArticle getArticle(
907                    long groupId, java.lang.String className, long classPK)
908                    throws com.liferay.portal.kernel.exception.PortalException,
909                            com.liferay.portal.kernel.exception.SystemException {
910                    return getService().getArticle(groupId, className, classPK);
911            }
912    
913            /**
914            * Returns the latest web content article that is approved, or the latest
915            * unapproved article if none are approved. Both approved and unapproved
916            * articles must match the group and URL title.
917            *
918            * @param groupId the primary key of the web content article's group
919            * @param urlTitle the web content article's accessible URL title
920            * @return the matching web content article
921            * @throws PortalException if a portal exception occurred
922            * @throws SystemException if a system exception occurred
923            */
924            public static com.liferay.portlet.journal.model.JournalArticle getArticleByUrlTitle(
925                    long groupId, java.lang.String urlTitle)
926                    throws com.liferay.portal.kernel.exception.PortalException,
927                            com.liferay.portal.kernel.exception.SystemException {
928                    return getService().getArticleByUrlTitle(groupId, urlTitle);
929            }
930    
931            /**
932            * Returns the web content associated with the web content article and DDM
933            * template.
934            *
935            * @param article the web content article
936            * @param ddmTemplateKey the primary key of the web content article's DDM
937            template (optionally <code>null</code>). If the article is
938            related to a DDM structure, the template's structure must match
939            it.
940            * @param viewMode the mode in which the web content is being viewed
941            * @param languageId the primary key of the language translation to get
942            * @param themeDisplay the theme display
943            * @return the web content associated with the DDM template
944            * @throws PortalException if a matching DDM template could not be found or
945            if a portal exception occurred
946            * @throws SystemException if a system exception occurred
947            */
948            public static java.lang.String getArticleContent(
949                    com.liferay.portlet.journal.model.JournalArticle article,
950                    java.lang.String ddmTemplateKey, java.lang.String viewMode,
951                    java.lang.String languageId,
952                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
953                    throws com.liferay.portal.kernel.exception.PortalException,
954                            com.liferay.portal.kernel.exception.SystemException {
955                    return getService()
956                                       .getArticleContent(article, ddmTemplateKey, viewMode,
957                            languageId, themeDisplay);
958            }
959    
960            /**
961            * Returns the web content matching the group, article ID, and version, and
962            * associated with the DDM template.
963            *
964            * @param groupId the primary key of the web content article's group
965            * @param articleId the primary key of the web content article
966            * @param version the web content article's version
967            * @param viewMode the mode in which the web content is being viewed
968            * @param ddmTemplateKey the primary key of the web content article's DDM
969            template (optionally <code>null</code>). If the article is
970            related to a DDM structure, the template's structure must match
971            it.
972            * @param languageId the primary key of the language translation to get
973            * @param themeDisplay the theme display
974            * @return the matching web content
975            * @throws PortalException if a matching web content article or DDM template
976            could not be found, or if a portal exception occurred
977            * @throws SystemException if a system exception occurred
978            */
979            public static java.lang.String getArticleContent(long groupId,
980                    java.lang.String articleId, double version, java.lang.String viewMode,
981                    java.lang.String ddmTemplateKey, java.lang.String languageId,
982                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
983                    throws com.liferay.portal.kernel.exception.PortalException,
984                            com.liferay.portal.kernel.exception.SystemException {
985                    return getService()
986                                       .getArticleContent(groupId, articleId, version, viewMode,
987                            ddmTemplateKey, languageId, themeDisplay);
988            }
989    
990            /**
991            * Returns the web content matching the group, article ID, and version.
992            *
993            * @param groupId the primary key of the web content article's group
994            * @param articleId the primary key of the web content article
995            * @param version the web content article's version
996            * @param viewMode the mode in which the web content is being viewed
997            * @param languageId the primary key of the language translation to get
998            * @param themeDisplay the theme display
999            * @return the matching web content
1000            * @throws PortalException if a matching web content article or DDM template
1001            could not be found, or if a portal exception occurred
1002            * @throws SystemException if a system exception occurred
1003            */
1004            public static java.lang.String getArticleContent(long groupId,
1005                    java.lang.String articleId, double version, java.lang.String viewMode,
1006                    java.lang.String languageId,
1007                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
1008                    throws com.liferay.portal.kernel.exception.PortalException,
1009                            com.liferay.portal.kernel.exception.SystemException {
1010                    return getService()
1011                                       .getArticleContent(groupId, articleId, version, viewMode,
1012                            languageId, themeDisplay);
1013            }
1014    
1015            /**
1016            * Returns the latest web content matching the group and article ID, and
1017            * associated with DDM template key.
1018            *
1019            * @param groupId the primary key of the web content article's group
1020            * @param articleId the primary key of the web content article
1021            * @param viewMode the mode in which the web content is being viewed
1022            * @param ddmTemplateKey the primary key of the web content article's DDM
1023            template (optionally <code>null</code>). If the article is
1024            related to a DDM structure, the template's structure must match
1025            it.
1026            * @param languageId the primary key of the language translation to get
1027            * @param themeDisplay the theme display
1028            * @return the matching web content
1029            * @throws PortalException if a matching web content article or DDM template
1030            could not be found, or if a portal exception occurred
1031            * @throws SystemException if a system exception occurred
1032            */
1033            public static java.lang.String getArticleContent(long groupId,
1034                    java.lang.String articleId, java.lang.String viewMode,
1035                    java.lang.String ddmTemplateKey, java.lang.String languageId,
1036                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
1037                    throws com.liferay.portal.kernel.exception.PortalException,
1038                            com.liferay.portal.kernel.exception.SystemException {
1039                    return getService()
1040                                       .getArticleContent(groupId, articleId, viewMode,
1041                            ddmTemplateKey, languageId, themeDisplay);
1042            }
1043    
1044            /**
1045            * Returns the latest web content matching the group and article ID.
1046            *
1047            * @param groupId the primary key of the web content article's group
1048            * @param articleId the primary key of the web content article
1049            * @param viewMode the mode in which the web content is being viewed
1050            * @param languageId the primary key of the language translation to get
1051            * @param themeDisplay the theme display
1052            * @return the matching web content
1053            * @throws PortalException if a matching web content article or DDM template
1054            could not be found, or if a portal exception occurred
1055            * @throws SystemException if a system exception occurred
1056            */
1057            public static java.lang.String getArticleContent(long groupId,
1058                    java.lang.String articleId, java.lang.String viewMode,
1059                    java.lang.String languageId,
1060                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
1061                    throws com.liferay.portal.kernel.exception.PortalException,
1062                            com.liferay.portal.kernel.exception.SystemException {
1063                    return getService()
1064                                       .getArticleContent(groupId, articleId, viewMode, languageId,
1065                            themeDisplay);
1066            }
1067    
1068            /**
1069            * Returns a web content article display for the specified page of the
1070            * latest version of the web content article, optionally based on the DDM
1071            * template if the article is template driven. If the article is template
1072            * driven, web content transformation tokens are added from the theme
1073            * display (if not <code>null</code>) or the XML request otherwise.
1074            *
1075            * @param article the web content article
1076            * @param ddmTemplateKey the primary key of the web content article's DDM
1077            template (optionally <code>null</code>). If the article is
1078            related to a DDM structure, the template's structure must match
1079            it.
1080            * @param viewMode the mode in which the web content is being viewed
1081            * @param languageId the primary key of the language translation to get
1082            * @param page the web content's page number. Page numbers start at
1083            <code>1</code>.
1084            * @param xmlRequest the request that serializes the web content into a
1085            hierarchical hash map (optionally <code>null</code>)
1086            * @param themeDisplay the theme display
1087            * @return the web content article display
1088            * @throws PortalException if a matching DDM template could not be found or
1089            if a portal exception occurred
1090            * @throws SystemException if a system exception occurred
1091            */
1092            public static com.liferay.portlet.journal.model.JournalArticleDisplay getArticleDisplay(
1093                    com.liferay.portlet.journal.model.JournalArticle article,
1094                    java.lang.String ddmTemplateKey, java.lang.String viewMode,
1095                    java.lang.String languageId, int page, java.lang.String xmlRequest,
1096                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
1097                    throws com.liferay.portal.kernel.exception.PortalException,
1098                            com.liferay.portal.kernel.exception.SystemException {
1099                    return getService()
1100                                       .getArticleDisplay(article, ddmTemplateKey, viewMode,
1101                            languageId, page, xmlRequest, themeDisplay);
1102            }
1103    
1104            /**
1105            * Returns a web content article display for the first page of the specified
1106            * version of the web content article, optionally based on the DDM template
1107            * if the article is template driven. If the article is template driven, web
1108            * content transformation tokens are added from the theme display (if not
1109            * <code>null</code>) or the XML request otherwise.
1110            *
1111            * @param groupId the primary key of the web content article's group
1112            * @param articleId the primary key of the web content article
1113            * @param version the web content article's version
1114            * @param ddmTemplateKey the primary key of the web content article's DDM
1115            template (optionally <code>null</code>). If the article is
1116            related to a DDM structure, the template's structure must match
1117            it.
1118            * @param viewMode the mode in which the web content is being viewed
1119            * @param languageId the primary key of the language translation to get
1120            * @param page the web content's page number
1121            * @param xmlRequest the request that serializes the web content into a
1122            hierarchical hash map
1123            * @param themeDisplay the theme display
1124            * @return the web content article display, or <code>null</code> if the
1125            article has expired or if article's display date/time is after
1126            the current date/time
1127            * @throws PortalException if a matching web content article or DDM template
1128            could not be found, or if a portal exception occurred
1129            * @throws SystemException if a system exception occurred
1130            */
1131            public static com.liferay.portlet.journal.model.JournalArticleDisplay getArticleDisplay(
1132                    long groupId, java.lang.String articleId, double version,
1133                    java.lang.String ddmTemplateKey, java.lang.String viewMode,
1134                    java.lang.String languageId, int page, java.lang.String xmlRequest,
1135                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
1136                    throws com.liferay.portal.kernel.exception.PortalException,
1137                            com.liferay.portal.kernel.exception.SystemException {
1138                    return getService()
1139                                       .getArticleDisplay(groupId, articleId, version,
1140                            ddmTemplateKey, viewMode, languageId, page, xmlRequest, themeDisplay);
1141            }
1142    
1143            /**
1144            * Returns a web content article display for the first page of the specified
1145            * version of the web content article matching the group and article ID,
1146            * optionally based on the DDM template if the article is template driven.
1147            * If the article is template driven, web content transformation tokens are
1148            * added from the theme display (if not <code>null</code>).
1149            *
1150            * @param groupId the primary key of the web content article's group
1151            * @param articleId the primary key of the web content article
1152            * @param version the web content article's version
1153            * @param ddmTemplateKey the primary key of the web content article's DDM
1154            template (optionally <code>null</code>). If the article is
1155            related to a DDM structure, the template's structure must match
1156            it.
1157            * @param viewMode the mode in which the web content is being viewed
1158            * @param languageId the primary key of the language translation to get
1159            * @param themeDisplay the theme display
1160            * @return the web content article display, or <code>null</code> if the
1161            article has expired or if article's display date/time is after
1162            the current date/time
1163            * @throws PortalException if a matching web content article or DDM template
1164            could not be found, or if a portal exception occurred
1165            * @throws SystemException if a system exception occurred
1166            */
1167            public static com.liferay.portlet.journal.model.JournalArticleDisplay getArticleDisplay(
1168                    long groupId, java.lang.String articleId, double version,
1169                    java.lang.String ddmTemplateKey, java.lang.String viewMode,
1170                    java.lang.String languageId,
1171                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
1172                    throws com.liferay.portal.kernel.exception.PortalException,
1173                            com.liferay.portal.kernel.exception.SystemException {
1174                    return getService()
1175                                       .getArticleDisplay(groupId, articleId, version,
1176                            ddmTemplateKey, viewMode, languageId, themeDisplay);
1177            }
1178    
1179            /**
1180            * Returns a web content article display for the first page of the latest
1181            * version of the web content article matching the group and article ID. If
1182            * the article is template driven, web content transformation tokens are
1183            * added from the theme display (if not <code>null</code>) or the XML
1184            * request otherwise.
1185            *
1186            * @param groupId the primary key of the web content article's group
1187            * @param articleId the primary key of the web content article
1188            * @param viewMode the mode in which the web content is being viewed
1189            * @param languageId the primary key of the language translation to get
1190            * @param page the web content's page number
1191            * @param xmlRequest the request that serializes the web content into a
1192            hierarchical hash map
1193            * @param themeDisplay the theme display
1194            * @return the web content article display, or <code>null</code> if the
1195            article has expired or if article's display date/time is after
1196            the current date/time
1197            * @throws PortalException if a matching web content article or DDM template
1198            could not be found, or if a portal exception occurred
1199            * @throws SystemException if a system exception occurred
1200            */
1201            public static com.liferay.portlet.journal.model.JournalArticleDisplay getArticleDisplay(
1202                    long groupId, java.lang.String articleId, java.lang.String viewMode,
1203                    java.lang.String languageId, int page, java.lang.String xmlRequest,
1204                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
1205                    throws com.liferay.portal.kernel.exception.PortalException,
1206                            com.liferay.portal.kernel.exception.SystemException {
1207                    return getService()
1208                                       .getArticleDisplay(groupId, articleId, viewMode, languageId,
1209                            page, xmlRequest, themeDisplay);
1210            }
1211    
1212            /**
1213            * Returns a web content article display for the specified page of the
1214            * latest version of the web content article matching the group and article
1215            * ID, optionally based on the DDM template if the article is template
1216            * driven. If the article is template driven, web content transformation
1217            * tokens are added from the theme display (if not <code>null</code>) or the
1218            * XML request otherwise.
1219            *
1220            * @param groupId the primary key of the web content article's group
1221            * @param articleId the primary key of the web content article
1222            * @param ddmTemplateKey the primary key of the web content article's DDM
1223            template (optionally <code>null</code>). If the article is
1224            related to a DDM structure, the template's structure must match
1225            it.
1226            * @param viewMode the mode in which the web content is being viewed
1227            * @param languageId the primary key of the language translation to get
1228            * @param page the web content's page number
1229            * @param xmlRequest the request that serializes the web content into a
1230            hierarchical hash map
1231            * @param themeDisplay the theme display
1232            * @return the web content article display, or <code>null</code> if the
1233            article has expired or if article's display date/time is after
1234            the current date/time
1235            * @throws PortalException if a matching web content article or DDM template
1236            could not be found, or if a portal exception occurred
1237            * @throws SystemException if a system exception occurred
1238            */
1239            public static com.liferay.portlet.journal.model.JournalArticleDisplay getArticleDisplay(
1240                    long groupId, java.lang.String articleId,
1241                    java.lang.String ddmTemplateKey, java.lang.String viewMode,
1242                    java.lang.String languageId, int page, java.lang.String xmlRequest,
1243                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
1244                    throws com.liferay.portal.kernel.exception.PortalException,
1245                            com.liferay.portal.kernel.exception.SystemException {
1246                    return getService()
1247                                       .getArticleDisplay(groupId, articleId, ddmTemplateKey,
1248                            viewMode, languageId, page, xmlRequest, themeDisplay);
1249            }
1250    
1251            /**
1252            * Returns a web content article display for the first page of the latest
1253            * version of the web content article matching the group and article ID,
1254            * optionally based on the DDM template if the article is template driven.
1255            * If the article is template driven, web content transformation tokens are
1256            * added from the theme display (if not <code>null</code>).
1257            *
1258            * @param groupId the primary key of the web content article's group
1259            * @param articleId the primary key of the web content article
1260            * @param ddmTemplateKey the primary key of the web content article's DDM
1261            template (optionally <code>null</code>). If the article is
1262            related to a DDM structure, the template's structure must match
1263            it.
1264            * @param viewMode the mode in which the web content is being viewed
1265            * @param languageId the primary key of the language translation to get
1266            * @param themeDisplay the theme display
1267            * @return the web content article display, or <code>null</code> if the
1268            article has expired or if article's display date/time is after
1269            the current date/time
1270            * @throws PortalException if a matching web content article or DDM template
1271            could not be found, or if a portal exception occurred
1272            * @throws SystemException if a system exception occurred
1273            */
1274            public static com.liferay.portlet.journal.model.JournalArticleDisplay getArticleDisplay(
1275                    long groupId, java.lang.String articleId,
1276                    java.lang.String ddmTemplateKey, java.lang.String viewMode,
1277                    java.lang.String languageId,
1278                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
1279                    throws com.liferay.portal.kernel.exception.PortalException,
1280                            com.liferay.portal.kernel.exception.SystemException {
1281                    return getService()
1282                                       .getArticleDisplay(groupId, articleId, ddmTemplateKey,
1283                            viewMode, languageId, themeDisplay);
1284            }
1285    
1286            /**
1287            * Returns a web content article display for the first page of the latest
1288            * version of the web content article matching the group and article ID. If
1289            * the article is template driven, web content transformation tokens are
1290            * added from the theme display (if not <code>null</code>).
1291            *
1292            * @param groupId the primary key of the web content article's group
1293            * @param articleId the primary key of the web content article
1294            * @param viewMode the mode in which the web content is being viewed
1295            * @param languageId the primary key of the language translation to get
1296            * @param themeDisplay the theme display
1297            * @return the web content article display, or <code>null</code> if the
1298            article has expired or if article's display date/time is after
1299            the current date/time
1300            * @throws PortalException if a matching web content article or DDM template
1301            could not be found, or if a portal exception occurred
1302            * @throws SystemException if a system exception occurred
1303            */
1304            public static com.liferay.portlet.journal.model.JournalArticleDisplay getArticleDisplay(
1305                    long groupId, java.lang.String articleId, java.lang.String viewMode,
1306                    java.lang.String languageId,
1307                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
1308                    throws com.liferay.portal.kernel.exception.PortalException,
1309                            com.liferay.portal.kernel.exception.SystemException {
1310                    return getService()
1311                                       .getArticleDisplay(groupId, articleId, viewMode, languageId,
1312                            themeDisplay);
1313            }
1314    
1315            /**
1316            * Returns all the web content articles present in the system.
1317            *
1318            * @return the web content articles present in the system
1319            * @throws SystemException if a system exception occurred
1320            */
1321            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles()
1322                    throws com.liferay.portal.kernel.exception.SystemException {
1323                    return getService().getArticles();
1324            }
1325    
1326            /**
1327            * Returns all the web content articles belonging to the group.
1328            *
1329            * @param groupId the primary key of the web content article's group
1330            * @return the web content articles belonging to the group
1331            * @throws SystemException if a system exception occurred
1332            */
1333            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles(
1334                    long groupId)
1335                    throws com.liferay.portal.kernel.exception.SystemException {
1336                    return getService().getArticles(groupId);
1337            }
1338    
1339            /**
1340            * Returns a range of all the web content articles belonging to the group.
1341            *
1342            * <p>
1343            * Useful when paginating results. Returns a maximum of <code>end -
1344            * start</code> instances. <code>start</code> and <code>end</code> are not
1345            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1346            * refers to the first result in the set. Setting both <code>start</code>
1347            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1348            * result set.
1349            * </p>
1350            *
1351            * @param groupId the primary key of the web content article's group
1352            * @param start the lower bound of the range of web content articles to
1353            return
1354            * @param end the upper bound of the range of web content articles to
1355            return (not inclusive)
1356            * @return the range of matching web content articles
1357            * @throws SystemException if a system exception occurred
1358            */
1359            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles(
1360                    long groupId, int start, int end)
1361                    throws com.liferay.portal.kernel.exception.SystemException {
1362                    return getService().getArticles(groupId, start, end);
1363            }
1364    
1365            /**
1366            * Returns an ordered range of all the web content articles belonging to the
1367            * group.
1368            *
1369            * <p>
1370            * Useful when paginating results. Returns a maximum of <code>end -
1371            * start</code> instances. <code>start</code> and <code>end</code> are not
1372            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1373            * refers to the first result in the set. Setting both <code>start</code>
1374            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1375            * result set.
1376            * </p>
1377            *
1378            * @param groupId the primary key of the web content article's group
1379            * @param start the lower bound of the range of web content articles to
1380            return
1381            * @param end the upper bound of the range of web content articles to
1382            return (not inclusive)
1383            * @param obc the comparator to order the web content articles
1384            * @return the range of matching web content articles ordered by the
1385            comparator
1386            * @throws SystemException if a system exception occurred
1387            */
1388            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles(
1389                    long groupId, int start, int end,
1390                    com.liferay.portal.kernel.util.OrderByComparator obc)
1391                    throws com.liferay.portal.kernel.exception.SystemException {
1392                    return getService().getArticles(groupId, start, end, obc);
1393            }
1394    
1395            /**
1396            * Returns all the web content articles matching the group and folder.
1397            *
1398            * @param groupId the primary key of the web content article's group
1399            * @param folderId the primary key of the web content article folder
1400            * @return the matching web content articles
1401            * @throws SystemException if a system exception occurred
1402            */
1403            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles(
1404                    long groupId, long folderId)
1405                    throws com.liferay.portal.kernel.exception.SystemException {
1406                    return getService().getArticles(groupId, folderId);
1407            }
1408    
1409            /**
1410            * Returns a range of all the web content articles matching the group and
1411            * folder.
1412            *
1413            * <p>
1414            * Useful when paginating results. Returns a maximum of <code>end -
1415            * start</code> instances. <code>start</code> and <code>end</code> are not
1416            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1417            * refers to the first result in the set. Setting both <code>start</code>
1418            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1419            * result set.
1420            * </p>
1421            *
1422            * @param groupId the primary key of the web content article's group
1423            * @param folderId the primary key of the web content article's folder
1424            * @param start the lower bound of the range of web content articles to
1425            return
1426            * @param end the upper bound of the range of web content articles to
1427            return (not inclusive)
1428            * @return the range of matching web content articles
1429            * @throws SystemException if a system exception occurred
1430            */
1431            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles(
1432                    long groupId, long folderId, int start, int end)
1433                    throws com.liferay.portal.kernel.exception.SystemException {
1434                    return getService().getArticles(groupId, folderId, start, end);
1435            }
1436    
1437            /**
1438            * Returns an ordered range of all the web content articles matching the
1439            * group and folder.
1440            *
1441            * <p>
1442            * Useful when paginating results. Returns a maximum of <code>end -
1443            * start</code> instances. <code>start</code> and <code>end</code> are not
1444            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1445            * refers to the first result in the set. Setting both <code>start</code>
1446            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1447            * result set.
1448            * </p>
1449            *
1450            * @param groupId the primary key of the web content article's group
1451            * @param folderId the primary key of the web content article's folder
1452            * @param start the lower bound of the range of web content articles to
1453            return
1454            * @param end the upper bound of the range of web content articles to
1455            return (not inclusive)
1456            * @param orderByComparator the comparator to order the web content
1457            articles
1458            * @return the range of matching web content articles ordered by the
1459            comparator
1460            * @throws SystemException if a system exception occurred
1461            */
1462            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles(
1463                    long groupId, long folderId, int start, int end,
1464                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1465                    throws com.liferay.portal.kernel.exception.SystemException {
1466                    return getService()
1467                                       .getArticles(groupId, folderId, start, end, orderByComparator);
1468            }
1469    
1470            /**
1471            * Returns all the web content articles matching the group and article ID.
1472            *
1473            * @param groupId the primary key of the web content article's group
1474            * @param articleId the primary key of the web content article
1475            * @return the matching web content articles
1476            * @throws SystemException if a system exception occurred
1477            */
1478            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles(
1479                    long groupId, java.lang.String articleId)
1480                    throws com.liferay.portal.kernel.exception.SystemException {
1481                    return getService().getArticles(groupId, articleId);
1482            }
1483    
1484            /**
1485            * Returns all the web content articles matching the small image ID.
1486            *
1487            * @param smallImageId the primary key of the web content article's small
1488            image
1489            * @return the web content articles matching the small image ID
1490            * @throws SystemException if a system exception occurred
1491            */
1492            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticlesBySmallImageId(
1493                    long smallImageId)
1494                    throws com.liferay.portal.kernel.exception.SystemException {
1495                    return getService().getArticlesBySmallImageId(smallImageId);
1496            }
1497    
1498            /**
1499            * Returns the number of web content articles belonging to the group.
1500            *
1501            * @param groupId the primary key of the web content article's group
1502            * @return the number of web content articles belonging to the group
1503            * @throws SystemException if a system exception occurred
1504            */
1505            public static int getArticlesCount(long groupId)
1506                    throws com.liferay.portal.kernel.exception.SystemException {
1507                    return getService().getArticlesCount(groupId);
1508            }
1509    
1510            /**
1511            * Returns the number of web content articles matching the group and folder.
1512            *
1513            * @param groupId the primary key of the web content article's group
1514            * @param folderId the primary key of the web content article's folder
1515            * @return the number of matching web content articles
1516            * @throws SystemException if a system exception occurred
1517            */
1518            public static int getArticlesCount(long groupId, long folderId)
1519                    throws com.liferay.portal.kernel.exception.SystemException {
1520                    return getService().getArticlesCount(groupId, folderId);
1521            }
1522    
1523            /**
1524            * Returns an ordered range of all the web content articles matching the
1525            * company, version, and workflow status.
1526            *
1527            * <p>
1528            * Useful when paginating results. Returns a maximum of <code>end -
1529            * start</code> instances. <code>start</code> and <code>end</code> are not
1530            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1531            * refers to the first result in the set. Setting both <code>start</code>
1532            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1533            * result set.
1534            * </p>
1535            *
1536            * @param companyId the primary key of the web content article's company
1537            * @param version the web content article's version
1538            * @param status the web content article's workflow status. For more
1539            information see {@link WorkflowConstants} for constants starting
1540            with the "STATUS_" prefix.
1541            * @param start the lower bound of the range of web content articles to
1542            return
1543            * @param end the upper bound of the range of web content articles to
1544            return (not inclusive)
1545            * @return the range of matching web content articles ordered by article ID
1546            * @throws SystemException if a system exception occurred
1547            */
1548            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getCompanyArticles(
1549                    long companyId, double version, int status, int start, int end)
1550                    throws com.liferay.portal.kernel.exception.SystemException {
1551                    return getService()
1552                                       .getCompanyArticles(companyId, version, status, start, end);
1553            }
1554    
1555            /**
1556            * Returns an ordered range of all the web content articles matching the
1557            * company and workflow status.
1558            *
1559            * <p>
1560            * Useful when paginating results. Returns a maximum of <code>end -
1561            * start</code> instances. <code>start</code> and <code>end</code> are not
1562            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1563            * refers to the first result in the set. Setting both <code>start</code>
1564            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1565            * result set.
1566            * </p>
1567            *
1568            * @param companyId the primary key of the web content article's company
1569            * @param status the web content article's workflow status. For more
1570            information see {@link WorkflowConstants} for constants starting
1571            with the "STATUS_" prefix.
1572            * @param start the lower bound of the range of web content articles to
1573            return
1574            * @param end the upper bound of the range of web content articles to
1575            return (not inclusive)
1576            * @return the range of matching web content articles ordered by article ID
1577            * @throws SystemException if a system exception occurred
1578            */
1579            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getCompanyArticles(
1580                    long companyId, int status, int start, int end)
1581                    throws com.liferay.portal.kernel.exception.SystemException {
1582                    return getService().getCompanyArticles(companyId, status, start, end);
1583            }
1584    
1585            /**
1586            * Returns the number of web content articles matching the company, version,
1587            * and workflow status.
1588            *
1589            * <p>
1590            * Useful when paginating results. Returns a maximum of <code>end -
1591            * start</code> instances. <code>start</code> and <code>end</code> are not
1592            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1593            * refers to the first result in the set. Setting both <code>start</code>
1594            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1595            * result set.
1596            * </p>
1597            *
1598            * @param companyId the primary key of the web content article's company
1599            * @param version the web content article's version
1600            * @param status the web content article's workflow status. For more
1601            information see {@link WorkflowConstants} for constants starting
1602            with the "STATUS_" prefix.
1603            * @param start the lower bound of the range of web content articles to
1604            return
1605            * @param end the upper bound of the range of web content articles to
1606            return (not inclusive)
1607            * @return the number of matching web content articles
1608            * @throws SystemException if a system exception occurred
1609            */
1610            public static int getCompanyArticlesCount(long companyId, double version,
1611                    int status, int start, int end)
1612                    throws com.liferay.portal.kernel.exception.SystemException {
1613                    return getService()
1614                                       .getCompanyArticlesCount(companyId, version, status, start,
1615                            end);
1616            }
1617    
1618            /**
1619            * Returns the number of web content articles matching the company and
1620            * workflow status.
1621            *
1622            * @param companyId the primary key of the web content article's company
1623            * @param status the web content article's workflow status. For more
1624            information see {@link WorkflowConstants} for constants starting
1625            with the "STATUS_" prefix.
1626            * @return the number of matching web content articles
1627            * @throws SystemException if a system exception occurred
1628            */
1629            public static int getCompanyArticlesCount(long companyId, int status)
1630                    throws com.liferay.portal.kernel.exception.SystemException {
1631                    return getService().getCompanyArticlesCount(companyId, status);
1632            }
1633    
1634            /**
1635            * Returns the matching web content article currently displayed or next to
1636            * be displayed if no article is currently displayed.
1637            *
1638            * @param groupId the primary key of the web content article's group
1639            * @param articleId the primary key of the web content article
1640            * @return the matching web content article currently displayed, or the next
1641            one to be displayed if no version of the article is currently
1642            displayed
1643            * @throws PortalException if no approved matching web content articles
1644            could be found
1645            * @throws SystemException if a system exception occurred
1646            */
1647            public static com.liferay.portlet.journal.model.JournalArticle getDisplayArticle(
1648                    long groupId, java.lang.String articleId)
1649                    throws com.liferay.portal.kernel.exception.PortalException,
1650                            com.liferay.portal.kernel.exception.SystemException {
1651                    return getService().getDisplayArticle(groupId, articleId);
1652            }
1653    
1654            /**
1655            * Returns the web content article matching the URL title that is currently
1656            * displayed or next to be displayed if no article is currently displayed.
1657            *
1658            * @param groupId the primary key of the web content article's group
1659            * @param urlTitle the web content article's accessible URL title
1660            * @return the web content article matching the URL title that is currently
1661            displayed, or next one to be displayed if no version of the
1662            article is currently displayed
1663            * @throws PortalException if no approved matching web content articles
1664            could be found
1665            * @throws SystemException if a system exception occurred
1666            */
1667            public static com.liferay.portlet.journal.model.JournalArticle getDisplayArticleByUrlTitle(
1668                    long groupId, java.lang.String urlTitle)
1669                    throws com.liferay.portal.kernel.exception.PortalException,
1670                            com.liferay.portal.kernel.exception.SystemException {
1671                    return getService().getDisplayArticleByUrlTitle(groupId, urlTitle);
1672            }
1673    
1674            /**
1675            * Returns the latest web content article matching the resource primary key,
1676            * preferring articles with approved workflow status.
1677            *
1678            * @param resourcePrimKey the primary key of the resource instance
1679            * @return the latest web content article matching the resource primary key,
1680            preferring articles with approved workflow status
1681            * @throws PortalException if a matching web content article could not be
1682            found
1683            * @throws SystemException if a system exception occurred
1684            */
1685            public static com.liferay.portlet.journal.model.JournalArticle getLatestArticle(
1686                    long resourcePrimKey)
1687                    throws com.liferay.portal.kernel.exception.PortalException,
1688                            com.liferay.portal.kernel.exception.SystemException {
1689                    return getService().getLatestArticle(resourcePrimKey);
1690            }
1691    
1692            /**
1693            * Returns the latest web content article matching the resource primary key
1694            * and workflow status, preferring articles with approved workflow status.
1695            *
1696            * @param resourcePrimKey the primary key of the resource instance
1697            * @param status the web content article's workflow status. For more
1698            information see {@link WorkflowConstants} for constants starting
1699            with the "STATUS_" prefix.
1700            * @return the latest web content article matching the resource primary key
1701            and workflow status, preferring articles with approved workflow
1702            status
1703            * @throws PortalException if a matching web content article could not be
1704            found
1705            * @throws SystemException if a system exception occurred
1706            */
1707            public static com.liferay.portlet.journal.model.JournalArticle getLatestArticle(
1708                    long resourcePrimKey, int status)
1709                    throws com.liferay.portal.kernel.exception.PortalException,
1710                            com.liferay.portal.kernel.exception.SystemException {
1711                    return getService().getLatestArticle(resourcePrimKey, status);
1712            }
1713    
1714            /**
1715            * Returns the latest web content article matching the resource primary key
1716            * and workflow status, optionally preferring articles with approved
1717            * workflow status.
1718            *
1719            * @param resourcePrimKey the primary key of the resource instance
1720            * @param status the web content article's workflow status. For more
1721            information see {@link WorkflowConstants} for constants starting
1722            with the "STATUS_" prefix.
1723            * @param preferApproved whether to prefer returning the latest matching
1724            article that has workflow status {@link
1725            WorkflowConstants#STATUS_APPROVED} over returning one that has a
1726            different status
1727            * @return the latest web content article matching the resource primary key
1728            and workflow status, optionally preferring articles with approved
1729            workflow status
1730            * @throws PortalException if a matching web content article could not be
1731            found
1732            * @throws SystemException if a system exception occurred
1733            */
1734            public static com.liferay.portlet.journal.model.JournalArticle getLatestArticle(
1735                    long resourcePrimKey, int status, boolean preferApproved)
1736                    throws com.liferay.portal.kernel.exception.PortalException,
1737                            com.liferay.portal.kernel.exception.SystemException {
1738                    return getService()
1739                                       .getLatestArticle(resourcePrimKey, status, preferApproved);
1740            }
1741    
1742            /**
1743            * Returns the latest web content article with the group and article ID.
1744            *
1745            * @param groupId the primary key of the web content article's group
1746            * @param articleId the primary key of the web content article
1747            * @return the latest matching web content article
1748            * @throws PortalException if a matching web content article could not be
1749            found
1750            * @throws SystemException if a system exception occurred
1751            */
1752            public static com.liferay.portlet.journal.model.JournalArticle getLatestArticle(
1753                    long groupId, java.lang.String articleId)
1754                    throws com.liferay.portal.kernel.exception.PortalException,
1755                            com.liferay.portal.kernel.exception.SystemException {
1756                    return getService().getLatestArticle(groupId, articleId);
1757            }
1758    
1759            /**
1760            * Returns the latest web content article matching the group, article ID,
1761            * and workflow status.
1762            *
1763            * @param groupId the primary key of the web content article's group
1764            * @param articleId the primary key of the web content article
1765            * @param status the web content article's workflow status. For more
1766            information see {@link WorkflowConstants} for constants starting
1767            with the "STATUS_" prefix.
1768            * @return the latest matching web content article
1769            * @throws PortalException if a matching web content article could not be
1770            found
1771            * @throws SystemException if a system exception occurred
1772            */
1773            public static com.liferay.portlet.journal.model.JournalArticle getLatestArticle(
1774                    long groupId, java.lang.String articleId, int status)
1775                    throws com.liferay.portal.kernel.exception.PortalException,
1776                            com.liferay.portal.kernel.exception.SystemException {
1777                    return getService().getLatestArticle(groupId, articleId, status);
1778            }
1779    
1780            /**
1781            * Returns the latest web content article matching the group, class name ID,
1782            * and class PK.
1783            *
1784            * @param groupId the primary key of the web content article's group
1785            * @param className the DDMStructure class name if the web content article
1786            is related to a DDM structure, the class name associated with the
1787            article, or {@link JournalArticleConstants#CLASSNAME_ID_DEFAULT}
1788            otherwise
1789            * @param classPK the primary key of the DDM structure, if the DDMStructure
1790            class name is given as the <code>className</code> parameter, the
1791            primary key of the class associated with the web content article,
1792            or <code>0</code> otherwise
1793            * @return the latest matching web content article
1794            * @throws PortalException if a matching web content article could not be
1795            found
1796            * @throws SystemException if a system exception occurred
1797            */
1798            public static com.liferay.portlet.journal.model.JournalArticle getLatestArticle(
1799                    long groupId, java.lang.String className, long classPK)
1800                    throws com.liferay.portal.kernel.exception.PortalException,
1801                            com.liferay.portal.kernel.exception.SystemException {
1802                    return getService().getLatestArticle(groupId, className, classPK);
1803            }
1804    
1805            /**
1806            * Returns the latest web content article matching the group, URL title, and
1807            * workflow status.
1808            *
1809            * @param groupId the primary key of the web content article's group
1810            * @param urlTitle the web content article's accessible URL title
1811            * @param status the web content article's workflow status. For more
1812            information see {@link WorkflowConstants} for constants starting
1813            with the "STATUS_" prefix.
1814            * @return the latest matching web content article
1815            * @throws PortalException if a matching web content article could not be
1816            found
1817            * @throws SystemException if a system exception occurred
1818            */
1819            public static com.liferay.portlet.journal.model.JournalArticle getLatestArticleByUrlTitle(
1820                    long groupId, java.lang.String urlTitle, int status)
1821                    throws com.liferay.portal.kernel.exception.PortalException,
1822                            com.liferay.portal.kernel.exception.SystemException {
1823                    return getService().getLatestArticleByUrlTitle(groupId, urlTitle, status);
1824            }
1825    
1826            /**
1827            * Returns the latest version number of the web content with the group and
1828            * article ID.
1829            *
1830            * @param groupId the primary key of the web content article's group
1831            * @param articleId the primary key of the web content article
1832            * @return the latest version number of the matching web content
1833            * @throws PortalException if a matching web content article could not be
1834            found
1835            * @throws SystemException if a system exception occurred
1836            */
1837            public static double getLatestVersion(long groupId,
1838                    java.lang.String articleId)
1839                    throws com.liferay.portal.kernel.exception.PortalException,
1840                            com.liferay.portal.kernel.exception.SystemException {
1841                    return getService().getLatestVersion(groupId, articleId);
1842            }
1843    
1844            /**
1845            * Returns the latest version number of the web content with the group,
1846            * article ID, and workflow status.
1847            *
1848            * @param groupId the primary key of the web content article's group
1849            * @param articleId the primary key of the web content article
1850            * @param status the web content article's workflow status. For more
1851            information see {@link WorkflowConstants} for constants starting
1852            with the "STATUS_" prefix.
1853            * @return the latest version number of the matching web content
1854            * @throws PortalException if a matching web content article could not be
1855            found
1856            * @throws SystemException if a system exception occurred
1857            */
1858            public static double getLatestVersion(long groupId,
1859                    java.lang.String articleId, int status)
1860                    throws com.liferay.portal.kernel.exception.PortalException,
1861                            com.liferay.portal.kernel.exception.SystemException {
1862                    return getService().getLatestVersion(groupId, articleId, status);
1863            }
1864    
1865            /**
1866            * Returns the number of web content articles that are not recycled.
1867            *
1868            * @param groupId the primary key of the web content article's group
1869            * @param folderId the primary key of the web content article folder
1870            * @return the number of web content articles that are not recycled
1871            * @throws SystemException if a system exception occurred
1872            */
1873            public static int getNotInTrashArticlesCount(long groupId, long folderId)
1874                    throws com.liferay.portal.kernel.exception.SystemException {
1875                    return getService().getNotInTrashArticlesCount(groupId, folderId);
1876            }
1877    
1878            /**
1879            * Returns the web content articles matching the group and DDM structure
1880            * key.
1881            *
1882            * @param groupId the primary key of the web content article's group
1883            * @param ddmStructureKey the primary key of the web content article's DDM
1884            structure
1885            * @return the matching web content articles
1886            * @throws SystemException if a system exception occurred
1887            */
1888            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getStructureArticles(
1889                    long groupId, java.lang.String ddmStructureKey)
1890                    throws com.liferay.portal.kernel.exception.SystemException {
1891                    return getService().getStructureArticles(groupId, ddmStructureKey);
1892            }
1893    
1894            /**
1895            * Returns an ordered range of all the web content articles matching the
1896            * group and DDM structure key.
1897            *
1898            * <p>
1899            * Useful when paginating results. Returns a maximum of <code>end -
1900            * start</code> instances. <code>start</code> and <code>end</code> are not
1901            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1902            * refers to the first result in the set. Setting both <code>start</code>
1903            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1904            * result set.
1905            * </p>
1906            *
1907            * @param groupId the primary key of the web content article's group
1908            * @param ddmStructureKey the primary key of the web content article's DDM
1909            structure
1910            * @param start the lower bound of the range of web content articles to
1911            return
1912            * @param end the upper bound of the range of web content articles to
1913            return (not inclusive)
1914            * @param obc the comparator to order the web content articles
1915            * @return the range of matching web content articles ordered by the
1916            comparator
1917            * @throws SystemException if a system exception occurred
1918            */
1919            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getStructureArticles(
1920                    long groupId, java.lang.String ddmStructureKey, int start, int end,
1921                    com.liferay.portal.kernel.util.OrderByComparator obc)
1922                    throws com.liferay.portal.kernel.exception.SystemException {
1923                    return getService()
1924                                       .getStructureArticles(groupId, ddmStructureKey, start, end,
1925                            obc);
1926            }
1927    
1928            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getStructureArticles(
1929                    java.lang.String[] ddmStructureKeys)
1930                    throws com.liferay.portal.kernel.exception.SystemException {
1931                    return getService().getStructureArticles(ddmStructureKeys);
1932            }
1933    
1934            /**
1935            * Returns the number of web content articles matching the group and DDM
1936            * structure key.
1937            *
1938            * @param groupId the primary key of the web content article's group
1939            * @param ddmStructureKey the primary key of the web content article's DDM
1940            structure
1941            * @return the number of matching web content articles
1942            * @throws SystemException if a system exception occurred
1943            */
1944            public static int getStructureArticlesCount(long groupId,
1945                    java.lang.String ddmStructureKey)
1946                    throws com.liferay.portal.kernel.exception.SystemException {
1947                    return getService().getStructureArticlesCount(groupId, ddmStructureKey);
1948            }
1949    
1950            /**
1951            * Returns the web content articles matching the group and DDM template key.
1952            *
1953            * @param groupId the primary key of the web content article's group
1954            * @param ddmTemplateKey the primary key of the web content article's DDM
1955            template (optionally <code>null</code>). If the article is
1956            related to a DDM structure, the template's structure must match
1957            it.
1958            * @return the matching web content articles
1959            * @throws SystemException if a system exception occurred
1960            */
1961            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getTemplateArticles(
1962                    long groupId, java.lang.String ddmTemplateKey)
1963                    throws com.liferay.portal.kernel.exception.SystemException {
1964                    return getService().getTemplateArticles(groupId, ddmTemplateKey);
1965            }
1966    
1967            /**
1968            * Returns an ordered range of all the web content articles matching the
1969            * group and DDM template key.
1970            *
1971            * <p>
1972            * Useful when paginating results. Returns a maximum of <code>end -
1973            * start</code> instances. <code>start</code> and <code>end</code> are not
1974            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1975            * refers to the first result in the set. Setting both <code>start</code>
1976            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1977            * result set.
1978            * </p>
1979            *
1980            * @param groupId the primary key of the web content article's group
1981            * @param ddmTemplateKey the primary key of the web content article's DDM
1982            template (optionally <code>null</code>). If the article is
1983            related to a DDM structure, the template's structure must match
1984            it.
1985            * @param start the lower bound of the range of web content articles to
1986            return
1987            * @param end the upper bound of the range of web content articles to
1988            return (not inclusive)
1989            * @param obc the comparator to order the web content articles
1990            * @return the range of matching web content articles ordered by the
1991            comparator
1992            * @throws SystemException if a system exception occurred
1993            */
1994            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getTemplateArticles(
1995                    long groupId, java.lang.String ddmTemplateKey, int start, int end,
1996                    com.liferay.portal.kernel.util.OrderByComparator obc)
1997                    throws com.liferay.portal.kernel.exception.SystemException {
1998                    return getService()
1999                                       .getTemplateArticles(groupId, ddmTemplateKey, start, end, obc);
2000            }
2001    
2002            /**
2003            * Returns the number of web content articles matching the group and DDM
2004            * template key.
2005            *
2006            * @param groupId the primary key of the web content article's group
2007            * @param ddmTemplateKey the primary key of the web content article's DDM
2008            template (optionally <code>null</code>). If the article is
2009            related to a DDM structure, the template's structure must match
2010            it.
2011            * @return the number of matching web content articles
2012            * @throws SystemException if a system exception occurred
2013            */
2014            public static int getTemplateArticlesCount(long groupId,
2015                    java.lang.String ddmTemplateKey)
2016                    throws com.liferay.portal.kernel.exception.SystemException {
2017                    return getService().getTemplateArticlesCount(groupId, ddmTemplateKey);
2018            }
2019    
2020            /**
2021            * Returns <code>true</code> if the specified web content article exists.
2022            *
2023            * @param groupId the primary key of the group
2024            * @param articleId the primary key of the web content article
2025            * @return <code>true</code> if the specified web content article exists;
2026            <code>false</code> otherwise
2027            * @throws SystemException if a system exception occurred
2028            */
2029            public static boolean hasArticle(long groupId, java.lang.String articleId)
2030                    throws com.liferay.portal.kernel.exception.SystemException {
2031                    return getService().hasArticle(groupId, articleId);
2032            }
2033    
2034            /**
2035            * Returns <code>true</code> if the web content article, specified by group
2036            * and article ID, is the latest version.
2037            *
2038            * @param groupId the primary key of the web content article's group
2039            * @param articleId the primary key of the web content article
2040            * @param version the web content article's version
2041            * @return <code>true</code> if the specified web content article is the
2042            latest version; <code>false</code> otherwise
2043            * @throws PortalException if a matching web content article could not be
2044            found
2045            * @throws SystemException if a system exception occurred
2046            */
2047            public static boolean isLatestVersion(long groupId,
2048                    java.lang.String articleId, double version)
2049                    throws com.liferay.portal.kernel.exception.PortalException,
2050                            com.liferay.portal.kernel.exception.SystemException {
2051                    return getService().isLatestVersion(groupId, articleId, version);
2052            }
2053    
2054            /**
2055            * Returns <code>true</code> if the web content article, specified by group,
2056            * article ID, and workflow status, is the latest version.
2057            *
2058            * @param groupId the primary key of the web content article's group
2059            * @param articleId the primary key of the web content article
2060            * @param version the web content article's version
2061            * @param status the web content article's workflow status. For more
2062            information see {@link WorkflowConstants} for constants starting
2063            with the "STATUS_" prefix.
2064            * @return <code>true</code> if the specified web content article is the
2065            latest version; <code>false</code> otherwise
2066            * @throws PortalException if a matching web content article could not be
2067            found
2068            * @throws SystemException if a system exception occurred
2069            */
2070            public static boolean isLatestVersion(long groupId,
2071                    java.lang.String articleId, double version, int status)
2072                    throws com.liferay.portal.kernel.exception.PortalException,
2073                            com.liferay.portal.kernel.exception.SystemException {
2074                    return getService().isLatestVersion(groupId, articleId, version, status);
2075            }
2076    
2077            /**
2078            * Moves the web content article matching the group and article ID to a new
2079            * folder.
2080            *
2081            * @param groupId the primary key of the web content article's group
2082            * @param articleId the primary key of the web content article
2083            * @param newFolderId the primary key of the web content article's new
2084            folder
2085            * @return the updated web content article, which was moved to a new folder
2086            * @throws PortalException if a matching web content article could not be
2087            found
2088            * @throws SystemException if a system exception occurred
2089            */
2090            public static com.liferay.portlet.journal.model.JournalArticle moveArticle(
2091                    long groupId, java.lang.String articleId, long newFolderId)
2092                    throws com.liferay.portal.kernel.exception.PortalException,
2093                            com.liferay.portal.kernel.exception.SystemException {
2094                    return getService().moveArticle(groupId, articleId, newFolderId);
2095            }
2096    
2097            /**
2098            * Moves the web content article from the Recycle Bin to a new folder.
2099            *
2100            * @param userId the primary key of the user updating the web content
2101            article
2102            * @param groupId the primary key of the web content article's group
2103            * @param article the web content article
2104            * @param newFolderId the primary key of the web content article's new
2105            folder
2106            * @param serviceContext the service context to be applied. Can set the
2107            modification date, portlet preferences, and can set whether to
2108            add the default command update for the web content article. With
2109            respect to social activities, by setting the service context's
2110            command to {@link
2111            com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation
2112            is considered a web content update activity; otherwise it is
2113            considered a web content add activity.
2114            * @return the updated web content article, which was moved from the Recycle
2115            Bin to a new folder
2116            * @throws PortalException if a trashed web content article with the primary
2117            key could not be found or if a portal exception occurred
2118            * @throws SystemException if a system exception occurred
2119            */
2120            public static com.liferay.portlet.journal.model.JournalArticle moveArticleFromTrash(
2121                    long userId, long groupId,
2122                    com.liferay.portlet.journal.model.JournalArticle article,
2123                    long newFolderId,
2124                    com.liferay.portal.service.ServiceContext serviceContext)
2125                    throws com.liferay.portal.kernel.exception.PortalException,
2126                            com.liferay.portal.kernel.exception.SystemException {
2127                    return getService()
2128                                       .moveArticleFromTrash(userId, groupId, article, newFolderId,
2129                            serviceContext);
2130            }
2131    
2132            /**
2133            * Moves the latest version of the web content article matching the group
2134            * and article ID to the recycle bin.
2135            *
2136            * @param userId the primary key of the user updating the web content
2137            article
2138            * @param article the web content article
2139            * @return the updated web content article, which was moved to the Recycle
2140            Bin
2141            * @throws PortalException if the user did not have permission to move the
2142            article to the Recycle Bin or if a portal exception occurred
2143            * @throws SystemException if a system exception occurred
2144            */
2145            public static com.liferay.portlet.journal.model.JournalArticle moveArticleToTrash(
2146                    long userId, com.liferay.portlet.journal.model.JournalArticle article)
2147                    throws com.liferay.portal.kernel.exception.PortalException,
2148                            com.liferay.portal.kernel.exception.SystemException {
2149                    return getService().moveArticleToTrash(userId, article);
2150            }
2151    
2152            /**
2153            * Moves the latest version of the web content article matching the group
2154            * and article ID to the recycle bin.
2155            *
2156            * @param userId the primary key of the user updating the web content
2157            article
2158            * @param groupId the primary key of the web content article's group
2159            * @param articleId the primary key of the web content article
2160            * @return the moved web content article or <code>null</code> if no matching
2161            article was found
2162            * @throws PortalException if the user did not have permission to move the
2163            article to the Recycle Bin or if a portal exception occurred
2164            * @throws SystemException if a system exception occurred
2165            */
2166            public static com.liferay.portlet.journal.model.JournalArticle moveArticleToTrash(
2167                    long userId, long groupId, java.lang.String articleId)
2168                    throws com.liferay.portal.kernel.exception.PortalException,
2169                            com.liferay.portal.kernel.exception.SystemException {
2170                    return getService().moveArticleToTrash(userId, groupId, articleId);
2171            }
2172    
2173            /**
2174            * Removes the web content of the web content article matching the group,
2175            * article ID, and version, and language.
2176            *
2177            * @param groupId the primary key of the web content article's group
2178            * @param articleId the primary key of the web content article
2179            * @param version the web content article's version
2180            * @param languageId the primary key of the language locale to remove
2181            * @return the updated web content article with the locale removed
2182            * @throws PortalException if a matching web content article could not be
2183            found
2184            * @throws SystemException if a system exception occurred
2185            */
2186            public static com.liferay.portlet.journal.model.JournalArticle removeArticleLocale(
2187                    long groupId, java.lang.String articleId, double version,
2188                    java.lang.String languageId)
2189                    throws com.liferay.portal.kernel.exception.PortalException,
2190                            com.liferay.portal.kernel.exception.SystemException {
2191                    return getService()
2192                                       .removeArticleLocale(groupId, articleId, version, languageId);
2193            }
2194    
2195            /**
2196            * Restores the web content article from the Recycle Bin.
2197            *
2198            * @param userId the primary key of the user restoring the web content
2199            article
2200            * @param article the web content article
2201            * @throws PortalException if the web content article with the primary key
2202            could not be found in the Recycle Bin, if the user did not have
2203            permission to restore the article, or if a portal exception
2204            occurred
2205            * @throws SystemException if a system exception occurred
2206            */
2207            public static void restoreArticleFromTrash(long userId,
2208                    com.liferay.portlet.journal.model.JournalArticle article)
2209                    throws com.liferay.portal.kernel.exception.PortalException,
2210                            com.liferay.portal.kernel.exception.SystemException {
2211                    getService().restoreArticleFromTrash(userId, article);
2212            }
2213    
2214            /**
2215            * Returns an ordered range of all the web content articles matching the
2216            * parameters without using the indexer, including a keywords parameter for
2217            * matching with the article's ID, title, description, and content, a DDM
2218            * structure key parameter, and a DDM template key parameter. It is
2219            * preferable to use the indexed version {@link #search(long, long, List,
2220            * long, String, String, String, LinkedHashMap, int, int, Sort)} instead of
2221            * this method wherever possible for performance reasons.
2222            *
2223            * <p>
2224            * Useful when paginating results. Returns a maximum of <code>end -
2225            * start</code> instances. <code>start</code> and <code>end</code> are not
2226            * primary keys, they are indexes in the result set. Thus, <code>0</code>
2227            * refers to the first result in the set. Setting both <code>start</code>
2228            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
2229            * result set.
2230            * </p>
2231            *
2232            * @param companyId the primary key of the web content article's company
2233            * @param groupId the primary key of the group (optionally <code>0</code>)
2234            * @param folderIds the primary keys of the web content article folders
2235            (optionally {@link java.util.Collections#EMPTY_LIST})
2236            * @param classNameId the primary key of the DDMStructure class if the web
2237            content article is related to a DDM structure, the primary key of
2238            the class name associated with the article, or {@link
2239            JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise
2240            * @param keywords the keywords (space separated), which may occur in the
2241            web content article ID, title, description, or content
2242            (optionally <code>null</code>). If the keywords value is not
2243            <code>null</code>, the search uses the OR operator in connecting
2244            query criteria; otherwise it uses the AND operator.
2245            * @param version the web content article's version (optionally
2246            <code>null</code>)
2247            * @param type the web content article's type (optionally
2248            <code>null</code>)
2249            * @param ddmStructureKey the primary key of the web content article's DDM
2250            structure, if the article is related to a DDM structure, or
2251            <code>null</code> otherwise
2252            * @param ddmTemplateKey the primary key of the web content article's DDM
2253            template (optionally <code>null</code>). If the article is
2254            related to a DDM structure, the template's structure must match
2255            it.
2256            * @param displayDateGT the date after which a matching web content
2257            article's display date must be after (optionally
2258            <code>null</code>)
2259            * @param displayDateLT the date before which a matching web content
2260            article's display date must be before (optionally
2261            <code>null</code>)
2262            * @param status the web content article's workflow status. For more
2263            information see {@link WorkflowConstants} for constants starting
2264            with the "STATUS_" prefix.
2265            * @param reviewDate the web content article's scheduled review date
2266            (optionally <code>null</code>)
2267            * @param start the lower bound of the range of web content articles to
2268            return
2269            * @param end the upper bound of the range of web content articles to
2270            return (not inclusive)
2271            * @param obc the comparator to order the web content articles
2272            * @return the range of matching web content articles ordered by the
2273            comparator
2274            * @throws SystemException if a system exception occurred
2275            */
2276            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> search(
2277                    long companyId, long groupId, java.util.List<java.lang.Long> folderIds,
2278                    long classNameId, java.lang.String keywords, java.lang.Double version,
2279                    java.lang.String type, java.lang.String ddmStructureKey,
2280                    java.lang.String ddmTemplateKey, java.util.Date displayDateGT,
2281                    java.util.Date displayDateLT, int status, java.util.Date reviewDate,
2282                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
2283                    throws com.liferay.portal.kernel.exception.SystemException {
2284                    return getService()
2285                                       .search(companyId, groupId, folderIds, classNameId,
2286                            keywords, version, type, ddmStructureKey, ddmTemplateKey,
2287                            displayDateGT, displayDateLT, status, reviewDate, start, end, obc);
2288            }
2289    
2290            /**
2291            * Returns an ordered range of all the web content articles matching the
2292            * parameters without using the indexer, including keyword parameters for
2293            * article ID, title, description, and content, a DDM structure key
2294            * parameter, a DDM template key parameter, and an AND operator switch. It
2295            * is preferable to use the indexed version {@link #search(long, long, List,
2296            * long, String, String, String, String, String, String, String, String,
2297            * LinkedHashMap, boolean, int, int, Sort)} instead of this method wherever
2298            * possible for performance reasons.
2299            *
2300            * <p>
2301            * Useful when paginating results. Returns a maximum of <code>end -
2302            * start</code> instances. <code>start</code> and <code>end</code> are not
2303            * primary keys, they are indexes in the result set. Thus, <code>0</code>
2304            * refers to the first result in the set. Setting both <code>start</code>
2305            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
2306            * result set.
2307            * </p>
2308            *
2309            * @param companyId the primary key of the web content article's company
2310            * @param groupId the primary key of the group (optionally <code>0</code>)
2311            * @param folderIds the primary keys of the web content article folders
2312            (optionally {@link java.util.Collections#EMPTY_LIST})
2313            * @param classNameId the primary key of the DDMStructure class if the web
2314            content article is related to a DDM structure, the primary key of
2315            the class name associated with the article, or {@link
2316            JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise
2317            * @param articleId the article ID keywords (space separated, optionally
2318            <code>null</code>)
2319            * @param version the web content article's version (optionally
2320            <code>null</code>)
2321            * @param title the title keywords (space separated, optionally
2322            <code>null</code>)
2323            * @param description the description keywords (space separated, optionally
2324            <code>null</code>)
2325            * @param content the content keywords (space separated, optionally
2326            <code>null</code>)
2327            * @param type the web content article's type (optionally
2328            <code>null</code>)
2329            * @param ddmStructureKey the primary key of the web content article's DDM
2330            structure, if the article is related to a DDM structure, or
2331            <code>null</code> otherwise
2332            * @param ddmTemplateKey the primary key of the web content article's DDM
2333            template (optionally <code>null</code>). If the article is
2334            related to a DDM structure, the template's structure must match
2335            it.
2336            * @param displayDateGT the date after which a matching web content
2337            article's display date must be after (optionally
2338            <code>null</code>)
2339            * @param displayDateLT the date before which a matching web content
2340            article's display date must be before (optionally
2341            <code>null</code>)
2342            * @param status the web content article's workflow status. For more
2343            information see {@link WorkflowConstants} for constants starting
2344            with the "STATUS_" prefix.
2345            * @param reviewDate the web content article's scheduled review date
2346            (optionally <code>null</code>)
2347            * @param andOperator whether every field must match its value or keywords,
2348            or just one field must match. Company, group, folder IDs, class
2349            name ID, and status must all match their values.
2350            * @param start the lower bound of the range of web content articles to
2351            return
2352            * @param end the upper bound of the range of web content articles to
2353            return (not inclusive)
2354            * @param obc the comparator to order the web content articles
2355            * @return the range of matching web content articles ordered by the
2356            comparator
2357            * @throws SystemException if a system exception occurred
2358            */
2359            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> search(
2360                    long companyId, long groupId, java.util.List<java.lang.Long> folderIds,
2361                    long classNameId, java.lang.String articleId, java.lang.Double version,
2362                    java.lang.String title, java.lang.String description,
2363                    java.lang.String content, java.lang.String type,
2364                    java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey,
2365                    java.util.Date displayDateGT, java.util.Date displayDateLT, int status,
2366                    java.util.Date reviewDate, boolean andOperator, int start, int end,
2367                    com.liferay.portal.kernel.util.OrderByComparator obc)
2368                    throws com.liferay.portal.kernel.exception.SystemException {
2369                    return getService()
2370                                       .search(companyId, groupId, folderIds, classNameId,
2371                            articleId, version, title, description, content, type,
2372                            ddmStructureKey, ddmTemplateKey, displayDateGT, displayDateLT,
2373                            status, reviewDate, andOperator, start, end, obc);
2374            }
2375    
2376            /**
2377            * Returns an ordered range of all the web content articles matching the
2378            * parameters without using the indexer, including keyword parameters for
2379            * article ID, title, description, and content, a DDM structure keys
2380            * (plural) parameter, a DDM template keys (plural) parameter, and an AND
2381            * operator switch.
2382            *
2383            * <p>
2384            * Useful when paginating results. Returns a maximum of <code>end -
2385            * start</code> instances. <code>start</code> and <code>end</code> are not
2386            * primary keys, they are indexes in the result set. Thus, <code>0</code>
2387            * refers to the first result in the set. Setting both <code>start</code>
2388            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
2389            * result set.
2390            * </p>
2391            *
2392            * @param companyId the primary key of the web content article's company
2393            * @param groupId the primary key of the group (optionally <code>0</code>)
2394            * @param folderIds the primary keys of the web content article folders
2395            (optionally {@link java.util.Collections#EMPTY_LIST})
2396            * @param classNameId the primary key of the DDMStructure class if the web
2397            content article is related to a DDM structure, the primary key of
2398            the class name associated with the article, or {@link
2399            JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise
2400            * @param articleId the article ID keywords (space separated, optionally
2401            <code>null</code>)
2402            * @param version the web content article's version (optionally
2403            <code>null</code>)
2404            * @param title the title keywords (space separated, optionally
2405            <code>null</code>)
2406            * @param description the description keywords (space separated, optionally
2407            <code>null</code>)
2408            * @param content the content keywords (space separated, optionally
2409            <code>null</code>)
2410            * @param type the web content article's type (optionally
2411            <code>null</code>)
2412            * @param ddmStructureKeys the primary keys of the web content article's
2413            DDM structures, if the article is related to a DDM structure, or
2414            <code>null</code> otherwise
2415            * @param ddmTemplateKeys the primary keys of the web content article's DDM
2416            templates (originally <code>null</code>). If the articles are
2417            related to a DDM structure, the template's structure must match
2418            it.
2419            * @param displayDateGT the date after which a matching web content
2420            article's display date must be after (optionally
2421            <code>null</code>)
2422            * @param displayDateLT the date before which a matching web content
2423            article's display date must be before (optionally
2424            <code>null</code>)
2425            * @param status the web content article's workflow status. For more
2426            information see {@link WorkflowConstants} for constants starting
2427            with the "STATUS_" prefix.
2428            * @param reviewDate the web content article's scheduled review date
2429            (optionally <code>null</code>)
2430            * @param andOperator whether every field must match its value or keywords,
2431            or just one field must match.  Company, group, folder IDs, class
2432            name ID, and status must all match their values.
2433            * @param start the lower bound of the range of web content articles to
2434            return
2435            * @param end the upper bound of the range of web content articles to
2436            return (not inclusive)
2437            * @param obc the comparator to order the web content articles
2438            * @return the range of matching web content articles ordered by the
2439            comparator
2440            * @throws SystemException if a system exception occurred
2441            */
2442            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> search(
2443                    long companyId, long groupId, java.util.List<java.lang.Long> folderIds,
2444                    long classNameId, java.lang.String articleId, java.lang.Double version,
2445                    java.lang.String title, java.lang.String description,
2446                    java.lang.String content, java.lang.String type,
2447                    java.lang.String[] ddmStructureKeys,
2448                    java.lang.String[] ddmTemplateKeys, java.util.Date displayDateGT,
2449                    java.util.Date displayDateLT, int status, java.util.Date reviewDate,
2450                    boolean andOperator, int start, int end,
2451                    com.liferay.portal.kernel.util.OrderByComparator obc)
2452                    throws com.liferay.portal.kernel.exception.SystemException {
2453                    return getService()
2454                                       .search(companyId, groupId, folderIds, classNameId,
2455                            articleId, version, title, description, content, type,
2456                            ddmStructureKeys, ddmTemplateKeys, displayDateGT, displayDateLT,
2457                            status, reviewDate, andOperator, start, end, obc);
2458            }
2459    
2460            /**
2461            * Returns an ordered range of all the web content articles matching the
2462            * parameters using the indexer, including a keywords parameter for matching
2463            * an article's ID, title, description, or content, a DDM structure key
2464            * parameter, a DDM template key parameter, and a finder hash map parameter.
2465            * It is preferable to use this method instead of the non-indexed version
2466            * whenever possible for performance reasons.
2467            *
2468            * <p>
2469            * Useful when paginating results. Returns a maximum of <code>end -
2470            * start</code> instances. <code>start</code> and <code>end</code> are not
2471            * primary keys, they are indexes in the result set. Thus, <code>0</code>
2472            * refers to the first result in the set. Setting both <code>start</code>
2473            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
2474            * result set.
2475            * </p>
2476            *
2477            * @param companyId the primary key of the web content article's company
2478            * @param groupId the primary key of the group (optionally <code>0</code>)
2479            * @param folderIds the primary keys of the web content article folders
2480            (optionally {@link java.util.Collections#EMPTY_LIST})
2481            * @param classNameId the primary key of the DDMStructure class if the web
2482            content article is related to a DDM structure, the primary key of
2483            the class name associated with the article, or {@link
2484            JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise
2485            * @param ddmStructureKey the primary key of the web content article's DDM
2486            structure, if the article is related to a DDM structure, or
2487            <code>null</code> otherwise
2488            * @param ddmTemplateKey the primary key of the web content article's DDM
2489            template (optionally <code>null</code>). If the article is
2490            related to a DDM structure, the template's structure must match
2491            it.
2492            * @param keywords the keywords (space separated), which may occur in the
2493            web content article ID, title, description, or content
2494            (optionally <code>null</code>). If the keywords value is not
2495            <code>null</code>, the search uses the OR operator in connecting
2496            query criteria; otherwise it uses the AND operator.
2497            * @param params the finder parameters (optionally <code>null</code>)
2498            * @param start the lower bound of the range of web content articles to
2499            return
2500            * @param end the upper bound of the range of web content articles to
2501            return (not inclusive)
2502            * @param sort the field, type, and direction by which to sort (optionally
2503            <code>null</code>)
2504            * @return the matching web content articles ordered by <code>sort</code>
2505            * @throws SystemException if a system exception occurred
2506            */
2507            public static com.liferay.portal.kernel.search.Hits search(long companyId,
2508                    long groupId, java.util.List<java.lang.Long> folderIds,
2509                    long classNameId, java.lang.String ddmStructureKey,
2510                    java.lang.String ddmTemplateKey, java.lang.String keywords,
2511                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2512                    int start, int end, com.liferay.portal.kernel.search.Sort sort)
2513                    throws com.liferay.portal.kernel.exception.SystemException {
2514                    return getService()
2515                                       .search(companyId, groupId, folderIds, classNameId,
2516                            ddmStructureKey, ddmTemplateKey, keywords, params, start, end, sort);
2517            }
2518    
2519            /**
2520            * Returns an ordered range of all the web content articles matching the
2521            * parameters using the indexer, including a keywords parameter for matching
2522            * an article's ID, title, description, or content, a DDM structure key
2523            * parameter, a DDM template key parameter, an AND operator switch, and
2524            * parameters for type, status, a finder hash map. It is preferable to use
2525            * this method instead of the non-indexed version whenever possible for
2526            * performance reasons.
2527            *
2528            * <p>
2529            * Useful when paginating results. Returns a maximum of <code>end -
2530            * start</code> instances. <code>start</code> and <code>end</code> are not
2531            * primary keys, they are indexes in the result set. Thus, <code>0</code>
2532            * refers to the first result in the set. Setting both <code>start</code>
2533            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
2534            * result set.
2535            * </p>
2536            *
2537            * @param companyId the primary key of the web content article's company
2538            * @param groupId the primary key of the group (optionally <code>0</code>)
2539            * @param folderIds the primary keys of the web content article folders
2540            (optionally {@link java.util.Collections#EMPTY_LIST})
2541            * @param classNameId the primary key of the DDMStructure class if the web
2542            content article is related to a DDM structure, the primary key of
2543            the class name associated with the article, or {@link
2544            JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise
2545            * @param articleId the article ID keywords (space separated, optionally
2546            <code>null</code>)
2547            * @param title the title keywords (space separated, optionally
2548            <code>null</code>)
2549            * @param description the description keywords (space separated, optionally
2550            <code>null</code>)
2551            * @param content the content keywords (space separated, optionally
2552            <code>null</code>)
2553            * @param type the web content article's type (optionally
2554            <code>null</code>)
2555            * @param status the web content article's workflow status. For more
2556            information see {@link WorkflowConstants} for constants starting
2557            with the "STATUS_" prefix.
2558            * @param ddmStructureKey the primary key of the web content article's DDM
2559            structure, if the article is related to a DDM structure, or
2560            <code>null</code> otherwise
2561            * @param ddmTemplateKey the primary key of the web content article's DDM
2562            template (optionally <code>null</code>). If the article is
2563            related to a DDM structure, the template's structure must match
2564            it.
2565            * @param params the finder parameters (optionally <code>null</code>). Can
2566            set parameter <code>"includeDiscussions"</code> to
2567            <code>true</code> to search for the keywords in the web content
2568            article discussions.
2569            * @param andSearch whether every field must match its value or keywords,
2570            or just one field must match
2571            * @param start the lower bound of the range of web content articles to
2572            return
2573            * @param end the upper bound of the range of web content articles to
2574            return (not inclusive)
2575            * @param sort the field, type, and direction by which to sort (optionally
2576            <code>null</code>)
2577            * @return the matching web content articles ordered by <code>sort</code>
2578            * @throws SystemException if a system exception occurred
2579            */
2580            public static com.liferay.portal.kernel.search.Hits search(long companyId,
2581                    long groupId, java.util.List<java.lang.Long> folderIds,
2582                    long classNameId, java.lang.String articleId, java.lang.String title,
2583                    java.lang.String description, java.lang.String content,
2584                    java.lang.String type, java.lang.String status,
2585                    java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey,
2586                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2587                    boolean andSearch, int start, int end,
2588                    com.liferay.portal.kernel.search.Sort sort)
2589                    throws com.liferay.portal.kernel.exception.SystemException {
2590                    return getService()
2591                                       .search(companyId, groupId, folderIds, classNameId,
2592                            articleId, title, description, content, type, status,
2593                            ddmStructureKey, ddmTemplateKey, params, andSearch, start, end, sort);
2594            }
2595    
2596            /**
2597            * Returns the number of web content articles matching the parameters,
2598            * including a keywords parameter for matching with the article's ID, title,
2599            * description, and content, a DDM structure key parameter, and a DDM
2600            * template key parameter.
2601            *
2602            * @param companyId the primary key of the web content article's company
2603            * @param groupId the primary key of the group (optionally <code>0</code>)
2604            * @param folderIds the primary keys of the web content article folders
2605            (optionally {@link java.util.Collections#EMPTY_LIST})
2606            * @param classNameId the primary key of the DDMStructure class if the web
2607            content article is related to a DDM structure, the primary key of
2608            the class name associated with the article, or {@link
2609            JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise
2610            * @param keywords the keywords (space separated), which may occur in the
2611            web content article ID, title, description, or content
2612            (optionally <code>null</code>). If the keywords value is not
2613            <code>null</code>, the search uses the OR operator in connecting
2614            query criteria; otherwise it uses the AND operator.
2615            * @param version the web content article's version (optionally
2616            <code>null</code>)
2617            * @param type the web content article's type (optionally
2618            <code>null</code>)
2619            * @param ddmStructureKey the primary key of the web content article's DDM
2620            structure, if the article is related to a DDM structure, or
2621            <code>null</code> otherwise
2622            * @param ddmTemplateKey the primary key of the web content article's DDM
2623            template (optionally <code>null</code>). If the article is
2624            related to a DDM structure, the template's structure must match
2625            it.
2626            * @param displayDateGT the date after which a matching web content
2627            article's display date must be after (optionally
2628            <code>null</code>)
2629            * @param displayDateLT the date before which a matching web content
2630            article's display date must be before (optionally
2631            <code>null</code>)
2632            * @param status the web content article's workflow status. For more
2633            information see {@link WorkflowConstants} for constants starting
2634            with the "STATUS_" prefix.
2635            * @param reviewDate the web content article's scheduled review date
2636            (optionally <code>null</code>)
2637            * @return the number of matching web content articles
2638            * @throws SystemException if a system exception occurred
2639            */
2640            public static int searchCount(long companyId, long groupId,
2641                    java.util.List<java.lang.Long> folderIds, long classNameId,
2642                    java.lang.String keywords, java.lang.Double version,
2643                    java.lang.String type, java.lang.String ddmStructureKey,
2644                    java.lang.String ddmTemplateKey, java.util.Date displayDateGT,
2645                    java.util.Date displayDateLT, int status, java.util.Date reviewDate)
2646                    throws com.liferay.portal.kernel.exception.SystemException {
2647                    return getService()
2648                                       .searchCount(companyId, groupId, folderIds, classNameId,
2649                            keywords, version, type, ddmStructureKey, ddmTemplateKey,
2650                            displayDateGT, displayDateLT, status, reviewDate);
2651            }
2652    
2653            /**
2654            * Returns the number of web content articles matching the parameters,
2655            * including keyword parameters for article ID, title, description, and
2656            * content, a DDM structure key parameter, a DDM template key parameter, and
2657            * an AND operator switch.
2658            *
2659            * @param companyId the primary key of the web content article's company
2660            * @param groupId the primary key of the group (optionally <code>0</code>)
2661            * @param folderIds the primary keys of the web content article folders
2662            (optionally {@link java.util.Collections#EMPTY_LIST})
2663            * @param classNameId the primary key of the DDMStructure class if the web
2664            content article is related to a DDM structure, the primary key of
2665            the class name associated with the article, or {@link
2666            JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise
2667            * @param articleId the article ID keywords (space separated, optionally
2668            <code>null</code>)
2669            * @param version the web content article's version (optionally
2670            <code>null</code>)
2671            * @param title the title keywords (space separated, optionally
2672            <code>null</code>)
2673            * @param description the description keywords (space separated, optionally
2674            <code>null</code>)
2675            * @param content the content keywords (space separated, optionally
2676            <code>null</code>)
2677            * @param type the web content article's type (optionally
2678            <code>null</code>)
2679            * @param ddmStructureKey the primary key of the web content article's DDM
2680            structure, if the article is related to a DDM structure, or
2681            <code>null</code> otherwise
2682            * @param ddmTemplateKey the primary key of the web content article's DDM
2683            template (optionally <code>null</code>). If the article is
2684            related to a DDM structure, the template's structure must match
2685            it.
2686            * @param displayDateGT the date after which a matching web content
2687            article's display date must be after (optionally
2688            <code>null</code>)
2689            * @param displayDateLT the date before which a matching web content
2690            article's display date must be before (optionally
2691            <code>null</code>)
2692            * @param status the web content article's workflow status. For more
2693            information see {@link WorkflowConstants} for constants starting
2694            with the "STATUS_" prefix.
2695            * @param reviewDate the web content article's scheduled review date
2696            (optionally <code>null</code>)
2697            * @param andOperator whether every field must match its value or keywords,
2698            or just one field must match. Group, folder IDs, class name ID,
2699            and status must all match their values.
2700            * @return the number of matching web content articles
2701            * @throws SystemException if a system exception occurred
2702            */
2703            public static int searchCount(long companyId, long groupId,
2704                    java.util.List<java.lang.Long> folderIds, long classNameId,
2705                    java.lang.String articleId, java.lang.Double version,
2706                    java.lang.String title, java.lang.String description,
2707                    java.lang.String content, java.lang.String type,
2708                    java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey,
2709                    java.util.Date displayDateGT, java.util.Date displayDateLT, int status,
2710                    java.util.Date reviewDate, boolean andOperator)
2711                    throws com.liferay.portal.kernel.exception.SystemException {
2712                    return getService()
2713                                       .searchCount(companyId, groupId, folderIds, classNameId,
2714                            articleId, version, title, description, content, type,
2715                            ddmStructureKey, ddmTemplateKey, displayDateGT, displayDateLT,
2716                            status, reviewDate, andOperator);
2717            }
2718    
2719            /**
2720            * Returns the number of web content articles matching the parameters,
2721            * including keyword parameters for article ID, title, description, and
2722            * content, a DDM structure keys (plural) parameter, a DDM template keys
2723            * (plural) parameter, and an AND operator switch.
2724            *
2725            * @param companyId the primary key of the web content article's company
2726            * @param groupId the primary key of the group (optionally <code>0</code>)
2727            * @param folderIds the primary keys of the web content article folders
2728            (optionally {@link java.util.Collections#EMPTY_LIST})
2729            * @param classNameId the primary key of the DDMStructure class if the web
2730            content article is related to a DDM structure, the primary key of
2731            the class name associated with the article, or {@link
2732            JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise
2733            * @param articleId the article ID keywords (space separated, optionally
2734            <code>null</code>)
2735            * @param version the web content article's version (optionally
2736            <code>null</code>)
2737            * @param title the title keywords (space separated, optionally
2738            <code>null</code>)
2739            * @param description the description keywords (space separated, optionally
2740            <code>null</code>)
2741            * @param content the content keywords (space separated, optionally
2742            <code>null</code>)
2743            * @param type the web content article's type (optionally
2744            <code>null</code>)
2745            * @param ddmStructureKeys the primary keys of the web content article's
2746            DDM structures, if the article is related to a DDM structure, or
2747            <code>null</code> otherwise
2748            * @param ddmTemplateKeys the primary keys of the web content article's DDM
2749            templates (originally <code>null</code>). If the articles are
2750            related to a DDM structure, the template's structure must match
2751            it.
2752            * @param displayDateGT the date after which a matching web content
2753            article's display date must be after (optionally
2754            <code>null</code>)
2755            * @param displayDateLT the date before which a matching web content
2756            article's display date must be before (optionally
2757            <code>null</code>)
2758            * @param status the web content article's workflow status. For more
2759            information see {@link WorkflowConstants} for constants starting
2760            with the "STATUS_" prefix.
2761            * @param reviewDate the web content article's scheduled review date
2762            (optionally <code>null</code>)
2763            * @param andOperator whether every field must match its value or keywords,
2764            or just one field must match.  Group, folder IDs, class name ID,
2765            and status must all match their values.
2766            * @return the number of matching web content articles
2767            * @throws SystemException if a system exception occurred
2768            */
2769            public static int searchCount(long companyId, long groupId,
2770                    java.util.List<java.lang.Long> folderIds, long classNameId,
2771                    java.lang.String articleId, java.lang.Double version,
2772                    java.lang.String title, java.lang.String description,
2773                    java.lang.String content, java.lang.String type,
2774                    java.lang.String[] ddmStructureKeys,
2775                    java.lang.String[] ddmTemplateKeys, java.util.Date displayDateGT,
2776                    java.util.Date displayDateLT, int status, java.util.Date reviewDate,
2777                    boolean andOperator)
2778                    throws com.liferay.portal.kernel.exception.SystemException {
2779                    return getService()
2780                                       .searchCount(companyId, groupId, folderIds, classNameId,
2781                            articleId, version, title, description, content, type,
2782                            ddmStructureKeys, ddmTemplateKeys, displayDateGT, displayDateLT,
2783                            status, reviewDate, andOperator);
2784            }
2785    
2786            /**
2787            * Subscribes the user to notifications for the web content article matching
2788            * the group, notifying him the instant versions of the article are created,
2789            * deleted, or modified.
2790            *
2791            * @param userId the primary key of the user to subscribe
2792            * @param groupId the primary key of the group
2793            * @throws PortalException if a matching user or group could not be found
2794            * @throws SystemException if a system exception occurred
2795            */
2796            public static void subscribe(long userId, long groupId)
2797                    throws com.liferay.portal.kernel.exception.PortalException,
2798                            com.liferay.portal.kernel.exception.SystemException {
2799                    getService().subscribe(userId, groupId);
2800            }
2801    
2802            /**
2803            * Unsubscribes the user from notifications for the web content article
2804            * matching the group.
2805            *
2806            * @param userId the primary key of the user to unsubscribe
2807            * @param groupId the primary key of the group
2808            * @throws PortalException if a matching user or subscription could not be
2809            found
2810            * @throws SystemException if a system exception occurred
2811            */
2812            public static void unsubscribe(long userId, long groupId)
2813                    throws com.liferay.portal.kernel.exception.PortalException,
2814                            com.liferay.portal.kernel.exception.SystemException {
2815                    getService().unsubscribe(userId, groupId);
2816            }
2817    
2818            /**
2819            * Updates the web content article matching the version, replacing its
2820            * folder, title, description, content, and layout UUID.
2821            *
2822            * @param userId the primary key of the user updating the web content
2823            article
2824            * @param groupId the primary key of the web content article's group
2825            * @param folderId the primary key of the web content article folder
2826            * @param articleId the primary key of the web content article
2827            * @param version the web content article's version
2828            * @param titleMap the web content article's locales and localized titles
2829            * @param descriptionMap the web content article's locales and localized
2830            descriptions
2831            * @param content the HTML content wrapped in XML. For more information,
2832            see the content example in the class description for {@link
2833            JournalArticleLocalServiceImpl}.
2834            * @param layoutUuid the unique string identifying the web content
2835            article's display page
2836            * @param serviceContext the service context to be applied. Can set the
2837            modification date, expando bridge attributes, asset category IDs,
2838            asset tag names, asset link entry IDs, workflow actions, the
2839            "defaultLanguageId" and "urlTitle" attributes, and can set
2840            whether to add the default command update for the web content
2841            article. With respect to social activities, by setting the
2842            service context's command to {@link
2843            com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation
2844            is considered a web content update activity; otherwise it is
2845            considered a web content add activity.
2846            * @return the updated web content article
2847            * @throws PortalException if a user with the primary key or a matching web
2848            content article could not be found, or if a portal exception
2849            occurred
2850            * @throws SystemException if a system exception occurred
2851            */
2852            public static com.liferay.portlet.journal.model.JournalArticle updateArticle(
2853                    long userId, long groupId, long folderId, java.lang.String articleId,
2854                    double version,
2855                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
2856                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
2857                    java.lang.String content, java.lang.String layoutUuid,
2858                    com.liferay.portal.service.ServiceContext serviceContext)
2859                    throws com.liferay.portal.kernel.exception.PortalException,
2860                            com.liferay.portal.kernel.exception.SystemException {
2861                    return getService()
2862                                       .updateArticle(userId, groupId, folderId, articleId,
2863                            version, titleMap, descriptionMap, content, layoutUuid,
2864                            serviceContext);
2865            }
2866    
2867            /**
2868            * Updates the web content article with additional parameters.
2869            *
2870            * @param userId the primary key of the user updating the web content
2871            article
2872            * @param groupId the primary key of the web content article's group
2873            * @param folderId the primary key of the web content article folder
2874            * @param articleId the primary key of the web content article
2875            * @param version the web content article's version
2876            * @param titleMap the web content article's locales and localized titles
2877            * @param descriptionMap the web content article's locales and localized
2878            descriptions
2879            * @param content the HTML content wrapped in XML. For more information,
2880            see the content example in the class description for {@link
2881            JournalArticleLocalServiceImpl}.
2882            * @param type the structure's type, if the web content article is related
2883            to a DDM structure. For more information, see {@link
2884            com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}.
2885            * @param ddmStructureKey the primary key of the web content article's DDM
2886            structure, if the article is related to a DDM structure, or
2887            <code>null</code> otherwise
2888            * @param ddmTemplateKey the primary key of the web content article's DDM
2889            template (optionally <code>null</code>). If the article is
2890            related to a DDM structure, the template's structure must match
2891            it.
2892            * @param layoutUuid the unique string identifying the web content
2893            article's display page
2894            * @param displayDateMonth the month the web content article is set to
2895            display
2896            * @param displayDateDay the calendar day the web content article is set to
2897            display
2898            * @param displayDateYear the year the web content article is set to
2899            display
2900            * @param displayDateHour the hour the web content article is set to
2901            display
2902            * @param displayDateMinute the minute the web content article is set to
2903            display
2904            * @param expirationDateMonth the month the web content article is set to
2905            expire
2906            * @param expirationDateDay the calendar day the web content article is set
2907            to expire
2908            * @param expirationDateYear the year the web content article is set to
2909            expire
2910            * @param expirationDateHour the hour the web content article is set to
2911            expire
2912            * @param expirationDateMinute the minute the web content article is set to
2913            expire
2914            * @param neverExpire whether the web content article is not set to auto
2915            expire
2916            * @param reviewDateMonth the month the web content article is set for
2917            review
2918            * @param reviewDateDay the calendar day the web content article is set for
2919            review
2920            * @param reviewDateYear the year the web content article is set for review
2921            * @param reviewDateHour the hour the web content article is set for review
2922            * @param reviewDateMinute the minute the web content article is set for
2923            review
2924            * @param neverReview whether the web content article is not set for review
2925            * @param indexable whether the web content is searchable
2926            * @param smallImage whether to update web content article's a small image.
2927            A file must be passed in as <code>smallImageFile</code> value,
2928            otherwise the current small image is deleted.
2929            * @param smallImageURL the web content article's small image URL
2930            (optionally <code>null</code>)
2931            * @param smallImageFile the web content article's new small image file
2932            (optionally <code>null</code>). Must pass in
2933            <code>smallImage</code> value of <code>true</code> to replace the
2934            article's small image file.
2935            * @param images the web content's images (optionally <code>null</code>)
2936            * @param articleURL the web content article's accessible URL (optionally
2937            <code>null</code>)
2938            * @param serviceContext the service context to be applied. Can set the
2939            modification date, expando bridge attributes, asset category IDs,
2940            asset tag names, asset link entry IDs, workflow actions, the
2941            "defaultLanguageId" and "urlTitle" attributes, and can set
2942            whether to add the default command update for the web content
2943            article. With respect to social activities, by setting the
2944            service context's command to {@link
2945            com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation
2946            is considered a web content update activity; otherwise it is
2947            considered a web content add activity.
2948            * @return the updated web content article
2949            * @throws PortalException if a user with the primary key or a matching web
2950            content article could not be found, or if a portal exception
2951            occurred
2952            * @throws SystemException if a system exception occurred
2953            */
2954            public static com.liferay.portlet.journal.model.JournalArticle updateArticle(
2955                    long userId, long groupId, long folderId, java.lang.String articleId,
2956                    double version,
2957                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
2958                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
2959                    java.lang.String content, java.lang.String type,
2960                    java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey,
2961                    java.lang.String layoutUuid, int displayDateMonth, int displayDateDay,
2962                    int displayDateYear, int displayDateHour, int displayDateMinute,
2963                    int expirationDateMonth, int expirationDateDay, int expirationDateYear,
2964                    int expirationDateHour, int expirationDateMinute, boolean neverExpire,
2965                    int reviewDateMonth, int reviewDateDay, int reviewDateYear,
2966                    int reviewDateHour, int reviewDateMinute, boolean neverReview,
2967                    boolean indexable, boolean smallImage, java.lang.String smallImageURL,
2968                    java.io.File smallImageFile,
2969                    java.util.Map<java.lang.String, byte[]> images,
2970                    java.lang.String articleURL,
2971                    com.liferay.portal.service.ServiceContext serviceContext)
2972                    throws com.liferay.portal.kernel.exception.PortalException,
2973                            com.liferay.portal.kernel.exception.SystemException {
2974                    return getService()
2975                                       .updateArticle(userId, groupId, folderId, articleId,
2976                            version, titleMap, descriptionMap, content, type, ddmStructureKey,
2977                            ddmTemplateKey, layoutUuid, displayDateMonth, displayDateDay,
2978                            displayDateYear, displayDateHour, displayDateMinute,
2979                            expirationDateMonth, expirationDateDay, expirationDateYear,
2980                            expirationDateHour, expirationDateMinute, neverExpire,
2981                            reviewDateMonth, reviewDateDay, reviewDateYear, reviewDateHour,
2982                            reviewDateMinute, neverReview, indexable, smallImage,
2983                            smallImageURL, smallImageFile, images, articleURL, serviceContext);
2984            }
2985    
2986            /**
2987            * Updates the web content article matching the version, replacing its
2988            * folder and content.
2989            *
2990            * @param userId the primary key of the user updating the web content
2991            article
2992            * @param groupId the primary key of the web content article's group
2993            * @param folderId the primary key of the web content article folder
2994            * @param articleId the primary key of the web content article
2995            * @param version the web content article's version
2996            * @param content the HTML content wrapped in XML. For more information,
2997            see the content example in the class description for {@link
2998            JournalArticleLocalServiceImpl}.
2999            * @param serviceContext the service context to be applied. Can set the
3000            modification date, expando bridge attributes, asset category IDs,
3001            asset tag names, asset link entry IDs, workflow actions, the
3002            "defaultLanguageId" and "urlTitle" attributes, and can set
3003            whether to add the default command update for the web content
3004            article. With respect to social activities, by setting the
3005            service context's command to {@link
3006            com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation
3007            is considered a web content update activity; otherwise it is
3008            considered a web content add activity.
3009            * @return the updated web content article
3010            * @throws PortalException if a user with the primary key or a matching web
3011            content article could not be found, or if a portal exception
3012            occurred
3013            * @throws SystemException if a system exception occurred
3014            */
3015            public static com.liferay.portlet.journal.model.JournalArticle updateArticle(
3016                    long userId, long groupId, long folderId, java.lang.String articleId,
3017                    double version, java.lang.String content,
3018                    com.liferay.portal.service.ServiceContext serviceContext)
3019                    throws com.liferay.portal.kernel.exception.PortalException,
3020                            com.liferay.portal.kernel.exception.SystemException {
3021                    return getService()
3022                                       .updateArticle(userId, groupId, folderId, articleId,
3023                            version, content, serviceContext);
3024            }
3025    
3026            /**
3027            * @deprecated As of 6.2.0, replaced by {@link
3028            #updateArticleTranslation(long, String, double, Locale,
3029            String, String, String, Map, ServiceContext)}
3030            */
3031            public static com.liferay.portlet.journal.model.JournalArticle updateArticleTranslation(
3032                    long groupId, java.lang.String articleId, double version,
3033                    java.util.Locale locale, java.lang.String title,
3034                    java.lang.String description, java.lang.String content,
3035                    java.util.Map<java.lang.String, byte[]> images)
3036                    throws com.liferay.portal.kernel.exception.PortalException,
3037                            com.liferay.portal.kernel.exception.SystemException {
3038                    return getService()
3039                                       .updateArticleTranslation(groupId, articleId, version,
3040                            locale, title, description, content, images);
3041            }
3042    
3043            /**
3044            * Updates the translation of the web content article.
3045            *
3046            * @param groupId the primary key of the web content article's group
3047            * @param articleId the primary key of the web content article
3048            * @param version the web content article's version
3049            * @param locale the locale of the web content article's display template
3050            * @param title the translated web content article title
3051            * @param description the translated web content article description
3052            * @param content the HTML content wrapped in XML. For more information,
3053            see the content example in the class description for {@link
3054            JournalArticleLocalServiceImpl}.
3055            * @param images the web content's images
3056            * @param serviceContext the service context to be applied. Can set the
3057            modification date and "urlTitle" attribute for the web content
3058            article.
3059            * @return the updated web content article
3060            * @throws PortalException if a user with the primary key or a matching web
3061            content article could not be found, or if a portal exception
3062            occurred
3063            * @throws SystemException if a system exception occurred
3064            */
3065            public static com.liferay.portlet.journal.model.JournalArticle updateArticleTranslation(
3066                    long groupId, java.lang.String articleId, double version,
3067                    java.util.Locale locale, java.lang.String title,
3068                    java.lang.String description, java.lang.String content,
3069                    java.util.Map<java.lang.String, byte[]> images,
3070                    com.liferay.portal.service.ServiceContext serviceContext)
3071                    throws com.liferay.portal.kernel.exception.PortalException,
3072                            com.liferay.portal.kernel.exception.SystemException {
3073                    return getService()
3074                                       .updateArticleTranslation(groupId, articleId, version,
3075                            locale, title, description, content, images, serviceContext);
3076            }
3077    
3078            /**
3079            * Updates the web content article's asset with the new asset categories,
3080            * tag names, and link entries, removing and adding them as necessary.
3081            *
3082            * @param userId the primary key of the user updating the web content
3083            article's asset
3084            * @param article the web content article
3085            * @param assetCategoryIds the primary keys of the new asset categories
3086            * @param assetTagNames the new asset tag names
3087            * @param assetLinkEntryIds the primary keys of the new asset link entries
3088            * @throws PortalException if a portal exception occurred
3089            * @throws SystemException if a system exception occurred
3090            */
3091            public static void updateAsset(long userId,
3092                    com.liferay.portlet.journal.model.JournalArticle article,
3093                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
3094                    long[] assetLinkEntryIds)
3095                    throws com.liferay.portal.kernel.exception.PortalException,
3096                            com.liferay.portal.kernel.exception.SystemException {
3097                    getService()
3098                            .updateAsset(userId, article, assetCategoryIds, assetTagNames,
3099                            assetLinkEntryIds);
3100            }
3101    
3102            /**
3103            * Updates the web content article matching the group, article ID, and
3104            * version, replacing its content.
3105            *
3106            * @param groupId the primary key of the web content article's group
3107            * @param articleId the primary key of the web content article
3108            * @param version the web content article's version
3109            * @param content the HTML content wrapped in XML. For more information,
3110            see the content example in the class description for {@link
3111            JournalArticleLocalServiceImpl}.
3112            * @return the updated web content article
3113            * @throws PortalException if a matching web content article could not be
3114            found
3115            * @throws SystemException if a system exception occurred
3116            */
3117            public static com.liferay.portlet.journal.model.JournalArticle updateContent(
3118                    long groupId, java.lang.String articleId, double version,
3119                    java.lang.String content)
3120                    throws com.liferay.portal.kernel.exception.PortalException,
3121                            com.liferay.portal.kernel.exception.SystemException {
3122                    return getService().updateContent(groupId, articleId, version, content);
3123            }
3124    
3125            /**
3126            * Updates the workflow status of the web content article.
3127            *
3128            * @param userId the primary key of the user updating the web content
3129            article's status
3130            * @param article the web content article
3131            * @param status the web content article's workflow status. For more
3132            information see {@link WorkflowConstants} for constants starting
3133            with the "STATUS_" prefix.
3134            * @param articleURL the web content article's accessible URL
3135            * @param workflowContext the web content article's configured workflow
3136            context
3137            * @param serviceContext the service context to be applied. Can set the
3138            modification date, status date, and portlet preferences. With
3139            respect to social activities, by setting the service context's
3140            command to {@link
3141            com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation
3142            is considered a web content update activity; otherwise it is
3143            considered a web content add activity.
3144            * @return the updated web content article
3145            * @throws PortalException if a portal exception occurred
3146            * @throws SystemException if a system exception occurred
3147            */
3148            public static com.liferay.portlet.journal.model.JournalArticle updateStatus(
3149                    long userId, com.liferay.portlet.journal.model.JournalArticle article,
3150                    int status, java.lang.String articleURL,
3151                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext,
3152                    com.liferay.portal.service.ServiceContext serviceContext)
3153                    throws com.liferay.portal.kernel.exception.PortalException,
3154                            com.liferay.portal.kernel.exception.SystemException {
3155                    return getService()
3156                                       .updateStatus(userId, article, status, articleURL,
3157                            workflowContext, serviceContext);
3158            }
3159    
3160            /**
3161            * Updates the workflow status of the web content article matching the class
3162            * PK.
3163            *
3164            * @param userId the primary key of the user updating the web content
3165            article's status
3166            * @param classPK the primary key of the DDM structure, if the web content
3167            article is related to a DDM structure, the primary key of the
3168            class associated with the article, or <code>0</code> otherwise
3169            * @param status the web content article's workflow status. For more
3170            information see {@link WorkflowConstants} for constants starting
3171            with the "STATUS_" prefix.
3172            * @param workflowContext the web content article's configured workflow
3173            * @param serviceContext the service context to be applied. Can set the
3174            modification date, portlet preferences, and can set whether to
3175            add the default command update for the web content article.
3176            * @return the updated web content article
3177            * @throws PortalException if a matching web content article could not be
3178            found or if a portal exception occurred
3179            * @throws SystemException if a system exception occurred
3180            */
3181            public static com.liferay.portlet.journal.model.JournalArticle updateStatus(
3182                    long userId, long classPK, int status,
3183                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext,
3184                    com.liferay.portal.service.ServiceContext serviceContext)
3185                    throws com.liferay.portal.kernel.exception.PortalException,
3186                            com.liferay.portal.kernel.exception.SystemException {
3187                    return getService()
3188                                       .updateStatus(userId, classPK, status, workflowContext,
3189                            serviceContext);
3190            }
3191    
3192            /**
3193            * Updates the workflow status of the web content article matching the
3194            * group, article ID, and version.
3195            *
3196            * @param userId the primary key of the user updating the web content
3197            article's status
3198            * @param groupId the primary key of the web content article's group
3199            * @param articleId the primary key of the web content article
3200            * @param version the web content article's version
3201            * @param status the web content article's workflow status. For more
3202            information see {@link WorkflowConstants} for constants starting
3203            with the "STATUS_" prefix.
3204            * @param articleURL the web content article's accessible URL
3205            * @param workflowContext the web content article's configured workflow
3206            * @param serviceContext the service context to be applied. Can set the
3207            modification date, portlet preferences, and can set whether to
3208            add the default command update for the web content article.
3209            * @return the updated web content article
3210            * @throws PortalException if a matching web content article could not be
3211            found or if a portal exception occurred
3212            * @throws SystemException if a system exception occurred
3213            */
3214            public static com.liferay.portlet.journal.model.JournalArticle updateStatus(
3215                    long userId, long groupId, java.lang.String articleId, double version,
3216                    int status, java.lang.String articleURL,
3217                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext,
3218                    com.liferay.portal.service.ServiceContext serviceContext)
3219                    throws com.liferay.portal.kernel.exception.PortalException,
3220                            com.liferay.portal.kernel.exception.SystemException {
3221                    return getService()
3222                                       .updateStatus(userId, groupId, articleId, version, status,
3223                            articleURL, workflowContext, serviceContext);
3224            }
3225    
3226            /**
3227            * Updates the web content articles matching the group, class name ID, and
3228            * DDM template key, replacing the DDM template key with a new one.
3229            *
3230            * @param groupId the primary key of the web content article's group
3231            * @param classNameId the primary key of the DDMStructure class if the web
3232            content article is related to a DDM structure, the primary key of
3233            the class name associated with the article, or {@link
3234            JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise
3235            * @param oldDDMTemplateKey the primary key of the web content article's
3236            old DDM template
3237            * @param newDDMTemplateKey the primary key of the web content article's
3238            new DDM template
3239            * @throws SystemException if a system exception occurred
3240            */
3241            public static void updateTemplateId(long groupId, long classNameId,
3242                    java.lang.String oldDDMTemplateKey, java.lang.String newDDMTemplateKey)
3243                    throws com.liferay.portal.kernel.exception.SystemException {
3244                    getService()
3245                            .updateTemplateId(groupId, classNameId, oldDDMTemplateKey,
3246                            newDDMTemplateKey);
3247            }
3248    
3249            public static JournalArticleLocalService getService() {
3250                    if (_service == null) {
3251                            _service = (JournalArticleLocalService)PortalBeanLocatorUtil.locate(JournalArticleLocalService.class.getName());
3252    
3253                            ReferenceRegistry.registerReference(JournalArticleLocalServiceUtil.class,
3254                                    "_service");
3255                    }
3256    
3257                    return _service;
3258            }
3259    
3260            /**
3261             * @deprecated As of 6.2.0
3262             */
3263            public void setService(JournalArticleLocalService service) {
3264            }
3265    
3266            private static JournalArticleLocalService _service;
3267    }