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