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