1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.wiki.service.http;
24  
25  import com.liferay.portal.kernel.log.Log;
26  import com.liferay.portal.kernel.log.LogFactoryUtil;
27  import com.liferay.portal.kernel.util.BooleanWrapper;
28  import com.liferay.portal.kernel.util.DoubleWrapper;
29  import com.liferay.portal.kernel.util.IntegerWrapper;
30  import com.liferay.portal.kernel.util.LongWrapper;
31  import com.liferay.portal.kernel.util.MethodWrapper;
32  import com.liferay.portal.kernel.util.NullWrapper;
33  import com.liferay.portal.security.auth.HttpPrincipal;
34  import com.liferay.portal.service.http.TunnelUtil;
35  
36  import com.liferay.portlet.wiki.service.WikiPageServiceUtil;
37  
38  /**
39   * <a href="WikiPageServiceHttp.java.html"><b><i>View Source</i></b></a>
40   *
41   * <p>
42   * ServiceBuilder generated this class. Modifications in this class will be
43   * overwritten the next time is generated.
44   * </p>
45   *
46   * <p>
47   * This class provides a HTTP utility for the
48   * <code>com.liferay.portlet.wiki.service.WikiPageServiceUtil</code> service
49   * utility. The static methods of this class calls the same methods of the
50   * service utility. However, the signatures are different because it requires an
51   * additional <code>com.liferay.portal.security.auth.HttpPrincipal</code>
52   * parameter.
53   * </p>
54   *
55   * <p>
56   * The benefits of using the HTTP utility is that it is fast and allows for
57   * tunneling without the cost of serializing to text. The drawback is that it
58   * only works with Java.
59   * </p>
60   *
61   * <p>
62   * Set the property <code>tunnel.servlet.hosts.allowed</code> in
63   * portal.properties to configure security.
64   * </p>
65   *
66   * <p>
67   * The HTTP utility is only generated for remote services.
68   * </p>
69   *
70   * @author Brian Wing Shun Chan
71   *
72   * @see com.liferay.portal.security.auth.HttpPrincipal
73   * @see com.liferay.portlet.wiki.service.WikiPageServiceUtil
74   * @see com.liferay.portlet.wiki.service.http.WikiPageServiceSoap
75   *
76   */
77  public class WikiPageServiceHttp {
78      public static com.liferay.portlet.wiki.model.WikiPage addPage(
79          HttpPrincipal httpPrincipal, long nodeId, java.lang.String title,
80          java.lang.String content, java.lang.String summary, boolean minorEdit,
81          com.liferay.portal.service.ServiceContext serviceContext)
82          throws com.liferay.portal.PortalException,
83              com.liferay.portal.SystemException {
84          try {
85              Object paramObj0 = new LongWrapper(nodeId);
86  
87              Object paramObj1 = title;
88  
89              if (title == null) {
90                  paramObj1 = new NullWrapper("java.lang.String");
91              }
92  
93              Object paramObj2 = content;
94  
95              if (content == null) {
96                  paramObj2 = new NullWrapper("java.lang.String");
97              }
98  
99              Object paramObj3 = summary;
100 
101             if (summary == null) {
102                 paramObj3 = new NullWrapper("java.lang.String");
103             }
104 
105             Object paramObj4 = new BooleanWrapper(minorEdit);
106 
107             Object paramObj5 = serviceContext;
108 
109             if (serviceContext == null) {
110                 paramObj5 = new NullWrapper(
111                         "com.liferay.portal.service.ServiceContext");
112             }
113 
114             MethodWrapper methodWrapper = new MethodWrapper(WikiPageServiceUtil.class.getName(),
115                     "addPage",
116                     new Object[] {
117                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
118                         paramObj5
119                     });
120 
121             Object returnObj = null;
122 
123             try {
124                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
125             }
126             catch (Exception e) {
127                 if (e instanceof com.liferay.portal.PortalException) {
128                     throw (com.liferay.portal.PortalException)e;
129                 }
130 
131                 if (e instanceof com.liferay.portal.SystemException) {
132                     throw (com.liferay.portal.SystemException)e;
133                 }
134 
135                 throw new com.liferay.portal.SystemException(e);
136             }
137 
138             return (com.liferay.portlet.wiki.model.WikiPage)returnObj;
139         }
140         catch (com.liferay.portal.SystemException se) {
141             _log.error(se, se);
142 
143             throw se;
144         }
145     }
146 
147     public static com.liferay.portlet.wiki.model.WikiPage addPage(
148         HttpPrincipal httpPrincipal, long nodeId, java.lang.String title,
149         java.lang.String content, java.lang.String summary, boolean minorEdit,
150         java.lang.String format, java.lang.String parentTitle,
151         java.lang.String redirectTitle,
152         com.liferay.portal.service.ServiceContext serviceContext)
153         throws com.liferay.portal.PortalException,
154             com.liferay.portal.SystemException {
155         try {
156             Object paramObj0 = new LongWrapper(nodeId);
157 
158             Object paramObj1 = title;
159 
160             if (title == null) {
161                 paramObj1 = new NullWrapper("java.lang.String");
162             }
163 
164             Object paramObj2 = content;
165 
166             if (content == null) {
167                 paramObj2 = new NullWrapper("java.lang.String");
168             }
169 
170             Object paramObj3 = summary;
171 
172             if (summary == null) {
173                 paramObj3 = new NullWrapper("java.lang.String");
174             }
175 
176             Object paramObj4 = new BooleanWrapper(minorEdit);
177 
178             Object paramObj5 = format;
179 
180             if (format == null) {
181                 paramObj5 = new NullWrapper("java.lang.String");
182             }
183 
184             Object paramObj6 = parentTitle;
185 
186             if (parentTitle == null) {
187                 paramObj6 = new NullWrapper("java.lang.String");
188             }
189 
190             Object paramObj7 = redirectTitle;
191 
192             if (redirectTitle == null) {
193                 paramObj7 = new NullWrapper("java.lang.String");
194             }
195 
196             Object paramObj8 = serviceContext;
197 
198             if (serviceContext == null) {
199                 paramObj8 = new NullWrapper(
200                         "com.liferay.portal.service.ServiceContext");
201             }
202 
203             MethodWrapper methodWrapper = new MethodWrapper(WikiPageServiceUtil.class.getName(),
204                     "addPage",
205                     new Object[] {
206                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
207                         paramObj5, paramObj6, paramObj7, paramObj8
208                     });
209 
210             Object returnObj = null;
211 
212             try {
213                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
214             }
215             catch (Exception e) {
216                 if (e instanceof com.liferay.portal.PortalException) {
217                     throw (com.liferay.portal.PortalException)e;
218                 }
219 
220                 if (e instanceof com.liferay.portal.SystemException) {
221                     throw (com.liferay.portal.SystemException)e;
222                 }
223 
224                 throw new com.liferay.portal.SystemException(e);
225             }
226 
227             return (com.liferay.portlet.wiki.model.WikiPage)returnObj;
228         }
229         catch (com.liferay.portal.SystemException se) {
230             _log.error(se, se);
231 
232             throw se;
233         }
234     }
235 
236     public static void addPageAttachments(HttpPrincipal httpPrincipal,
237         long nodeId, java.lang.String title,
238         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files)
239         throws com.liferay.portal.PortalException,
240             com.liferay.portal.SystemException {
241         try {
242             Object paramObj0 = new LongWrapper(nodeId);
243 
244             Object paramObj1 = title;
245 
246             if (title == null) {
247                 paramObj1 = new NullWrapper("java.lang.String");
248             }
249 
250             Object paramObj2 = files;
251 
252             if (files == null) {
253                 paramObj2 = new NullWrapper("java.util.List");
254             }
255 
256             MethodWrapper methodWrapper = new MethodWrapper(WikiPageServiceUtil.class.getName(),
257                     "addPageAttachments",
258                     new Object[] { paramObj0, paramObj1, paramObj2 });
259 
260             try {
261                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
262             }
263             catch (Exception e) {
264                 if (e instanceof com.liferay.portal.PortalException) {
265                     throw (com.liferay.portal.PortalException)e;
266                 }
267 
268                 if (e instanceof com.liferay.portal.SystemException) {
269                     throw (com.liferay.portal.SystemException)e;
270                 }
271 
272                 throw new com.liferay.portal.SystemException(e);
273             }
274         }
275         catch (com.liferay.portal.SystemException se) {
276             _log.error(se, se);
277 
278             throw se;
279         }
280     }
281 
282     public static void changeParent(HttpPrincipal httpPrincipal, long nodeId,
283         java.lang.String title, java.lang.String newParentTitle,
284         com.liferay.portal.service.ServiceContext serviceContext)
285         throws com.liferay.portal.PortalException,
286             com.liferay.portal.SystemException {
287         try {
288             Object paramObj0 = new LongWrapper(nodeId);
289 
290             Object paramObj1 = title;
291 
292             if (title == null) {
293                 paramObj1 = new NullWrapper("java.lang.String");
294             }
295 
296             Object paramObj2 = newParentTitle;
297 
298             if (newParentTitle == null) {
299                 paramObj2 = new NullWrapper("java.lang.String");
300             }
301 
302             Object paramObj3 = serviceContext;
303 
304             if (serviceContext == null) {
305                 paramObj3 = new NullWrapper(
306                         "com.liferay.portal.service.ServiceContext");
307             }
308 
309             MethodWrapper methodWrapper = new MethodWrapper(WikiPageServiceUtil.class.getName(),
310                     "changeParent",
311                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
312 
313             try {
314                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
315             }
316             catch (Exception e) {
317                 if (e instanceof com.liferay.portal.PortalException) {
318                     throw (com.liferay.portal.PortalException)e;
319                 }
320 
321                 if (e instanceof com.liferay.portal.SystemException) {
322                     throw (com.liferay.portal.SystemException)e;
323                 }
324 
325                 throw new com.liferay.portal.SystemException(e);
326             }
327         }
328         catch (com.liferay.portal.SystemException se) {
329             _log.error(se, se);
330 
331             throw se;
332         }
333     }
334 
335     public static void deletePage(HttpPrincipal httpPrincipal, long nodeId,
336         java.lang.String title)
337         throws com.liferay.portal.PortalException,
338             com.liferay.portal.SystemException {
339         try {
340             Object paramObj0 = new LongWrapper(nodeId);
341 
342             Object paramObj1 = title;
343 
344             if (title == null) {
345                 paramObj1 = new NullWrapper("java.lang.String");
346             }
347 
348             MethodWrapper methodWrapper = new MethodWrapper(WikiPageServiceUtil.class.getName(),
349                     "deletePage", new Object[] { paramObj0, paramObj1 });
350 
351             try {
352                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
353             }
354             catch (Exception e) {
355                 if (e instanceof com.liferay.portal.PortalException) {
356                     throw (com.liferay.portal.PortalException)e;
357                 }
358 
359                 if (e instanceof com.liferay.portal.SystemException) {
360                     throw (com.liferay.portal.SystemException)e;
361                 }
362 
363                 throw new com.liferay.portal.SystemException(e);
364             }
365         }
366         catch (com.liferay.portal.SystemException se) {
367             _log.error(se, se);
368 
369             throw se;
370         }
371     }
372 
373     public static void deletePageAttachment(HttpPrincipal httpPrincipal,
374         long nodeId, java.lang.String title, java.lang.String fileName)
375         throws com.liferay.portal.PortalException,
376             com.liferay.portal.SystemException {
377         try {
378             Object paramObj0 = new LongWrapper(nodeId);
379 
380             Object paramObj1 = title;
381 
382             if (title == null) {
383                 paramObj1 = new NullWrapper("java.lang.String");
384             }
385 
386             Object paramObj2 = fileName;
387 
388             if (fileName == null) {
389                 paramObj2 = new NullWrapper("java.lang.String");
390             }
391 
392             MethodWrapper methodWrapper = new MethodWrapper(WikiPageServiceUtil.class.getName(),
393                     "deletePageAttachment",
394                     new Object[] { paramObj0, paramObj1, paramObj2 });
395 
396             try {
397                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
398             }
399             catch (Exception e) {
400                 if (e instanceof com.liferay.portal.PortalException) {
401                     throw (com.liferay.portal.PortalException)e;
402                 }
403 
404                 if (e instanceof com.liferay.portal.SystemException) {
405                     throw (com.liferay.portal.SystemException)e;
406                 }
407 
408                 throw new com.liferay.portal.SystemException(e);
409             }
410         }
411         catch (com.liferay.portal.SystemException se) {
412             _log.error(se, se);
413 
414             throw se;
415         }
416     }
417 
418     public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getNodePages(
419         HttpPrincipal httpPrincipal, long nodeId, int max)
420         throws com.liferay.portal.PortalException,
421             com.liferay.portal.SystemException {
422         try {
423             Object paramObj0 = new LongWrapper(nodeId);
424 
425             Object paramObj1 = new IntegerWrapper(max);
426 
427             MethodWrapper methodWrapper = new MethodWrapper(WikiPageServiceUtil.class.getName(),
428                     "getNodePages", new Object[] { paramObj0, paramObj1 });
429 
430             Object returnObj = null;
431 
432             try {
433                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
434             }
435             catch (Exception e) {
436                 if (e instanceof com.liferay.portal.PortalException) {
437                     throw (com.liferay.portal.PortalException)e;
438                 }
439 
440                 if (e instanceof com.liferay.portal.SystemException) {
441                     throw (com.liferay.portal.SystemException)e;
442                 }
443 
444                 throw new com.liferay.portal.SystemException(e);
445             }
446 
447             return (java.util.List<com.liferay.portlet.wiki.model.WikiPage>)returnObj;
448         }
449         catch (com.liferay.portal.SystemException se) {
450             _log.error(se, se);
451 
452             throw se;
453         }
454     }
455 
456     public static java.lang.String getNodePagesRSS(
457         HttpPrincipal httpPrincipal, long nodeId, int max,
458         java.lang.String type, double version, java.lang.String displayStyle,
459         java.lang.String feedURL, java.lang.String entryURL)
460         throws com.liferay.portal.PortalException,
461             com.liferay.portal.SystemException {
462         try {
463             Object paramObj0 = new LongWrapper(nodeId);
464 
465             Object paramObj1 = new IntegerWrapper(max);
466 
467             Object paramObj2 = type;
468 
469             if (type == null) {
470                 paramObj2 = new NullWrapper("java.lang.String");
471             }
472 
473             Object paramObj3 = new DoubleWrapper(version);
474 
475             Object paramObj4 = displayStyle;
476 
477             if (displayStyle == null) {
478                 paramObj4 = new NullWrapper("java.lang.String");
479             }
480 
481             Object paramObj5 = feedURL;
482 
483             if (feedURL == null) {
484                 paramObj5 = new NullWrapper("java.lang.String");
485             }
486 
487             Object paramObj6 = entryURL;
488 
489             if (entryURL == null) {
490                 paramObj6 = new NullWrapper("java.lang.String");
491             }
492 
493             MethodWrapper methodWrapper = new MethodWrapper(WikiPageServiceUtil.class.getName(),
494                     "getNodePagesRSS",
495                     new Object[] {
496                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
497                         paramObj5, paramObj6
498                     });
499 
500             Object returnObj = null;
501 
502             try {
503                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
504             }
505             catch (Exception e) {
506                 if (e instanceof com.liferay.portal.PortalException) {
507                     throw (com.liferay.portal.PortalException)e;
508                 }
509 
510                 if (e instanceof com.liferay.portal.SystemException) {
511                     throw (com.liferay.portal.SystemException)e;
512                 }
513 
514                 throw new com.liferay.portal.SystemException(e);
515             }
516 
517             return (java.lang.String)returnObj;
518         }
519         catch (com.liferay.portal.SystemException se) {
520             _log.error(se, se);
521 
522             throw se;
523         }
524     }
525 
526     public static com.liferay.portlet.wiki.model.WikiPage getPage(
527         HttpPrincipal httpPrincipal, long nodeId, java.lang.String title)
528         throws com.liferay.portal.PortalException,
529             com.liferay.portal.SystemException {
530         try {
531             Object paramObj0 = new LongWrapper(nodeId);
532 
533             Object paramObj1 = title;
534 
535             if (title == null) {
536                 paramObj1 = new NullWrapper("java.lang.String");
537             }
538 
539             MethodWrapper methodWrapper = new MethodWrapper(WikiPageServiceUtil.class.getName(),
540                     "getPage", new Object[] { paramObj0, paramObj1 });
541 
542             Object returnObj = null;
543 
544             try {
545                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
546             }
547             catch (Exception e) {
548                 if (e instanceof com.liferay.portal.PortalException) {
549                     throw (com.liferay.portal.PortalException)e;
550                 }
551 
552                 if (e instanceof com.liferay.portal.SystemException) {
553                     throw (com.liferay.portal.SystemException)e;
554                 }
555 
556                 throw new com.liferay.portal.SystemException(e);
557             }
558 
559             return (com.liferay.portlet.wiki.model.WikiPage)returnObj;
560         }
561         catch (com.liferay.portal.SystemException se) {
562             _log.error(se, se);
563 
564             throw se;
565         }
566     }
567 
568     public static com.liferay.portlet.wiki.model.WikiPage getPage(
569         HttpPrincipal httpPrincipal, long nodeId, java.lang.String title,
570         double version)
571         throws com.liferay.portal.PortalException,
572             com.liferay.portal.SystemException {
573         try {
574             Object paramObj0 = new LongWrapper(nodeId);
575 
576             Object paramObj1 = title;
577 
578             if (title == null) {
579                 paramObj1 = new NullWrapper("java.lang.String");
580             }
581 
582             Object paramObj2 = new DoubleWrapper(version);
583 
584             MethodWrapper methodWrapper = new MethodWrapper(WikiPageServiceUtil.class.getName(),
585                     "getPage", new Object[] { paramObj0, paramObj1, paramObj2 });
586 
587             Object returnObj = null;
588 
589             try {
590                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
591             }
592             catch (Exception e) {
593                 if (e instanceof com.liferay.portal.PortalException) {
594                     throw (com.liferay.portal.PortalException)e;
595                 }
596 
597                 if (e instanceof com.liferay.portal.SystemException) {
598                     throw (com.liferay.portal.SystemException)e;
599                 }
600 
601                 throw new com.liferay.portal.SystemException(e);
602             }
603 
604             return (com.liferay.portlet.wiki.model.WikiPage)returnObj;
605         }
606         catch (com.liferay.portal.SystemException se) {
607             _log.error(se, se);
608 
609             throw se;
610         }
611     }
612 
613     public static java.lang.String getPagesRSS(HttpPrincipal httpPrincipal,
614         long companyId, long nodeId, java.lang.String title, int max,
615         java.lang.String type, double version, java.lang.String displayStyle,
616         java.lang.String feedURL, java.lang.String entryURL,
617         java.util.Locale locale)
618         throws com.liferay.portal.PortalException,
619             com.liferay.portal.SystemException {
620         try {
621             Object paramObj0 = new LongWrapper(companyId);
622 
623             Object paramObj1 = new LongWrapper(nodeId);
624 
625             Object paramObj2 = title;
626 
627             if (title == null) {
628                 paramObj2 = new NullWrapper("java.lang.String");
629             }
630 
631             Object paramObj3 = new IntegerWrapper(max);
632 
633             Object paramObj4 = type;
634 
635             if (type == null) {
636                 paramObj4 = new NullWrapper("java.lang.String");
637             }
638 
639             Object paramObj5 = new DoubleWrapper(version);
640 
641             Object paramObj6 = displayStyle;
642 
643             if (displayStyle == null) {
644                 paramObj6 = new NullWrapper("java.lang.String");
645             }
646 
647             Object paramObj7 = feedURL;
648 
649             if (feedURL == null) {
650                 paramObj7 = new NullWrapper("java.lang.String");
651             }
652 
653             Object paramObj8 = entryURL;
654 
655             if (entryURL == null) {
656                 paramObj8 = new NullWrapper("java.lang.String");
657             }
658 
659             Object paramObj9 = locale;
660 
661             if (locale == null) {
662                 paramObj9 = new NullWrapper("java.util.Locale");
663             }
664 
665             MethodWrapper methodWrapper = new MethodWrapper(WikiPageServiceUtil.class.getName(),
666                     "getPagesRSS",
667                     new Object[] {
668                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
669                         paramObj5, paramObj6, paramObj7, paramObj8, paramObj9
670                     });
671 
672             Object returnObj = null;
673 
674             try {
675                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
676             }
677             catch (Exception e) {
678                 if (e instanceof com.liferay.portal.PortalException) {
679                     throw (com.liferay.portal.PortalException)e;
680                 }
681 
682                 if (e instanceof com.liferay.portal.SystemException) {
683                     throw (com.liferay.portal.SystemException)e;
684                 }
685 
686                 throw new com.liferay.portal.SystemException(e);
687             }
688 
689             return (java.lang.String)returnObj;
690         }
691         catch (com.liferay.portal.SystemException se) {
692             _log.error(se, se);
693 
694             throw se;
695         }
696     }
697 
698     public static void movePage(HttpPrincipal httpPrincipal, long nodeId,
699         java.lang.String title, java.lang.String newTitle,
700         com.liferay.portal.service.ServiceContext serviceContext)
701         throws com.liferay.portal.PortalException,
702             com.liferay.portal.SystemException {
703         try {
704             Object paramObj0 = new LongWrapper(nodeId);
705 
706             Object paramObj1 = title;
707 
708             if (title == null) {
709                 paramObj1 = new NullWrapper("java.lang.String");
710             }
711 
712             Object paramObj2 = newTitle;
713 
714             if (newTitle == null) {
715                 paramObj2 = new NullWrapper("java.lang.String");
716             }
717 
718             Object paramObj3 = serviceContext;
719 
720             if (serviceContext == null) {
721                 paramObj3 = new NullWrapper(
722                         "com.liferay.portal.service.ServiceContext");
723             }
724 
725             MethodWrapper methodWrapper = new MethodWrapper(WikiPageServiceUtil.class.getName(),
726                     "movePage",
727                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
728 
729             try {
730                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
731             }
732             catch (Exception e) {
733                 if (e instanceof com.liferay.portal.PortalException) {
734                     throw (com.liferay.portal.PortalException)e;
735                 }
736 
737                 if (e instanceof com.liferay.portal.SystemException) {
738                     throw (com.liferay.portal.SystemException)e;
739                 }
740 
741                 throw new com.liferay.portal.SystemException(e);
742             }
743         }
744         catch (com.liferay.portal.SystemException se) {
745             _log.error(se, se);
746 
747             throw se;
748         }
749     }
750 
751     public static com.liferay.portlet.wiki.model.WikiPage revertPage(
752         HttpPrincipal httpPrincipal, long nodeId, java.lang.String title,
753         double version, com.liferay.portal.service.ServiceContext serviceContext)
754         throws com.liferay.portal.PortalException,
755             com.liferay.portal.SystemException {
756         try {
757             Object paramObj0 = new LongWrapper(nodeId);
758 
759             Object paramObj1 = title;
760 
761             if (title == null) {
762                 paramObj1 = new NullWrapper("java.lang.String");
763             }
764 
765             Object paramObj2 = new DoubleWrapper(version);
766 
767             Object paramObj3 = serviceContext;
768 
769             if (serviceContext == null) {
770                 paramObj3 = new NullWrapper(
771                         "com.liferay.portal.service.ServiceContext");
772             }
773 
774             MethodWrapper methodWrapper = new MethodWrapper(WikiPageServiceUtil.class.getName(),
775                     "revertPage",
776                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
777 
778             Object returnObj = null;
779 
780             try {
781                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
782             }
783             catch (Exception e) {
784                 if (e instanceof com.liferay.portal.PortalException) {
785                     throw (com.liferay.portal.PortalException)e;
786                 }
787 
788                 if (e instanceof com.liferay.portal.SystemException) {
789                     throw (com.liferay.portal.SystemException)e;
790                 }
791 
792                 throw new com.liferay.portal.SystemException(e);
793             }
794 
795             return (com.liferay.portlet.wiki.model.WikiPage)returnObj;
796         }
797         catch (com.liferay.portal.SystemException se) {
798             _log.error(se, se);
799 
800             throw se;
801         }
802     }
803 
804     public static void subscribePage(HttpPrincipal httpPrincipal, long nodeId,
805         java.lang.String title)
806         throws com.liferay.portal.PortalException,
807             com.liferay.portal.SystemException {
808         try {
809             Object paramObj0 = new LongWrapper(nodeId);
810 
811             Object paramObj1 = title;
812 
813             if (title == null) {
814                 paramObj1 = new NullWrapper("java.lang.String");
815             }
816 
817             MethodWrapper methodWrapper = new MethodWrapper(WikiPageServiceUtil.class.getName(),
818                     "subscribePage", new Object[] { paramObj0, paramObj1 });
819 
820             try {
821                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
822             }
823             catch (Exception e) {
824                 if (e instanceof com.liferay.portal.PortalException) {
825                     throw (com.liferay.portal.PortalException)e;
826                 }
827 
828                 if (e instanceof com.liferay.portal.SystemException) {
829                     throw (com.liferay.portal.SystemException)e;
830                 }
831 
832                 throw new com.liferay.portal.SystemException(e);
833             }
834         }
835         catch (com.liferay.portal.SystemException se) {
836             _log.error(se, se);
837 
838             throw se;
839         }
840     }
841 
842     public static void unsubscribePage(HttpPrincipal httpPrincipal,
843         long nodeId, java.lang.String title)
844         throws com.liferay.portal.PortalException,
845             com.liferay.portal.SystemException {
846         try {
847             Object paramObj0 = new LongWrapper(nodeId);
848 
849             Object paramObj1 = title;
850 
851             if (title == null) {
852                 paramObj1 = new NullWrapper("java.lang.String");
853             }
854 
855             MethodWrapper methodWrapper = new MethodWrapper(WikiPageServiceUtil.class.getName(),
856                     "unsubscribePage", new Object[] { paramObj0, paramObj1 });
857 
858             try {
859                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
860             }
861             catch (Exception e) {
862                 if (e instanceof com.liferay.portal.PortalException) {
863                     throw (com.liferay.portal.PortalException)e;
864                 }
865 
866                 if (e instanceof com.liferay.portal.SystemException) {
867                     throw (com.liferay.portal.SystemException)e;
868                 }
869 
870                 throw new com.liferay.portal.SystemException(e);
871             }
872         }
873         catch (com.liferay.portal.SystemException se) {
874             _log.error(se, se);
875 
876             throw se;
877         }
878     }
879 
880     public static com.liferay.portlet.wiki.model.WikiPage updatePage(
881         HttpPrincipal httpPrincipal, long nodeId, java.lang.String title,
882         double version, java.lang.String content, java.lang.String summary,
883         boolean minorEdit, java.lang.String format,
884         java.lang.String parentTitle, java.lang.String redirectTitle,
885         com.liferay.portal.service.ServiceContext serviceContext)
886         throws com.liferay.portal.PortalException,
887             com.liferay.portal.SystemException {
888         try {
889             Object paramObj0 = new LongWrapper(nodeId);
890 
891             Object paramObj1 = title;
892 
893             if (title == null) {
894                 paramObj1 = new NullWrapper("java.lang.String");
895             }
896 
897             Object paramObj2 = new DoubleWrapper(version);
898 
899             Object paramObj3 = content;
900 
901             if (content == null) {
902                 paramObj3 = new NullWrapper("java.lang.String");
903             }
904 
905             Object paramObj4 = summary;
906 
907             if (summary == null) {
908                 paramObj4 = new NullWrapper("java.lang.String");
909             }
910 
911             Object paramObj5 = new BooleanWrapper(minorEdit);
912 
913             Object paramObj6 = format;
914 
915             if (format == null) {
916                 paramObj6 = new NullWrapper("java.lang.String");
917             }
918 
919             Object paramObj7 = parentTitle;
920 
921             if (parentTitle == null) {
922                 paramObj7 = new NullWrapper("java.lang.String");
923             }
924 
925             Object paramObj8 = redirectTitle;
926 
927             if (redirectTitle == null) {
928                 paramObj8 = new NullWrapper("java.lang.String");
929             }
930 
931             Object paramObj9 = serviceContext;
932 
933             if (serviceContext == null) {
934                 paramObj9 = new NullWrapper(
935                         "com.liferay.portal.service.ServiceContext");
936             }
937 
938             MethodWrapper methodWrapper = new MethodWrapper(WikiPageServiceUtil.class.getName(),
939                     "updatePage",
940                     new Object[] {
941                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
942                         paramObj5, paramObj6, paramObj7, paramObj8, paramObj9
943                     });
944 
945             Object returnObj = null;
946 
947             try {
948                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
949             }
950             catch (Exception e) {
951                 if (e instanceof com.liferay.portal.PortalException) {
952                     throw (com.liferay.portal.PortalException)e;
953                 }
954 
955                 if (e instanceof com.liferay.portal.SystemException) {
956                     throw (com.liferay.portal.SystemException)e;
957                 }
958 
959                 throw new com.liferay.portal.SystemException(e);
960             }
961 
962             return (com.liferay.portlet.wiki.model.WikiPage)returnObj;
963         }
964         catch (com.liferay.portal.SystemException se) {
965             _log.error(se, se);
966 
967             throw se;
968         }
969     }
970 
971     private static Log _log = LogFactoryUtil.getLog(WikiPageServiceHttp.class);
972 }