001    /**
002     * Copyright (c) 2000-2013 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/api/secure/axis. Set the property
054     * <b>axis.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, java.io.InputStream>> inputStream)
109                    throws RemoteException {
110                    try {
111                            WikiPageServiceUtil.addPageAttachments(nodeId, title, inputStream);
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 void deleteTempPageAttachment(long nodeId,
173                    java.lang.String fileName, java.lang.String tempFolderName)
174                    throws RemoteException {
175                    try {
176                            WikiPageServiceUtil.deleteTempPageAttachment(nodeId, fileName,
177                                    tempFolderName);
178                    }
179                    catch (Exception e) {
180                            _log.error(e, e);
181    
182                            throw new RemoteException(e.getMessage());
183                    }
184            }
185    
186            public static com.liferay.portlet.wiki.model.WikiPageSoap[] getChildren(
187                    long groupId, long nodeId, boolean head, java.lang.String parentTitle)
188                    throws RemoteException {
189                    try {
190                            java.util.List<com.liferay.portlet.wiki.model.WikiPage> returnValue = WikiPageServiceUtil.getChildren(groupId,
191                                            nodeId, head, parentTitle);
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 com.liferay.portlet.wiki.model.WikiPageSoap getDraftPage(
203                    long nodeId, java.lang.String title) throws RemoteException {
204                    try {
205                            com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.getDraftPage(nodeId,
206                                            title);
207    
208                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
209                    }
210                    catch (Exception e) {
211                            _log.error(e, e);
212    
213                            throw new RemoteException(e.getMessage());
214                    }
215            }
216    
217            public static com.liferay.portlet.wiki.model.WikiPageSoap[] getNodePages(
218                    long nodeId, int max) throws RemoteException {
219                    try {
220                            java.util.List<com.liferay.portlet.wiki.model.WikiPage> returnValue = WikiPageServiceUtil.getNodePages(nodeId,
221                                            max);
222    
223                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModels(returnValue);
224                    }
225                    catch (Exception e) {
226                            _log.error(e, e);
227    
228                            throw new RemoteException(e.getMessage());
229                    }
230            }
231    
232            public static java.lang.String getNodePagesRSS(long nodeId, int max,
233                    java.lang.String type, double version, java.lang.String displayStyle,
234                    java.lang.String feedURL, java.lang.String entryURL)
235                    throws RemoteException {
236                    try {
237                            java.lang.String returnValue = WikiPageServiceUtil.getNodePagesRSS(nodeId,
238                                            max, type, version, displayStyle, feedURL, entryURL);
239    
240                            return returnValue;
241                    }
242                    catch (Exception e) {
243                            _log.error(e, e);
244    
245                            throw new RemoteException(e.getMessage());
246                    }
247            }
248    
249            public static java.lang.String getNodePagesRSS(long nodeId, int max,
250                    java.lang.String type, double version, java.lang.String displayStyle,
251                    java.lang.String feedURL, java.lang.String entryURL,
252                    java.lang.String attachmentURLPrefix) throws RemoteException {
253                    try {
254                            java.lang.String returnValue = WikiPageServiceUtil.getNodePagesRSS(nodeId,
255                                            max, type, version, displayStyle, feedURL, entryURL,
256                                            attachmentURLPrefix);
257    
258                            return returnValue;
259                    }
260                    catch (Exception e) {
261                            _log.error(e, e);
262    
263                            throw new RemoteException(e.getMessage());
264                    }
265            }
266    
267            public static com.liferay.portlet.wiki.model.WikiPageSoap[] getOrphans(
268                    long groupId, long nodeId) throws RemoteException {
269                    try {
270                            java.util.List<com.liferay.portlet.wiki.model.WikiPage> returnValue = WikiPageServiceUtil.getOrphans(groupId,
271                                            nodeId);
272    
273                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModels(returnValue);
274                    }
275                    catch (Exception e) {
276                            _log.error(e, e);
277    
278                            throw new RemoteException(e.getMessage());
279                    }
280            }
281    
282            public static com.liferay.portlet.wiki.model.WikiPageSoap getPage(
283                    long groupId, long nodeId, java.lang.String title)
284                    throws RemoteException {
285                    try {
286                            com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.getPage(groupId,
287                                            nodeId, title);
288    
289                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
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 getPage(
299                    long nodeId, java.lang.String title) throws RemoteException {
300                    try {
301                            com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.getPage(nodeId,
302                                            title);
303    
304                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
305                    }
306                    catch (Exception e) {
307                            _log.error(e, e);
308    
309                            throw new RemoteException(e.getMessage());
310                    }
311            }
312    
313            public static com.liferay.portlet.wiki.model.WikiPageSoap getPage(
314                    long nodeId, java.lang.String title, java.lang.Boolean head)
315                    throws RemoteException {
316                    try {
317                            com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.getPage(nodeId,
318                                            title, head);
319    
320                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
321                    }
322                    catch (Exception e) {
323                            _log.error(e, e);
324    
325                            throw new RemoteException(e.getMessage());
326                    }
327            }
328    
329            public static com.liferay.portlet.wiki.model.WikiPageSoap getPage(
330                    long nodeId, java.lang.String title, double version)
331                    throws RemoteException {
332                    try {
333                            com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.getPage(nodeId,
334                                            title, version);
335    
336                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
337                    }
338                    catch (Exception e) {
339                            _log.error(e, e);
340    
341                            throw new RemoteException(e.getMessage());
342                    }
343            }
344    
345            public static com.liferay.portlet.wiki.model.WikiPageSoap[] getPages(
346                    long groupId, long nodeId, boolean head, int status, int start,
347                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
348                    throws RemoteException {
349                    try {
350                            java.util.List<com.liferay.portlet.wiki.model.WikiPage> returnValue = WikiPageServiceUtil.getPages(groupId,
351                                            nodeId, head, status, start, end, obc);
352    
353                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModels(returnValue);
354                    }
355                    catch (Exception e) {
356                            _log.error(e, e);
357    
358                            throw new RemoteException(e.getMessage());
359                    }
360            }
361    
362            public static com.liferay.portlet.wiki.model.WikiPageSoap[] getPages(
363                    long groupId, long userId, long nodeId, int status, int start, int end)
364                    throws RemoteException {
365                    try {
366                            java.util.List<com.liferay.portlet.wiki.model.WikiPage> returnValue = WikiPageServiceUtil.getPages(groupId,
367                                            userId, nodeId, status, start, end);
368    
369                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModels(returnValue);
370                    }
371                    catch (Exception e) {
372                            _log.error(e, e);
373    
374                            throw new RemoteException(e.getMessage());
375                    }
376            }
377    
378            public static int getPagesCount(long groupId, long nodeId, boolean head)
379                    throws RemoteException {
380                    try {
381                            int returnValue = WikiPageServiceUtil.getPagesCount(groupId,
382                                            nodeId, head);
383    
384                            return returnValue;
385                    }
386                    catch (Exception e) {
387                            _log.error(e, e);
388    
389                            throw new RemoteException(e.getMessage());
390                    }
391            }
392    
393            public static int getPagesCount(long groupId, long userId, long nodeId,
394                    int status) throws RemoteException {
395                    try {
396                            int returnValue = WikiPageServiceUtil.getPagesCount(groupId,
397                                            userId, nodeId, status);
398    
399                            return returnValue;
400                    }
401                    catch (Exception e) {
402                            _log.error(e, e);
403    
404                            throw new RemoteException(e.getMessage());
405                    }
406            }
407    
408            public static java.lang.String getPagesRSS(long companyId, long nodeId,
409                    java.lang.String title, int max, java.lang.String type, double version,
410                    java.lang.String displayStyle, java.lang.String feedURL,
411                    java.lang.String entryURL, String locale) throws RemoteException {
412                    try {
413                            java.lang.String returnValue = WikiPageServiceUtil.getPagesRSS(companyId,
414                                            nodeId, title, max, type, version, displayStyle, feedURL,
415                                            entryURL, LocaleUtil.fromLanguageId(locale));
416    
417                            return returnValue;
418                    }
419                    catch (Exception e) {
420                            _log.error(e, e);
421    
422                            throw new RemoteException(e.getMessage());
423                    }
424            }
425    
426            public static java.lang.String getPagesRSS(long companyId, long nodeId,
427                    java.lang.String title, int max, java.lang.String type, double version,
428                    java.lang.String displayStyle, java.lang.String feedURL,
429                    java.lang.String entryURL, java.lang.String attachmentURLPrefix,
430                    String locale) throws RemoteException {
431                    try {
432                            java.lang.String returnValue = WikiPageServiceUtil.getPagesRSS(companyId,
433                                            nodeId, title, max, type, version, displayStyle, feedURL,
434                                            entryURL, attachmentURLPrefix,
435                                            LocaleUtil.fromLanguageId(locale));
436    
437                            return returnValue;
438                    }
439                    catch (Exception e) {
440                            _log.error(e, e);
441    
442                            throw new RemoteException(e.getMessage());
443                    }
444            }
445    
446            public static com.liferay.portlet.wiki.model.WikiPageSoap[] getRecentChanges(
447                    long groupId, long nodeId, int start, int end)
448                    throws RemoteException {
449                    try {
450                            java.util.List<com.liferay.portlet.wiki.model.WikiPage> returnValue = WikiPageServiceUtil.getRecentChanges(groupId,
451                                            nodeId, start, end);
452    
453                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModels(returnValue);
454                    }
455                    catch (Exception e) {
456                            _log.error(e, e);
457    
458                            throw new RemoteException(e.getMessage());
459                    }
460            }
461    
462            public static int getRecentChangesCount(long groupId, long nodeId)
463                    throws RemoteException {
464                    try {
465                            int returnValue = WikiPageServiceUtil.getRecentChangesCount(groupId,
466                                            nodeId);
467    
468                            return returnValue;
469                    }
470                    catch (Exception e) {
471                            _log.error(e, e);
472    
473                            throw new RemoteException(e.getMessage());
474                    }
475            }
476    
477            public static java.lang.String[] getTempPageAttachmentNames(long nodeId,
478                    java.lang.String tempFolderName) throws RemoteException {
479                    try {
480                            java.lang.String[] returnValue = WikiPageServiceUtil.getTempPageAttachmentNames(nodeId,
481                                            tempFolderName);
482    
483                            return returnValue;
484                    }
485                    catch (Exception e) {
486                            _log.error(e, e);
487    
488                            throw new RemoteException(e.getMessage());
489                    }
490            }
491    
492            public static void movePage(long nodeId, java.lang.String title,
493                    java.lang.String newTitle,
494                    com.liferay.portal.service.ServiceContext serviceContext)
495                    throws RemoteException {
496                    try {
497                            WikiPageServiceUtil.movePage(nodeId, title, newTitle, serviceContext);
498                    }
499                    catch (Exception e) {
500                            _log.error(e, e);
501    
502                            throw new RemoteException(e.getMessage());
503                    }
504            }
505    
506            public static com.liferay.portlet.wiki.model.WikiPageSoap revertPage(
507                    long nodeId, java.lang.String title, double version,
508                    com.liferay.portal.service.ServiceContext serviceContext)
509                    throws RemoteException {
510                    try {
511                            com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.revertPage(nodeId,
512                                            title, version, serviceContext);
513    
514                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
515                    }
516                    catch (Exception e) {
517                            _log.error(e, e);
518    
519                            throw new RemoteException(e.getMessage());
520                    }
521            }
522    
523            public static void subscribePage(long nodeId, java.lang.String title)
524                    throws RemoteException {
525                    try {
526                            WikiPageServiceUtil.subscribePage(nodeId, title);
527                    }
528                    catch (Exception e) {
529                            _log.error(e, e);
530    
531                            throw new RemoteException(e.getMessage());
532                    }
533            }
534    
535            public static void unsubscribePage(long nodeId, java.lang.String title)
536                    throws RemoteException {
537                    try {
538                            WikiPageServiceUtil.unsubscribePage(nodeId, title);
539                    }
540                    catch (Exception e) {
541                            _log.error(e, e);
542    
543                            throw new RemoteException(e.getMessage());
544                    }
545            }
546    
547            public static com.liferay.portlet.wiki.model.WikiPageSoap updatePage(
548                    long nodeId, java.lang.String title, double version,
549                    java.lang.String content, java.lang.String summary, boolean minorEdit,
550                    java.lang.String format, java.lang.String parentTitle,
551                    java.lang.String redirectTitle,
552                    com.liferay.portal.service.ServiceContext serviceContext)
553                    throws RemoteException {
554                    try {
555                            com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.updatePage(nodeId,
556                                            title, version, content, summary, minorEdit, format,
557                                            parentTitle, redirectTitle, serviceContext);
558    
559                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
560                    }
561                    catch (Exception e) {
562                            _log.error(e, e);
563    
564                            throw new RemoteException(e.getMessage());
565                    }
566            }
567    
568            private static Log _log = LogFactoryUtil.getLog(WikiPageServiceSoap.class);
569    }