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