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