001    /**
002     * Copyright (c) 2000-2012 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 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 wiki page remote service. This utility wraps {@link com.liferay.portlet.wiki.service.impl.WikiPageServiceImpl} 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 WikiPageService
030     * @see com.liferay.portlet.wiki.service.base.WikiPageServiceBaseImpl
031     * @see com.liferay.portlet.wiki.service.impl.WikiPageServiceImpl
032     * @generated
033     */
034    public class WikiPageServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * 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.
039             */
040            public static com.liferay.portlet.wiki.model.WikiPage addPage(long nodeId,
041                    java.lang.String title, java.lang.String content,
042                    java.lang.String summary, boolean minorEdit,
043                    com.liferay.portal.service.ServiceContext serviceContext)
044                    throws com.liferay.portal.kernel.exception.PortalException,
045                            com.liferay.portal.kernel.exception.SystemException {
046                    return getService()
047                                       .addPage(nodeId, title, content, summary, minorEdit,
048                            serviceContext);
049            }
050    
051            public static com.liferay.portlet.wiki.model.WikiPage addPage(long nodeId,
052                    java.lang.String title, java.lang.String content,
053                    java.lang.String summary, boolean minorEdit, java.lang.String format,
054                    java.lang.String parentTitle, java.lang.String redirectTitle,
055                    com.liferay.portal.service.ServiceContext serviceContext)
056                    throws com.liferay.portal.kernel.exception.PortalException,
057                            com.liferay.portal.kernel.exception.SystemException {
058                    return getService()
059                                       .addPage(nodeId, title, content, summary, minorEdit, format,
060                            parentTitle, redirectTitle, serviceContext);
061            }
062    
063            public static void addPageAttachment(long nodeId, java.lang.String title,
064                    java.lang.String fileName, java.io.File file)
065                    throws com.liferay.portal.kernel.exception.PortalException,
066                            com.liferay.portal.kernel.exception.SystemException {
067                    getService().addPageAttachment(nodeId, title, fileName, file);
068            }
069    
070            public static void addPageAttachments(long nodeId, java.lang.String title,
071                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStream)
072                    throws com.liferay.portal.kernel.exception.PortalException,
073                            com.liferay.portal.kernel.exception.SystemException {
074                    getService().addPageAttachments(nodeId, title, inputStream);
075            }
076    
077            public static java.lang.String addTempPageAttachment(long nodeId,
078                    java.lang.String fileName, java.lang.String tempFolderName,
079                    java.io.InputStream inputStream)
080                    throws com.liferay.portal.kernel.exception.PortalException,
081                            com.liferay.portal.kernel.exception.SystemException,
082                            java.io.IOException {
083                    return getService()
084                                       .addTempPageAttachment(nodeId, fileName, tempFolderName,
085                            inputStream);
086            }
087    
088            public static void changeParent(long nodeId, java.lang.String title,
089                    java.lang.String newParentTitle,
090                    com.liferay.portal.service.ServiceContext serviceContext)
091                    throws com.liferay.portal.kernel.exception.PortalException,
092                            com.liferay.portal.kernel.exception.SystemException {
093                    getService().changeParent(nodeId, title, newParentTitle, serviceContext);
094            }
095    
096            public static void deletePage(long nodeId, java.lang.String title)
097                    throws com.liferay.portal.kernel.exception.PortalException,
098                            com.liferay.portal.kernel.exception.SystemException {
099                    getService().deletePage(nodeId, title);
100            }
101    
102            public static void deletePage(long nodeId, java.lang.String title,
103                    double version)
104                    throws com.liferay.portal.kernel.exception.PortalException,
105                            com.liferay.portal.kernel.exception.SystemException {
106                    getService().deletePage(nodeId, title, version);
107            }
108    
109            public static void deletePageAttachment(long nodeId,
110                    java.lang.String title, java.lang.String fileName)
111                    throws com.liferay.portal.kernel.exception.PortalException,
112                            com.liferay.portal.kernel.exception.SystemException {
113                    getService().deletePageAttachment(nodeId, title, fileName);
114            }
115    
116            public static void deleteTempPageAttachment(long nodeId,
117                    java.lang.String fileName, java.lang.String tempFolderName)
118                    throws com.liferay.portal.kernel.exception.PortalException,
119                            com.liferay.portal.kernel.exception.SystemException {
120                    getService().deleteTempPageAttachment(nodeId, fileName, tempFolderName);
121            }
122    
123            public static com.liferay.portlet.wiki.model.WikiPage getDraftPage(
124                    long nodeId, java.lang.String title)
125                    throws com.liferay.portal.kernel.exception.PortalException,
126                            com.liferay.portal.kernel.exception.SystemException {
127                    return getService().getDraftPage(nodeId, title);
128            }
129    
130            public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getNodePages(
131                    long nodeId, int max)
132                    throws com.liferay.portal.kernel.exception.PortalException,
133                            com.liferay.portal.kernel.exception.SystemException {
134                    return getService().getNodePages(nodeId, max);
135            }
136    
137            public static java.lang.String getNodePagesRSS(long nodeId, int max,
138                    java.lang.String type, double version, java.lang.String displayStyle,
139                    java.lang.String feedURL, java.lang.String entryURL)
140                    throws com.liferay.portal.kernel.exception.PortalException,
141                            com.liferay.portal.kernel.exception.SystemException {
142                    return getService()
143                                       .getNodePagesRSS(nodeId, max, type, version, displayStyle,
144                            feedURL, entryURL);
145            }
146    
147            public static com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
148                    java.lang.String title)
149                    throws com.liferay.portal.kernel.exception.PortalException,
150                            com.liferay.portal.kernel.exception.SystemException {
151                    return getService().getPage(nodeId, title);
152            }
153    
154            public static com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
155                    java.lang.String title, java.lang.Boolean head)
156                    throws com.liferay.portal.kernel.exception.PortalException,
157                            com.liferay.portal.kernel.exception.SystemException {
158                    return getService().getPage(nodeId, title, head);
159            }
160    
161            public static com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
162                    java.lang.String title, double version)
163                    throws com.liferay.portal.kernel.exception.PortalException,
164                            com.liferay.portal.kernel.exception.SystemException {
165                    return getService().getPage(nodeId, title, version);
166            }
167    
168            public static java.lang.String getPagesRSS(long companyId, long nodeId,
169                    java.lang.String title, int max, java.lang.String type, double version,
170                    java.lang.String displayStyle, java.lang.String feedURL,
171                    java.lang.String entryURL, java.util.Locale locale)
172                    throws com.liferay.portal.kernel.exception.PortalException,
173                            com.liferay.portal.kernel.exception.SystemException {
174                    return getService()
175                                       .getPagesRSS(companyId, nodeId, title, max, type, version,
176                            displayStyle, feedURL, entryURL, locale);
177            }
178    
179            public static java.lang.String[] getTempPageAttachmentNames(long nodeId,
180                    java.lang.String tempFolderName)
181                    throws com.liferay.portal.kernel.exception.PortalException,
182                            com.liferay.portal.kernel.exception.SystemException {
183                    return getService().getTempPageAttachmentNames(nodeId, tempFolderName);
184            }
185    
186            public static void movePage(long nodeId, java.lang.String title,
187                    java.lang.String newTitle,
188                    com.liferay.portal.service.ServiceContext serviceContext)
189                    throws com.liferay.portal.kernel.exception.PortalException,
190                            com.liferay.portal.kernel.exception.SystemException {
191                    getService().movePage(nodeId, title, newTitle, serviceContext);
192            }
193    
194            public static com.liferay.portlet.wiki.model.WikiPage revertPage(
195                    long nodeId, java.lang.String title, double version,
196                    com.liferay.portal.service.ServiceContext serviceContext)
197                    throws com.liferay.portal.kernel.exception.PortalException,
198                            com.liferay.portal.kernel.exception.SystemException {
199                    return getService().revertPage(nodeId, title, version, serviceContext);
200            }
201    
202            public static void subscribePage(long nodeId, java.lang.String title)
203                    throws com.liferay.portal.kernel.exception.PortalException,
204                            com.liferay.portal.kernel.exception.SystemException {
205                    getService().subscribePage(nodeId, title);
206            }
207    
208            public static void unsubscribePage(long nodeId, java.lang.String title)
209                    throws com.liferay.portal.kernel.exception.PortalException,
210                            com.liferay.portal.kernel.exception.SystemException {
211                    getService().unsubscribePage(nodeId, title);
212            }
213    
214            public static com.liferay.portlet.wiki.model.WikiPage updatePage(
215                    long nodeId, java.lang.String title, double version,
216                    java.lang.String content, java.lang.String summary, boolean minorEdit,
217                    java.lang.String format, java.lang.String parentTitle,
218                    java.lang.String redirectTitle,
219                    com.liferay.portal.service.ServiceContext serviceContext)
220                    throws com.liferay.portal.kernel.exception.PortalException,
221                            com.liferay.portal.kernel.exception.SystemException {
222                    return getService()
223                                       .updatePage(nodeId, title, version, content, summary,
224                            minorEdit, format, parentTitle, redirectTitle, serviceContext);
225            }
226    
227            public static WikiPageService getService() {
228                    if (_service == null) {
229                            _service = (WikiPageService)PortalBeanLocatorUtil.locate(WikiPageService.class.getName());
230    
231                            ReferenceRegistry.registerReference(WikiPageServiceUtil.class,
232                                    "_service");
233                            MethodCache.remove(WikiPageService.class);
234                    }
235    
236                    return _service;
237            }
238    
239            public void setService(WikiPageService service) {
240                    MethodCache.remove(WikiPageService.class);
241    
242                    _service = service;
243    
244                    ReferenceRegistry.registerReference(WikiPageServiceUtil.class,
245                            "_service");
246                    MethodCache.remove(WikiPageService.class);
247            }
248    
249            private static WikiPageService _service;
250    }