1
14
15 package com.liferay.portlet.journal.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.BooleanWrapper;
20 import com.liferay.portal.kernel.util.DoubleWrapper;
21 import com.liferay.portal.kernel.util.IntegerWrapper;
22 import com.liferay.portal.kernel.util.LongWrapper;
23 import com.liferay.portal.kernel.util.MethodWrapper;
24 import com.liferay.portal.kernel.util.NullWrapper;
25 import com.liferay.portal.security.auth.HttpPrincipal;
26 import com.liferay.portal.service.http.TunnelUtil;
27
28 import com.liferay.portlet.journal.service.JournalArticleServiceUtil;
29
30
67 public class JournalArticleServiceHttp {
68 public static com.liferay.portlet.journal.model.JournalArticle addArticle(
69 HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId,
70 boolean autoArticleId, java.lang.String title,
71 java.lang.String description, java.lang.String content,
72 java.lang.String type, java.lang.String structureId,
73 java.lang.String templateId, int displayDateMonth, int displayDateDay,
74 int displayDateYear, int displayDateHour, int displayDateMinute,
75 int expirationDateMonth, int expirationDateDay, int expirationDateYear,
76 int expirationDateHour, int expirationDateMinute, boolean neverExpire,
77 int reviewDateMonth, int reviewDateDay, int reviewDateYear,
78 int reviewDateHour, int reviewDateMinute, boolean neverReview,
79 boolean indexable, boolean smallImage, java.lang.String smallImageURL,
80 java.io.File smallFile, java.util.Map<java.lang.String, byte[]> images,
81 java.lang.String articleURL,
82 com.liferay.portal.service.ServiceContext serviceContext)
83 throws com.liferay.portal.kernel.exception.PortalException,
84 com.liferay.portal.kernel.exception.SystemException {
85 try {
86 Object paramObj0 = new LongWrapper(groupId);
87
88 Object paramObj1 = articleId;
89
90 if (articleId == null) {
91 paramObj1 = new NullWrapper("java.lang.String");
92 }
93
94 Object paramObj2 = new BooleanWrapper(autoArticleId);
95
96 Object paramObj3 = title;
97
98 if (title == null) {
99 paramObj3 = new NullWrapper("java.lang.String");
100 }
101
102 Object paramObj4 = description;
103
104 if (description == null) {
105 paramObj4 = new NullWrapper("java.lang.String");
106 }
107
108 Object paramObj5 = content;
109
110 if (content == null) {
111 paramObj5 = new NullWrapper("java.lang.String");
112 }
113
114 Object paramObj6 = type;
115
116 if (type == null) {
117 paramObj6 = new NullWrapper("java.lang.String");
118 }
119
120 Object paramObj7 = structureId;
121
122 if (structureId == null) {
123 paramObj7 = new NullWrapper("java.lang.String");
124 }
125
126 Object paramObj8 = templateId;
127
128 if (templateId == null) {
129 paramObj8 = new NullWrapper("java.lang.String");
130 }
131
132 Object paramObj9 = new IntegerWrapper(displayDateMonth);
133
134 Object paramObj10 = new IntegerWrapper(displayDateDay);
135
136 Object paramObj11 = new IntegerWrapper(displayDateYear);
137
138 Object paramObj12 = new IntegerWrapper(displayDateHour);
139
140 Object paramObj13 = new IntegerWrapper(displayDateMinute);
141
142 Object paramObj14 = new IntegerWrapper(expirationDateMonth);
143
144 Object paramObj15 = new IntegerWrapper(expirationDateDay);
145
146 Object paramObj16 = new IntegerWrapper(expirationDateYear);
147
148 Object paramObj17 = new IntegerWrapper(expirationDateHour);
149
150 Object paramObj18 = new IntegerWrapper(expirationDateMinute);
151
152 Object paramObj19 = new BooleanWrapper(neverExpire);
153
154 Object paramObj20 = new IntegerWrapper(reviewDateMonth);
155
156 Object paramObj21 = new IntegerWrapper(reviewDateDay);
157
158 Object paramObj22 = new IntegerWrapper(reviewDateYear);
159
160 Object paramObj23 = new IntegerWrapper(reviewDateHour);
161
162 Object paramObj24 = new IntegerWrapper(reviewDateMinute);
163
164 Object paramObj25 = new BooleanWrapper(neverReview);
165
166 Object paramObj26 = new BooleanWrapper(indexable);
167
168 Object paramObj27 = new BooleanWrapper(smallImage);
169
170 Object paramObj28 = smallImageURL;
171
172 if (smallImageURL == null) {
173 paramObj28 = new NullWrapper("java.lang.String");
174 }
175
176 Object paramObj29 = smallFile;
177
178 if (smallFile == null) {
179 paramObj29 = new NullWrapper("java.io.File");
180 }
181
182 Object paramObj30 = images;
183
184 if (images == null) {
185 paramObj30 = new NullWrapper("java.util.Map");
186 }
187
188 Object paramObj31 = articleURL;
189
190 if (articleURL == null) {
191 paramObj31 = new NullWrapper("java.lang.String");
192 }
193
194 Object paramObj32 = serviceContext;
195
196 if (serviceContext == null) {
197 paramObj32 = new NullWrapper(
198 "com.liferay.portal.service.ServiceContext");
199 }
200
201 MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
202 "addArticle",
203 new Object[] {
204 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
205 paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
206 paramObj10, paramObj11, paramObj12, paramObj13,
207 paramObj14, paramObj15, paramObj16, paramObj17,
208 paramObj18, paramObj19, paramObj20, paramObj21,
209 paramObj22, paramObj23, paramObj24, paramObj25,
210 paramObj26, paramObj27, paramObj28, paramObj29,
211 paramObj30, paramObj31, paramObj32
212 });
213
214 Object returnObj = null;
215
216 try {
217 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
218 }
219 catch (Exception e) {
220 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
221 throw (com.liferay.portal.kernel.exception.PortalException)e;
222 }
223
224 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
225 throw (com.liferay.portal.kernel.exception.SystemException)e;
226 }
227
228 throw new com.liferay.portal.kernel.exception.SystemException(e);
229 }
230
231 return (com.liferay.portlet.journal.model.JournalArticle)returnObj;
232 }
233 catch (com.liferay.portal.kernel.exception.SystemException se) {
234 _log.error(se, se);
235
236 throw se;
237 }
238 }
239
240 public static com.liferay.portlet.journal.model.JournalArticle addArticle(
241 HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId,
242 boolean autoArticleId, java.lang.String title,
243 java.lang.String description, java.lang.String content,
244 java.lang.String type, java.lang.String structureId,
245 java.lang.String templateId, int displayDateMonth, int displayDateDay,
246 int displayDateYear, int displayDateHour, int displayDateMinute,
247 int expirationDateMonth, int expirationDateDay, int expirationDateYear,
248 int expirationDateHour, int expirationDateMinute, boolean neverExpire,
249 int reviewDateMonth, int reviewDateDay, int reviewDateYear,
250 int reviewDateHour, int reviewDateMinute, boolean neverReview,
251 boolean indexable, java.lang.String articleURL,
252 com.liferay.portal.service.ServiceContext serviceContext)
253 throws com.liferay.portal.kernel.exception.PortalException,
254 com.liferay.portal.kernel.exception.SystemException {
255 try {
256 Object paramObj0 = new LongWrapper(groupId);
257
258 Object paramObj1 = articleId;
259
260 if (articleId == null) {
261 paramObj1 = new NullWrapper("java.lang.String");
262 }
263
264 Object paramObj2 = new BooleanWrapper(autoArticleId);
265
266 Object paramObj3 = title;
267
268 if (title == null) {
269 paramObj3 = new NullWrapper("java.lang.String");
270 }
271
272 Object paramObj4 = description;
273
274 if (description == null) {
275 paramObj4 = new NullWrapper("java.lang.String");
276 }
277
278 Object paramObj5 = content;
279
280 if (content == null) {
281 paramObj5 = new NullWrapper("java.lang.String");
282 }
283
284 Object paramObj6 = type;
285
286 if (type == null) {
287 paramObj6 = new NullWrapper("java.lang.String");
288 }
289
290 Object paramObj7 = structureId;
291
292 if (structureId == null) {
293 paramObj7 = new NullWrapper("java.lang.String");
294 }
295
296 Object paramObj8 = templateId;
297
298 if (templateId == null) {
299 paramObj8 = new NullWrapper("java.lang.String");
300 }
301
302 Object paramObj9 = new IntegerWrapper(displayDateMonth);
303
304 Object paramObj10 = new IntegerWrapper(displayDateDay);
305
306 Object paramObj11 = new IntegerWrapper(displayDateYear);
307
308 Object paramObj12 = new IntegerWrapper(displayDateHour);
309
310 Object paramObj13 = new IntegerWrapper(displayDateMinute);
311
312 Object paramObj14 = new IntegerWrapper(expirationDateMonth);
313
314 Object paramObj15 = new IntegerWrapper(expirationDateDay);
315
316 Object paramObj16 = new IntegerWrapper(expirationDateYear);
317
318 Object paramObj17 = new IntegerWrapper(expirationDateHour);
319
320 Object paramObj18 = new IntegerWrapper(expirationDateMinute);
321
322 Object paramObj19 = new BooleanWrapper(neverExpire);
323
324 Object paramObj20 = new IntegerWrapper(reviewDateMonth);
325
326 Object paramObj21 = new IntegerWrapper(reviewDateDay);
327
328 Object paramObj22 = new IntegerWrapper(reviewDateYear);
329
330 Object paramObj23 = new IntegerWrapper(reviewDateHour);
331
332 Object paramObj24 = new IntegerWrapper(reviewDateMinute);
333
334 Object paramObj25 = new BooleanWrapper(neverReview);
335
336 Object paramObj26 = new BooleanWrapper(indexable);
337
338 Object paramObj27 = articleURL;
339
340 if (articleURL == null) {
341 paramObj27 = new NullWrapper("java.lang.String");
342 }
343
344 Object paramObj28 = serviceContext;
345
346 if (serviceContext == null) {
347 paramObj28 = new NullWrapper(
348 "com.liferay.portal.service.ServiceContext");
349 }
350
351 MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
352 "addArticle",
353 new Object[] {
354 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
355 paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
356 paramObj10, paramObj11, paramObj12, paramObj13,
357 paramObj14, paramObj15, paramObj16, paramObj17,
358 paramObj18, paramObj19, paramObj20, paramObj21,
359 paramObj22, paramObj23, paramObj24, paramObj25,
360 paramObj26, paramObj27, paramObj28
361 });
362
363 Object returnObj = null;
364
365 try {
366 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
367 }
368 catch (Exception e) {
369 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
370 throw (com.liferay.portal.kernel.exception.PortalException)e;
371 }
372
373 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
374 throw (com.liferay.portal.kernel.exception.SystemException)e;
375 }
376
377 throw new com.liferay.portal.kernel.exception.SystemException(e);
378 }
379
380 return (com.liferay.portlet.journal.model.JournalArticle)returnObj;
381 }
382 catch (com.liferay.portal.kernel.exception.SystemException se) {
383 _log.error(se, se);
384
385 throw se;
386 }
387 }
388
389 public static com.liferay.portlet.journal.model.JournalArticle copyArticle(
390 HttpPrincipal httpPrincipal, long groupId,
391 java.lang.String oldArticleId, java.lang.String newArticleId,
392 boolean autoArticleId, double version)
393 throws com.liferay.portal.kernel.exception.PortalException,
394 com.liferay.portal.kernel.exception.SystemException {
395 try {
396 Object paramObj0 = new LongWrapper(groupId);
397
398 Object paramObj1 = oldArticleId;
399
400 if (oldArticleId == null) {
401 paramObj1 = new NullWrapper("java.lang.String");
402 }
403
404 Object paramObj2 = newArticleId;
405
406 if (newArticleId == null) {
407 paramObj2 = new NullWrapper("java.lang.String");
408 }
409
410 Object paramObj3 = new BooleanWrapper(autoArticleId);
411
412 Object paramObj4 = new DoubleWrapper(version);
413
414 MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
415 "copyArticle",
416 new Object[] {
417 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
418 });
419
420 Object returnObj = null;
421
422 try {
423 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
424 }
425 catch (Exception e) {
426 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
427 throw (com.liferay.portal.kernel.exception.PortalException)e;
428 }
429
430 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
431 throw (com.liferay.portal.kernel.exception.SystemException)e;
432 }
433
434 throw new com.liferay.portal.kernel.exception.SystemException(e);
435 }
436
437 return (com.liferay.portlet.journal.model.JournalArticle)returnObj;
438 }
439 catch (com.liferay.portal.kernel.exception.SystemException se) {
440 _log.error(se, se);
441
442 throw se;
443 }
444 }
445
446 public static void deleteArticle(HttpPrincipal httpPrincipal, long groupId,
447 java.lang.String articleId, double version,
448 java.lang.String articleURL,
449 com.liferay.portal.service.ServiceContext serviceContext)
450 throws com.liferay.portal.kernel.exception.PortalException,
451 com.liferay.portal.kernel.exception.SystemException {
452 try {
453 Object paramObj0 = new LongWrapper(groupId);
454
455 Object paramObj1 = articleId;
456
457 if (articleId == null) {
458 paramObj1 = new NullWrapper("java.lang.String");
459 }
460
461 Object paramObj2 = new DoubleWrapper(version);
462
463 Object paramObj3 = articleURL;
464
465 if (articleURL == null) {
466 paramObj3 = new NullWrapper("java.lang.String");
467 }
468
469 Object paramObj4 = serviceContext;
470
471 if (serviceContext == null) {
472 paramObj4 = new NullWrapper(
473 "com.liferay.portal.service.ServiceContext");
474 }
475
476 MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
477 "deleteArticle",
478 new Object[] {
479 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
480 });
481
482 try {
483 TunnelUtil.invoke(httpPrincipal, methodWrapper);
484 }
485 catch (Exception e) {
486 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
487 throw (com.liferay.portal.kernel.exception.PortalException)e;
488 }
489
490 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
491 throw (com.liferay.portal.kernel.exception.SystemException)e;
492 }
493
494 throw new com.liferay.portal.kernel.exception.SystemException(e);
495 }
496 }
497 catch (com.liferay.portal.kernel.exception.SystemException se) {
498 _log.error(se, se);
499
500 throw se;
501 }
502 }
503
504 public static void deleteArticle(HttpPrincipal httpPrincipal, long groupId,
505 java.lang.String articleId, java.lang.String articleURL,
506 com.liferay.portal.service.ServiceContext serviceContext)
507 throws com.liferay.portal.kernel.exception.PortalException,
508 com.liferay.portal.kernel.exception.SystemException {
509 try {
510 Object paramObj0 = new LongWrapper(groupId);
511
512 Object paramObj1 = articleId;
513
514 if (articleId == null) {
515 paramObj1 = new NullWrapper("java.lang.String");
516 }
517
518 Object paramObj2 = articleURL;
519
520 if (articleURL == null) {
521 paramObj2 = new NullWrapper("java.lang.String");
522 }
523
524 Object paramObj3 = serviceContext;
525
526 if (serviceContext == null) {
527 paramObj3 = new NullWrapper(
528 "com.liferay.portal.service.ServiceContext");
529 }
530
531 MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
532 "deleteArticle",
533 new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
534
535 try {
536 TunnelUtil.invoke(httpPrincipal, methodWrapper);
537 }
538 catch (Exception e) {
539 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
540 throw (com.liferay.portal.kernel.exception.PortalException)e;
541 }
542
543 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
544 throw (com.liferay.portal.kernel.exception.SystemException)e;
545 }
546
547 throw new com.liferay.portal.kernel.exception.SystemException(e);
548 }
549 }
550 catch (com.liferay.portal.kernel.exception.SystemException se) {
551 _log.error(se, se);
552
553 throw se;
554 }
555 }
556
557 public static com.liferay.portlet.journal.model.JournalArticle expireArticle(
558 HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId,
559 double version, java.lang.String articleURL,
560 com.liferay.portal.service.ServiceContext serviceContext)
561 throws com.liferay.portal.kernel.exception.PortalException,
562 com.liferay.portal.kernel.exception.SystemException {
563 try {
564 Object paramObj0 = new LongWrapper(groupId);
565
566 Object paramObj1 = articleId;
567
568 if (articleId == null) {
569 paramObj1 = new NullWrapper("java.lang.String");
570 }
571
572 Object paramObj2 = new DoubleWrapper(version);
573
574 Object paramObj3 = articleURL;
575
576 if (articleURL == null) {
577 paramObj3 = new NullWrapper("java.lang.String");
578 }
579
580 Object paramObj4 = serviceContext;
581
582 if (serviceContext == null) {
583 paramObj4 = new NullWrapper(
584 "com.liferay.portal.service.ServiceContext");
585 }
586
587 MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
588 "expireArticle",
589 new Object[] {
590 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
591 });
592
593 Object returnObj = null;
594
595 try {
596 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
597 }
598 catch (Exception e) {
599 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
600 throw (com.liferay.portal.kernel.exception.PortalException)e;
601 }
602
603 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
604 throw (com.liferay.portal.kernel.exception.SystemException)e;
605 }
606
607 throw new com.liferay.portal.kernel.exception.SystemException(e);
608 }
609
610 return (com.liferay.portlet.journal.model.JournalArticle)returnObj;
611 }
612 catch (com.liferay.portal.kernel.exception.SystemException se) {
613 _log.error(se, se);
614
615 throw se;
616 }
617 }
618
619 public static com.liferay.portlet.journal.model.JournalArticle getArticle(
620 HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId)
621 throws com.liferay.portal.kernel.exception.PortalException,
622 com.liferay.portal.kernel.exception.SystemException {
623 try {
624 Object paramObj0 = new LongWrapper(groupId);
625
626 Object paramObj1 = articleId;
627
628 if (articleId == null) {
629 paramObj1 = new NullWrapper("java.lang.String");
630 }
631
632 MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
633 "getArticle", new Object[] { paramObj0, paramObj1 });
634
635 Object returnObj = null;
636
637 try {
638 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
639 }
640 catch (Exception e) {
641 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
642 throw (com.liferay.portal.kernel.exception.PortalException)e;
643 }
644
645 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
646 throw (com.liferay.portal.kernel.exception.SystemException)e;
647 }
648
649 throw new com.liferay.portal.kernel.exception.SystemException(e);
650 }
651
652 return (com.liferay.portlet.journal.model.JournalArticle)returnObj;
653 }
654 catch (com.liferay.portal.kernel.exception.SystemException se) {
655 _log.error(se, se);
656
657 throw se;
658 }
659 }
660
661 public static com.liferay.portlet.journal.model.JournalArticle getArticle(
662 HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId,
663 double version)
664 throws com.liferay.portal.kernel.exception.PortalException,
665 com.liferay.portal.kernel.exception.SystemException {
666 try {
667 Object paramObj0 = new LongWrapper(groupId);
668
669 Object paramObj1 = articleId;
670
671 if (articleId == null) {
672 paramObj1 = new NullWrapper("java.lang.String");
673 }
674
675 Object paramObj2 = new DoubleWrapper(version);
676
677 MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
678 "getArticle",
679 new Object[] { paramObj0, paramObj1, paramObj2 });
680
681 Object returnObj = null;
682
683 try {
684 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
685 }
686 catch (Exception e) {
687 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
688 throw (com.liferay.portal.kernel.exception.PortalException)e;
689 }
690
691 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
692 throw (com.liferay.portal.kernel.exception.SystemException)e;
693 }
694
695 throw new com.liferay.portal.kernel.exception.SystemException(e);
696 }
697
698 return (com.liferay.portlet.journal.model.JournalArticle)returnObj;
699 }
700 catch (com.liferay.portal.kernel.exception.SystemException se) {
701 _log.error(se, se);
702
703 throw se;
704 }
705 }
706
707 public static com.liferay.portlet.journal.model.JournalArticle getArticleByUrlTitle(
708 HttpPrincipal httpPrincipal, long groupId, java.lang.String urlTitle)
709 throws com.liferay.portal.kernel.exception.PortalException,
710 com.liferay.portal.kernel.exception.SystemException {
711 try {
712 Object paramObj0 = new LongWrapper(groupId);
713
714 Object paramObj1 = urlTitle;
715
716 if (urlTitle == null) {
717 paramObj1 = new NullWrapper("java.lang.String");
718 }
719
720 MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
721 "getArticleByUrlTitle",
722 new Object[] { paramObj0, paramObj1 });
723
724 Object returnObj = null;
725
726 try {
727 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
728 }
729 catch (Exception e) {
730 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
731 throw (com.liferay.portal.kernel.exception.PortalException)e;
732 }
733
734 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
735 throw (com.liferay.portal.kernel.exception.SystemException)e;
736 }
737
738 throw new com.liferay.portal.kernel.exception.SystemException(e);
739 }
740
741 return (com.liferay.portlet.journal.model.JournalArticle)returnObj;
742 }
743 catch (com.liferay.portal.kernel.exception.SystemException se) {
744 _log.error(se, se);
745
746 throw se;
747 }
748 }
749
750 public static java.lang.String getArticleContent(
751 HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId,
752 double version, java.lang.String languageId,
753 com.liferay.portal.theme.ThemeDisplay themeDisplay)
754 throws com.liferay.portal.kernel.exception.PortalException,
755 com.liferay.portal.kernel.exception.SystemException {
756 try {
757 Object paramObj0 = new LongWrapper(groupId);
758
759 Object paramObj1 = articleId;
760
761 if (articleId == null) {
762 paramObj1 = new NullWrapper("java.lang.String");
763 }
764
765 Object paramObj2 = new DoubleWrapper(version);
766
767 Object paramObj3 = languageId;
768
769 if (languageId == null) {
770 paramObj3 = new NullWrapper("java.lang.String");
771 }
772
773 Object paramObj4 = themeDisplay;
774
775 if (themeDisplay == null) {
776 paramObj4 = new NullWrapper(
777 "com.liferay.portal.theme.ThemeDisplay");
778 }
779
780 MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
781 "getArticleContent",
782 new Object[] {
783 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
784 });
785
786 Object returnObj = null;
787
788 try {
789 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
790 }
791 catch (Exception e) {
792 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
793 throw (com.liferay.portal.kernel.exception.PortalException)e;
794 }
795
796 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
797 throw (com.liferay.portal.kernel.exception.SystemException)e;
798 }
799
800 throw new com.liferay.portal.kernel.exception.SystemException(e);
801 }
802
803 return (java.lang.String)returnObj;
804 }
805 catch (com.liferay.portal.kernel.exception.SystemException se) {
806 _log.error(se, se);
807
808 throw se;
809 }
810 }
811
812 public static java.lang.String getArticleContent(
813 HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId,
814 java.lang.String languageId,
815 com.liferay.portal.theme.ThemeDisplay themeDisplay)
816 throws com.liferay.portal.kernel.exception.PortalException,
817 com.liferay.portal.kernel.exception.SystemException {
818 try {
819 Object paramObj0 = new LongWrapper(groupId);
820
821 Object paramObj1 = articleId;
822
823 if (articleId == null) {
824 paramObj1 = new NullWrapper("java.lang.String");
825 }
826
827 Object paramObj2 = languageId;
828
829 if (languageId == null) {
830 paramObj2 = new NullWrapper("java.lang.String");
831 }
832
833 Object paramObj3 = themeDisplay;
834
835 if (themeDisplay == null) {
836 paramObj3 = new NullWrapper(
837 "com.liferay.portal.theme.ThemeDisplay");
838 }
839
840 MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
841 "getArticleContent",
842 new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
843
844 Object returnObj = null;
845
846 try {
847 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
848 }
849 catch (Exception e) {
850 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
851 throw (com.liferay.portal.kernel.exception.PortalException)e;
852 }
853
854 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
855 throw (com.liferay.portal.kernel.exception.SystemException)e;
856 }
857
858 throw new com.liferay.portal.kernel.exception.SystemException(e);
859 }
860
861 return (java.lang.String)returnObj;
862 }
863 catch (com.liferay.portal.kernel.exception.SystemException se) {
864 _log.error(se, se);
865
866 throw se;
867 }
868 }
869
870 public static com.liferay.portlet.journal.model.JournalArticle getLatestArticle(
871 HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId,
872 int status)
873 throws com.liferay.portal.kernel.exception.PortalException,
874 com.liferay.portal.kernel.exception.SystemException {
875 try {
876 Object paramObj0 = new LongWrapper(groupId);
877
878 Object paramObj1 = articleId;
879
880 if (articleId == null) {
881 paramObj1 = new NullWrapper("java.lang.String");
882 }
883
884 Object paramObj2 = new IntegerWrapper(status);
885
886 MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
887 "getLatestArticle",
888 new Object[] { paramObj0, paramObj1, paramObj2 });
889
890 Object returnObj = null;
891
892 try {
893 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
894 }
895 catch (Exception e) {
896 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
897 throw (com.liferay.portal.kernel.exception.PortalException)e;
898 }
899
900 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
901 throw (com.liferay.portal.kernel.exception.SystemException)e;
902 }
903
904 throw new com.liferay.portal.kernel.exception.SystemException(e);
905 }
906
907 return (com.liferay.portlet.journal.model.JournalArticle)returnObj;
908 }
909 catch (com.liferay.portal.kernel.exception.SystemException se) {
910 _log.error(se, se);
911
912 throw se;
913 }
914 }
915
916 public static void removeArticleLocale(HttpPrincipal httpPrincipal,
917 long companyId, java.lang.String languageId)
918 throws com.liferay.portal.kernel.exception.PortalException,
919 com.liferay.portal.kernel.exception.SystemException {
920 try {
921 Object paramObj0 = new LongWrapper(companyId);
922
923 Object paramObj1 = languageId;
924
925 if (languageId == null) {
926 paramObj1 = new NullWrapper("java.lang.String");
927 }
928
929 MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
930 "removeArticleLocale", new Object[] { paramObj0, paramObj1 });
931
932 try {
933 TunnelUtil.invoke(httpPrincipal, methodWrapper);
934 }
935 catch (Exception e) {
936 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
937 throw (com.liferay.portal.kernel.exception.PortalException)e;
938 }
939
940 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
941 throw (com.liferay.portal.kernel.exception.SystemException)e;
942 }
943
944 throw new com.liferay.portal.kernel.exception.SystemException(e);
945 }
946 }
947 catch (com.liferay.portal.kernel.exception.SystemException se) {
948 _log.error(se, se);
949
950 throw se;
951 }
952 }
953
954 public static com.liferay.portlet.journal.model.JournalArticle removeArticleLocale(
955 HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId,
956 double version, java.lang.String languageId)
957 throws com.liferay.portal.kernel.exception.PortalException,
958 com.liferay.portal.kernel.exception.SystemException {
959 try {
960 Object paramObj0 = new LongWrapper(groupId);
961
962 Object paramObj1 = articleId;
963
964 if (articleId == null) {
965 paramObj1 = new NullWrapper("java.lang.String");
966 }
967
968 Object paramObj2 = new DoubleWrapper(version);
969
970 Object paramObj3 = languageId;
971
972 if (languageId == null) {
973 paramObj3 = new NullWrapper("java.lang.String");
974 }
975
976 MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
977 "removeArticleLocale",
978 new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
979
980 Object returnObj = null;
981
982 try {
983 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
984 }
985 catch (Exception e) {
986 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
987 throw (com.liferay.portal.kernel.exception.PortalException)e;
988 }
989
990 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
991 throw (com.liferay.portal.kernel.exception.SystemException)e;
992 }
993
994 throw new com.liferay.portal.kernel.exception.SystemException(e);
995 }
996
997 return (com.liferay.portlet.journal.model.JournalArticle)returnObj;
998 }
999 catch (com.liferay.portal.kernel.exception.SystemException se) {
1000 _log.error(se, se);
1001
1002 throw se;
1003 }
1004 }
1005
1006 public static com.liferay.portlet.journal.model.JournalArticle updateArticle(
1007 HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId,
1008 double version, java.lang.String content)
1009 throws com.liferay.portal.kernel.exception.PortalException,
1010 com.liferay.portal.kernel.exception.SystemException {
1011 try {
1012 Object paramObj0 = new LongWrapper(groupId);
1013
1014 Object paramObj1 = articleId;
1015
1016 if (articleId == null) {
1017 paramObj1 = new NullWrapper("java.lang.String");
1018 }
1019
1020 Object paramObj2 = new DoubleWrapper(version);
1021
1022 Object paramObj3 = content;
1023
1024 if (content == null) {
1025 paramObj3 = new NullWrapper("java.lang.String");
1026 }
1027
1028 MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
1029 "updateArticle",
1030 new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1031
1032 Object returnObj = null;
1033
1034 try {
1035 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1036 }
1037 catch (Exception e) {
1038 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1039 throw (com.liferay.portal.kernel.exception.PortalException)e;
1040 }
1041
1042 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1043 throw (com.liferay.portal.kernel.exception.SystemException)e;
1044 }
1045
1046 throw new com.liferay.portal.kernel.exception.SystemException(e);
1047 }
1048
1049 return (com.liferay.portlet.journal.model.JournalArticle)returnObj;
1050 }
1051 catch (com.liferay.portal.kernel.exception.SystemException se) {
1052 _log.error(se, se);
1053
1054 throw se;
1055 }
1056 }
1057
1058 public static com.liferay.portlet.journal.model.JournalArticle updateArticle(
1059 HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId,
1060 double version, java.lang.String title, java.lang.String description,
1061 java.lang.String content, java.lang.String type,
1062 java.lang.String structureId, java.lang.String templateId,
1063 int displayDateMonth, int displayDateDay, int displayDateYear,
1064 int displayDateHour, int displayDateMinute, int expirationDateMonth,
1065 int expirationDateDay, int expirationDateYear, int expirationDateHour,
1066 int expirationDateMinute, boolean neverExpire, int reviewDateMonth,
1067 int reviewDateDay, int reviewDateYear, int reviewDateHour,
1068 int reviewDateMinute, boolean neverReview, boolean indexable,
1069 boolean smallImage, java.lang.String smallImageURL,
1070 java.io.File smallFile, java.util.Map<java.lang.String, byte[]> images,
1071 java.lang.String articleURL,
1072 com.liferay.portal.service.ServiceContext serviceContext)
1073 throws com.liferay.portal.kernel.exception.PortalException,
1074 com.liferay.portal.kernel.exception.SystemException {
1075 try {
1076 Object paramObj0 = new LongWrapper(groupId);
1077
1078 Object paramObj1 = articleId;
1079
1080 if (articleId == null) {
1081 paramObj1 = new NullWrapper("java.lang.String");
1082 }
1083
1084 Object paramObj2 = new DoubleWrapper(version);
1085
1086 Object paramObj3 = title;
1087
1088 if (title == null) {
1089 paramObj3 = new NullWrapper("java.lang.String");
1090 }
1091
1092 Object paramObj4 = description;
1093
1094 if (description == null) {
1095 paramObj4 = new NullWrapper("java.lang.String");
1096 }
1097
1098 Object paramObj5 = content;
1099
1100 if (content == null) {
1101 paramObj5 = new NullWrapper("java.lang.String");
1102 }
1103
1104 Object paramObj6 = type;
1105
1106 if (type == null) {
1107 paramObj6 = new NullWrapper("java.lang.String");
1108 }
1109
1110 Object paramObj7 = structureId;
1111
1112 if (structureId == null) {
1113 paramObj7 = new NullWrapper("java.lang.String");
1114 }
1115
1116 Object paramObj8 = templateId;
1117
1118 if (templateId == null) {
1119 paramObj8 = new NullWrapper("java.lang.String");
1120 }
1121
1122 Object paramObj9 = new IntegerWrapper(displayDateMonth);
1123
1124 Object paramObj10 = new IntegerWrapper(displayDateDay);
1125
1126 Object paramObj11 = new IntegerWrapper(displayDateYear);
1127
1128 Object paramObj12 = new IntegerWrapper(displayDateHour);
1129
1130 Object paramObj13 = new IntegerWrapper(displayDateMinute);
1131
1132 Object paramObj14 = new IntegerWrapper(expirationDateMonth);
1133
1134 Object paramObj15 = new IntegerWrapper(expirationDateDay);
1135
1136 Object paramObj16 = new IntegerWrapper(expirationDateYear);
1137
1138 Object paramObj17 = new IntegerWrapper(expirationDateHour);
1139
1140 Object paramObj18 = new IntegerWrapper(expirationDateMinute);
1141
1142 Object paramObj19 = new BooleanWrapper(neverExpire);
1143
1144 Object paramObj20 = new IntegerWrapper(reviewDateMonth);
1145
1146 Object paramObj21 = new IntegerWrapper(reviewDateDay);
1147
1148 Object paramObj22 = new IntegerWrapper(reviewDateYear);
1149
1150 Object paramObj23 = new IntegerWrapper(reviewDateHour);
1151
1152 Object paramObj24 = new IntegerWrapper(reviewDateMinute);
1153
1154 Object paramObj25 = new BooleanWrapper(neverReview);
1155
1156 Object paramObj26 = new BooleanWrapper(indexable);
1157
1158 Object paramObj27 = new BooleanWrapper(smallImage);
1159
1160 Object paramObj28 = smallImageURL;
1161
1162 if (smallImageURL == null) {
1163 paramObj28 = new NullWrapper("java.lang.String");
1164 }
1165
1166 Object paramObj29 = smallFile;
1167
1168 if (smallFile == null) {
1169 paramObj29 = new NullWrapper("java.io.File");
1170 }
1171
1172 Object paramObj30 = images;
1173
1174 if (images == null) {
1175 paramObj30 = new NullWrapper("java.util.Map");
1176 }
1177
1178 Object paramObj31 = articleURL;
1179
1180 if (articleURL == null) {
1181 paramObj31 = new NullWrapper("java.lang.String");
1182 }
1183
1184 Object paramObj32 = serviceContext;
1185
1186 if (serviceContext == null) {
1187 paramObj32 = new NullWrapper(
1188 "com.liferay.portal.service.ServiceContext");
1189 }
1190
1191 MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
1192 "updateArticle",
1193 new Object[] {
1194 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1195 paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
1196 paramObj10, paramObj11, paramObj12, paramObj13,
1197 paramObj14, paramObj15, paramObj16, paramObj17,
1198 paramObj18, paramObj19, paramObj20, paramObj21,
1199 paramObj22, paramObj23, paramObj24, paramObj25,
1200 paramObj26, paramObj27, paramObj28, paramObj29,
1201 paramObj30, paramObj31, paramObj32
1202 });
1203
1204 Object returnObj = null;
1205
1206 try {
1207 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1208 }
1209 catch (Exception e) {
1210 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1211 throw (com.liferay.portal.kernel.exception.PortalException)e;
1212 }
1213
1214 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1215 throw (com.liferay.portal.kernel.exception.SystemException)e;
1216 }
1217
1218 throw new com.liferay.portal.kernel.exception.SystemException(e);
1219 }
1220
1221 return (com.liferay.portlet.journal.model.JournalArticle)returnObj;
1222 }
1223 catch (com.liferay.portal.kernel.exception.SystemException se) {
1224 _log.error(se, se);
1225
1226 throw se;
1227 }
1228 }
1229
1230 public static com.liferay.portlet.journal.model.JournalArticle updateContent(
1231 HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId,
1232 double version, java.lang.String content)
1233 throws com.liferay.portal.kernel.exception.PortalException,
1234 com.liferay.portal.kernel.exception.SystemException {
1235 try {
1236 Object paramObj0 = new LongWrapper(groupId);
1237
1238 Object paramObj1 = articleId;
1239
1240 if (articleId == null) {
1241 paramObj1 = new NullWrapper("java.lang.String");
1242 }
1243
1244 Object paramObj2 = new DoubleWrapper(version);
1245
1246 Object paramObj3 = content;
1247
1248 if (content == null) {
1249 paramObj3 = new NullWrapper("java.lang.String");
1250 }
1251
1252 MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
1253 "updateContent",
1254 new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1255
1256 Object returnObj = null;
1257
1258 try {
1259 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1260 }
1261 catch (Exception e) {
1262 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1263 throw (com.liferay.portal.kernel.exception.PortalException)e;
1264 }
1265
1266 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1267 throw (com.liferay.portal.kernel.exception.SystemException)e;
1268 }
1269
1270 throw new com.liferay.portal.kernel.exception.SystemException(e);
1271 }
1272
1273 return (com.liferay.portlet.journal.model.JournalArticle)returnObj;
1274 }
1275 catch (com.liferay.portal.kernel.exception.SystemException se) {
1276 _log.error(se, se);
1277
1278 throw se;
1279 }
1280 }
1281
1282 private static Log _log = LogFactoryUtil.getLog(JournalArticleServiceHttp.class);
1283}