001    /**
002     * Copyright (c) 2000-2010 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.http;
016    
017    import com.liferay.portal.kernel.log.Log;
018    import com.liferay.portal.kernel.log.LogFactoryUtil;
019    import com.liferay.portal.kernel.util.LocaleUtil;
020    
021    import com.liferay.portlet.wiki.service.WikiPageServiceUtil;
022    
023    import java.rmi.RemoteException;
024    
025    /**
026     * <p>
027     * This class provides a SOAP utility for the
028     * {@link com.liferay.portlet.wiki.service.WikiPageServiceUtil} service utility. The
029     * static methods of this class calls the same methods of the service utility.
030     * However, the signatures are different because it is difficult for SOAP to
031     * support certain types.
032     * </p>
033     *
034     * <p>
035     * ServiceBuilder follows certain rules in translating the methods. For example,
036     * if the method in the service utility returns a {@link java.util.List}, that
037     * is translated to an array of {@link com.liferay.portlet.wiki.model.WikiPageSoap}.
038     * If the method in the service utility returns a
039     * {@link com.liferay.portlet.wiki.model.WikiPage}, that is translated to a
040     * {@link com.liferay.portlet.wiki.model.WikiPageSoap}. Methods that SOAP cannot
041     * safely wire are skipped.
042     * </p>
043     *
044     * <p>
045     * The benefits of using the SOAP utility is that it is cross platform
046     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
047     * even Perl, to call the generated services. One drawback of SOAP is that it is
048     * slow because it needs to serialize all calls into a text format (XML).
049     * </p>
050     *
051     * <p>
052     * You can see a list of services at
053     * http://localhost:8080/tunnel-web/secure/axis. Set the property
054     * <b>tunnel.servlet.hosts.allowed</b> in portal.properties to configure
055     * security.
056     * </p>
057     *
058     * <p>
059     * The SOAP utility is only generated for remote services.
060     * </p>
061     *
062     * @author    Brian Wing Shun Chan
063     * @see       WikiPageServiceHttp
064     * @see       com.liferay.portlet.wiki.model.WikiPageSoap
065     * @see       com.liferay.portlet.wiki.service.WikiPageServiceUtil
066     * @generated
067     */
068    public class WikiPageServiceSoap {
069            public static com.liferay.portlet.wiki.model.WikiPageSoap addPage(
070                    long nodeId, java.lang.String title, java.lang.String content,
071                    java.lang.String summary, boolean minorEdit,
072                    com.liferay.portal.service.ServiceContext serviceContext)
073                    throws RemoteException {
074                    try {
075                            com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.addPage(nodeId,
076                                            title, content, summary, minorEdit, serviceContext);
077    
078                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
079                    }
080                    catch (Exception e) {
081                            _log.error(e, e);
082    
083                            throw new RemoteException(e.getMessage());
084                    }
085            }
086    
087            public static com.liferay.portlet.wiki.model.WikiPageSoap addPage(
088                    long nodeId, java.lang.String title, java.lang.String content,
089                    java.lang.String summary, boolean minorEdit, java.lang.String format,
090                    java.lang.String parentTitle, java.lang.String redirectTitle,
091                    com.liferay.portal.service.ServiceContext serviceContext)
092                    throws RemoteException {
093                    try {
094                            com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.addPage(nodeId,
095                                            title, content, summary, minorEdit, format, parentTitle,
096                                            redirectTitle, serviceContext);
097    
098                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
099                    }
100                    catch (Exception e) {
101                            _log.error(e, e);
102    
103                            throw new RemoteException(e.getMessage());
104                    }
105            }
106    
107            public static void addPageAttachments(long nodeId, java.lang.String title,
108                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files)
109                    throws RemoteException {
110                    try {
111                            WikiPageServiceUtil.addPageAttachments(nodeId, title, files);
112                    }
113                    catch (Exception e) {
114                            _log.error(e, e);
115    
116                            throw new RemoteException(e.getMessage());
117                    }
118            }
119    
120            public static void changeParent(long nodeId, java.lang.String title,
121                    java.lang.String newParentTitle,
122                    com.liferay.portal.service.ServiceContext serviceContext)
123                    throws RemoteException {
124                    try {
125                            WikiPageServiceUtil.changeParent(nodeId, title, newParentTitle,
126                                    serviceContext);
127                    }
128                    catch (Exception e) {
129                            _log.error(e, e);
130    
131                            throw new RemoteException(e.getMessage());
132                    }
133            }
134    
135            public static void deletePage(long nodeId, java.lang.String title)
136                    throws RemoteException {
137                    try {
138                            WikiPageServiceUtil.deletePage(nodeId, title);
139                    }
140                    catch (Exception e) {
141                            _log.error(e, e);
142    
143                            throw new RemoteException(e.getMessage());
144                    }
145            }
146    
147            public static void deletePage(long nodeId, java.lang.String title,
148                    double version) throws RemoteException {
149                    try {
150                            WikiPageServiceUtil.deletePage(nodeId, title, version);
151                    }
152                    catch (Exception e) {
153                            _log.error(e, e);
154    
155                            throw new RemoteException(e.getMessage());
156                    }
157            }
158    
159            public static void deletePageAttachment(long nodeId,
160                    java.lang.String title, java.lang.String fileName)
161                    throws RemoteException {
162                    try {
163                            WikiPageServiceUtil.deletePageAttachment(nodeId, title, fileName);
164                    }
165                    catch (Exception e) {
166                            _log.error(e, e);
167    
168                            throw new RemoteException(e.getMessage());
169                    }
170            }
171    
172            public static com.liferay.portlet.wiki.model.WikiPageSoap getDraftPage(
173                    long nodeId, java.lang.String title) throws RemoteException {
174                    try {
175                            com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.getDraftPage(nodeId,
176                                            title);
177    
178                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
179                    }
180                    catch (Exception e) {
181                            _log.error(e, e);
182    
183                            throw new RemoteException(e.getMessage());
184                    }
185            }
186    
187            public static com.liferay.portlet.wiki.model.WikiPageSoap[] getNodePages(
188                    long nodeId, int max) throws RemoteException {
189                    try {
190                            java.util.List<com.liferay.portlet.wiki.model.WikiPage> returnValue = WikiPageServiceUtil.getNodePages(nodeId,
191                                            max);
192    
193                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModels(returnValue);
194                    }
195                    catch (Exception e) {
196                            _log.error(e, e);
197    
198                            throw new RemoteException(e.getMessage());
199                    }
200            }
201    
202            public static java.lang.String getNodePagesRSS(long nodeId, int max,
203                    java.lang.String type, double version, java.lang.String displayStyle,
204                    java.lang.String feedURL, java.lang.String entryURL)
205                    throws RemoteException {
206                    try {
207                            java.lang.String returnValue = WikiPageServiceUtil.getNodePagesRSS(nodeId,
208                                            max, type, version, displayStyle, feedURL, entryURL);
209    
210                            return returnValue;
211                    }
212                    catch (Exception e) {
213                            _log.error(e, e);
214    
215                            throw new RemoteException(e.getMessage());
216                    }
217            }
218    
219            public static com.liferay.portlet.wiki.model.WikiPageSoap getPage(
220                    long nodeId, java.lang.String title) throws RemoteException {
221                    try {
222                            com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.getPage(nodeId,
223                                            title);
224    
225                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
226                    }
227                    catch (Exception e) {
228                            _log.error(e, e);
229    
230                            throw new RemoteException(e.getMessage());
231                    }
232            }
233    
234            public static com.liferay.portlet.wiki.model.WikiPageSoap getPage(
235                    long nodeId, java.lang.String title, java.lang.Boolean head)
236                    throws RemoteException {
237                    try {
238                            com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.getPage(nodeId,
239                                            title, head);
240    
241                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
242                    }
243                    catch (Exception e) {
244                            _log.error(e, e);
245    
246                            throw new RemoteException(e.getMessage());
247                    }
248            }
249    
250            public static com.liferay.portlet.wiki.model.WikiPageSoap getPage(
251                    long nodeId, java.lang.String title, double version)
252                    throws RemoteException {
253                    try {
254                            com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.getPage(nodeId,
255                                            title, version);
256    
257                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
258                    }
259                    catch (Exception e) {
260                            _log.error(e, e);
261    
262                            throw new RemoteException(e.getMessage());
263                    }
264            }
265    
266            public static java.lang.String getPagesRSS(long companyId, long nodeId,
267                    java.lang.String title, int max, java.lang.String type, double version,
268                    java.lang.String displayStyle, java.lang.String feedURL,
269                    java.lang.String entryURL, String locale) throws RemoteException {
270                    try {
271                            java.lang.String returnValue = WikiPageServiceUtil.getPagesRSS(companyId,
272                                            nodeId, title, max, type, version, displayStyle, feedURL,
273                                            entryURL, LocaleUtil.fromLanguageId(locale));
274    
275                            return returnValue;
276                    }
277                    catch (Exception e) {
278                            _log.error(e, e);
279    
280                            throw new RemoteException(e.getMessage());
281                    }
282            }
283    
284            public static void movePage(long nodeId, java.lang.String title,
285                    java.lang.String newTitle,
286                    com.liferay.portal.service.ServiceContext serviceContext)
287                    throws RemoteException {
288                    try {
289                            WikiPageServiceUtil.movePage(nodeId, title, newTitle, serviceContext);
290                    }
291                    catch (Exception e) {
292                            _log.error(e, e);
293    
294                            throw new RemoteException(e.getMessage());
295                    }
296            }
297    
298            public static com.liferay.portlet.wiki.model.WikiPageSoap revertPage(
299                    long nodeId, java.lang.String title, double version,
300                    com.liferay.portal.service.ServiceContext serviceContext)
301                    throws RemoteException {
302                    try {
303                            com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.revertPage(nodeId,
304                                            title, version, serviceContext);
305    
306                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
307                    }
308                    catch (Exception e) {
309                            _log.error(e, e);
310    
311                            throw new RemoteException(e.getMessage());
312                    }
313            }
314    
315            public static void subscribePage(long nodeId, java.lang.String title)
316                    throws RemoteException {
317                    try {
318                            WikiPageServiceUtil.subscribePage(nodeId, title);
319                    }
320                    catch (Exception e) {
321                            _log.error(e, e);
322    
323                            throw new RemoteException(e.getMessage());
324                    }
325            }
326    
327            public static void unsubscribePage(long nodeId, java.lang.String title)
328                    throws RemoteException {
329                    try {
330                            WikiPageServiceUtil.unsubscribePage(nodeId, title);
331                    }
332                    catch (Exception e) {
333                            _log.error(e, e);
334    
335                            throw new RemoteException(e.getMessage());
336                    }
337            }
338    
339            public static com.liferay.portlet.wiki.model.WikiPageSoap updatePage(
340                    long nodeId, java.lang.String title, double version,
341                    java.lang.String content, java.lang.String summary, boolean minorEdit,
342                    java.lang.String format, java.lang.String parentTitle,
343                    java.lang.String redirectTitle,
344                    com.liferay.portal.service.ServiceContext serviceContext)
345                    throws RemoteException {
346                    try {
347                            com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.updatePage(nodeId,
348                                            title, version, content, summary, minorEdit, format,
349                                            parentTitle, redirectTitle, serviceContext);
350    
351                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
352                    }
353                    catch (Exception e) {
354                            _log.error(e, e);
355    
356                            throw new RemoteException(e.getMessage());
357                    }
358            }
359    
360            private static Log _log = LogFactoryUtil.getLog(WikiPageServiceSoap.class);
361    }