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.MethodHandler;
020    import com.liferay.portal.kernel.util.MethodKey;
021    import com.liferay.portal.security.auth.HttpPrincipal;
022    import com.liferay.portal.service.http.TunnelUtil;
023    
024    import com.liferay.portlet.wiki.service.WikiPageServiceUtil;
025    
026    /**
027     * <p>
028     * This class provides a HTTP utility for the
029     * {@link com.liferay.portlet.wiki.service.WikiPageServiceUtil} service utility. The
030     * static methods of this class calls the same methods of the service utility.
031     * However, the signatures are different because it requires an additional
032     * {@link com.liferay.portal.security.auth.HttpPrincipal} parameter.
033     * </p>
034     *
035     * <p>
036     * The benefits of using the HTTP utility is that it is fast and allows for
037     * tunneling without the cost of serializing to text. The drawback is that it
038     * only works with Java.
039     * </p>
040     *
041     * <p>
042     * Set the property <b>tunnel.servlet.hosts.allowed</b> in portal.properties to
043     * configure security.
044     * </p>
045     *
046     * <p>
047     * The HTTP utility is only generated for remote services.
048     * </p>
049     *
050     * @author    Brian Wing Shun Chan
051     * @see       WikiPageServiceSoap
052     * @see       com.liferay.portal.security.auth.HttpPrincipal
053     * @see       com.liferay.portlet.wiki.service.WikiPageServiceUtil
054     * @generated
055     */
056    public class WikiPageServiceHttp {
057            public static com.liferay.portlet.wiki.model.WikiPage addPage(
058                    HttpPrincipal httpPrincipal, long nodeId, java.lang.String title,
059                    java.lang.String content, java.lang.String summary, boolean minorEdit,
060                    com.liferay.portal.service.ServiceContext serviceContext)
061                    throws com.liferay.portal.kernel.exception.PortalException,
062                            com.liferay.portal.kernel.exception.SystemException {
063                    try {
064                            MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
065                                            "addPage", long.class, java.lang.String.class,
066                                            java.lang.String.class, java.lang.String.class,
067                                            boolean.class,
068                                            com.liferay.portal.service.ServiceContext.class);
069    
070                            MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
071                                            title, content, summary, minorEdit, serviceContext);
072    
073                            Object returnObj = null;
074    
075                            try {
076                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
077                            }
078                            catch (Exception e) {
079                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
080                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
081                                    }
082    
083                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
084                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
085                                    }
086    
087                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
088                            }
089    
090                            return (com.liferay.portlet.wiki.model.WikiPage)returnObj;
091                    }
092                    catch (com.liferay.portal.kernel.exception.SystemException se) {
093                            _log.error(se, se);
094    
095                            throw se;
096                    }
097            }
098    
099            public static com.liferay.portlet.wiki.model.WikiPage addPage(
100                    HttpPrincipal httpPrincipal, long nodeId, java.lang.String title,
101                    java.lang.String content, java.lang.String summary, boolean minorEdit,
102                    java.lang.String format, java.lang.String parentTitle,
103                    java.lang.String redirectTitle,
104                    com.liferay.portal.service.ServiceContext serviceContext)
105                    throws com.liferay.portal.kernel.exception.PortalException,
106                            com.liferay.portal.kernel.exception.SystemException {
107                    try {
108                            MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
109                                            "addPage", long.class, java.lang.String.class,
110                                            java.lang.String.class, java.lang.String.class,
111                                            boolean.class, java.lang.String.class,
112                                            java.lang.String.class, java.lang.String.class,
113                                            com.liferay.portal.service.ServiceContext.class);
114    
115                            MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
116                                            title, content, summary, minorEdit, format, parentTitle,
117                                            redirectTitle, serviceContext);
118    
119                            Object returnObj = null;
120    
121                            try {
122                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
123                            }
124                            catch (Exception e) {
125                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
126                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
127                                    }
128    
129                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
130                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
131                                    }
132    
133                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
134                            }
135    
136                            return (com.liferay.portlet.wiki.model.WikiPage)returnObj;
137                    }
138                    catch (com.liferay.portal.kernel.exception.SystemException se) {
139                            _log.error(se, se);
140    
141                            throw se;
142                    }
143            }
144    
145            public static void addPageAttachments(HttpPrincipal httpPrincipal,
146                    long nodeId, java.lang.String title,
147                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files)
148                    throws com.liferay.portal.kernel.exception.PortalException,
149                            com.liferay.portal.kernel.exception.SystemException {
150                    try {
151                            MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
152                                            "addPageAttachments", long.class, java.lang.String.class,
153                                            java.util.List.class);
154    
155                            MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
156                                            title, files);
157    
158                            try {
159                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
160                            }
161                            catch (Exception e) {
162                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
163                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
164                                    }
165    
166                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
167                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
168                                    }
169    
170                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
171                            }
172                    }
173                    catch (com.liferay.portal.kernel.exception.SystemException se) {
174                            _log.error(se, se);
175    
176                            throw se;
177                    }
178            }
179    
180            public static void changeParent(HttpPrincipal httpPrincipal, long nodeId,
181                    java.lang.String title, java.lang.String newParentTitle,
182                    com.liferay.portal.service.ServiceContext serviceContext)
183                    throws com.liferay.portal.kernel.exception.PortalException,
184                            com.liferay.portal.kernel.exception.SystemException {
185                    try {
186                            MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
187                                            "changeParent", long.class, java.lang.String.class,
188                                            java.lang.String.class,
189                                            com.liferay.portal.service.ServiceContext.class);
190    
191                            MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
192                                            title, newParentTitle, serviceContext);
193    
194                            try {
195                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
196                            }
197                            catch (Exception e) {
198                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
199                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
200                                    }
201    
202                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
203                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
204                                    }
205    
206                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
207                            }
208                    }
209                    catch (com.liferay.portal.kernel.exception.SystemException se) {
210                            _log.error(se, se);
211    
212                            throw se;
213                    }
214            }
215    
216            public static void deletePage(HttpPrincipal httpPrincipal, long nodeId,
217                    java.lang.String title)
218                    throws com.liferay.portal.kernel.exception.PortalException,
219                            com.liferay.portal.kernel.exception.SystemException {
220                    try {
221                            MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
222                                            "deletePage", long.class, java.lang.String.class);
223    
224                            MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
225                                            title);
226    
227                            try {
228                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
229                            }
230                            catch (Exception e) {
231                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
232                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
233                                    }
234    
235                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
236                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
237                                    }
238    
239                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
240                            }
241                    }
242                    catch (com.liferay.portal.kernel.exception.SystemException se) {
243                            _log.error(se, se);
244    
245                            throw se;
246                    }
247            }
248    
249            public static void deletePage(HttpPrincipal httpPrincipal, long nodeId,
250                    java.lang.String title, double version)
251                    throws com.liferay.portal.kernel.exception.PortalException,
252                            com.liferay.portal.kernel.exception.SystemException {
253                    try {
254                            MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
255                                            "deletePage", long.class, java.lang.String.class,
256                                            double.class);
257    
258                            MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
259                                            title, version);
260    
261                            try {
262                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
263                            }
264                            catch (Exception e) {
265                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
266                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
267                                    }
268    
269                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
270                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
271                                    }
272    
273                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
274                            }
275                    }
276                    catch (com.liferay.portal.kernel.exception.SystemException se) {
277                            _log.error(se, se);
278    
279                            throw se;
280                    }
281            }
282    
283            public static void deletePageAttachment(HttpPrincipal httpPrincipal,
284                    long nodeId, java.lang.String title, java.lang.String fileName)
285                    throws com.liferay.portal.kernel.exception.PortalException,
286                            com.liferay.portal.kernel.exception.SystemException {
287                    try {
288                            MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
289                                            "deletePageAttachment", long.class, java.lang.String.class,
290                                            java.lang.String.class);
291    
292                            MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
293                                            title, fileName);
294    
295                            try {
296                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
297                            }
298                            catch (Exception e) {
299                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
300                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
301                                    }
302    
303                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
304                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
305                                    }
306    
307                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
308                            }
309                    }
310                    catch (com.liferay.portal.kernel.exception.SystemException se) {
311                            _log.error(se, se);
312    
313                            throw se;
314                    }
315            }
316    
317            public static com.liferay.portlet.wiki.model.WikiPage getDraftPage(
318                    HttpPrincipal httpPrincipal, long nodeId, java.lang.String title)
319                    throws com.liferay.portal.kernel.exception.PortalException,
320                            com.liferay.portal.kernel.exception.SystemException {
321                    try {
322                            MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
323                                            "getDraftPage", long.class, java.lang.String.class);
324    
325                            MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
326                                            title);
327    
328                            Object returnObj = null;
329    
330                            try {
331                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
332                            }
333                            catch (Exception e) {
334                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
335                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
336                                    }
337    
338                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
339                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
340                                    }
341    
342                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
343                            }
344    
345                            return (com.liferay.portlet.wiki.model.WikiPage)returnObj;
346                    }
347                    catch (com.liferay.portal.kernel.exception.SystemException se) {
348                            _log.error(se, se);
349    
350                            throw se;
351                    }
352            }
353    
354            public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getNodePages(
355                    HttpPrincipal httpPrincipal, long nodeId, int max)
356                    throws com.liferay.portal.kernel.exception.PortalException,
357                            com.liferay.portal.kernel.exception.SystemException {
358                    try {
359                            MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
360                                            "getNodePages", long.class, int.class);
361    
362                            MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
363                                            max);
364    
365                            Object returnObj = null;
366    
367                            try {
368                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
369                            }
370                            catch (Exception e) {
371                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
372                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
373                                    }
374    
375                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
376                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
377                                    }
378    
379                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
380                            }
381    
382                            return (java.util.List<com.liferay.portlet.wiki.model.WikiPage>)returnObj;
383                    }
384                    catch (com.liferay.portal.kernel.exception.SystemException se) {
385                            _log.error(se, se);
386    
387                            throw se;
388                    }
389            }
390    
391            public static java.lang.String getNodePagesRSS(
392                    HttpPrincipal httpPrincipal, long nodeId, int max,
393                    java.lang.String type, double version, java.lang.String displayStyle,
394                    java.lang.String feedURL, java.lang.String entryURL)
395                    throws com.liferay.portal.kernel.exception.PortalException,
396                            com.liferay.portal.kernel.exception.SystemException {
397                    try {
398                            MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
399                                            "getNodePagesRSS", long.class, int.class,
400                                            java.lang.String.class, double.class,
401                                            java.lang.String.class, java.lang.String.class,
402                                            java.lang.String.class);
403    
404                            MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
405                                            max, type, version, displayStyle, feedURL, entryURL);
406    
407                            Object returnObj = null;
408    
409                            try {
410                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
411                            }
412                            catch (Exception e) {
413                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
414                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
415                                    }
416    
417                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
418                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
419                                    }
420    
421                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
422                            }
423    
424                            return (java.lang.String)returnObj;
425                    }
426                    catch (com.liferay.portal.kernel.exception.SystemException se) {
427                            _log.error(se, se);
428    
429                            throw se;
430                    }
431            }
432    
433            public static com.liferay.portlet.wiki.model.WikiPage getPage(
434                    HttpPrincipal httpPrincipal, long nodeId, java.lang.String title)
435                    throws com.liferay.portal.kernel.exception.PortalException,
436                            com.liferay.portal.kernel.exception.SystemException {
437                    try {
438                            MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
439                                            "getPage", long.class, java.lang.String.class);
440    
441                            MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
442                                            title);
443    
444                            Object returnObj = null;
445    
446                            try {
447                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
448                            }
449                            catch (Exception e) {
450                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
451                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
452                                    }
453    
454                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
455                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
456                                    }
457    
458                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
459                            }
460    
461                            return (com.liferay.portlet.wiki.model.WikiPage)returnObj;
462                    }
463                    catch (com.liferay.portal.kernel.exception.SystemException se) {
464                            _log.error(se, se);
465    
466                            throw se;
467                    }
468            }
469    
470            public static com.liferay.portlet.wiki.model.WikiPage getPage(
471                    HttpPrincipal httpPrincipal, long nodeId, java.lang.String title,
472                    java.lang.Boolean head)
473                    throws com.liferay.portal.kernel.exception.PortalException,
474                            com.liferay.portal.kernel.exception.SystemException {
475                    try {
476                            MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
477                                            "getPage", long.class, java.lang.String.class,
478                                            java.lang.Boolean.class);
479    
480                            MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
481                                            title, head);
482    
483                            Object returnObj = null;
484    
485                            try {
486                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
487                            }
488                            catch (Exception e) {
489                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
490                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
491                                    }
492    
493                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
494                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
495                                    }
496    
497                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
498                            }
499    
500                            return (com.liferay.portlet.wiki.model.WikiPage)returnObj;
501                    }
502                    catch (com.liferay.portal.kernel.exception.SystemException se) {
503                            _log.error(se, se);
504    
505                            throw se;
506                    }
507            }
508    
509            public static com.liferay.portlet.wiki.model.WikiPage getPage(
510                    HttpPrincipal httpPrincipal, long nodeId, java.lang.String title,
511                    double version)
512                    throws com.liferay.portal.kernel.exception.PortalException,
513                            com.liferay.portal.kernel.exception.SystemException {
514                    try {
515                            MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
516                                            "getPage", long.class, java.lang.String.class, double.class);
517    
518                            MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
519                                            title, version);
520    
521                            Object returnObj = null;
522    
523                            try {
524                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
525                            }
526                            catch (Exception e) {
527                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
528                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
529                                    }
530    
531                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
532                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
533                                    }
534    
535                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
536                            }
537    
538                            return (com.liferay.portlet.wiki.model.WikiPage)returnObj;
539                    }
540                    catch (com.liferay.portal.kernel.exception.SystemException se) {
541                            _log.error(se, se);
542    
543                            throw se;
544                    }
545            }
546    
547            public static java.lang.String getPagesRSS(HttpPrincipal httpPrincipal,
548                    long companyId, long nodeId, java.lang.String title, int max,
549                    java.lang.String type, double version, java.lang.String displayStyle,
550                    java.lang.String feedURL, java.lang.String entryURL,
551                    java.util.Locale locale)
552                    throws com.liferay.portal.kernel.exception.PortalException,
553                            com.liferay.portal.kernel.exception.SystemException {
554                    try {
555                            MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
556                                            "getPagesRSS", long.class, long.class,
557                                            java.lang.String.class, int.class, java.lang.String.class,
558                                            double.class, java.lang.String.class,
559                                            java.lang.String.class, java.lang.String.class,
560                                            java.util.Locale.class);
561    
562                            MethodHandler methodHandler = new MethodHandler(methodKey,
563                                            companyId, nodeId, title, max, type, version, displayStyle,
564                                            feedURL, entryURL, locale);
565    
566                            Object returnObj = null;
567    
568                            try {
569                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
570                            }
571                            catch (Exception e) {
572                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
573                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
574                                    }
575    
576                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
577                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
578                                    }
579    
580                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
581                            }
582    
583                            return (java.lang.String)returnObj;
584                    }
585                    catch (com.liferay.portal.kernel.exception.SystemException se) {
586                            _log.error(se, se);
587    
588                            throw se;
589                    }
590            }
591    
592            public static void movePage(HttpPrincipal httpPrincipal, long nodeId,
593                    java.lang.String title, java.lang.String newTitle,
594                    com.liferay.portal.service.ServiceContext serviceContext)
595                    throws com.liferay.portal.kernel.exception.PortalException,
596                            com.liferay.portal.kernel.exception.SystemException {
597                    try {
598                            MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
599                                            "movePage", long.class, java.lang.String.class,
600                                            java.lang.String.class,
601                                            com.liferay.portal.service.ServiceContext.class);
602    
603                            MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
604                                            title, newTitle, serviceContext);
605    
606                            try {
607                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
608                            }
609                            catch (Exception e) {
610                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
611                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
612                                    }
613    
614                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
615                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
616                                    }
617    
618                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
619                            }
620                    }
621                    catch (com.liferay.portal.kernel.exception.SystemException se) {
622                            _log.error(se, se);
623    
624                            throw se;
625                    }
626            }
627    
628            public static com.liferay.portlet.wiki.model.WikiPage revertPage(
629                    HttpPrincipal httpPrincipal, long nodeId, java.lang.String title,
630                    double version, com.liferay.portal.service.ServiceContext serviceContext)
631                    throws com.liferay.portal.kernel.exception.PortalException,
632                            com.liferay.portal.kernel.exception.SystemException {
633                    try {
634                            MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
635                                            "revertPage", long.class, java.lang.String.class,
636                                            double.class,
637                                            com.liferay.portal.service.ServiceContext.class);
638    
639                            MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
640                                            title, version, serviceContext);
641    
642                            Object returnObj = null;
643    
644                            try {
645                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
646                            }
647                            catch (Exception e) {
648                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
649                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
650                                    }
651    
652                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
653                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
654                                    }
655    
656                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
657                            }
658    
659                            return (com.liferay.portlet.wiki.model.WikiPage)returnObj;
660                    }
661                    catch (com.liferay.portal.kernel.exception.SystemException se) {
662                            _log.error(se, se);
663    
664                            throw se;
665                    }
666            }
667    
668            public static void subscribePage(HttpPrincipal httpPrincipal, long nodeId,
669                    java.lang.String title)
670                    throws com.liferay.portal.kernel.exception.PortalException,
671                            com.liferay.portal.kernel.exception.SystemException {
672                    try {
673                            MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
674                                            "subscribePage", long.class, java.lang.String.class);
675    
676                            MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
677                                            title);
678    
679                            try {
680                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
681                            }
682                            catch (Exception e) {
683                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
684                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
685                                    }
686    
687                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
688                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
689                                    }
690    
691                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
692                            }
693                    }
694                    catch (com.liferay.portal.kernel.exception.SystemException se) {
695                            _log.error(se, se);
696    
697                            throw se;
698                    }
699            }
700    
701            public static void unsubscribePage(HttpPrincipal httpPrincipal,
702                    long nodeId, java.lang.String title)
703                    throws com.liferay.portal.kernel.exception.PortalException,
704                            com.liferay.portal.kernel.exception.SystemException {
705                    try {
706                            MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
707                                            "unsubscribePage", long.class, java.lang.String.class);
708    
709                            MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
710                                            title);
711    
712                            try {
713                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
714                            }
715                            catch (Exception e) {
716                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
717                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
718                                    }
719    
720                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
721                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
722                                    }
723    
724                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
725                            }
726                    }
727                    catch (com.liferay.portal.kernel.exception.SystemException se) {
728                            _log.error(se, se);
729    
730                            throw se;
731                    }
732            }
733    
734            public static com.liferay.portlet.wiki.model.WikiPage updatePage(
735                    HttpPrincipal httpPrincipal, long nodeId, java.lang.String title,
736                    double version, java.lang.String content, java.lang.String summary,
737                    boolean minorEdit, java.lang.String format,
738                    java.lang.String parentTitle, java.lang.String redirectTitle,
739                    com.liferay.portal.service.ServiceContext serviceContext)
740                    throws com.liferay.portal.kernel.exception.PortalException,
741                            com.liferay.portal.kernel.exception.SystemException {
742                    try {
743                            MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
744                                            "updatePage", long.class, java.lang.String.class,
745                                            double.class, java.lang.String.class,
746                                            java.lang.String.class, boolean.class,
747                                            java.lang.String.class, java.lang.String.class,
748                                            java.lang.String.class,
749                                            com.liferay.portal.service.ServiceContext.class);
750    
751                            MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
752                                            title, version, content, summary, minorEdit, format,
753                                            parentTitle, redirectTitle, serviceContext);
754    
755                            Object returnObj = null;
756    
757                            try {
758                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
759                            }
760                            catch (Exception e) {
761                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
762                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
763                                    }
764    
765                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
766                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
767                                    }
768    
769                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
770                            }
771    
772                            return (com.liferay.portlet.wiki.model.WikiPage)returnObj;
773                    }
774                    catch (com.liferay.portal.kernel.exception.SystemException se) {
775                            _log.error(se, se);
776    
777                            throw se;
778                    }
779            }
780    
781            private static Log _log = LogFactoryUtil.getLog(WikiPageServiceHttp.class);
782    }