1   /**
2    * Copyright (c) 2000-2008 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          javax.portlet.PortletPreferences prefs,
82          com.liferay.portal.theme.ThemeDisplay themeDisplay)
83          throws com.liferay.portal.PortalException,
84              com.liferay.portal.SystemException {
85          try {
86              Object paramObj0 = new LongWrapper(nodeId);
87  
88              Object paramObj1 = title;
89  
90              if (title == null) {
91                  paramObj1 = new NullWrapper("java.lang.String");
92              }
93  
94              Object paramObj2 = content;
95  
96              if (content == null) {
97                  paramObj2 = new NullWrapper("java.lang.String");
98              }
99  
100             Object paramObj3 = summary;
101 
102             if (summary == null) {
103                 paramObj3 = new NullWrapper("java.lang.String");
104             }
105 
106             Object paramObj4 = new BooleanWrapper(minorEdit);
107 
108             Object paramObj5 = prefs;
109 
110             if (prefs == null) {
111                 paramObj5 = new NullWrapper("javax.portlet.PortletPreferences");
112             }
113 
114             Object paramObj6 = themeDisplay;
115 
116             if (themeDisplay == null) {
117                 paramObj6 = new NullWrapper(
118                         "com.liferay.portal.theme.ThemeDisplay");
119             }
120 
121             MethodWrapper methodWrapper = new MethodWrapper(WikiPageServiceUtil.class.getName(),
122                     "addPage",
123                     new Object[] {
124                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
125                         paramObj5, paramObj6
126                     });
127 
128             Object returnObj = null;
129 
130             try {
131                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
132             }
133             catch (Exception e) {
134                 if (e instanceof com.liferay.portal.PortalException) {
135                     throw (com.liferay.portal.PortalException)e;
136                 }
137 
138                 if (e instanceof com.liferay.portal.SystemException) {
139                     throw (com.liferay.portal.SystemException)e;
140                 }
141 
142                 throw new com.liferay.portal.SystemException(e);
143             }
144 
145             return (com.liferay.portlet.wiki.model.WikiPage)returnObj;
146         }
147         catch (com.liferay.portal.SystemException se) {
148             _log.error(se, se);
149 
150             throw se;
151         }
152     }
153 
154     public static void addPageAttachments(HttpPrincipal httpPrincipal,
155         long nodeId, java.lang.String title,
156         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files)
157         throws com.liferay.portal.PortalException,
158             com.liferay.portal.SystemException {
159         try {
160             Object paramObj0 = new LongWrapper(nodeId);
161 
162             Object paramObj1 = title;
163 
164             if (title == null) {
165                 paramObj1 = new NullWrapper("java.lang.String");
166             }
167 
168             Object paramObj2 = files;
169 
170             if (files == null) {
171                 paramObj2 = new NullWrapper("java.util.List");
172             }
173 
174             MethodWrapper methodWrapper = new MethodWrapper(WikiPageServiceUtil.class.getName(),
175                     "addPageAttachments",
176                     new Object[] { paramObj0, paramObj1, paramObj2 });
177 
178             try {
179                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
180             }
181             catch (Exception e) {
182                 if (e instanceof com.liferay.portal.PortalException) {
183                     throw (com.liferay.portal.PortalException)e;
184                 }
185 
186                 if (e instanceof com.liferay.portal.SystemException) {
187                     throw (com.liferay.portal.SystemException)e;
188                 }
189 
190                 throw new com.liferay.portal.SystemException(e);
191             }
192         }
193         catch (com.liferay.portal.SystemException se) {
194             _log.error(se, se);
195 
196             throw se;
197         }
198     }
199 
200     public static void changeParent(HttpPrincipal httpPrincipal, long nodeId,
201         java.lang.String title, java.lang.String newParentTitle,
202         javax.portlet.PortletPreferences prefs,
203         com.liferay.portal.theme.ThemeDisplay themeDisplay)
204         throws com.liferay.portal.PortalException,
205             com.liferay.portal.SystemException {
206         try {
207             Object paramObj0 = new LongWrapper(nodeId);
208 
209             Object paramObj1 = title;
210 
211             if (title == null) {
212                 paramObj1 = new NullWrapper("java.lang.String");
213             }
214 
215             Object paramObj2 = newParentTitle;
216 
217             if (newParentTitle == null) {
218                 paramObj2 = new NullWrapper("java.lang.String");
219             }
220 
221             Object paramObj3 = prefs;
222 
223             if (prefs == null) {
224                 paramObj3 = new NullWrapper("javax.portlet.PortletPreferences");
225             }
226 
227             Object paramObj4 = themeDisplay;
228 
229             if (themeDisplay == null) {
230                 paramObj4 = new NullWrapper(
231                         "com.liferay.portal.theme.ThemeDisplay");
232             }
233 
234             MethodWrapper methodWrapper = new MethodWrapper(WikiPageServiceUtil.class.getName(),
235                     "changeParent",
236                     new Object[] {
237                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
238                     });
239 
240             try {
241                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
242             }
243             catch (Exception e) {
244                 if (e instanceof com.liferay.portal.PortalException) {
245                     throw (com.liferay.portal.PortalException)e;
246                 }
247 
248                 if (e instanceof com.liferay.portal.SystemException) {
249                     throw (com.liferay.portal.SystemException)e;
250                 }
251 
252                 throw new com.liferay.portal.SystemException(e);
253             }
254         }
255         catch (com.liferay.portal.SystemException se) {
256             _log.error(se, se);
257 
258             throw se;
259         }
260     }
261 
262     public static void deletePage(HttpPrincipal httpPrincipal, long nodeId,
263         java.lang.String title)
264         throws com.liferay.portal.PortalException,
265             com.liferay.portal.SystemException {
266         try {
267             Object paramObj0 = new LongWrapper(nodeId);
268 
269             Object paramObj1 = title;
270 
271             if (title == null) {
272                 paramObj1 = new NullWrapper("java.lang.String");
273             }
274 
275             MethodWrapper methodWrapper = new MethodWrapper(WikiPageServiceUtil.class.getName(),
276                     "deletePage", new Object[] { paramObj0, paramObj1 });
277 
278             try {
279                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
280             }
281             catch (Exception e) {
282                 if (e instanceof com.liferay.portal.PortalException) {
283                     throw (com.liferay.portal.PortalException)e;
284                 }
285 
286                 if (e instanceof com.liferay.portal.SystemException) {
287                     throw (com.liferay.portal.SystemException)e;
288                 }
289 
290                 throw new com.liferay.portal.SystemException(e);
291             }
292         }
293         catch (com.liferay.portal.SystemException se) {
294             _log.error(se, se);
295 
296             throw se;
297         }
298     }
299 
300     public static void deletePageAttachment(HttpPrincipal httpPrincipal,
301         long nodeId, java.lang.String title, java.lang.String fileName)
302         throws com.liferay.portal.PortalException,
303             com.liferay.portal.SystemException {
304         try {
305             Object paramObj0 = new LongWrapper(nodeId);
306 
307             Object paramObj1 = title;
308 
309             if (title == null) {
310                 paramObj1 = new NullWrapper("java.lang.String");
311             }
312 
313             Object paramObj2 = fileName;
314 
315             if (fileName == null) {
316                 paramObj2 = new NullWrapper("java.lang.String");
317             }
318 
319             MethodWrapper methodWrapper = new MethodWrapper(WikiPageServiceUtil.class.getName(),
320                     "deletePageAttachment",
321                     new Object[] { paramObj0, paramObj1, paramObj2 });
322 
323             try {
324                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
325             }
326             catch (Exception e) {
327                 if (e instanceof com.liferay.portal.PortalException) {
328                     throw (com.liferay.portal.PortalException)e;
329                 }
330 
331                 if (e instanceof com.liferay.portal.SystemException) {
332                     throw (com.liferay.portal.SystemException)e;
333                 }
334 
335                 throw new com.liferay.portal.SystemException(e);
336             }
337         }
338         catch (com.liferay.portal.SystemException se) {
339             _log.error(se, se);
340 
341             throw se;
342         }
343     }
344 
345     public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getNodePages(
346         HttpPrincipal httpPrincipal, long nodeId, int max)
347         throws com.liferay.portal.PortalException,
348             com.liferay.portal.SystemException {
349         try {
350             Object paramObj0 = new LongWrapper(nodeId);
351 
352             Object paramObj1 = new IntegerWrapper(max);
353 
354             MethodWrapper methodWrapper = new MethodWrapper(WikiPageServiceUtil.class.getName(),
355                     "getNodePages", new Object[] { paramObj0, paramObj1 });
356 
357             Object returnObj = null;
358 
359             try {
360                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
361             }
362             catch (Exception e) {
363                 if (e instanceof com.liferay.portal.PortalException) {
364                     throw (com.liferay.portal.PortalException)e;
365                 }
366 
367                 if (e instanceof com.liferay.portal.SystemException) {
368                     throw (com.liferay.portal.SystemException)e;
369                 }
370 
371                 throw new com.liferay.portal.SystemException(e);
372             }
373 
374             return (java.util.List<com.liferay.portlet.wiki.model.WikiPage>)returnObj;
375         }
376         catch (com.liferay.portal.SystemException se) {
377             _log.error(se, se);
378 
379             throw se;
380         }
381     }
382 
383     public static java.lang.String getNodePagesRSS(
384         HttpPrincipal httpPrincipal, long nodeId, int max,
385         java.lang.String type, double version, java.lang.String displayStyle,
386         java.lang.String feedURL, java.lang.String entryURL)
387         throws com.liferay.portal.PortalException,
388             com.liferay.portal.SystemException {
389         try {
390             Object paramObj0 = new LongWrapper(nodeId);
391 
392             Object paramObj1 = new IntegerWrapper(max);
393 
394             Object paramObj2 = type;
395 
396             if (type == null) {
397                 paramObj2 = new NullWrapper("java.lang.String");
398             }
399 
400             Object paramObj3 = new DoubleWrapper(version);
401 
402             Object paramObj4 = displayStyle;
403 
404             if (displayStyle == null) {
405                 paramObj4 = new NullWrapper("java.lang.String");
406             }
407 
408             Object paramObj5 = feedURL;
409 
410             if (feedURL == null) {
411                 paramObj5 = new NullWrapper("java.lang.String");
412             }
413 
414             Object paramObj6 = entryURL;
415 
416             if (entryURL == null) {
417                 paramObj6 = new NullWrapper("java.lang.String");
418             }
419 
420             MethodWrapper methodWrapper = new MethodWrapper(WikiPageServiceUtil.class.getName(),
421                     "getNodePagesRSS",
422                     new Object[] {
423                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
424                         paramObj5, paramObj6
425                     });
426 
427             Object returnObj = null;
428 
429             try {
430                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
431             }
432             catch (Exception e) {
433                 if (e instanceof com.liferay.portal.PortalException) {
434                     throw (com.liferay.portal.PortalException)e;
435                 }
436 
437                 if (e instanceof com.liferay.portal.SystemException) {
438                     throw (com.liferay.portal.SystemException)e;
439                 }
440 
441                 throw new com.liferay.portal.SystemException(e);
442             }
443 
444             return (java.lang.String)returnObj;
445         }
446         catch (com.liferay.portal.SystemException se) {
447             _log.error(se, se);
448 
449             throw se;
450         }
451     }
452 
453     public static com.liferay.portlet.wiki.model.WikiPage getPage(
454         HttpPrincipal httpPrincipal, long nodeId, java.lang.String title)
455         throws com.liferay.portal.PortalException,
456             com.liferay.portal.SystemException {
457         try {
458             Object paramObj0 = new LongWrapper(nodeId);
459 
460             Object paramObj1 = title;
461 
462             if (title == null) {
463                 paramObj1 = new NullWrapper("java.lang.String");
464             }
465 
466             MethodWrapper methodWrapper = new MethodWrapper(WikiPageServiceUtil.class.getName(),
467                     "getPage", new Object[] { paramObj0, paramObj1 });
468 
469             Object returnObj = null;
470 
471             try {
472                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
473             }
474             catch (Exception e) {
475                 if (e instanceof com.liferay.portal.PortalException) {
476                     throw (com.liferay.portal.PortalException)e;
477                 }
478 
479                 if (e instanceof com.liferay.portal.SystemException) {
480                     throw (com.liferay.portal.SystemException)e;
481                 }
482 
483                 throw new com.liferay.portal.SystemException(e);
484             }
485 
486             return (com.liferay.portlet.wiki.model.WikiPage)returnObj;
487         }
488         catch (com.liferay.portal.SystemException se) {
489             _log.error(se, se);
490 
491             throw se;
492         }
493     }
494 
495     public static com.liferay.portlet.wiki.model.WikiPage getPage(
496         HttpPrincipal httpPrincipal, long nodeId, java.lang.String title,
497         double version)
498         throws com.liferay.portal.PortalException,
499             com.liferay.portal.SystemException {
500         try {
501             Object paramObj0 = new LongWrapper(nodeId);
502 
503             Object paramObj1 = title;
504 
505             if (title == null) {
506                 paramObj1 = new NullWrapper("java.lang.String");
507             }
508 
509             Object paramObj2 = new DoubleWrapper(version);
510 
511             MethodWrapper methodWrapper = new MethodWrapper(WikiPageServiceUtil.class.getName(),
512                     "getPage", new Object[] { paramObj0, paramObj1, paramObj2 });
513 
514             Object returnObj = null;
515 
516             try {
517                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
518             }
519             catch (Exception e) {
520                 if (e instanceof com.liferay.portal.PortalException) {
521                     throw (com.liferay.portal.PortalException)e;
522                 }
523 
524                 if (e instanceof com.liferay.portal.SystemException) {
525                     throw (com.liferay.portal.SystemException)e;
526                 }
527 
528                 throw new com.liferay.portal.SystemException(e);
529             }
530 
531             return (com.liferay.portlet.wiki.model.WikiPage)returnObj;
532         }
533         catch (com.liferay.portal.SystemException se) {
534             _log.error(se, se);
535 
536             throw se;
537         }
538     }
539 
540     public static java.lang.String getPagesRSS(HttpPrincipal httpPrincipal,
541         long companyId, long nodeId, java.lang.String title, int max,
542         java.lang.String type, double version, java.lang.String displayStyle,
543         java.lang.String feedURL, java.lang.String entryURL,
544         java.util.Locale locale)
545         throws com.liferay.portal.PortalException,
546             com.liferay.portal.SystemException {
547         try {
548             Object paramObj0 = new LongWrapper(companyId);
549 
550             Object paramObj1 = new LongWrapper(nodeId);
551 
552             Object paramObj2 = title;
553 
554             if (title == null) {
555                 paramObj2 = new NullWrapper("java.lang.String");
556             }
557 
558             Object paramObj3 = new IntegerWrapper(max);
559 
560             Object paramObj4 = type;
561 
562             if (type == null) {
563                 paramObj4 = new NullWrapper("java.lang.String");
564             }
565 
566             Object paramObj5 = new DoubleWrapper(version);
567 
568             Object paramObj6 = displayStyle;
569 
570             if (displayStyle == null) {
571                 paramObj6 = new NullWrapper("java.lang.String");
572             }
573 
574             Object paramObj7 = feedURL;
575 
576             if (feedURL == null) {
577                 paramObj7 = new NullWrapper("java.lang.String");
578             }
579 
580             Object paramObj8 = entryURL;
581 
582             if (entryURL == null) {
583                 paramObj8 = new NullWrapper("java.lang.String");
584             }
585 
586             Object paramObj9 = locale;
587 
588             if (locale == null) {
589                 paramObj9 = new NullWrapper("java.util.Locale");
590             }
591 
592             MethodWrapper methodWrapper = new MethodWrapper(WikiPageServiceUtil.class.getName(),
593                     "getPagesRSS",
594                     new Object[] {
595                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
596                         paramObj5, paramObj6, paramObj7, paramObj8, paramObj9
597                     });
598 
599             Object returnObj = null;
600 
601             try {
602                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
603             }
604             catch (Exception e) {
605                 if (e instanceof com.liferay.portal.PortalException) {
606                     throw (com.liferay.portal.PortalException)e;
607                 }
608 
609                 if (e instanceof com.liferay.portal.SystemException) {
610                     throw (com.liferay.portal.SystemException)e;
611                 }
612 
613                 throw new com.liferay.portal.SystemException(e);
614             }
615 
616             return (java.lang.String)returnObj;
617         }
618         catch (com.liferay.portal.SystemException se) {
619             _log.error(se, se);
620 
621             throw se;
622         }
623     }
624 
625     public static void movePage(HttpPrincipal httpPrincipal, long nodeId,
626         java.lang.String title, java.lang.String newTitle,
627         javax.portlet.PortletPreferences prefs,
628         com.liferay.portal.theme.ThemeDisplay themeDisplay)
629         throws com.liferay.portal.PortalException,
630             com.liferay.portal.SystemException {
631         try {
632             Object paramObj0 = new LongWrapper(nodeId);
633 
634             Object paramObj1 = title;
635 
636             if (title == null) {
637                 paramObj1 = new NullWrapper("java.lang.String");
638             }
639 
640             Object paramObj2 = newTitle;
641 
642             if (newTitle == null) {
643                 paramObj2 = new NullWrapper("java.lang.String");
644             }
645 
646             Object paramObj3 = prefs;
647 
648             if (prefs == null) {
649                 paramObj3 = new NullWrapper("javax.portlet.PortletPreferences");
650             }
651 
652             Object paramObj4 = themeDisplay;
653 
654             if (themeDisplay == null) {
655                 paramObj4 = new NullWrapper(
656                         "com.liferay.portal.theme.ThemeDisplay");
657             }
658 
659             MethodWrapper methodWrapper = new MethodWrapper(WikiPageServiceUtil.class.getName(),
660                     "movePage",
661                     new Object[] {
662                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
663                     });
664 
665             try {
666                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
667             }
668             catch (Exception e) {
669                 if (e instanceof com.liferay.portal.PortalException) {
670                     throw (com.liferay.portal.PortalException)e;
671                 }
672 
673                 if (e instanceof com.liferay.portal.SystemException) {
674                     throw (com.liferay.portal.SystemException)e;
675                 }
676 
677                 throw new com.liferay.portal.SystemException(e);
678             }
679         }
680         catch (com.liferay.portal.SystemException se) {
681             _log.error(se, se);
682 
683             throw se;
684         }
685     }
686 
687     public static com.liferay.portlet.wiki.model.WikiPage revertPage(
688         HttpPrincipal httpPrincipal, long nodeId, java.lang.String title,
689         double version, javax.portlet.PortletPreferences prefs,
690         com.liferay.portal.theme.ThemeDisplay themeDisplay)
691         throws com.liferay.portal.PortalException,
692             com.liferay.portal.SystemException {
693         try {
694             Object paramObj0 = new LongWrapper(nodeId);
695 
696             Object paramObj1 = title;
697 
698             if (title == null) {
699                 paramObj1 = new NullWrapper("java.lang.String");
700             }
701 
702             Object paramObj2 = new DoubleWrapper(version);
703 
704             Object paramObj3 = prefs;
705 
706             if (prefs == null) {
707                 paramObj3 = new NullWrapper("javax.portlet.PortletPreferences");
708             }
709 
710             Object paramObj4 = themeDisplay;
711 
712             if (themeDisplay == null) {
713                 paramObj4 = new NullWrapper(
714                         "com.liferay.portal.theme.ThemeDisplay");
715             }
716 
717             MethodWrapper methodWrapper = new MethodWrapper(WikiPageServiceUtil.class.getName(),
718                     "revertPage",
719                     new Object[] {
720                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
721                     });
722 
723             Object returnObj = null;
724 
725             try {
726                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
727             }
728             catch (Exception e) {
729                 if (e instanceof com.liferay.portal.PortalException) {
730                     throw (com.liferay.portal.PortalException)e;
731                 }
732 
733                 if (e instanceof com.liferay.portal.SystemException) {
734                     throw (com.liferay.portal.SystemException)e;
735                 }
736 
737                 throw new com.liferay.portal.SystemException(e);
738             }
739 
740             return (com.liferay.portlet.wiki.model.WikiPage)returnObj;
741         }
742         catch (com.liferay.portal.SystemException se) {
743             _log.error(se, se);
744 
745             throw se;
746         }
747     }
748 
749     public static void subscribePage(HttpPrincipal httpPrincipal, long nodeId,
750         java.lang.String title)
751         throws com.liferay.portal.PortalException,
752             com.liferay.portal.SystemException {
753         try {
754             Object paramObj0 = new LongWrapper(nodeId);
755 
756             Object paramObj1 = title;
757 
758             if (title == null) {
759                 paramObj1 = new NullWrapper("java.lang.String");
760             }
761 
762             MethodWrapper methodWrapper = new MethodWrapper(WikiPageServiceUtil.class.getName(),
763                     "subscribePage", new Object[] { paramObj0, paramObj1 });
764 
765             try {
766                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
767             }
768             catch (Exception e) {
769                 if (e instanceof com.liferay.portal.PortalException) {
770                     throw (com.liferay.portal.PortalException)e;
771                 }
772 
773                 if (e instanceof com.liferay.portal.SystemException) {
774                     throw (com.liferay.portal.SystemException)e;
775                 }
776 
777                 throw new com.liferay.portal.SystemException(e);
778             }
779         }
780         catch (com.liferay.portal.SystemException se) {
781             _log.error(se, se);
782 
783             throw se;
784         }
785     }
786 
787     public static void unsubscribePage(HttpPrincipal httpPrincipal,
788         long nodeId, java.lang.String title)
789         throws com.liferay.portal.PortalException,
790             com.liferay.portal.SystemException {
791         try {
792             Object paramObj0 = new LongWrapper(nodeId);
793 
794             Object paramObj1 = title;
795 
796             if (title == null) {
797                 paramObj1 = new NullWrapper("java.lang.String");
798             }
799 
800             MethodWrapper methodWrapper = new MethodWrapper(WikiPageServiceUtil.class.getName(),
801                     "unsubscribePage", new Object[] { paramObj0, paramObj1 });
802 
803             try {
804                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
805             }
806             catch (Exception e) {
807                 if (e instanceof com.liferay.portal.PortalException) {
808                     throw (com.liferay.portal.PortalException)e;
809                 }
810 
811                 if (e instanceof com.liferay.portal.SystemException) {
812                     throw (com.liferay.portal.SystemException)e;
813                 }
814 
815                 throw new com.liferay.portal.SystemException(e);
816             }
817         }
818         catch (com.liferay.portal.SystemException se) {
819             _log.error(se, se);
820 
821             throw se;
822         }
823     }
824 
825     public static com.liferay.portlet.wiki.model.WikiPage updatePage(
826         HttpPrincipal httpPrincipal, long nodeId, java.lang.String title,
827         double version, java.lang.String content, java.lang.String summary,
828         boolean minorEdit, java.lang.String format,
829         java.lang.String parentTitle, java.lang.String redirectTitle,
830         java.lang.String[] tagsEntries, javax.portlet.PortletPreferences prefs,
831         com.liferay.portal.theme.ThemeDisplay themeDisplay)
832         throws com.liferay.portal.PortalException,
833             com.liferay.portal.SystemException {
834         try {
835             Object paramObj0 = new LongWrapper(nodeId);
836 
837             Object paramObj1 = title;
838 
839             if (title == null) {
840                 paramObj1 = new NullWrapper("java.lang.String");
841             }
842 
843             Object paramObj2 = new DoubleWrapper(version);
844 
845             Object paramObj3 = content;
846 
847             if (content == null) {
848                 paramObj3 = new NullWrapper("java.lang.String");
849             }
850 
851             Object paramObj4 = summary;
852 
853             if (summary == null) {
854                 paramObj4 = new NullWrapper("java.lang.String");
855             }
856 
857             Object paramObj5 = new BooleanWrapper(minorEdit);
858 
859             Object paramObj6 = format;
860 
861             if (format == null) {
862                 paramObj6 = new NullWrapper("java.lang.String");
863             }
864 
865             Object paramObj7 = parentTitle;
866 
867             if (parentTitle == null) {
868                 paramObj7 = new NullWrapper("java.lang.String");
869             }
870 
871             Object paramObj8 = redirectTitle;
872 
873             if (redirectTitle == null) {
874                 paramObj8 = new NullWrapper("java.lang.String");
875             }
876 
877             Object paramObj9 = tagsEntries;
878 
879             if (tagsEntries == null) {
880                 paramObj9 = new NullWrapper("[Ljava.lang.String;");
881             }
882 
883             Object paramObj10 = prefs;
884 
885             if (prefs == null) {
886                 paramObj10 = new NullWrapper("javax.portlet.PortletPreferences");
887             }
888 
889             Object paramObj11 = themeDisplay;
890 
891             if (themeDisplay == null) {
892                 paramObj11 = new NullWrapper(
893                         "com.liferay.portal.theme.ThemeDisplay");
894             }
895 
896             MethodWrapper methodWrapper = new MethodWrapper(WikiPageServiceUtil.class.getName(),
897                     "updatePage",
898                     new Object[] {
899                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
900                         paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
901                         paramObj10, paramObj11
902                     });
903 
904             Object returnObj = null;
905 
906             try {
907                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
908             }
909             catch (Exception e) {
910                 if (e instanceof com.liferay.portal.PortalException) {
911                     throw (com.liferay.portal.PortalException)e;
912                 }
913 
914                 if (e instanceof com.liferay.portal.SystemException) {
915                     throw (com.liferay.portal.SystemException)e;
916                 }
917 
918                 throw new com.liferay.portal.SystemException(e);
919             }
920 
921             return (com.liferay.portlet.wiki.model.WikiPage)returnObj;
922         }
923         catch (com.liferay.portal.SystemException se) {
924             _log.error(se, se);
925 
926             throw se;
927         }
928     }
929 
930     private static Log _log = LogFactoryUtil.getLog(WikiPageServiceHttp.class);
931 }