1
22
23 package com.liferay.portlet.blogs.service.http;
24
25 import com.liferay.portal.kernel.log.Log;
26 import com.liferay.portal.kernel.log.LogFactoryUtil;
27 import com.liferay.portal.kernel.util.BooleanWrapper;
28 import com.liferay.portal.kernel.util.DoubleWrapper;
29 import com.liferay.portal.kernel.util.IntegerWrapper;
30 import com.liferay.portal.kernel.util.LongWrapper;
31 import com.liferay.portal.kernel.util.MethodWrapper;
32 import com.liferay.portal.kernel.util.NullWrapper;
33 import com.liferay.portal.security.auth.HttpPrincipal;
34 import com.liferay.portal.service.http.TunnelUtil;
35
36 import com.liferay.portlet.blogs.service.BlogsEntryServiceUtil;
37
38
75 public class BlogsEntryServiceHttp {
76 public static com.liferay.portlet.blogs.model.BlogsEntry addEntry(
77 HttpPrincipal httpPrincipal, long plid, long categoryId,
78 java.lang.String title, java.lang.String content, int displayDateMonth,
79 int displayDateDay, int displayDateYear, int displayDateHour,
80 int displayDateMinute,
81 com.liferay.portal.theme.ThemeDisplay themeDisplay,
82 java.lang.String[] tagsEntries, boolean addCommunityPermissions,
83 boolean addGuestPermissions)
84 throws com.liferay.portal.SystemException,
85 com.liferay.portal.PortalException {
86 try {
87 Object paramObj0 = new LongWrapper(plid);
88 Object paramObj1 = new LongWrapper(categoryId);
89 Object paramObj2 = title;
90
91 if (title == null) {
92 paramObj2 = new NullWrapper("java.lang.String");
93 }
94
95 Object paramObj3 = content;
96
97 if (content == null) {
98 paramObj3 = new NullWrapper("java.lang.String");
99 }
100
101 Object paramObj4 = new IntegerWrapper(displayDateMonth);
102 Object paramObj5 = new IntegerWrapper(displayDateDay);
103 Object paramObj6 = new IntegerWrapper(displayDateYear);
104 Object paramObj7 = new IntegerWrapper(displayDateHour);
105 Object paramObj8 = new IntegerWrapper(displayDateMinute);
106 Object paramObj9 = themeDisplay;
107
108 if (themeDisplay == null) {
109 paramObj9 = new NullWrapper(
110 "com.liferay.portal.theme.ThemeDisplay");
111 }
112
113 Object paramObj10 = tagsEntries;
114
115 if (tagsEntries == null) {
116 paramObj10 = new NullWrapper("[Ljava.lang.String;");
117 }
118
119 Object paramObj11 = new BooleanWrapper(addCommunityPermissions);
120 Object paramObj12 = new BooleanWrapper(addGuestPermissions);
121 MethodWrapper methodWrapper = new MethodWrapper(BlogsEntryServiceUtil.class.getName(),
122 "addEntry",
123 new Object[] {
124 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
125 paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
126 paramObj10, paramObj11, paramObj12
127 });
128 Object returnObj = null;
129
130 try {
131 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
132 }
133 catch (Exception e) {
134 if (e instanceof com.liferay.portal.SystemException) {
135 throw (com.liferay.portal.SystemException)e;
136 }
137
138 if (e instanceof com.liferay.portal.PortalException) {
139 throw (com.liferay.portal.PortalException)e;
140 }
141
142 throw new com.liferay.portal.SystemException(e);
143 }
144
145 return (com.liferay.portlet.blogs.model.BlogsEntry)returnObj;
146 }
147 catch (com.liferay.portal.SystemException se) {
148 _log.error(se, se);
149 throw se;
150 }
151 }
152
153 public static com.liferay.portlet.blogs.model.BlogsEntry addEntry(
154 HttpPrincipal httpPrincipal, long plid, long categoryId,
155 java.lang.String title, java.lang.String content, int displayDateMonth,
156 int displayDateDay, int displayDateYear, int displayDateHour,
157 int displayDateMinute,
158 com.liferay.portal.theme.ThemeDisplay themeDisplay,
159 java.lang.String[] tagsEntries,
160 java.lang.String[] communityPermissions,
161 java.lang.String[] guestPermissions)
162 throws com.liferay.portal.SystemException,
163 com.liferay.portal.PortalException {
164 try {
165 Object paramObj0 = new LongWrapper(plid);
166 Object paramObj1 = new LongWrapper(categoryId);
167 Object paramObj2 = title;
168
169 if (title == null) {
170 paramObj2 = new NullWrapper("java.lang.String");
171 }
172
173 Object paramObj3 = content;
174
175 if (content == null) {
176 paramObj3 = new NullWrapper("java.lang.String");
177 }
178
179 Object paramObj4 = new IntegerWrapper(displayDateMonth);
180 Object paramObj5 = new IntegerWrapper(displayDateDay);
181 Object paramObj6 = new IntegerWrapper(displayDateYear);
182 Object paramObj7 = new IntegerWrapper(displayDateHour);
183 Object paramObj8 = new IntegerWrapper(displayDateMinute);
184 Object paramObj9 = themeDisplay;
185
186 if (themeDisplay == null) {
187 paramObj9 = new NullWrapper(
188 "com.liferay.portal.theme.ThemeDisplay");
189 }
190
191 Object paramObj10 = tagsEntries;
192
193 if (tagsEntries == null) {
194 paramObj10 = new NullWrapper("[Ljava.lang.String;");
195 }
196
197 Object paramObj11 = communityPermissions;
198
199 if (communityPermissions == null) {
200 paramObj11 = new NullWrapper("[Ljava.lang.String;");
201 }
202
203 Object paramObj12 = guestPermissions;
204
205 if (guestPermissions == null) {
206 paramObj12 = new NullWrapper("[Ljava.lang.String;");
207 }
208
209 MethodWrapper methodWrapper = new MethodWrapper(BlogsEntryServiceUtil.class.getName(),
210 "addEntry",
211 new Object[] {
212 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
213 paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
214 paramObj10, paramObj11, paramObj12
215 });
216 Object returnObj = null;
217
218 try {
219 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
220 }
221 catch (Exception e) {
222 if (e instanceof com.liferay.portal.SystemException) {
223 throw (com.liferay.portal.SystemException)e;
224 }
225
226 if (e instanceof com.liferay.portal.PortalException) {
227 throw (com.liferay.portal.PortalException)e;
228 }
229
230 throw new com.liferay.portal.SystemException(e);
231 }
232
233 return (com.liferay.portlet.blogs.model.BlogsEntry)returnObj;
234 }
235 catch (com.liferay.portal.SystemException se) {
236 _log.error(se, se);
237 throw se;
238 }
239 }
240
241 public static void deleteEntry(HttpPrincipal httpPrincipal, long entryId)
242 throws com.liferay.portal.SystemException,
243 com.liferay.portal.PortalException {
244 try {
245 Object paramObj0 = new LongWrapper(entryId);
246 MethodWrapper methodWrapper = new MethodWrapper(BlogsEntryServiceUtil.class.getName(),
247 "deleteEntry", new Object[] { paramObj0 });
248
249 try {
250 TunnelUtil.invoke(httpPrincipal, methodWrapper);
251 }
252 catch (Exception e) {
253 if (e instanceof com.liferay.portal.SystemException) {
254 throw (com.liferay.portal.SystemException)e;
255 }
256
257 if (e instanceof com.liferay.portal.PortalException) {
258 throw (com.liferay.portal.PortalException)e;
259 }
260
261 throw new com.liferay.portal.SystemException(e);
262 }
263 }
264 catch (com.liferay.portal.SystemException se) {
265 _log.error(se, se);
266 throw se;
267 }
268 }
269
270 public static java.lang.String getCategoryBlogsRSS(
271 HttpPrincipal httpPrincipal, long categoryId, int max,
272 java.lang.String type, double version, java.lang.String feedURL,
273 java.lang.String entryURL)
274 throws com.liferay.portal.SystemException,
275 com.liferay.portal.PortalException {
276 try {
277 Object paramObj0 = new LongWrapper(categoryId);
278 Object paramObj1 = new IntegerWrapper(max);
279 Object paramObj2 = type;
280
281 if (type == null) {
282 paramObj2 = new NullWrapper("java.lang.String");
283 }
284
285 Object paramObj3 = new DoubleWrapper(version);
286 Object paramObj4 = feedURL;
287
288 if (feedURL == null) {
289 paramObj4 = new NullWrapper("java.lang.String");
290 }
291
292 Object paramObj5 = entryURL;
293
294 if (entryURL == null) {
295 paramObj5 = new NullWrapper("java.lang.String");
296 }
297
298 MethodWrapper methodWrapper = new MethodWrapper(BlogsEntryServiceUtil.class.getName(),
299 "getCategoryBlogsRSS",
300 new Object[] {
301 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
302 paramObj5
303 });
304 Object returnObj = null;
305
306 try {
307 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
308 }
309 catch (Exception e) {
310 if (e instanceof com.liferay.portal.SystemException) {
311 throw (com.liferay.portal.SystemException)e;
312 }
313
314 if (e instanceof com.liferay.portal.PortalException) {
315 throw (com.liferay.portal.PortalException)e;
316 }
317
318 throw new com.liferay.portal.SystemException(e);
319 }
320
321 return (java.lang.String)returnObj;
322 }
323 catch (com.liferay.portal.SystemException se) {
324 _log.error(se, se);
325 throw se;
326 }
327 }
328
329 public static java.util.List getCompanyEntries(
330 HttpPrincipal httpPrincipal, long companyId, int max)
331 throws com.liferay.portal.SystemException,
332 com.liferay.portal.PortalException {
333 try {
334 Object paramObj0 = new LongWrapper(companyId);
335 Object paramObj1 = new IntegerWrapper(max);
336 MethodWrapper methodWrapper = new MethodWrapper(BlogsEntryServiceUtil.class.getName(),
337 "getCompanyEntries", new Object[] { paramObj0, paramObj1 });
338 Object returnObj = null;
339
340 try {
341 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
342 }
343 catch (Exception e) {
344 if (e instanceof com.liferay.portal.SystemException) {
345 throw (com.liferay.portal.SystemException)e;
346 }
347
348 if (e instanceof com.liferay.portal.PortalException) {
349 throw (com.liferay.portal.PortalException)e;
350 }
351
352 throw new com.liferay.portal.SystemException(e);
353 }
354
355 return (java.util.List)returnObj;
356 }
357 catch (com.liferay.portal.SystemException se) {
358 _log.error(se, se);
359 throw se;
360 }
361 }
362
363 public static java.lang.String getCompanyEntriesRSS(
364 HttpPrincipal httpPrincipal, long companyId, int max,
365 java.lang.String type, double version, java.lang.String feedURL,
366 java.lang.String entryURL)
367 throws com.liferay.portal.SystemException,
368 com.liferay.portal.PortalException {
369 try {
370 Object paramObj0 = new LongWrapper(companyId);
371 Object paramObj1 = new IntegerWrapper(max);
372 Object paramObj2 = type;
373
374 if (type == null) {
375 paramObj2 = new NullWrapper("java.lang.String");
376 }
377
378 Object paramObj3 = new DoubleWrapper(version);
379 Object paramObj4 = feedURL;
380
381 if (feedURL == null) {
382 paramObj4 = new NullWrapper("java.lang.String");
383 }
384
385 Object paramObj5 = entryURL;
386
387 if (entryURL == null) {
388 paramObj5 = new NullWrapper("java.lang.String");
389 }
390
391 MethodWrapper methodWrapper = new MethodWrapper(BlogsEntryServiceUtil.class.getName(),
392 "getCompanyEntriesRSS",
393 new Object[] {
394 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
395 paramObj5
396 });
397 Object returnObj = null;
398
399 try {
400 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
401 }
402 catch (Exception e) {
403 if (e instanceof com.liferay.portal.SystemException) {
404 throw (com.liferay.portal.SystemException)e;
405 }
406
407 if (e instanceof com.liferay.portal.PortalException) {
408 throw (com.liferay.portal.PortalException)e;
409 }
410
411 throw new com.liferay.portal.SystemException(e);
412 }
413
414 return (java.lang.String)returnObj;
415 }
416 catch (com.liferay.portal.SystemException se) {
417 _log.error(se, se);
418 throw se;
419 }
420 }
421
422 public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
423 HttpPrincipal httpPrincipal, long entryId)
424 throws com.liferay.portal.SystemException,
425 com.liferay.portal.PortalException {
426 try {
427 Object paramObj0 = new LongWrapper(entryId);
428 MethodWrapper methodWrapper = new MethodWrapper(BlogsEntryServiceUtil.class.getName(),
429 "getEntry", new Object[] { paramObj0 });
430 Object returnObj = null;
431
432 try {
433 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
434 }
435 catch (Exception e) {
436 if (e instanceof com.liferay.portal.SystemException) {
437 throw (com.liferay.portal.SystemException)e;
438 }
439
440 if (e instanceof com.liferay.portal.PortalException) {
441 throw (com.liferay.portal.PortalException)e;
442 }
443
444 throw new com.liferay.portal.SystemException(e);
445 }
446
447 return (com.liferay.portlet.blogs.model.BlogsEntry)returnObj;
448 }
449 catch (com.liferay.portal.SystemException se) {
450 _log.error(se, se);
451 throw se;
452 }
453 }
454
455 public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
456 HttpPrincipal httpPrincipal, long groupId, java.lang.String urlTitle)
457 throws com.liferay.portal.SystemException,
458 com.liferay.portal.PortalException {
459 try {
460 Object paramObj0 = new LongWrapper(groupId);
461 Object paramObj1 = urlTitle;
462
463 if (urlTitle == null) {
464 paramObj1 = new NullWrapper("java.lang.String");
465 }
466
467 MethodWrapper methodWrapper = new MethodWrapper(BlogsEntryServiceUtil.class.getName(),
468 "getEntry", new Object[] { paramObj0, paramObj1 });
469 Object returnObj = null;
470
471 try {
472 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
473 }
474 catch (Exception e) {
475 if (e instanceof com.liferay.portal.SystemException) {
476 throw (com.liferay.portal.SystemException)e;
477 }
478
479 if (e instanceof com.liferay.portal.PortalException) {
480 throw (com.liferay.portal.PortalException)e;
481 }
482
483 throw new com.liferay.portal.SystemException(e);
484 }
485
486 return (com.liferay.portlet.blogs.model.BlogsEntry)returnObj;
487 }
488 catch (com.liferay.portal.SystemException se) {
489 _log.error(se, se);
490 throw se;
491 }
492 }
493
494 public static java.util.List getGroupEntries(HttpPrincipal httpPrincipal,
495 long groupId, int max)
496 throws com.liferay.portal.SystemException,
497 com.liferay.portal.PortalException {
498 try {
499 Object paramObj0 = new LongWrapper(groupId);
500 Object paramObj1 = new IntegerWrapper(max);
501 MethodWrapper methodWrapper = new MethodWrapper(BlogsEntryServiceUtil.class.getName(),
502 "getGroupEntries", new Object[] { paramObj0, paramObj1 });
503 Object returnObj = null;
504
505 try {
506 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
507 }
508 catch (Exception e) {
509 if (e instanceof com.liferay.portal.SystemException) {
510 throw (com.liferay.portal.SystemException)e;
511 }
512
513 if (e instanceof com.liferay.portal.PortalException) {
514 throw (com.liferay.portal.PortalException)e;
515 }
516
517 throw new com.liferay.portal.SystemException(e);
518 }
519
520 return (java.util.List)returnObj;
521 }
522 catch (com.liferay.portal.SystemException se) {
523 _log.error(se, se);
524 throw se;
525 }
526 }
527
528 public static java.lang.String getGroupEntriesRSS(
529 HttpPrincipal httpPrincipal, long groupId, int max,
530 java.lang.String type, double version, java.lang.String feedURL,
531 java.lang.String entryURL)
532 throws com.liferay.portal.SystemException,
533 com.liferay.portal.PortalException {
534 try {
535 Object paramObj0 = new LongWrapper(groupId);
536 Object paramObj1 = new IntegerWrapper(max);
537 Object paramObj2 = type;
538
539 if (type == null) {
540 paramObj2 = new NullWrapper("java.lang.String");
541 }
542
543 Object paramObj3 = new DoubleWrapper(version);
544 Object paramObj4 = feedURL;
545
546 if (feedURL == null) {
547 paramObj4 = new NullWrapper("java.lang.String");
548 }
549
550 Object paramObj5 = entryURL;
551
552 if (entryURL == null) {
553 paramObj5 = new NullWrapper("java.lang.String");
554 }
555
556 MethodWrapper methodWrapper = new MethodWrapper(BlogsEntryServiceUtil.class.getName(),
557 "getGroupEntriesRSS",
558 new Object[] {
559 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
560 paramObj5
561 });
562 Object returnObj = null;
563
564 try {
565 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
566 }
567 catch (Exception e) {
568 if (e instanceof com.liferay.portal.SystemException) {
569 throw (com.liferay.portal.SystemException)e;
570 }
571
572 if (e instanceof com.liferay.portal.PortalException) {
573 throw (com.liferay.portal.PortalException)e;
574 }
575
576 throw new com.liferay.portal.SystemException(e);
577 }
578
579 return (java.lang.String)returnObj;
580 }
581 catch (com.liferay.portal.SystemException se) {
582 _log.error(se, se);
583 throw se;
584 }
585 }
586
587 public static java.util.List getOrganizationEntries(
588 HttpPrincipal httpPrincipal, long organizationId, int max)
589 throws com.liferay.portal.SystemException,
590 com.liferay.portal.PortalException {
591 try {
592 Object paramObj0 = new LongWrapper(organizationId);
593 Object paramObj1 = new IntegerWrapper(max);
594 MethodWrapper methodWrapper = new MethodWrapper(BlogsEntryServiceUtil.class.getName(),
595 "getOrganizationEntries",
596 new Object[] { paramObj0, paramObj1 });
597 Object returnObj = null;
598
599 try {
600 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
601 }
602 catch (Exception e) {
603 if (e instanceof com.liferay.portal.SystemException) {
604 throw (com.liferay.portal.SystemException)e;
605 }
606
607 if (e instanceof com.liferay.portal.PortalException) {
608 throw (com.liferay.portal.PortalException)e;
609 }
610
611 throw new com.liferay.portal.SystemException(e);
612 }
613
614 return (java.util.List)returnObj;
615 }
616 catch (com.liferay.portal.SystemException se) {
617 _log.error(se, se);
618 throw se;
619 }
620 }
621
622 public static java.lang.String getOrganizationEntriesRSS(
623 HttpPrincipal httpPrincipal, long organizationId, int max,
624 java.lang.String type, double version, java.lang.String feedURL,
625 java.lang.String entryURL)
626 throws com.liferay.portal.SystemException,
627 com.liferay.portal.PortalException {
628 try {
629 Object paramObj0 = new LongWrapper(organizationId);
630 Object paramObj1 = new IntegerWrapper(max);
631 Object paramObj2 = type;
632
633 if (type == null) {
634 paramObj2 = new NullWrapper("java.lang.String");
635 }
636
637 Object paramObj3 = new DoubleWrapper(version);
638 Object paramObj4 = feedURL;
639
640 if (feedURL == null) {
641 paramObj4 = new NullWrapper("java.lang.String");
642 }
643
644 Object paramObj5 = entryURL;
645
646 if (entryURL == null) {
647 paramObj5 = new NullWrapper("java.lang.String");
648 }
649
650 MethodWrapper methodWrapper = new MethodWrapper(BlogsEntryServiceUtil.class.getName(),
651 "getOrganizationEntriesRSS",
652 new Object[] {
653 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
654 paramObj5
655 });
656 Object returnObj = null;
657
658 try {
659 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
660 }
661 catch (Exception e) {
662 if (e instanceof com.liferay.portal.SystemException) {
663 throw (com.liferay.portal.SystemException)e;
664 }
665
666 if (e instanceof com.liferay.portal.PortalException) {
667 throw (com.liferay.portal.PortalException)e;
668 }
669
670 throw new com.liferay.portal.SystemException(e);
671 }
672
673 return (java.lang.String)returnObj;
674 }
675 catch (com.liferay.portal.SystemException se) {
676 _log.error(se, se);
677 throw se;
678 }
679 }
680
681 public static com.liferay.portlet.blogs.model.BlogsEntry updateEntry(
682 HttpPrincipal httpPrincipal, long entryId, long categoryId,
683 java.lang.String title, java.lang.String content, int displayDateMonth,
684 int displayDateDay, int displayDateYear, int displayDateHour,
685 int displayDateMinute,
686 com.liferay.portal.theme.ThemeDisplay themeDisplay,
687 java.lang.String[] tagsEntries)
688 throws com.liferay.portal.SystemException,
689 com.liferay.portal.PortalException {
690 try {
691 Object paramObj0 = new LongWrapper(entryId);
692 Object paramObj1 = new LongWrapper(categoryId);
693 Object paramObj2 = title;
694
695 if (title == null) {
696 paramObj2 = new NullWrapper("java.lang.String");
697 }
698
699 Object paramObj3 = content;
700
701 if (content == null) {
702 paramObj3 = new NullWrapper("java.lang.String");
703 }
704
705 Object paramObj4 = new IntegerWrapper(displayDateMonth);
706 Object paramObj5 = new IntegerWrapper(displayDateDay);
707 Object paramObj6 = new IntegerWrapper(displayDateYear);
708 Object paramObj7 = new IntegerWrapper(displayDateHour);
709 Object paramObj8 = new IntegerWrapper(displayDateMinute);
710 Object paramObj9 = themeDisplay;
711
712 if (themeDisplay == null) {
713 paramObj9 = new NullWrapper(
714 "com.liferay.portal.theme.ThemeDisplay");
715 }
716
717 Object paramObj10 = tagsEntries;
718
719 if (tagsEntries == null) {
720 paramObj10 = new NullWrapper("[Ljava.lang.String;");
721 }
722
723 MethodWrapper methodWrapper = new MethodWrapper(BlogsEntryServiceUtil.class.getName(),
724 "updateEntry",
725 new Object[] {
726 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
727 paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
728 paramObj10
729 });
730 Object returnObj = null;
731
732 try {
733 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
734 }
735 catch (Exception e) {
736 if (e instanceof com.liferay.portal.SystemException) {
737 throw (com.liferay.portal.SystemException)e;
738 }
739
740 if (e instanceof com.liferay.portal.PortalException) {
741 throw (com.liferay.portal.PortalException)e;
742 }
743
744 throw new com.liferay.portal.SystemException(e);
745 }
746
747 return (com.liferay.portlet.blogs.model.BlogsEntry)returnObj;
748 }
749 catch (com.liferay.portal.SystemException se) {
750 _log.error(se, se);
751 throw se;
752 }
753 }
754
755 private static Log _log = LogFactoryUtil.getLog(BlogsEntryServiceHttp.class);
756 }