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