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