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