1
14
15 package com.liferay.portlet.wiki.service.http;
16
17 import com.liferay.portal.kernel.log.Log;
18 import com.liferay.portal.kernel.log.LogFactoryUtil;
19 import com.liferay.portal.kernel.util.MethodHandler;
20 import com.liferay.portal.kernel.util.MethodKey;
21 import com.liferay.portal.security.auth.HttpPrincipal;
22 import com.liferay.portal.service.http.TunnelUtil;
23
24 import com.liferay.portlet.wiki.service.WikiPageServiceUtil;
25
26
63 public class WikiPageServiceHttp {
64 public static com.liferay.portlet.wiki.model.WikiPage addPage(
65 HttpPrincipal httpPrincipal, long nodeId, java.lang.String title,
66 java.lang.String content, java.lang.String summary, boolean minorEdit,
67 com.liferay.portal.service.ServiceContext serviceContext)
68 throws com.liferay.portal.PortalException,
69 com.liferay.portal.SystemException {
70 try {
71 MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
72 "addPage", _addPageParameterTypes0);
73
74 MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
75 title, content, summary, minorEdit, serviceContext);
76
77 Object returnObj = null;
78
79 try {
80 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
81 }
82 catch (Exception e) {
83 if (e instanceof com.liferay.portal.PortalException) {
84 throw (com.liferay.portal.PortalException)e;
85 }
86
87 if (e instanceof com.liferay.portal.SystemException) {
88 throw (com.liferay.portal.SystemException)e;
89 }
90
91 throw new com.liferay.portal.SystemException(e);
92 }
93
94 return (com.liferay.portlet.wiki.model.WikiPage)returnObj;
95 }
96 catch (com.liferay.portal.SystemException se) {
97 _log.error(se, se);
98
99 throw se;
100 }
101 }
102
103 public static com.liferay.portlet.wiki.model.WikiPage addPage(
104 HttpPrincipal httpPrincipal, long nodeId, java.lang.String title,
105 java.lang.String content, java.lang.String summary, boolean minorEdit,
106 java.lang.String format, java.lang.String parentTitle,
107 java.lang.String redirectTitle,
108 com.liferay.portal.service.ServiceContext serviceContext)
109 throws com.liferay.portal.PortalException,
110 com.liferay.portal.SystemException {
111 try {
112 MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
113 "addPage", _addPageParameterTypes1);
114
115 MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
116 title, content, summary, minorEdit, format, parentTitle,
117 redirectTitle, serviceContext);
118
119 Object returnObj = null;
120
121 try {
122 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
123 }
124 catch (Exception e) {
125 if (e instanceof com.liferay.portal.PortalException) {
126 throw (com.liferay.portal.PortalException)e;
127 }
128
129 if (e instanceof com.liferay.portal.SystemException) {
130 throw (com.liferay.portal.SystemException)e;
131 }
132
133 throw new com.liferay.portal.SystemException(e);
134 }
135
136 return (com.liferay.portlet.wiki.model.WikiPage)returnObj;
137 }
138 catch (com.liferay.portal.SystemException se) {
139 _log.error(se, se);
140
141 throw se;
142 }
143 }
144
145 public static void addPageAttachments(HttpPrincipal httpPrincipal,
146 long nodeId, java.lang.String title,
147 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files)
148 throws com.liferay.portal.PortalException,
149 com.liferay.portal.SystemException {
150 try {
151 MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
152 "addPageAttachments", _addPageAttachmentsParameterTypes2);
153
154 MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
155 title, files);
156
157 try {
158 TunnelUtil.invoke(httpPrincipal, methodHandler);
159 }
160 catch (Exception e) {
161 if (e instanceof com.liferay.portal.PortalException) {
162 throw (com.liferay.portal.PortalException)e;
163 }
164
165 if (e instanceof com.liferay.portal.SystemException) {
166 throw (com.liferay.portal.SystemException)e;
167 }
168
169 throw new com.liferay.portal.SystemException(e);
170 }
171 }
172 catch (com.liferay.portal.SystemException se) {
173 _log.error(se, se);
174
175 throw se;
176 }
177 }
178
179 public static void changeParent(HttpPrincipal httpPrincipal, long nodeId,
180 java.lang.String title, java.lang.String newParentTitle,
181 com.liferay.portal.service.ServiceContext serviceContext)
182 throws com.liferay.portal.PortalException,
183 com.liferay.portal.SystemException {
184 try {
185 MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
186 "changeParent", _changeParentParameterTypes3);
187
188 MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
189 title, newParentTitle, serviceContext);
190
191 try {
192 TunnelUtil.invoke(httpPrincipal, methodHandler);
193 }
194 catch (Exception e) {
195 if (e instanceof com.liferay.portal.PortalException) {
196 throw (com.liferay.portal.PortalException)e;
197 }
198
199 if (e instanceof com.liferay.portal.SystemException) {
200 throw (com.liferay.portal.SystemException)e;
201 }
202
203 throw new com.liferay.portal.SystemException(e);
204 }
205 }
206 catch (com.liferay.portal.SystemException se) {
207 _log.error(se, se);
208
209 throw se;
210 }
211 }
212
213 public static void deletePage(HttpPrincipal httpPrincipal, long nodeId,
214 java.lang.String title)
215 throws com.liferay.portal.PortalException,
216 com.liferay.portal.SystemException {
217 try {
218 MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
219 "deletePage", _deletePageParameterTypes4);
220
221 MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
222 title);
223
224 try {
225 TunnelUtil.invoke(httpPrincipal, methodHandler);
226 }
227 catch (Exception e) {
228 if (e instanceof com.liferay.portal.PortalException) {
229 throw (com.liferay.portal.PortalException)e;
230 }
231
232 if (e instanceof com.liferay.portal.SystemException) {
233 throw (com.liferay.portal.SystemException)e;
234 }
235
236 throw new com.liferay.portal.SystemException(e);
237 }
238 }
239 catch (com.liferay.portal.SystemException se) {
240 _log.error(se, se);
241
242 throw se;
243 }
244 }
245
246 public static void deletePageAttachment(HttpPrincipal httpPrincipal,
247 long nodeId, java.lang.String title, java.lang.String fileName)
248 throws com.liferay.portal.PortalException,
249 com.liferay.portal.SystemException {
250 try {
251 MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
252 "deletePageAttachment", _deletePageAttachmentParameterTypes5);
253
254 MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
255 title, fileName);
256
257 try {
258 TunnelUtil.invoke(httpPrincipal, methodHandler);
259 }
260 catch (Exception e) {
261 if (e instanceof com.liferay.portal.PortalException) {
262 throw (com.liferay.portal.PortalException)e;
263 }
264
265 if (e instanceof com.liferay.portal.SystemException) {
266 throw (com.liferay.portal.SystemException)e;
267 }
268
269 throw new com.liferay.portal.SystemException(e);
270 }
271 }
272 catch (com.liferay.portal.SystemException se) {
273 _log.error(se, se);
274
275 throw se;
276 }
277 }
278
279 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getNodePages(
280 HttpPrincipal httpPrincipal, long nodeId, int max)
281 throws com.liferay.portal.PortalException,
282 com.liferay.portal.SystemException {
283 try {
284 MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
285 "getNodePages", _getNodePagesParameterTypes6);
286
287 MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
288 max);
289
290 Object returnObj = null;
291
292 try {
293 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
294 }
295 catch (Exception e) {
296 if (e instanceof com.liferay.portal.PortalException) {
297 throw (com.liferay.portal.PortalException)e;
298 }
299
300 if (e instanceof com.liferay.portal.SystemException) {
301 throw (com.liferay.portal.SystemException)e;
302 }
303
304 throw new com.liferay.portal.SystemException(e);
305 }
306
307 return (java.util.List<com.liferay.portlet.wiki.model.WikiPage>)returnObj;
308 }
309 catch (com.liferay.portal.SystemException se) {
310 _log.error(se, se);
311
312 throw se;
313 }
314 }
315
316 public static java.lang.String getNodePagesRSS(
317 HttpPrincipal httpPrincipal, long nodeId, int max,
318 java.lang.String type, double version, java.lang.String displayStyle,
319 java.lang.String feedURL, java.lang.String entryURL)
320 throws com.liferay.portal.PortalException,
321 com.liferay.portal.SystemException {
322 try {
323 MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
324 "getNodePagesRSS", _getNodePagesRSSParameterTypes7);
325
326 MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
327 max, type, version, displayStyle, feedURL, entryURL);
328
329 Object returnObj = null;
330
331 try {
332 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
333 }
334 catch (Exception e) {
335 if (e instanceof com.liferay.portal.PortalException) {
336 throw (com.liferay.portal.PortalException)e;
337 }
338
339 if (e instanceof com.liferay.portal.SystemException) {
340 throw (com.liferay.portal.SystemException)e;
341 }
342
343 throw new com.liferay.portal.SystemException(e);
344 }
345
346 return (java.lang.String)returnObj;
347 }
348 catch (com.liferay.portal.SystemException se) {
349 _log.error(se, se);
350
351 throw se;
352 }
353 }
354
355 public static com.liferay.portlet.wiki.model.WikiPage getPage(
356 HttpPrincipal httpPrincipal, long nodeId, java.lang.String title)
357 throws com.liferay.portal.PortalException,
358 com.liferay.portal.SystemException {
359 try {
360 MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
361 "getPage", _getPageParameterTypes8);
362
363 MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
364 title);
365
366 Object returnObj = null;
367
368 try {
369 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
370 }
371 catch (Exception e) {
372 if (e instanceof com.liferay.portal.PortalException) {
373 throw (com.liferay.portal.PortalException)e;
374 }
375
376 if (e instanceof com.liferay.portal.SystemException) {
377 throw (com.liferay.portal.SystemException)e;
378 }
379
380 throw new com.liferay.portal.SystemException(e);
381 }
382
383 return (com.liferay.portlet.wiki.model.WikiPage)returnObj;
384 }
385 catch (com.liferay.portal.SystemException se) {
386 _log.error(se, se);
387
388 throw se;
389 }
390 }
391
392 public static com.liferay.portlet.wiki.model.WikiPage getPage(
393 HttpPrincipal httpPrincipal, long nodeId, java.lang.String title,
394 double version)
395 throws com.liferay.portal.PortalException,
396 com.liferay.portal.SystemException {
397 try {
398 MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
399 "getPage", _getPageParameterTypes9);
400
401 MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
402 title, version);
403
404 Object returnObj = null;
405
406 try {
407 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
408 }
409 catch (Exception e) {
410 if (e instanceof com.liferay.portal.PortalException) {
411 throw (com.liferay.portal.PortalException)e;
412 }
413
414 if (e instanceof com.liferay.portal.SystemException) {
415 throw (com.liferay.portal.SystemException)e;
416 }
417
418 throw new com.liferay.portal.SystemException(e);
419 }
420
421 return (com.liferay.portlet.wiki.model.WikiPage)returnObj;
422 }
423 catch (com.liferay.portal.SystemException se) {
424 _log.error(se, se);
425
426 throw se;
427 }
428 }
429
430 public static java.lang.String getPagesRSS(HttpPrincipal httpPrincipal,
431 long companyId, long nodeId, java.lang.String title, int max,
432 java.lang.String type, double version, java.lang.String displayStyle,
433 java.lang.String feedURL, java.lang.String entryURL,
434 java.util.Locale locale)
435 throws com.liferay.portal.PortalException,
436 com.liferay.portal.SystemException {
437 try {
438 MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
439 "getPagesRSS", _getPagesRSSParameterTypes10);
440
441 MethodHandler methodHandler = new MethodHandler(methodKey,
442 companyId, nodeId, title, max, type, version, displayStyle,
443 feedURL, entryURL, locale);
444
445 Object returnObj = null;
446
447 try {
448 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
449 }
450 catch (Exception e) {
451 if (e instanceof com.liferay.portal.PortalException) {
452 throw (com.liferay.portal.PortalException)e;
453 }
454
455 if (e instanceof com.liferay.portal.SystemException) {
456 throw (com.liferay.portal.SystemException)e;
457 }
458
459 throw new com.liferay.portal.SystemException(e);
460 }
461
462 return (java.lang.String)returnObj;
463 }
464 catch (com.liferay.portal.SystemException se) {
465 _log.error(se, se);
466
467 throw se;
468 }
469 }
470
471 public static void movePage(HttpPrincipal httpPrincipal, long nodeId,
472 java.lang.String title, java.lang.String newTitle,
473 com.liferay.portal.service.ServiceContext serviceContext)
474 throws com.liferay.portal.PortalException,
475 com.liferay.portal.SystemException {
476 try {
477 MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
478 "movePage", _movePageParameterTypes11);
479
480 MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
481 title, newTitle, serviceContext);
482
483 try {
484 TunnelUtil.invoke(httpPrincipal, methodHandler);
485 }
486 catch (Exception e) {
487 if (e instanceof com.liferay.portal.PortalException) {
488 throw (com.liferay.portal.PortalException)e;
489 }
490
491 if (e instanceof com.liferay.portal.SystemException) {
492 throw (com.liferay.portal.SystemException)e;
493 }
494
495 throw new com.liferay.portal.SystemException(e);
496 }
497 }
498 catch (com.liferay.portal.SystemException se) {
499 _log.error(se, se);
500
501 throw se;
502 }
503 }
504
505 public static com.liferay.portlet.wiki.model.WikiPage revertPage(
506 HttpPrincipal httpPrincipal, long nodeId, java.lang.String title,
507 double version, com.liferay.portal.service.ServiceContext serviceContext)
508 throws com.liferay.portal.PortalException,
509 com.liferay.portal.SystemException {
510 try {
511 MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
512 "revertPage", _revertPageParameterTypes12);
513
514 MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
515 title, version, serviceContext);
516
517 Object returnObj = null;
518
519 try {
520 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
521 }
522 catch (Exception e) {
523 if (e instanceof com.liferay.portal.PortalException) {
524 throw (com.liferay.portal.PortalException)e;
525 }
526
527 if (e instanceof com.liferay.portal.SystemException) {
528 throw (com.liferay.portal.SystemException)e;
529 }
530
531 throw new com.liferay.portal.SystemException(e);
532 }
533
534 return (com.liferay.portlet.wiki.model.WikiPage)returnObj;
535 }
536 catch (com.liferay.portal.SystemException se) {
537 _log.error(se, se);
538
539 throw se;
540 }
541 }
542
543 public static void subscribePage(HttpPrincipal httpPrincipal, long nodeId,
544 java.lang.String title)
545 throws com.liferay.portal.PortalException,
546 com.liferay.portal.SystemException {
547 try {
548 MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
549 "subscribePage", _subscribePageParameterTypes13);
550
551 MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
552 title);
553
554 try {
555 TunnelUtil.invoke(httpPrincipal, methodHandler);
556 }
557 catch (Exception e) {
558 if (e instanceof com.liferay.portal.PortalException) {
559 throw (com.liferay.portal.PortalException)e;
560 }
561
562 if (e instanceof com.liferay.portal.SystemException) {
563 throw (com.liferay.portal.SystemException)e;
564 }
565
566 throw new com.liferay.portal.SystemException(e);
567 }
568 }
569 catch (com.liferay.portal.SystemException se) {
570 _log.error(se, se);
571
572 throw se;
573 }
574 }
575
576 public static void unsubscribePage(HttpPrincipal httpPrincipal,
577 long nodeId, java.lang.String title)
578 throws com.liferay.portal.PortalException,
579 com.liferay.portal.SystemException {
580 try {
581 MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
582 "unsubscribePage", _unsubscribePageParameterTypes14);
583
584 MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
585 title);
586
587 try {
588 TunnelUtil.invoke(httpPrincipal, methodHandler);
589 }
590 catch (Exception e) {
591 if (e instanceof com.liferay.portal.PortalException) {
592 throw (com.liferay.portal.PortalException)e;
593 }
594
595 if (e instanceof com.liferay.portal.SystemException) {
596 throw (com.liferay.portal.SystemException)e;
597 }
598
599 throw new com.liferay.portal.SystemException(e);
600 }
601 }
602 catch (com.liferay.portal.SystemException se) {
603 _log.error(se, se);
604
605 throw se;
606 }
607 }
608
609 public static com.liferay.portlet.wiki.model.WikiPage updatePage(
610 HttpPrincipal httpPrincipal, long nodeId, java.lang.String title,
611 double version, java.lang.String content, java.lang.String summary,
612 boolean minorEdit, java.lang.String format,
613 java.lang.String parentTitle, java.lang.String redirectTitle,
614 com.liferay.portal.service.ServiceContext serviceContext)
615 throws com.liferay.portal.PortalException,
616 com.liferay.portal.SystemException {
617 try {
618 MethodKey methodKey = new MethodKey(WikiPageServiceUtil.class.getName(),
619 "updatePage", _updatePageParameterTypes15);
620
621 MethodHandler methodHandler = new MethodHandler(methodKey, nodeId,
622 title, version, content, summary, minorEdit, format,
623 parentTitle, redirectTitle, serviceContext);
624
625 Object returnObj = null;
626
627 try {
628 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
629 }
630 catch (Exception e) {
631 if (e instanceof com.liferay.portal.PortalException) {
632 throw (com.liferay.portal.PortalException)e;
633 }
634
635 if (e instanceof com.liferay.portal.SystemException) {
636 throw (com.liferay.portal.SystemException)e;
637 }
638
639 throw new com.liferay.portal.SystemException(e);
640 }
641
642 return (com.liferay.portlet.wiki.model.WikiPage)returnObj;
643 }
644 catch (com.liferay.portal.SystemException se) {
645 _log.error(se, se);
646
647 throw se;
648 }
649 }
650
651 private static Log _log = LogFactoryUtil.getLog(WikiPageServiceHttp.class);
652 private static final Class<?>[] _addPageParameterTypes0 = new Class[] {
653 long.class, java.lang.String.class, java.lang.String.class,
654 java.lang.String.class, boolean.class,
655 com.liferay.portal.service.ServiceContext.class
656 };
657 private static final Class<?>[] _addPageParameterTypes1 = new Class[] {
658 long.class, java.lang.String.class, java.lang.String.class,
659 java.lang.String.class, boolean.class, java.lang.String.class,
660 java.lang.String.class, java.lang.String.class,
661 com.liferay.portal.service.ServiceContext.class
662 };
663 private static final Class<?>[] _addPageAttachmentsParameterTypes2 = new Class[] {
664 long.class, java.lang.String.class, java.util.List.class
665 };
666 private static final Class<?>[] _changeParentParameterTypes3 = new Class[] {
667 long.class, java.lang.String.class, java.lang.String.class,
668 com.liferay.portal.service.ServiceContext.class
669 };
670 private static final Class<?>[] _deletePageParameterTypes4 = new Class[] {
671 long.class, java.lang.String.class
672 };
673 private static final Class<?>[] _deletePageAttachmentParameterTypes5 = new Class[] {
674 long.class, java.lang.String.class, java.lang.String.class
675 };
676 private static final Class<?>[] _getNodePagesParameterTypes6 = new Class[] {
677 long.class, int.class
678 };
679 private static final Class<?>[] _getNodePagesRSSParameterTypes7 = new Class[] {
680 long.class, int.class, java.lang.String.class, double.class,
681 java.lang.String.class, java.lang.String.class,
682 java.lang.String.class
683 };
684 private static final Class<?>[] _getPageParameterTypes8 = new Class[] {
685 long.class, java.lang.String.class
686 };
687 private static final Class<?>[] _getPageParameterTypes9 = new Class[] {
688 long.class, java.lang.String.class, double.class
689 };
690 private static final Class<?>[] _getPagesRSSParameterTypes10 = new Class[] {
691 long.class, long.class, java.lang.String.class, int.class,
692 java.lang.String.class, double.class, java.lang.String.class,
693 java.lang.String.class, java.lang.String.class,
694 java.util.Locale.class
695 };
696 private static final Class<?>[] _movePageParameterTypes11 = new Class[] {
697 long.class, java.lang.String.class, java.lang.String.class,
698 com.liferay.portal.service.ServiceContext.class
699 };
700 private static final Class<?>[] _revertPageParameterTypes12 = new Class[] {
701 long.class, java.lang.String.class, double.class,
702 com.liferay.portal.service.ServiceContext.class
703 };
704 private static final Class<?>[] _subscribePageParameterTypes13 = new Class[] {
705 long.class, java.lang.String.class
706 };
707 private static final Class<?>[] _unsubscribePageParameterTypes14 = new Class[] {
708 long.class, java.lang.String.class
709 };
710 private static final Class<?>[] _updatePageParameterTypes15 = new Class[] {
711 long.class, java.lang.String.class, double.class,
712 java.lang.String.class, java.lang.String.class, boolean.class,
713 java.lang.String.class, java.lang.String.class,
714 java.lang.String.class,
715 com.liferay.portal.service.ServiceContext.class
716 };
717 }