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.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 http://localhost:8080/api/axis. Set the
053     * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
054     * security.
055     * </p>
056     *
057     * <p>
058     * The SOAP utility is only generated for remote services.
059     * </p>
060     *
061     * @author    Brian Wing Shun Chan
062     * @see       WikiPageServiceHttp
063     * @see       com.liferay.portlet.wiki.model.WikiPageSoap
064     * @see       com.liferay.portlet.wiki.service.WikiPageServiceUtil
065     * @generated
066     */
067    public class WikiPageServiceSoap {
068            public static com.liferay.portlet.wiki.model.WikiPageSoap addPage(
069                    long nodeId, java.lang.String title, java.lang.String content,
070                    java.lang.String summary, boolean minorEdit,
071                    com.liferay.portal.service.ServiceContext serviceContext)
072                    throws RemoteException {
073                    try {
074                            com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.addPage(nodeId,
075                                            title, content, summary, minorEdit, serviceContext);
076    
077                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
078                    }
079                    catch (Exception e) {
080                            _log.error(e, e);
081    
082                            throw new RemoteException(e.getMessage());
083                    }
084            }
085    
086            public static com.liferay.portlet.wiki.model.WikiPageSoap addPage(
087                    long nodeId, java.lang.String title, java.lang.String content,
088                    java.lang.String summary, boolean minorEdit, java.lang.String format,
089                    java.lang.String parentTitle, java.lang.String redirectTitle,
090                    com.liferay.portal.service.ServiceContext serviceContext)
091                    throws RemoteException {
092                    try {
093                            com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.addPage(nodeId,
094                                            title, content, summary, minorEdit, format, parentTitle,
095                                            redirectTitle, serviceContext);
096    
097                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
098                    }
099                    catch (Exception e) {
100                            _log.error(e, e);
101    
102                            throw new RemoteException(e.getMessage());
103                    }
104            }
105    
106            public static void addPageAttachments(long nodeId, java.lang.String title,
107                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs)
108                    throws RemoteException {
109                    try {
110                            WikiPageServiceUtil.addPageAttachments(nodeId, title,
111                                    inputStreamOVPs);
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 deletePageAttachments(long nodeId, java.lang.String title)
173                    throws RemoteException {
174                    try {
175                            WikiPageServiceUtil.deletePageAttachments(nodeId, title);
176                    }
177                    catch (Exception e) {
178                            _log.error(e, e);
179    
180                            throw new RemoteException(e.getMessage());
181                    }
182            }
183    
184            public static void deleteTempPageAttachment(long nodeId,
185                    java.lang.String fileName, java.lang.String tempFolderName)
186                    throws RemoteException {
187                    try {
188                            WikiPageServiceUtil.deleteTempPageAttachment(nodeId, fileName,
189                                    tempFolderName);
190                    }
191                    catch (Exception e) {
192                            _log.error(e, e);
193    
194                            throw new RemoteException(e.getMessage());
195                    }
196            }
197    
198            public static void deleteTrashPageAttachments(long nodeId,
199                    java.lang.String title) throws RemoteException {
200                    try {
201                            WikiPageServiceUtil.deleteTrashPageAttachments(nodeId, title);
202                    }
203                    catch (Exception e) {
204                            _log.error(e, e);
205    
206                            throw new RemoteException(e.getMessage());
207                    }
208            }
209    
210            public static com.liferay.portlet.wiki.model.WikiPageSoap[] getChildren(
211                    long groupId, long nodeId, boolean head, java.lang.String parentTitle)
212                    throws RemoteException {
213                    try {
214                            java.util.List<com.liferay.portlet.wiki.model.WikiPage> returnValue = WikiPageServiceUtil.getChildren(groupId,
215                                            nodeId, head, parentTitle);
216    
217                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModels(returnValue);
218                    }
219                    catch (Exception e) {
220                            _log.error(e, e);
221    
222                            throw new RemoteException(e.getMessage());
223                    }
224            }
225    
226            public static com.liferay.portlet.wiki.model.WikiPageSoap getDraftPage(
227                    long nodeId, java.lang.String title) throws RemoteException {
228                    try {
229                            com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.getDraftPage(nodeId,
230                                            title);
231    
232                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
233                    }
234                    catch (Exception e) {
235                            _log.error(e, e);
236    
237                            throw new RemoteException(e.getMessage());
238                    }
239            }
240    
241            public static com.liferay.portlet.wiki.model.WikiPageSoap[] getNodePages(
242                    long nodeId, int max) throws RemoteException {
243                    try {
244                            java.util.List<com.liferay.portlet.wiki.model.WikiPage> returnValue = WikiPageServiceUtil.getNodePages(nodeId,
245                                            max);
246    
247                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModels(returnValue);
248                    }
249                    catch (Exception e) {
250                            _log.error(e, e);
251    
252                            throw new RemoteException(e.getMessage());
253                    }
254            }
255    
256            public static java.lang.String getNodePagesRSS(long nodeId, int max,
257                    java.lang.String type, double version, java.lang.String displayStyle,
258                    java.lang.String feedURL, java.lang.String entryURL)
259                    throws RemoteException {
260                    try {
261                            java.lang.String returnValue = WikiPageServiceUtil.getNodePagesRSS(nodeId,
262                                            max, type, version, displayStyle, feedURL, entryURL);
263    
264                            return returnValue;
265                    }
266                    catch (Exception e) {
267                            _log.error(e, e);
268    
269                            throw new RemoteException(e.getMessage());
270                    }
271            }
272    
273            public static com.liferay.portlet.wiki.model.WikiPageSoap[] getOrphans(
274                    long groupId, long nodeId) throws RemoteException {
275                    try {
276                            java.util.List<com.liferay.portlet.wiki.model.WikiPage> returnValue = WikiPageServiceUtil.getOrphans(groupId,
277                                            nodeId);
278    
279                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModels(returnValue);
280                    }
281                    catch (Exception e) {
282                            _log.error(e, e);
283    
284                            throw new RemoteException(e.getMessage());
285                    }
286            }
287    
288            public static com.liferay.portlet.wiki.model.WikiPageSoap getPage(
289                    long groupId, long nodeId, java.lang.String title)
290                    throws RemoteException {
291                    try {
292                            com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.getPage(groupId,
293                                            nodeId, title);
294    
295                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
296                    }
297                    catch (Exception e) {
298                            _log.error(e, e);
299    
300                            throw new RemoteException(e.getMessage());
301                    }
302            }
303    
304            public static com.liferay.portlet.wiki.model.WikiPageSoap getPage(
305                    long nodeId, java.lang.String title) throws RemoteException {
306                    try {
307                            com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.getPage(nodeId,
308                                            title);
309    
310                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
311                    }
312                    catch (Exception e) {
313                            _log.error(e, e);
314    
315                            throw new RemoteException(e.getMessage());
316                    }
317            }
318    
319            public static com.liferay.portlet.wiki.model.WikiPageSoap getPage(
320                    long nodeId, java.lang.String title, java.lang.Boolean head)
321                    throws RemoteException {
322                    try {
323                            com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.getPage(nodeId,
324                                            title, head);
325    
326                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
327                    }
328                    catch (Exception e) {
329                            _log.error(e, e);
330    
331                            throw new RemoteException(e.getMessage());
332                    }
333            }
334    
335            public static com.liferay.portlet.wiki.model.WikiPageSoap getPage(
336                    long nodeId, java.lang.String title, double version)
337                    throws RemoteException {
338                    try {
339                            com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.getPage(nodeId,
340                                            title, version);
341    
342                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
343                    }
344                    catch (Exception e) {
345                            _log.error(e, e);
346    
347                            throw new RemoteException(e.getMessage());
348                    }
349            }
350    
351            public static com.liferay.portlet.wiki.model.WikiPageSoap[] getPages(
352                    long groupId, long nodeId, boolean head, int status, int start,
353                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
354                    throws RemoteException {
355                    try {
356                            java.util.List<com.liferay.portlet.wiki.model.WikiPage> returnValue = WikiPageServiceUtil.getPages(groupId,
357                                            nodeId, head, status, start, end, obc);
358    
359                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModels(returnValue);
360                    }
361                    catch (Exception e) {
362                            _log.error(e, e);
363    
364                            throw new RemoteException(e.getMessage());
365                    }
366            }
367    
368            public static com.liferay.portlet.wiki.model.WikiPageSoap[] getPages(
369                    long groupId, long userId, long nodeId, int status, int start, int end)
370                    throws RemoteException {
371                    try {
372                            java.util.List<com.liferay.portlet.wiki.model.WikiPage> returnValue = WikiPageServiceUtil.getPages(groupId,
373                                            userId, nodeId, status, start, end);
374    
375                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModels(returnValue);
376                    }
377                    catch (Exception e) {
378                            _log.error(e, e);
379    
380                            throw new RemoteException(e.getMessage());
381                    }
382            }
383    
384            public static int getPagesCount(long groupId, long nodeId, boolean head)
385                    throws RemoteException {
386                    try {
387                            int returnValue = WikiPageServiceUtil.getPagesCount(groupId,
388                                            nodeId, head);
389    
390                            return returnValue;
391                    }
392                    catch (Exception e) {
393                            _log.error(e, e);
394    
395                            throw new RemoteException(e.getMessage());
396                    }
397            }
398    
399            public static int getPagesCount(long groupId, long userId, long nodeId,
400                    int status) throws RemoteException {
401                    try {
402                            int returnValue = WikiPageServiceUtil.getPagesCount(groupId,
403                                            userId, nodeId, status);
404    
405                            return returnValue;
406                    }
407                    catch (Exception e) {
408                            _log.error(e, e);
409    
410                            throw new RemoteException(e.getMessage());
411                    }
412            }
413    
414            public static java.lang.String getPagesRSS(long companyId, long nodeId,
415                    java.lang.String title, int max, java.lang.String type, double version,
416                    java.lang.String displayStyle, java.lang.String feedURL,
417                    java.lang.String entryURL, String locale) throws RemoteException {
418                    try {
419                            java.lang.String returnValue = WikiPageServiceUtil.getPagesRSS(companyId,
420                                            nodeId, title, max, type, version, displayStyle, feedURL,
421                                            entryURL, LocaleUtil.fromLanguageId(locale));
422    
423                            return returnValue;
424                    }
425                    catch (Exception e) {
426                            _log.error(e, e);
427    
428                            throw new RemoteException(e.getMessage());
429                    }
430            }
431    
432            public static com.liferay.portlet.wiki.model.WikiPageSoap[] getRecentChanges(
433                    long groupId, long nodeId, int start, int end)
434                    throws RemoteException {
435                    try {
436                            java.util.List<com.liferay.portlet.wiki.model.WikiPage> returnValue = WikiPageServiceUtil.getRecentChanges(groupId,
437                                            nodeId, start, end);
438    
439                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModels(returnValue);
440                    }
441                    catch (Exception e) {
442                            _log.error(e, e);
443    
444                            throw new RemoteException(e.getMessage());
445                    }
446            }
447    
448            public static int getRecentChangesCount(long groupId, long nodeId)
449                    throws RemoteException {
450                    try {
451                            int returnValue = WikiPageServiceUtil.getRecentChangesCount(groupId,
452                                            nodeId);
453    
454                            return returnValue;
455                    }
456                    catch (Exception e) {
457                            _log.error(e, e);
458    
459                            throw new RemoteException(e.getMessage());
460                    }
461            }
462    
463            public static java.lang.String[] getTempPageAttachmentNames(long nodeId,
464                    java.lang.String tempFolderName) throws RemoteException {
465                    try {
466                            java.lang.String[] returnValue = WikiPageServiceUtil.getTempPageAttachmentNames(nodeId,
467                                            tempFolderName);
468    
469                            return returnValue;
470                    }
471                    catch (Exception e) {
472                            _log.error(e, e);
473    
474                            throw new RemoteException(e.getMessage());
475                    }
476            }
477    
478            public static void movePage(long nodeId, java.lang.String title,
479                    java.lang.String newTitle,
480                    com.liferay.portal.service.ServiceContext serviceContext)
481                    throws RemoteException {
482                    try {
483                            WikiPageServiceUtil.movePage(nodeId, title, newTitle, serviceContext);
484                    }
485                    catch (Exception e) {
486                            _log.error(e, e);
487    
488                            throw new RemoteException(e.getMessage());
489                    }
490            }
491    
492            public static long movePageAttachmentToTrash(long nodeId,
493                    java.lang.String title, java.lang.String fileName)
494                    throws RemoteException {
495                    try {
496                            long returnValue = WikiPageServiceUtil.movePageAttachmentToTrash(nodeId,
497                                            title, fileName);
498    
499                            return returnValue;
500                    }
501                    catch (Exception e) {
502                            _log.error(e, e);
503    
504                            throw new RemoteException(e.getMessage());
505                    }
506            }
507    
508            public static void movePageToTrash(long nodeId, java.lang.String title)
509                    throws RemoteException {
510                    try {
511                            WikiPageServiceUtil.movePageToTrash(nodeId, title);
512                    }
513                    catch (Exception e) {
514                            _log.error(e, e);
515    
516                            throw new RemoteException(e.getMessage());
517                    }
518            }
519    
520            public static void movePageToTrash(long nodeId, java.lang.String title,
521                    double version) throws RemoteException {
522                    try {
523                            WikiPageServiceUtil.movePageToTrash(nodeId, title, version);
524                    }
525                    catch (Exception e) {
526                            _log.error(e, e);
527    
528                            throw new RemoteException(e.getMessage());
529                    }
530            }
531    
532            public static void restorePageAttachmentFromTrash(long nodeId,
533                    java.lang.String title, java.lang.String fileName)
534                    throws RemoteException {
535                    try {
536                            WikiPageServiceUtil.restorePageAttachmentFromTrash(nodeId, title,
537                                    fileName);
538                    }
539                    catch (Exception e) {
540                            _log.error(e, e);
541    
542                            throw new RemoteException(e.getMessage());
543                    }
544            }
545    
546            public static void restorePageFromTrash(long resourcePrimKey)
547                    throws RemoteException {
548                    try {
549                            WikiPageServiceUtil.restorePageFromTrash(resourcePrimKey);
550                    }
551                    catch (Exception e) {
552                            _log.error(e, e);
553    
554                            throw new RemoteException(e.getMessage());
555                    }
556            }
557    
558            public static com.liferay.portlet.wiki.model.WikiPageSoap revertPage(
559                    long nodeId, java.lang.String title, double version,
560                    com.liferay.portal.service.ServiceContext serviceContext)
561                    throws RemoteException {
562                    try {
563                            com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.revertPage(nodeId,
564                                            title, version, serviceContext);
565    
566                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
567                    }
568                    catch (Exception e) {
569                            _log.error(e, e);
570    
571                            throw new RemoteException(e.getMessage());
572                    }
573            }
574    
575            public static void subscribePage(long nodeId, java.lang.String title)
576                    throws RemoteException {
577                    try {
578                            WikiPageServiceUtil.subscribePage(nodeId, title);
579                    }
580                    catch (Exception e) {
581                            _log.error(e, e);
582    
583                            throw new RemoteException(e.getMessage());
584                    }
585            }
586    
587            public static void unsubscribePage(long nodeId, java.lang.String title)
588                    throws RemoteException {
589                    try {
590                            WikiPageServiceUtil.unsubscribePage(nodeId, title);
591                    }
592                    catch (Exception e) {
593                            _log.error(e, e);
594    
595                            throw new RemoteException(e.getMessage());
596                    }
597            }
598    
599            public static com.liferay.portlet.wiki.model.WikiPageSoap updatePage(
600                    long nodeId, java.lang.String title, double version,
601                    java.lang.String content, java.lang.String summary, boolean minorEdit,
602                    java.lang.String format, java.lang.String parentTitle,
603                    java.lang.String redirectTitle,
604                    com.liferay.portal.service.ServiceContext serviceContext)
605                    throws RemoteException {
606                    try {
607                            com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.updatePage(nodeId,
608                                            title, version, content, summary, minorEdit, format,
609                                            parentTitle, redirectTitle, serviceContext);
610    
611                            return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
612                    }
613                    catch (Exception e) {
614                            _log.error(e, e);
615    
616                            throw new RemoteException(e.getMessage());
617                    }
618            }
619    
620            private static Log _log = LogFactoryUtil.getLog(WikiPageServiceSoap.class);
621    }