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