001    /**
002     * Copyright (c) 2000-2011 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 com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.MethodCache;
019    import com.liferay.portal.kernel.util.ReferenceRegistry;
020    
021    /**
022     * The utility for the journal article remote service. This utility wraps {@link com.liferay.portlet.journal.service.impl.JournalArticleServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
023     *
024     * <p>
025     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see JournalArticleService
030     * @see com.liferay.portlet.journal.service.base.JournalArticleServiceBaseImpl
031     * @see com.liferay.portlet.journal.service.impl.JournalArticleServiceImpl
032     * @generated
033     */
034    public class JournalArticleServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.journal.service.impl.JournalArticleServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040            public static com.liferay.portlet.journal.model.JournalArticle addArticle(
041                    long groupId, java.lang.String articleId, boolean autoArticleId,
042                    java.lang.String title, java.lang.String description,
043                    java.lang.String content, java.lang.String type,
044                    java.lang.String structureId, java.lang.String templateId,
045                    int displayDateMonth, int displayDateDay, int displayDateYear,
046                    int displayDateHour, int displayDateMinute, int expirationDateMonth,
047                    int expirationDateDay, int expirationDateYear, int expirationDateHour,
048                    int expirationDateMinute, boolean neverExpire, int reviewDateMonth,
049                    int reviewDateDay, int reviewDateYear, int reviewDateHour,
050                    int reviewDateMinute, boolean neverReview, boolean indexable,
051                    boolean smallImage, java.lang.String smallImageURL,
052                    java.io.File smallFile, java.util.Map<java.lang.String, byte[]> images,
053                    java.lang.String articleURL,
054                    com.liferay.portal.service.ServiceContext serviceContext)
055                    throws com.liferay.portal.kernel.exception.PortalException,
056                            com.liferay.portal.kernel.exception.SystemException {
057                    return getService()
058                                       .addArticle(groupId, articleId, autoArticleId, title,
059                            description, content, type, structureId, templateId,
060                            displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
061                            displayDateMinute, expirationDateMonth, expirationDateDay,
062                            expirationDateYear, expirationDateHour, expirationDateMinute,
063                            neverExpire, reviewDateMonth, reviewDateDay, reviewDateYear,
064                            reviewDateHour, reviewDateMinute, neverReview, indexable,
065                            smallImage, smallImageURL, smallFile, images, articleURL,
066                            serviceContext);
067            }
068    
069            public static com.liferay.portlet.journal.model.JournalArticle addArticle(
070                    long groupId, java.lang.String articleId, boolean autoArticleId,
071                    java.lang.String title, java.lang.String description,
072                    java.lang.String content, java.lang.String type,
073                    java.lang.String structureId, java.lang.String templateId,
074                    int displayDateMonth, int displayDateDay, int displayDateYear,
075                    int displayDateHour, int displayDateMinute, int expirationDateMonth,
076                    int expirationDateDay, int expirationDateYear, int expirationDateHour,
077                    int expirationDateMinute, boolean neverExpire, int reviewDateMonth,
078                    int reviewDateDay, int reviewDateYear, int reviewDateHour,
079                    int reviewDateMinute, boolean neverReview, boolean indexable,
080                    java.lang.String articleURL,
081                    com.liferay.portal.service.ServiceContext serviceContext)
082                    throws com.liferay.portal.kernel.exception.PortalException,
083                            com.liferay.portal.kernel.exception.SystemException {
084                    return getService()
085                                       .addArticle(groupId, articleId, autoArticleId, title,
086                            description, content, type, structureId, templateId,
087                            displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
088                            displayDateMinute, expirationDateMonth, expirationDateDay,
089                            expirationDateYear, expirationDateHour, expirationDateMinute,
090                            neverExpire, reviewDateMonth, reviewDateDay, reviewDateYear,
091                            reviewDateHour, reviewDateMinute, neverReview, indexable,
092                            articleURL, serviceContext);
093            }
094    
095            public static com.liferay.portlet.journal.model.JournalArticle copyArticle(
096                    long groupId, java.lang.String oldArticleId,
097                    java.lang.String newArticleId, boolean autoArticleId, double version)
098                    throws com.liferay.portal.kernel.exception.PortalException,
099                            com.liferay.portal.kernel.exception.SystemException {
100                    return getService()
101                                       .copyArticle(groupId, oldArticleId, newArticleId,
102                            autoArticleId, version);
103            }
104    
105            public static void deleteArticle(long groupId, java.lang.String articleId,
106                    double version, java.lang.String articleURL,
107                    com.liferay.portal.service.ServiceContext serviceContext)
108                    throws com.liferay.portal.kernel.exception.PortalException,
109                            com.liferay.portal.kernel.exception.SystemException {
110                    getService()
111                            .deleteArticle(groupId, articleId, version, articleURL,
112                            serviceContext);
113            }
114    
115            public static void deleteArticle(long groupId, java.lang.String articleId,
116                    java.lang.String articleURL,
117                    com.liferay.portal.service.ServiceContext serviceContext)
118                    throws com.liferay.portal.kernel.exception.PortalException,
119                            com.liferay.portal.kernel.exception.SystemException {
120                    getService()
121                            .deleteArticle(groupId, articleId, articleURL, serviceContext);
122            }
123    
124            public static com.liferay.portlet.journal.model.JournalArticle expireArticle(
125                    long groupId, java.lang.String articleId, double version,
126                    java.lang.String articleURL,
127                    com.liferay.portal.service.ServiceContext serviceContext)
128                    throws com.liferay.portal.kernel.exception.PortalException,
129                            com.liferay.portal.kernel.exception.SystemException {
130                    return getService()
131                                       .expireArticle(groupId, articleId, version, articleURL,
132                            serviceContext);
133            }
134    
135            public static void expireArticle(long groupId, java.lang.String articleId,
136                    java.lang.String articleURL,
137                    com.liferay.portal.service.ServiceContext serviceContext)
138                    throws com.liferay.portal.kernel.exception.PortalException,
139                            com.liferay.portal.kernel.exception.SystemException {
140                    getService()
141                            .expireArticle(groupId, articleId, articleURL, serviceContext);
142            }
143    
144            public static com.liferay.portlet.journal.model.JournalArticle getArticle(
145                    long groupId, java.lang.String articleId)
146                    throws com.liferay.portal.kernel.exception.PortalException,
147                            com.liferay.portal.kernel.exception.SystemException {
148                    return getService().getArticle(groupId, articleId);
149            }
150    
151            public static com.liferay.portlet.journal.model.JournalArticle getArticle(
152                    long groupId, java.lang.String articleId, double version)
153                    throws com.liferay.portal.kernel.exception.PortalException,
154                            com.liferay.portal.kernel.exception.SystemException {
155                    return getService().getArticle(groupId, articleId, version);
156            }
157    
158            public static com.liferay.portlet.journal.model.JournalArticle getArticleByUrlTitle(
159                    long groupId, java.lang.String urlTitle)
160                    throws com.liferay.portal.kernel.exception.PortalException,
161                            com.liferay.portal.kernel.exception.SystemException {
162                    return getService().getArticleByUrlTitle(groupId, urlTitle);
163            }
164    
165            public static java.lang.String getArticleContent(long groupId,
166                    java.lang.String articleId, double version,
167                    java.lang.String languageId,
168                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
169                    throws com.liferay.portal.kernel.exception.PortalException,
170                            com.liferay.portal.kernel.exception.SystemException {
171                    return getService()
172                                       .getArticleContent(groupId, articleId, version, languageId,
173                            themeDisplay);
174            }
175    
176            public static java.lang.String getArticleContent(long groupId,
177                    java.lang.String articleId, java.lang.String languageId,
178                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
179                    throws com.liferay.portal.kernel.exception.PortalException,
180                            com.liferay.portal.kernel.exception.SystemException {
181                    return getService()
182                                       .getArticleContent(groupId, articleId, languageId,
183                            themeDisplay);
184            }
185    
186            public static com.liferay.portlet.journal.model.JournalArticle getLatestArticle(
187                    long resourcePrimKey)
188                    throws com.liferay.portal.kernel.exception.PortalException,
189                            com.liferay.portal.kernel.exception.SystemException {
190                    return getService().getLatestArticle(resourcePrimKey);
191            }
192    
193            public static com.liferay.portlet.journal.model.JournalArticle getLatestArticle(
194                    long groupId, java.lang.String articleId, int status)
195                    throws com.liferay.portal.kernel.exception.PortalException,
196                            com.liferay.portal.kernel.exception.SystemException {
197                    return getService().getLatestArticle(groupId, articleId, status);
198            }
199    
200            public static void removeArticleLocale(long companyId,
201                    java.lang.String languageId)
202                    throws com.liferay.portal.kernel.exception.PortalException,
203                            com.liferay.portal.kernel.exception.SystemException {
204                    getService().removeArticleLocale(companyId, languageId);
205            }
206    
207            public static com.liferay.portlet.journal.model.JournalArticle removeArticleLocale(
208                    long groupId, java.lang.String articleId, double version,
209                    java.lang.String languageId)
210                    throws com.liferay.portal.kernel.exception.PortalException,
211                            com.liferay.portal.kernel.exception.SystemException {
212                    return getService()
213                                       .removeArticleLocale(groupId, articleId, version, languageId);
214            }
215    
216            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> search(
217                    long companyId, long groupId, java.lang.String keywords,
218                    java.lang.Double version, java.lang.String type,
219                    java.lang.String structureId, java.lang.String templateId,
220                    java.util.Date displayDateGT, java.util.Date displayDateLT, int status,
221                    java.util.Date reviewDate, int start, int end,
222                    com.liferay.portal.kernel.util.OrderByComparator obc)
223                    throws com.liferay.portal.kernel.exception.SystemException {
224                    return getService()
225                                       .search(companyId, groupId, keywords, version, type,
226                            structureId, templateId, displayDateGT, displayDateLT, status,
227                            reviewDate, start, end, obc);
228            }
229    
230            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> search(
231                    long companyId, long groupId, java.lang.String articleId,
232                    java.lang.Double version, java.lang.String title,
233                    java.lang.String description, java.lang.String content,
234                    java.lang.String type, java.lang.String structureId,
235                    java.lang.String templateId, java.util.Date displayDateGT,
236                    java.util.Date displayDateLT, int status, java.util.Date reviewDate,
237                    boolean andOperator, int start, int end,
238                    com.liferay.portal.kernel.util.OrderByComparator obc)
239                    throws com.liferay.portal.kernel.exception.SystemException {
240                    return getService()
241                                       .search(companyId, groupId, articleId, version, title,
242                            description, content, type, structureId, templateId, displayDateGT,
243                            displayDateLT, status, reviewDate, andOperator, start, end, obc);
244            }
245    
246            public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> search(
247                    long companyId, long groupId, java.lang.String articleId,
248                    java.lang.Double version, java.lang.String title,
249                    java.lang.String description, java.lang.String content,
250                    java.lang.String type, java.lang.String[] structureIds,
251                    java.lang.String[] templateIds, java.util.Date displayDateGT,
252                    java.util.Date displayDateLT, int status, java.util.Date reviewDate,
253                    boolean andOperator, int start, int end,
254                    com.liferay.portal.kernel.util.OrderByComparator obc)
255                    throws com.liferay.portal.kernel.exception.SystemException {
256                    return getService()
257                                       .search(companyId, groupId, articleId, version, title,
258                            description, content, type, structureIds, templateIds,
259                            displayDateGT, displayDateLT, status, reviewDate, andOperator,
260                            start, end, obc);
261            }
262    
263            public static int searchCount(long companyId, long groupId,
264                    java.lang.String keywords, java.lang.Double version,
265                    java.lang.String type, java.lang.String structureId,
266                    java.lang.String templateId, java.util.Date displayDateGT,
267                    java.util.Date displayDateLT, int status, java.util.Date reviewDate)
268                    throws com.liferay.portal.kernel.exception.SystemException {
269                    return getService()
270                                       .searchCount(companyId, groupId, keywords, version, type,
271                            structureId, templateId, displayDateGT, displayDateLT, status,
272                            reviewDate);
273            }
274    
275            public static int searchCount(long companyId, long groupId,
276                    java.lang.String articleId, java.lang.Double version,
277                    java.lang.String title, java.lang.String description,
278                    java.lang.String content, java.lang.String type,
279                    java.lang.String structureId, java.lang.String templateId,
280                    java.util.Date displayDateGT, java.util.Date displayDateLT, int status,
281                    java.util.Date reviewDate, boolean andOperator)
282                    throws com.liferay.portal.kernel.exception.SystemException {
283                    return getService()
284                                       .searchCount(companyId, groupId, articleId, version, title,
285                            description, content, type, structureId, templateId, displayDateGT,
286                            displayDateLT, status, reviewDate, andOperator);
287            }
288    
289            public static int searchCount(long companyId, long groupId,
290                    java.lang.String articleId, java.lang.Double version,
291                    java.lang.String title, java.lang.String description,
292                    java.lang.String content, java.lang.String type,
293                    java.lang.String[] structureIds, java.lang.String[] templateIds,
294                    java.util.Date displayDateGT, java.util.Date displayDateLT, int status,
295                    java.util.Date reviewDate, boolean andOperator)
296                    throws com.liferay.portal.kernel.exception.SystemException {
297                    return getService()
298                                       .searchCount(companyId, groupId, articleId, version, title,
299                            description, content, type, structureIds, templateIds,
300                            displayDateGT, displayDateLT, status, reviewDate, andOperator);
301            }
302    
303            public static void subscribe(long groupId)
304                    throws com.liferay.portal.kernel.exception.PortalException,
305                            com.liferay.portal.kernel.exception.SystemException {
306                    getService().subscribe(groupId);
307            }
308    
309            public static void unsubscribe(long groupId)
310                    throws com.liferay.portal.kernel.exception.PortalException,
311                            com.liferay.portal.kernel.exception.SystemException {
312                    getService().unsubscribe(groupId);
313            }
314    
315            public static com.liferay.portlet.journal.model.JournalArticle updateArticle(
316                    long groupId, java.lang.String articleId, double version,
317                    java.lang.String content)
318                    throws com.liferay.portal.kernel.exception.PortalException,
319                            com.liferay.portal.kernel.exception.SystemException {
320                    return getService().updateArticle(groupId, articleId, version, content);
321            }
322    
323            public static com.liferay.portlet.journal.model.JournalArticle updateArticle(
324                    long groupId, java.lang.String articleId, double version,
325                    java.lang.String title, java.lang.String description,
326                    java.lang.String content, java.lang.String type,
327                    java.lang.String structureId, java.lang.String templateId,
328                    int displayDateMonth, int displayDateDay, int displayDateYear,
329                    int displayDateHour, int displayDateMinute, int expirationDateMonth,
330                    int expirationDateDay, int expirationDateYear, int expirationDateHour,
331                    int expirationDateMinute, boolean neverExpire, int reviewDateMonth,
332                    int reviewDateDay, int reviewDateYear, int reviewDateHour,
333                    int reviewDateMinute, boolean neverReview, boolean indexable,
334                    boolean smallImage, java.lang.String smallImageURL,
335                    java.io.File smallFile, java.util.Map<java.lang.String, byte[]> images,
336                    java.lang.String articleURL,
337                    com.liferay.portal.service.ServiceContext serviceContext)
338                    throws com.liferay.portal.kernel.exception.PortalException,
339                            com.liferay.portal.kernel.exception.SystemException {
340                    return getService()
341                                       .updateArticle(groupId, articleId, version, title,
342                            description, content, type, structureId, templateId,
343                            displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
344                            displayDateMinute, expirationDateMonth, expirationDateDay,
345                            expirationDateYear, expirationDateHour, expirationDateMinute,
346                            neverExpire, reviewDateMonth, reviewDateDay, reviewDateYear,
347                            reviewDateHour, reviewDateMinute, neverReview, indexable,
348                            smallImage, smallImageURL, smallFile, images, articleURL,
349                            serviceContext);
350            }
351    
352            public static com.liferay.portlet.journal.model.JournalArticle updateContent(
353                    long groupId, java.lang.String articleId, double version,
354                    java.lang.String content)
355                    throws com.liferay.portal.kernel.exception.PortalException,
356                            com.liferay.portal.kernel.exception.SystemException {
357                    return getService().updateContent(groupId, articleId, version, content);
358            }
359    
360            public static JournalArticleService getService() {
361                    if (_service == null) {
362                            _service = (JournalArticleService)PortalBeanLocatorUtil.locate(JournalArticleService.class.getName());
363    
364                            ReferenceRegistry.registerReference(JournalArticleServiceUtil.class,
365                                    "_service");
366                            MethodCache.remove(JournalArticleService.class);
367                    }
368    
369                    return _service;
370            }
371    
372            public void setService(JournalArticleService service) {
373                    MethodCache.remove(JournalArticleService.class);
374    
375                    _service = service;
376    
377                    ReferenceRegistry.registerReference(JournalArticleServiceUtil.class,
378                            "_service");
379                    MethodCache.remove(JournalArticleService.class);
380            }
381    
382            private static JournalArticleService _service;
383    }