001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.wiki.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the remote service utility for WikiPage. This utility wraps
024     * {@link com.liferay.portlet.wiki.service.impl.WikiPageServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on a remote server. Methods of this service are expected to have security
027     * checks based on the propagated JAAS credentials because this service can be
028     * accessed remotely.
029     *
030     * @author Brian Wing Shun Chan
031     * @see WikiPageService
032     * @see com.liferay.portlet.wiki.service.base.WikiPageServiceBaseImpl
033     * @see com.liferay.portlet.wiki.service.impl.WikiPageServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class WikiPageServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.wiki.service.impl.WikiPageServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043            public static com.liferay.portlet.wiki.model.WikiPage addPage(long nodeId,
044                    java.lang.String title, java.lang.String content,
045                    java.lang.String summary, boolean minorEdit, java.lang.String format,
046                    java.lang.String parentTitle, java.lang.String redirectTitle,
047                    com.liferay.portal.service.ServiceContext serviceContext)
048                    throws com.liferay.portal.kernel.exception.PortalException {
049                    return getService()
050                                       .addPage(nodeId, title, content, summary, minorEdit, format,
051                            parentTitle, redirectTitle, serviceContext);
052            }
053    
054            public static com.liferay.portlet.wiki.model.WikiPage addPage(long nodeId,
055                    java.lang.String title, java.lang.String content,
056                    java.lang.String summary, boolean minorEdit,
057                    com.liferay.portal.service.ServiceContext serviceContext)
058                    throws com.liferay.portal.kernel.exception.PortalException {
059                    return getService()
060                                       .addPage(nodeId, title, content, summary, minorEdit,
061                            serviceContext);
062            }
063    
064            public static void addPageAttachment(long nodeId, java.lang.String title,
065                    java.lang.String fileName, java.io.File file, java.lang.String mimeType)
066                    throws com.liferay.portal.kernel.exception.PortalException {
067                    getService().addPageAttachment(nodeId, title, fileName, file, mimeType);
068            }
069    
070            public static void addPageAttachment(long nodeId, java.lang.String title,
071                    java.lang.String fileName, java.io.InputStream inputStream,
072                    java.lang.String mimeType)
073                    throws com.liferay.portal.kernel.exception.PortalException {
074                    getService()
075                            .addPageAttachment(nodeId, title, fileName, inputStream, mimeType);
076            }
077    
078            public static void addPageAttachments(long nodeId, java.lang.String title,
079                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs)
080                    throws com.liferay.portal.kernel.exception.PortalException {
081                    getService().addPageAttachments(nodeId, title, inputStreamOVPs);
082            }
083    
084            public static void addTempFileEntry(long nodeId,
085                    java.lang.String folderName, java.lang.String fileName,
086                    java.io.InputStream inputStream, java.lang.String mimeType)
087                    throws com.liferay.portal.kernel.exception.PortalException {
088                    getService()
089                            .addTempFileEntry(nodeId, folderName, fileName, inputStream,
090                            mimeType);
091            }
092    
093            /**
094            * @deprecated As of 7.0.0 replaced by {@link #addTempFileEntry(long,
095            String, String, InputStream, String)}
096            */
097            @Deprecated
098            public static void addTempPageAttachment(long nodeId,
099                    java.lang.String fileName, java.lang.String tempFolderName,
100                    java.io.InputStream inputStream, java.lang.String mimeType)
101                    throws com.liferay.portal.kernel.exception.PortalException {
102                    getService()
103                            .addTempPageAttachment(nodeId, fileName, tempFolderName,
104                            inputStream, mimeType);
105            }
106    
107            public static void changeNode(long nodeId, java.lang.String title,
108                    long newNodeId, com.liferay.portal.service.ServiceContext serviceContext)
109                    throws com.liferay.portal.kernel.exception.PortalException {
110                    getService().changeNode(nodeId, title, newNodeId, serviceContext);
111            }
112    
113            public static void changeParent(long nodeId, java.lang.String title,
114                    java.lang.String newParentTitle,
115                    com.liferay.portal.service.ServiceContext serviceContext)
116                    throws com.liferay.portal.kernel.exception.PortalException {
117                    getService().changeParent(nodeId, title, newParentTitle, serviceContext);
118            }
119    
120            public static void copyPageAttachments(long templateNodeId,
121                    java.lang.String templateTitle, long nodeId, java.lang.String title)
122                    throws com.liferay.portal.kernel.exception.PortalException {
123                    getService()
124                            .copyPageAttachments(templateNodeId, templateTitle, nodeId, title);
125            }
126    
127            public static void deletePage(long nodeId, java.lang.String title)
128                    throws com.liferay.portal.kernel.exception.PortalException {
129                    getService().deletePage(nodeId, title);
130            }
131    
132            /**
133            * @deprecated As of 6.2.0 replaced by {@link #discardDraft(long, String,
134            double)}
135            */
136            @Deprecated
137            public static void deletePage(long nodeId, java.lang.String title,
138                    double version)
139                    throws com.liferay.portal.kernel.exception.PortalException {
140                    getService().deletePage(nodeId, title, version);
141            }
142    
143            public static void deletePageAttachment(long nodeId,
144                    java.lang.String title, java.lang.String fileName)
145                    throws com.liferay.portal.kernel.exception.PortalException {
146                    getService().deletePageAttachment(nodeId, title, fileName);
147            }
148    
149            public static void deletePageAttachments(long nodeId, java.lang.String title)
150                    throws com.liferay.portal.kernel.exception.PortalException {
151                    getService().deletePageAttachments(nodeId, title);
152            }
153    
154            public static void deleteTempFileEntry(long nodeId,
155                    java.lang.String folderName, java.lang.String fileName)
156                    throws com.liferay.portal.kernel.exception.PortalException {
157                    getService().deleteTempFileEntry(nodeId, folderName, fileName);
158            }
159    
160            public static void deleteTrashPageAttachments(long nodeId,
161                    java.lang.String title)
162                    throws com.liferay.portal.kernel.exception.PortalException {
163                    getService().deleteTrashPageAttachments(nodeId, title);
164            }
165    
166            public static void discardDraft(long nodeId, java.lang.String title,
167                    double version)
168                    throws com.liferay.portal.kernel.exception.PortalException {
169                    getService().discardDraft(nodeId, title, version);
170            }
171    
172            public static com.liferay.portlet.wiki.model.WikiPage fetchPage(
173                    long nodeId, java.lang.String title, double version)
174                    throws com.liferay.portal.kernel.exception.PortalException {
175                    return getService().fetchPage(nodeId, title, version);
176            }
177    
178            /**
179            * Returns the Spring bean ID for this bean.
180            *
181            * @return the Spring bean ID for this bean
182            */
183            public static java.lang.String getBeanIdentifier() {
184                    return getService().getBeanIdentifier();
185            }
186    
187            public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getChildren(
188                    long groupId, long nodeId, boolean head, java.lang.String parentTitle)
189                    throws com.liferay.portal.kernel.exception.PortalException {
190                    return getService().getChildren(groupId, nodeId, head, parentTitle);
191            }
192    
193            public static com.liferay.portlet.wiki.model.WikiPage getDraftPage(
194                    long nodeId, java.lang.String title)
195                    throws com.liferay.portal.kernel.exception.PortalException {
196                    return getService().getDraftPage(nodeId, title);
197            }
198    
199            public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getNodePages(
200                    long nodeId, int max)
201                    throws com.liferay.portal.kernel.exception.PortalException {
202                    return getService().getNodePages(nodeId, max);
203            }
204    
205            /**
206            * @deprecated As of 6.2.0, replaced by {@link #getNodePagesRSS(long, int,
207            String, double, String, String, String, String)}
208            */
209            @Deprecated
210            public static java.lang.String getNodePagesRSS(long nodeId, int max,
211                    java.lang.String type, double version, java.lang.String displayStyle,
212                    java.lang.String feedURL, java.lang.String entryURL)
213                    throws com.liferay.portal.kernel.exception.PortalException {
214                    return getService()
215                                       .getNodePagesRSS(nodeId, max, type, version, displayStyle,
216                            feedURL, entryURL);
217            }
218    
219            public static java.lang.String getNodePagesRSS(long nodeId, int max,
220                    java.lang.String type, double version, java.lang.String displayStyle,
221                    java.lang.String feedURL, java.lang.String entryURL,
222                    java.lang.String attachmentURLPrefix)
223                    throws com.liferay.portal.kernel.exception.PortalException {
224                    return getService()
225                                       .getNodePagesRSS(nodeId, max, type, version, displayStyle,
226                            feedURL, entryURL, attachmentURLPrefix);
227            }
228    
229            public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getOrphans(
230                    long groupId, long nodeId)
231                    throws com.liferay.portal.kernel.exception.PortalException {
232                    return getService().getOrphans(groupId, nodeId);
233            }
234    
235            public static com.liferay.portlet.wiki.model.WikiPage getPage(
236                    long groupId, long nodeId, java.lang.String title)
237                    throws com.liferay.portal.kernel.exception.PortalException {
238                    return getService().getPage(groupId, nodeId, title);
239            }
240    
241            public static com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
242                    java.lang.String title)
243                    throws com.liferay.portal.kernel.exception.PortalException {
244                    return getService().getPage(nodeId, title);
245            }
246    
247            public static com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
248                    java.lang.String title, java.lang.Boolean head)
249                    throws com.liferay.portal.kernel.exception.PortalException {
250                    return getService().getPage(nodeId, title, head);
251            }
252    
253            public static com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
254                    java.lang.String title, double version)
255                    throws com.liferay.portal.kernel.exception.PortalException {
256                    return getService().getPage(nodeId, title, version);
257            }
258    
259            public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
260                    long groupId, long nodeId, boolean head, int status, int start,
261                    int end,
262                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.wiki.model.WikiPage> obc)
263                    throws com.liferay.portal.kernel.exception.PortalException {
264                    return getService()
265                                       .getPages(groupId, nodeId, head, status, start, end, obc);
266            }
267    
268            public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
269                    long groupId, long userId, long nodeId, int status, int start, int end)
270                    throws com.liferay.portal.kernel.exception.PortalException {
271                    return getService().getPages(groupId, userId, nodeId, status, start, end);
272            }
273    
274            public static int getPagesCount(long groupId, long nodeId, boolean head)
275                    throws com.liferay.portal.kernel.exception.PortalException {
276                    return getService().getPagesCount(groupId, nodeId, head);
277            }
278    
279            public static int getPagesCount(long groupId, long userId, long nodeId,
280                    int status) throws com.liferay.portal.kernel.exception.PortalException {
281                    return getService().getPagesCount(groupId, userId, nodeId, status);
282            }
283    
284            public static java.lang.String getPagesRSS(long companyId, long nodeId,
285                    java.lang.String title, int max, java.lang.String type, double version,
286                    java.lang.String displayStyle, java.lang.String feedURL,
287                    java.lang.String entryURL, java.lang.String attachmentURLPrefix,
288                    java.util.Locale locale)
289                    throws com.liferay.portal.kernel.exception.PortalException {
290                    return getService()
291                                       .getPagesRSS(companyId, nodeId, title, max, type, version,
292                            displayStyle, feedURL, entryURL, attachmentURLPrefix, locale);
293            }
294    
295            /**
296            * @deprecated As of 6.2.0, replaced by {@link #getPagesRSS(long, long,
297            String, int, String, double, String, String, String, String,
298            java.util.Locale)}
299            */
300            @Deprecated
301            public static java.lang.String getPagesRSS(long companyId, long nodeId,
302                    java.lang.String title, int max, java.lang.String type, double version,
303                    java.lang.String displayStyle, java.lang.String feedURL,
304                    java.lang.String entryURL, java.util.Locale locale)
305                    throws com.liferay.portal.kernel.exception.PortalException {
306                    return getService()
307                                       .getPagesRSS(companyId, nodeId, title, max, type, version,
308                            displayStyle, feedURL, entryURL, locale);
309            }
310    
311            public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getRecentChanges(
312                    long groupId, long nodeId, int start, int end)
313                    throws com.liferay.portal.kernel.exception.PortalException {
314                    return getService().getRecentChanges(groupId, nodeId, start, end);
315            }
316    
317            public static int getRecentChangesCount(long groupId, long nodeId)
318                    throws com.liferay.portal.kernel.exception.PortalException {
319                    return getService().getRecentChangesCount(groupId, nodeId);
320            }
321    
322            public static java.lang.String[] getTempFileNames(long nodeId,
323                    java.lang.String folderName)
324                    throws com.liferay.portal.kernel.exception.PortalException {
325                    return getService().getTempFileNames(nodeId, folderName);
326            }
327    
328            /**
329            * @deprecated As of 6.2.0, replaced by {@link #renamePage(long, String,
330            String, ServiceContext)} *
331            */
332            @Deprecated
333            public static void movePage(long nodeId, java.lang.String title,
334                    java.lang.String newTitle,
335                    com.liferay.portal.service.ServiceContext serviceContext)
336                    throws com.liferay.portal.kernel.exception.PortalException {
337                    getService().movePage(nodeId, title, newTitle, serviceContext);
338            }
339    
340            public static com.liferay.portal.kernel.repository.model.FileEntry movePageAttachmentToTrash(
341                    long nodeId, java.lang.String title, java.lang.String fileName)
342                    throws com.liferay.portal.kernel.exception.PortalException {
343                    return getService().movePageAttachmentToTrash(nodeId, title, fileName);
344            }
345    
346            public static com.liferay.portlet.wiki.model.WikiPage movePageToTrash(
347                    long nodeId, java.lang.String title)
348                    throws com.liferay.portal.kernel.exception.PortalException {
349                    return getService().movePageToTrash(nodeId, title);
350            }
351    
352            public static com.liferay.portlet.wiki.model.WikiPage movePageToTrash(
353                    long nodeId, java.lang.String title, double version)
354                    throws com.liferay.portal.kernel.exception.PortalException {
355                    return getService().movePageToTrash(nodeId, title, version);
356            }
357    
358            public static void renamePage(long nodeId, java.lang.String title,
359                    java.lang.String newTitle,
360                    com.liferay.portal.service.ServiceContext serviceContext)
361                    throws com.liferay.portal.kernel.exception.PortalException {
362                    getService().renamePage(nodeId, title, newTitle, serviceContext);
363            }
364    
365            public static void restorePageAttachmentFromTrash(long nodeId,
366                    java.lang.String title, java.lang.String fileName)
367                    throws com.liferay.portal.kernel.exception.PortalException {
368                    getService().restorePageAttachmentFromTrash(nodeId, title, fileName);
369            }
370    
371            public static void restorePageFromTrash(long resourcePrimKey)
372                    throws com.liferay.portal.kernel.exception.PortalException {
373                    getService().restorePageFromTrash(resourcePrimKey);
374            }
375    
376            public static com.liferay.portlet.wiki.model.WikiPage revertPage(
377                    long nodeId, java.lang.String title, double version,
378                    com.liferay.portal.service.ServiceContext serviceContext)
379                    throws com.liferay.portal.kernel.exception.PortalException {
380                    return getService().revertPage(nodeId, title, version, serviceContext);
381            }
382    
383            /**
384            * Sets the Spring bean ID for this bean.
385            *
386            * @param beanIdentifier the Spring bean ID for this bean
387            */
388            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
389                    getService().setBeanIdentifier(beanIdentifier);
390            }
391    
392            public static void subscribePage(long nodeId, java.lang.String title)
393                    throws com.liferay.portal.kernel.exception.PortalException {
394                    getService().subscribePage(nodeId, title);
395            }
396    
397            public static void unsubscribePage(long nodeId, java.lang.String title)
398                    throws com.liferay.portal.kernel.exception.PortalException {
399                    getService().unsubscribePage(nodeId, title);
400            }
401    
402            public static com.liferay.portlet.wiki.model.WikiPage updatePage(
403                    long nodeId, java.lang.String title, double version,
404                    java.lang.String content, java.lang.String summary, boolean minorEdit,
405                    java.lang.String format, java.lang.String parentTitle,
406                    java.lang.String redirectTitle,
407                    com.liferay.portal.service.ServiceContext serviceContext)
408                    throws com.liferay.portal.kernel.exception.PortalException {
409                    return getService()
410                                       .updatePage(nodeId, title, version, content, summary,
411                            minorEdit, format, parentTitle, redirectTitle, serviceContext);
412            }
413    
414            public static WikiPageService getService() {
415                    if (_service == null) {
416                            _service = (WikiPageService)PortalBeanLocatorUtil.locate(WikiPageService.class.getName());
417    
418                            ReferenceRegistry.registerReference(WikiPageServiceUtil.class,
419                                    "_service");
420                    }
421    
422                    return _service;
423            }
424    
425            /**
426             * @deprecated As of 6.2.0
427             */
428            @Deprecated
429            public void setService(WikiPageService service) {
430            }
431    
432            private static WikiPageService _service;
433    }