1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.journal.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.journal.service.JournalArticleServiceUtil;
37  
38  /**
39   * <a href="JournalArticleServiceHttp.java.html"><b><i>View Source</i></b></a>
40   *
41   * <p>
42   * ServiceBuilder generated this class. Modifications in this class will be
43   * overwritten the next time is generated.
44   * </p>
45   *
46   * <p>
47   * This class provides a HTTP utility for the
48   * <code>com.liferay.portlet.journal.service.JournalArticleServiceUtil</code> service
49   * utility. The static methods of this class calls the same methods of the
50   * service utility. However, the signatures are different because it requires an
51   * additional <code>com.liferay.portal.security.auth.HttpPrincipal</code>
52   * parameter.
53   * </p>
54   *
55   * <p>
56   * The benefits of using the HTTP utility is that it is fast and allows for
57   * tunneling without the cost of serializing to text. The drawback is that it
58   * only works with Java.
59   * </p>
60   *
61   * <p>
62   * Set the property <code>tunnel.servlet.hosts.allowed</code> in
63   * portal.properties to configure security.
64   * </p>
65   *
66   * <p>
67   * The HTTP utility is only generated for remote services.
68   * </p>
69   *
70   * @author Brian Wing Shun Chan
71   *
72   * @see com.liferay.portal.security.auth.HttpPrincipal
73   * @see com.liferay.portlet.journal.service.JournalArticleServiceUtil
74   * @see com.liferay.portlet.journal.service.http.JournalArticleServiceSoap
75   *
76   */
77  public class JournalArticleServiceHttp {
78      public static com.liferay.portlet.journal.model.JournalArticle addArticle(
79          HttpPrincipal httpPrincipal, java.lang.String articleId,
80          boolean autoArticleId, long plid, java.lang.String title,
81          java.lang.String description, java.lang.String content,
82          java.lang.String type, java.lang.String structureId,
83          java.lang.String templateId, int displayDateMonth, int displayDateDay,
84          int displayDateYear, int displayDateHour, int displayDateMinute,
85          int expirationDateMonth, int expirationDateDay, int expirationDateYear,
86          int expirationDateHour, int expirationDateMinute, boolean neverExpire,
87          int reviewDateMonth, int reviewDateDay, int reviewDateYear,
88          int reviewDateHour, int reviewDateMinute, boolean neverReview,
89          boolean indexable, boolean smallImage, java.lang.String smallImageURL,
90          java.io.File smallFile, java.util.Map<String, byte[]> images,
91          java.lang.String articleURL, javax.portlet.PortletPreferences prefs,
92          java.lang.String[] tagsEntries, boolean addCommunityPermissions,
93          boolean addGuestPermissions)
94          throws com.liferay.portal.PortalException,
95              com.liferay.portal.SystemException {
96          try {
97              Object paramObj0 = articleId;
98  
99              if (articleId == null) {
100                 paramObj0 = new NullWrapper("java.lang.String");
101             }
102 
103             Object paramObj1 = new BooleanWrapper(autoArticleId);
104 
105             Object paramObj2 = new LongWrapper(plid);
106 
107             Object paramObj3 = title;
108 
109             if (title == null) {
110                 paramObj3 = new NullWrapper("java.lang.String");
111             }
112 
113             Object paramObj4 = description;
114 
115             if (description == null) {
116                 paramObj4 = new NullWrapper("java.lang.String");
117             }
118 
119             Object paramObj5 = content;
120 
121             if (content == null) {
122                 paramObj5 = new NullWrapper("java.lang.String");
123             }
124 
125             Object paramObj6 = type;
126 
127             if (type == null) {
128                 paramObj6 = new NullWrapper("java.lang.String");
129             }
130 
131             Object paramObj7 = structureId;
132 
133             if (structureId == null) {
134                 paramObj7 = new NullWrapper("java.lang.String");
135             }
136 
137             Object paramObj8 = templateId;
138 
139             if (templateId == null) {
140                 paramObj8 = new NullWrapper("java.lang.String");
141             }
142 
143             Object paramObj9 = new IntegerWrapper(displayDateMonth);
144 
145             Object paramObj10 = new IntegerWrapper(displayDateDay);
146 
147             Object paramObj11 = new IntegerWrapper(displayDateYear);
148 
149             Object paramObj12 = new IntegerWrapper(displayDateHour);
150 
151             Object paramObj13 = new IntegerWrapper(displayDateMinute);
152 
153             Object paramObj14 = new IntegerWrapper(expirationDateMonth);
154 
155             Object paramObj15 = new IntegerWrapper(expirationDateDay);
156 
157             Object paramObj16 = new IntegerWrapper(expirationDateYear);
158 
159             Object paramObj17 = new IntegerWrapper(expirationDateHour);
160 
161             Object paramObj18 = new IntegerWrapper(expirationDateMinute);
162 
163             Object paramObj19 = new BooleanWrapper(neverExpire);
164 
165             Object paramObj20 = new IntegerWrapper(reviewDateMonth);
166 
167             Object paramObj21 = new IntegerWrapper(reviewDateDay);
168 
169             Object paramObj22 = new IntegerWrapper(reviewDateYear);
170 
171             Object paramObj23 = new IntegerWrapper(reviewDateHour);
172 
173             Object paramObj24 = new IntegerWrapper(reviewDateMinute);
174 
175             Object paramObj25 = new BooleanWrapper(neverReview);
176 
177             Object paramObj26 = new BooleanWrapper(indexable);
178 
179             Object paramObj27 = new BooleanWrapper(smallImage);
180 
181             Object paramObj28 = smallImageURL;
182 
183             if (smallImageURL == null) {
184                 paramObj28 = new NullWrapper("java.lang.String");
185             }
186 
187             Object paramObj29 = smallFile;
188 
189             if (smallFile == null) {
190                 paramObj29 = new NullWrapper("java.io.File");
191             }
192 
193             Object paramObj30 = images;
194 
195             if (images == null) {
196                 paramObj30 = new NullWrapper("java.util.Map");
197             }
198 
199             Object paramObj31 = articleURL;
200 
201             if (articleURL == null) {
202                 paramObj31 = new NullWrapper("java.lang.String");
203             }
204 
205             Object paramObj32 = prefs;
206 
207             if (prefs == null) {
208                 paramObj32 = new NullWrapper("javax.portlet.PortletPreferences");
209             }
210 
211             Object paramObj33 = tagsEntries;
212 
213             if (tagsEntries == null) {
214                 paramObj33 = new NullWrapper("[Ljava.lang.String;");
215             }
216 
217             Object paramObj34 = new BooleanWrapper(addCommunityPermissions);
218 
219             Object paramObj35 = new BooleanWrapper(addGuestPermissions);
220 
221             MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
222                     "addArticle",
223                     new Object[] {
224                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
225                         paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
226                         paramObj10, paramObj11, paramObj12, paramObj13,
227                         paramObj14, paramObj15, paramObj16, paramObj17,
228                         paramObj18, paramObj19, paramObj20, paramObj21,
229                         paramObj22, paramObj23, paramObj24, paramObj25,
230                         paramObj26, paramObj27, paramObj28, paramObj29,
231                         paramObj30, paramObj31, paramObj32, paramObj33,
232                         paramObj34, paramObj35
233                     });
234 
235             Object returnObj = null;
236 
237             try {
238                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
239             }
240             catch (Exception e) {
241                 if (e instanceof com.liferay.portal.PortalException) {
242                     throw (com.liferay.portal.PortalException)e;
243                 }
244 
245                 if (e instanceof com.liferay.portal.SystemException) {
246                     throw (com.liferay.portal.SystemException)e;
247                 }
248 
249                 throw new com.liferay.portal.SystemException(e);
250             }
251 
252             return (com.liferay.portlet.journal.model.JournalArticle)returnObj;
253         }
254         catch (com.liferay.portal.SystemException se) {
255             _log.error(se, se);
256 
257             throw se;
258         }
259     }
260 
261     public static com.liferay.portlet.journal.model.JournalArticle addArticle(
262         HttpPrincipal httpPrincipal, java.lang.String articleId,
263         boolean autoArticleId, long plid, java.lang.String title,
264         java.lang.String description, java.lang.String content,
265         java.lang.String type, java.lang.String structureId,
266         java.lang.String templateId, int displayDateMonth, int displayDateDay,
267         int displayDateYear, int displayDateHour, int displayDateMinute,
268         int expirationDateMonth, int expirationDateDay, int expirationDateYear,
269         int expirationDateHour, int expirationDateMinute, boolean neverExpire,
270         int reviewDateMonth, int reviewDateDay, int reviewDateYear,
271         int reviewDateHour, int reviewDateMinute, boolean neverReview,
272         boolean indexable, boolean smallImage, java.lang.String smallImageURL,
273         java.io.File smallFile, java.util.Map<String, byte[]> images,
274         java.lang.String articleURL, javax.portlet.PortletPreferences prefs,
275         java.lang.String[] tagsEntries,
276         java.lang.String[] communityPermissions,
277         java.lang.String[] guestPermissions)
278         throws com.liferay.portal.PortalException,
279             com.liferay.portal.SystemException {
280         try {
281             Object paramObj0 = articleId;
282 
283             if (articleId == null) {
284                 paramObj0 = new NullWrapper("java.lang.String");
285             }
286 
287             Object paramObj1 = new BooleanWrapper(autoArticleId);
288 
289             Object paramObj2 = new LongWrapper(plid);
290 
291             Object paramObj3 = title;
292 
293             if (title == null) {
294                 paramObj3 = new NullWrapper("java.lang.String");
295             }
296 
297             Object paramObj4 = description;
298 
299             if (description == null) {
300                 paramObj4 = new NullWrapper("java.lang.String");
301             }
302 
303             Object paramObj5 = content;
304 
305             if (content == null) {
306                 paramObj5 = new NullWrapper("java.lang.String");
307             }
308 
309             Object paramObj6 = type;
310 
311             if (type == null) {
312                 paramObj6 = new NullWrapper("java.lang.String");
313             }
314 
315             Object paramObj7 = structureId;
316 
317             if (structureId == null) {
318                 paramObj7 = new NullWrapper("java.lang.String");
319             }
320 
321             Object paramObj8 = templateId;
322 
323             if (templateId == null) {
324                 paramObj8 = new NullWrapper("java.lang.String");
325             }
326 
327             Object paramObj9 = new IntegerWrapper(displayDateMonth);
328 
329             Object paramObj10 = new IntegerWrapper(displayDateDay);
330 
331             Object paramObj11 = new IntegerWrapper(displayDateYear);
332 
333             Object paramObj12 = new IntegerWrapper(displayDateHour);
334 
335             Object paramObj13 = new IntegerWrapper(displayDateMinute);
336 
337             Object paramObj14 = new IntegerWrapper(expirationDateMonth);
338 
339             Object paramObj15 = new IntegerWrapper(expirationDateDay);
340 
341             Object paramObj16 = new IntegerWrapper(expirationDateYear);
342 
343             Object paramObj17 = new IntegerWrapper(expirationDateHour);
344 
345             Object paramObj18 = new IntegerWrapper(expirationDateMinute);
346 
347             Object paramObj19 = new BooleanWrapper(neverExpire);
348 
349             Object paramObj20 = new IntegerWrapper(reviewDateMonth);
350 
351             Object paramObj21 = new IntegerWrapper(reviewDateDay);
352 
353             Object paramObj22 = new IntegerWrapper(reviewDateYear);
354 
355             Object paramObj23 = new IntegerWrapper(reviewDateHour);
356 
357             Object paramObj24 = new IntegerWrapper(reviewDateMinute);
358 
359             Object paramObj25 = new BooleanWrapper(neverReview);
360 
361             Object paramObj26 = new BooleanWrapper(indexable);
362 
363             Object paramObj27 = new BooleanWrapper(smallImage);
364 
365             Object paramObj28 = smallImageURL;
366 
367             if (smallImageURL == null) {
368                 paramObj28 = new NullWrapper("java.lang.String");
369             }
370 
371             Object paramObj29 = smallFile;
372 
373             if (smallFile == null) {
374                 paramObj29 = new NullWrapper("java.io.File");
375             }
376 
377             Object paramObj30 = images;
378 
379             if (images == null) {
380                 paramObj30 = new NullWrapper("java.util.Map");
381             }
382 
383             Object paramObj31 = articleURL;
384 
385             if (articleURL == null) {
386                 paramObj31 = new NullWrapper("java.lang.String");
387             }
388 
389             Object paramObj32 = prefs;
390 
391             if (prefs == null) {
392                 paramObj32 = new NullWrapper("javax.portlet.PortletPreferences");
393             }
394 
395             Object paramObj33 = tagsEntries;
396 
397             if (tagsEntries == null) {
398                 paramObj33 = new NullWrapper("[Ljava.lang.String;");
399             }
400 
401             Object paramObj34 = communityPermissions;
402 
403             if (communityPermissions == null) {
404                 paramObj34 = new NullWrapper("[Ljava.lang.String;");
405             }
406 
407             Object paramObj35 = guestPermissions;
408 
409             if (guestPermissions == null) {
410                 paramObj35 = new NullWrapper("[Ljava.lang.String;");
411             }
412 
413             MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
414                     "addArticle",
415                     new Object[] {
416                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
417                         paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
418                         paramObj10, paramObj11, paramObj12, paramObj13,
419                         paramObj14, paramObj15, paramObj16, paramObj17,
420                         paramObj18, paramObj19, paramObj20, paramObj21,
421                         paramObj22, paramObj23, paramObj24, paramObj25,
422                         paramObj26, paramObj27, paramObj28, paramObj29,
423                         paramObj30, paramObj31, paramObj32, paramObj33,
424                         paramObj34, paramObj35
425                     });
426 
427             Object returnObj = null;
428 
429             try {
430                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
431             }
432             catch (Exception e) {
433                 if (e instanceof com.liferay.portal.PortalException) {
434                     throw (com.liferay.portal.PortalException)e;
435                 }
436 
437                 if (e instanceof com.liferay.portal.SystemException) {
438                     throw (com.liferay.portal.SystemException)e;
439                 }
440 
441                 throw new com.liferay.portal.SystemException(e);
442             }
443 
444             return (com.liferay.portlet.journal.model.JournalArticle)returnObj;
445         }
446         catch (com.liferay.portal.SystemException se) {
447             _log.error(se, se);
448 
449             throw se;
450         }
451     }
452 
453     public static com.liferay.portlet.journal.model.JournalArticle approveArticle(
454         HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId,
455         double version, long plid, java.lang.String articleURL,
456         javax.portlet.PortletPreferences prefs)
457         throws com.liferay.portal.PortalException,
458             com.liferay.portal.SystemException {
459         try {
460             Object paramObj0 = new LongWrapper(groupId);
461 
462             Object paramObj1 = articleId;
463 
464             if (articleId == null) {
465                 paramObj1 = new NullWrapper("java.lang.String");
466             }
467 
468             Object paramObj2 = new DoubleWrapper(version);
469 
470             Object paramObj3 = new LongWrapper(plid);
471 
472             Object paramObj4 = articleURL;
473 
474             if (articleURL == null) {
475                 paramObj4 = new NullWrapper("java.lang.String");
476             }
477 
478             Object paramObj5 = prefs;
479 
480             if (prefs == null) {
481                 paramObj5 = new NullWrapper("javax.portlet.PortletPreferences");
482             }
483 
484             MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
485                     "approveArticle",
486                     new Object[] {
487                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
488                         paramObj5
489                     });
490 
491             Object returnObj = null;
492 
493             try {
494                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
495             }
496             catch (Exception e) {
497                 if (e instanceof com.liferay.portal.PortalException) {
498                     throw (com.liferay.portal.PortalException)e;
499                 }
500 
501                 if (e instanceof com.liferay.portal.SystemException) {
502                     throw (com.liferay.portal.SystemException)e;
503                 }
504 
505                 throw new com.liferay.portal.SystemException(e);
506             }
507 
508             return (com.liferay.portlet.journal.model.JournalArticle)returnObj;
509         }
510         catch (com.liferay.portal.SystemException se) {
511             _log.error(se, se);
512 
513             throw se;
514         }
515     }
516 
517     public static com.liferay.portlet.journal.model.JournalArticle copyArticle(
518         HttpPrincipal httpPrincipal, long groupId,
519         java.lang.String oldArticleId, java.lang.String newArticleId,
520         boolean autoArticleId, double version)
521         throws com.liferay.portal.PortalException,
522             com.liferay.portal.SystemException {
523         try {
524             Object paramObj0 = new LongWrapper(groupId);
525 
526             Object paramObj1 = oldArticleId;
527 
528             if (oldArticleId == null) {
529                 paramObj1 = new NullWrapper("java.lang.String");
530             }
531 
532             Object paramObj2 = newArticleId;
533 
534             if (newArticleId == null) {
535                 paramObj2 = new NullWrapper("java.lang.String");
536             }
537 
538             Object paramObj3 = new BooleanWrapper(autoArticleId);
539 
540             Object paramObj4 = new DoubleWrapper(version);
541 
542             MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
543                     "copyArticle",
544                     new Object[] {
545                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
546                     });
547 
548             Object returnObj = null;
549 
550             try {
551                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
552             }
553             catch (Exception e) {
554                 if (e instanceof com.liferay.portal.PortalException) {
555                     throw (com.liferay.portal.PortalException)e;
556                 }
557 
558                 if (e instanceof com.liferay.portal.SystemException) {
559                     throw (com.liferay.portal.SystemException)e;
560                 }
561 
562                 throw new com.liferay.portal.SystemException(e);
563             }
564 
565             return (com.liferay.portlet.journal.model.JournalArticle)returnObj;
566         }
567         catch (com.liferay.portal.SystemException se) {
568             _log.error(se, se);
569 
570             throw se;
571         }
572     }
573 
574     public static com.liferay.portlet.journal.model.JournalArticle getArticle(
575         HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId,
576         double version)
577         throws com.liferay.portal.PortalException,
578             com.liferay.portal.SystemException {
579         try {
580             Object paramObj0 = new LongWrapper(groupId);
581 
582             Object paramObj1 = articleId;
583 
584             if (articleId == null) {
585                 paramObj1 = new NullWrapper("java.lang.String");
586             }
587 
588             Object paramObj2 = new DoubleWrapper(version);
589 
590             MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
591                     "getArticle",
592                     new Object[] { paramObj0, paramObj1, paramObj2 });
593 
594             Object returnObj = null;
595 
596             try {
597                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
598             }
599             catch (Exception e) {
600                 if (e instanceof com.liferay.portal.PortalException) {
601                     throw (com.liferay.portal.PortalException)e;
602                 }
603 
604                 if (e instanceof com.liferay.portal.SystemException) {
605                     throw (com.liferay.portal.SystemException)e;
606                 }
607 
608                 throw new com.liferay.portal.SystemException(e);
609             }
610 
611             return (com.liferay.portlet.journal.model.JournalArticle)returnObj;
612         }
613         catch (com.liferay.portal.SystemException se) {
614             _log.error(se, se);
615 
616             throw se;
617         }
618     }
619 
620     public static java.lang.String getArticleContent(
621         HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId,
622         java.lang.String languageId,
623         com.liferay.portal.theme.ThemeDisplay themeDisplay)
624         throws com.liferay.portal.PortalException,
625             com.liferay.portal.SystemException {
626         try {
627             Object paramObj0 = new LongWrapper(groupId);
628 
629             Object paramObj1 = articleId;
630 
631             if (articleId == null) {
632                 paramObj1 = new NullWrapper("java.lang.String");
633             }
634 
635             Object paramObj2 = languageId;
636 
637             if (languageId == null) {
638                 paramObj2 = new NullWrapper("java.lang.String");
639             }
640 
641             Object paramObj3 = themeDisplay;
642 
643             if (themeDisplay == null) {
644                 paramObj3 = new NullWrapper(
645                         "com.liferay.portal.theme.ThemeDisplay");
646             }
647 
648             MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
649                     "getArticleContent",
650                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
651 
652             Object returnObj = null;
653 
654             try {
655                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
656             }
657             catch (Exception e) {
658                 if (e instanceof com.liferay.portal.PortalException) {
659                     throw (com.liferay.portal.PortalException)e;
660                 }
661 
662                 if (e instanceof com.liferay.portal.SystemException) {
663                     throw (com.liferay.portal.SystemException)e;
664                 }
665 
666                 throw new com.liferay.portal.SystemException(e);
667             }
668 
669             return (java.lang.String)returnObj;
670         }
671         catch (com.liferay.portal.SystemException se) {
672             _log.error(se, se);
673 
674             throw se;
675         }
676     }
677 
678     public static java.lang.String getArticleContent(
679         HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId,
680         double version, java.lang.String languageId,
681         com.liferay.portal.theme.ThemeDisplay themeDisplay)
682         throws com.liferay.portal.PortalException,
683             com.liferay.portal.SystemException {
684         try {
685             Object paramObj0 = new LongWrapper(groupId);
686 
687             Object paramObj1 = articleId;
688 
689             if (articleId == null) {
690                 paramObj1 = new NullWrapper("java.lang.String");
691             }
692 
693             Object paramObj2 = new DoubleWrapper(version);
694 
695             Object paramObj3 = languageId;
696 
697             if (languageId == null) {
698                 paramObj3 = new NullWrapper("java.lang.String");
699             }
700 
701             Object paramObj4 = themeDisplay;
702 
703             if (themeDisplay == null) {
704                 paramObj4 = new NullWrapper(
705                         "com.liferay.portal.theme.ThemeDisplay");
706             }
707 
708             MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
709                     "getArticleContent",
710                     new Object[] {
711                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
712                     });
713 
714             Object returnObj = null;
715 
716             try {
717                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
718             }
719             catch (Exception e) {
720                 if (e instanceof com.liferay.portal.PortalException) {
721                     throw (com.liferay.portal.PortalException)e;
722                 }
723 
724                 if (e instanceof com.liferay.portal.SystemException) {
725                     throw (com.liferay.portal.SystemException)e;
726                 }
727 
728                 throw new com.liferay.portal.SystemException(e);
729             }
730 
731             return (java.lang.String)returnObj;
732         }
733         catch (com.liferay.portal.SystemException se) {
734             _log.error(se, se);
735 
736             throw se;
737         }
738     }
739 
740     public static void deleteArticle(HttpPrincipal httpPrincipal, long groupId,
741         java.lang.String articleId, double version,
742         java.lang.String articleURL, javax.portlet.PortletPreferences prefs)
743         throws com.liferay.portal.PortalException,
744             com.liferay.portal.SystemException {
745         try {
746             Object paramObj0 = new LongWrapper(groupId);
747 
748             Object paramObj1 = articleId;
749 
750             if (articleId == null) {
751                 paramObj1 = new NullWrapper("java.lang.String");
752             }
753 
754             Object paramObj2 = new DoubleWrapper(version);
755 
756             Object paramObj3 = articleURL;
757 
758             if (articleURL == null) {
759                 paramObj3 = new NullWrapper("java.lang.String");
760             }
761 
762             Object paramObj4 = prefs;
763 
764             if (prefs == null) {
765                 paramObj4 = new NullWrapper("javax.portlet.PortletPreferences");
766             }
767 
768             MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
769                     "deleteArticle",
770                     new Object[] {
771                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
772                     });
773 
774             try {
775                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
776             }
777             catch (Exception e) {
778                 if (e instanceof com.liferay.portal.PortalException) {
779                     throw (com.liferay.portal.PortalException)e;
780                 }
781 
782                 if (e instanceof com.liferay.portal.SystemException) {
783                     throw (com.liferay.portal.SystemException)e;
784                 }
785 
786                 throw new com.liferay.portal.SystemException(e);
787             }
788         }
789         catch (com.liferay.portal.SystemException se) {
790             _log.error(se, se);
791 
792             throw se;
793         }
794     }
795 
796     public static void expireArticle(HttpPrincipal httpPrincipal, long groupId,
797         java.lang.String articleId, double version,
798         java.lang.String articleURL, javax.portlet.PortletPreferences prefs)
799         throws com.liferay.portal.PortalException,
800             com.liferay.portal.SystemException {
801         try {
802             Object paramObj0 = new LongWrapper(groupId);
803 
804             Object paramObj1 = articleId;
805 
806             if (articleId == null) {
807                 paramObj1 = new NullWrapper("java.lang.String");
808             }
809 
810             Object paramObj2 = new DoubleWrapper(version);
811 
812             Object paramObj3 = articleURL;
813 
814             if (articleURL == null) {
815                 paramObj3 = new NullWrapper("java.lang.String");
816             }
817 
818             Object paramObj4 = prefs;
819 
820             if (prefs == null) {
821                 paramObj4 = new NullWrapper("javax.portlet.PortletPreferences");
822             }
823 
824             MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
825                     "expireArticle",
826                     new Object[] {
827                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
828                     });
829 
830             try {
831                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
832             }
833             catch (Exception e) {
834                 if (e instanceof com.liferay.portal.PortalException) {
835                     throw (com.liferay.portal.PortalException)e;
836                 }
837 
838                 if (e instanceof com.liferay.portal.SystemException) {
839                     throw (com.liferay.portal.SystemException)e;
840                 }
841 
842                 throw new com.liferay.portal.SystemException(e);
843             }
844         }
845         catch (com.liferay.portal.SystemException se) {
846             _log.error(se, se);
847 
848             throw se;
849         }
850     }
851 
852     public static void removeArticleLocale(HttpPrincipal httpPrincipal,
853         long companyId, java.lang.String languageId)
854         throws com.liferay.portal.PortalException,
855             com.liferay.portal.SystemException {
856         try {
857             Object paramObj0 = new LongWrapper(companyId);
858 
859             Object paramObj1 = languageId;
860 
861             if (languageId == null) {
862                 paramObj1 = new NullWrapper("java.lang.String");
863             }
864 
865             MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
866                     "removeArticleLocale", new Object[] { paramObj0, paramObj1 });
867 
868             try {
869                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
870             }
871             catch (Exception e) {
872                 if (e instanceof com.liferay.portal.PortalException) {
873                     throw (com.liferay.portal.PortalException)e;
874                 }
875 
876                 if (e instanceof com.liferay.portal.SystemException) {
877                     throw (com.liferay.portal.SystemException)e;
878                 }
879 
880                 throw new com.liferay.portal.SystemException(e);
881             }
882         }
883         catch (com.liferay.portal.SystemException se) {
884             _log.error(se, se);
885 
886             throw se;
887         }
888     }
889 
890     public static com.liferay.portlet.journal.model.JournalArticle removeArticleLocale(
891         HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId,
892         double version, java.lang.String languageId)
893         throws com.liferay.portal.PortalException,
894             com.liferay.portal.SystemException {
895         try {
896             Object paramObj0 = new LongWrapper(groupId);
897 
898             Object paramObj1 = articleId;
899 
900             if (articleId == null) {
901                 paramObj1 = new NullWrapper("java.lang.String");
902             }
903 
904             Object paramObj2 = new DoubleWrapper(version);
905 
906             Object paramObj3 = languageId;
907 
908             if (languageId == null) {
909                 paramObj3 = new NullWrapper("java.lang.String");
910             }
911 
912             MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
913                     "removeArticleLocale",
914                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
915 
916             Object returnObj = null;
917 
918             try {
919                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
920             }
921             catch (Exception e) {
922                 if (e instanceof com.liferay.portal.PortalException) {
923                     throw (com.liferay.portal.PortalException)e;
924                 }
925 
926                 if (e instanceof com.liferay.portal.SystemException) {
927                     throw (com.liferay.portal.SystemException)e;
928                 }
929 
930                 throw new com.liferay.portal.SystemException(e);
931             }
932 
933             return (com.liferay.portlet.journal.model.JournalArticle)returnObj;
934         }
935         catch (com.liferay.portal.SystemException se) {
936             _log.error(se, se);
937 
938             throw se;
939         }
940     }
941 
942     public static com.liferay.portlet.journal.model.JournalArticle updateArticle(
943         HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId,
944         double version, boolean incrementVersion, java.lang.String title,
945         java.lang.String description, java.lang.String content,
946         java.lang.String type, java.lang.String structureId,
947         java.lang.String templateId, int displayDateMonth, int displayDateDay,
948         int displayDateYear, int displayDateHour, int displayDateMinute,
949         int expirationDateMonth, int expirationDateDay, int expirationDateYear,
950         int expirationDateHour, int expirationDateMinute, boolean neverExpire,
951         int reviewDateMonth, int reviewDateDay, int reviewDateYear,
952         int reviewDateHour, int reviewDateMinute, boolean neverReview,
953         boolean indexable, boolean smallImage, java.lang.String smallImageURL,
954         java.io.File smallFile, java.util.Map<String, byte[]> images,
955         java.lang.String articleURL, javax.portlet.PortletPreferences prefs,
956         java.lang.String[] tagsEntries)
957         throws com.liferay.portal.PortalException,
958             com.liferay.portal.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 = new BooleanWrapper(incrementVersion);
971 
972             Object paramObj4 = title;
973 
974             if (title == null) {
975                 paramObj4 = new NullWrapper("java.lang.String");
976             }
977 
978             Object paramObj5 = description;
979 
980             if (description == null) {
981                 paramObj5 = new NullWrapper("java.lang.String");
982             }
983 
984             Object paramObj6 = content;
985 
986             if (content == null) {
987                 paramObj6 = new NullWrapper("java.lang.String");
988             }
989 
990             Object paramObj7 = type;
991 
992             if (type == null) {
993                 paramObj7 = new NullWrapper("java.lang.String");
994             }
995 
996             Object paramObj8 = structureId;
997 
998             if (structureId == null) {
999                 paramObj8 = new NullWrapper("java.lang.String");
1000            }
1001
1002            Object paramObj9 = templateId;
1003
1004            if (templateId == null) {
1005                paramObj9 = new NullWrapper("java.lang.String");
1006            }
1007
1008            Object paramObj10 = new IntegerWrapper(displayDateMonth);
1009
1010            Object paramObj11 = new IntegerWrapper(displayDateDay);
1011
1012            Object paramObj12 = new IntegerWrapper(displayDateYear);
1013
1014            Object paramObj13 = new IntegerWrapper(displayDateHour);
1015
1016            Object paramObj14 = new IntegerWrapper(displayDateMinute);
1017
1018            Object paramObj15 = new IntegerWrapper(expirationDateMonth);
1019
1020            Object paramObj16 = new IntegerWrapper(expirationDateDay);
1021
1022            Object paramObj17 = new IntegerWrapper(expirationDateYear);
1023
1024            Object paramObj18 = new IntegerWrapper(expirationDateHour);
1025
1026            Object paramObj19 = new IntegerWrapper(expirationDateMinute);
1027
1028            Object paramObj20 = new BooleanWrapper(neverExpire);
1029
1030            Object paramObj21 = new IntegerWrapper(reviewDateMonth);
1031
1032            Object paramObj22 = new IntegerWrapper(reviewDateDay);
1033
1034            Object paramObj23 = new IntegerWrapper(reviewDateYear);
1035
1036            Object paramObj24 = new IntegerWrapper(reviewDateHour);
1037
1038            Object paramObj25 = new IntegerWrapper(reviewDateMinute);
1039
1040            Object paramObj26 = new BooleanWrapper(neverReview);
1041
1042            Object paramObj27 = new BooleanWrapper(indexable);
1043
1044            Object paramObj28 = new BooleanWrapper(smallImage);
1045
1046            Object paramObj29 = smallImageURL;
1047
1048            if (smallImageURL == null) {
1049                paramObj29 = new NullWrapper("java.lang.String");
1050            }
1051
1052            Object paramObj30 = smallFile;
1053
1054            if (smallFile == null) {
1055                paramObj30 = new NullWrapper("java.io.File");
1056            }
1057
1058            Object paramObj31 = images;
1059
1060            if (images == null) {
1061                paramObj31 = new NullWrapper("java.util.Map");
1062            }
1063
1064            Object paramObj32 = articleURL;
1065
1066            if (articleURL == null) {
1067                paramObj32 = new NullWrapper("java.lang.String");
1068            }
1069
1070            Object paramObj33 = prefs;
1071
1072            if (prefs == null) {
1073                paramObj33 = new NullWrapper("javax.portlet.PortletPreferences");
1074            }
1075
1076            Object paramObj34 = tagsEntries;
1077
1078            if (tagsEntries == null) {
1079                paramObj34 = new NullWrapper("[Ljava.lang.String;");
1080            }
1081
1082            MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
1083                    "updateArticle",
1084                    new Object[] {
1085                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1086                        paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
1087                        paramObj10, paramObj11, paramObj12, paramObj13,
1088                        paramObj14, paramObj15, paramObj16, paramObj17,
1089                        paramObj18, paramObj19, paramObj20, paramObj21,
1090                        paramObj22, paramObj23, paramObj24, paramObj25,
1091                        paramObj26, paramObj27, paramObj28, paramObj29,
1092                        paramObj30, paramObj31, paramObj32, paramObj33,
1093                        paramObj34
1094                    });
1095
1096            Object returnObj = null;
1097
1098            try {
1099                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1100            }
1101            catch (Exception e) {
1102                if (e instanceof com.liferay.portal.PortalException) {
1103                    throw (com.liferay.portal.PortalException)e;
1104                }
1105
1106                if (e instanceof com.liferay.portal.SystemException) {
1107                    throw (com.liferay.portal.SystemException)e;
1108                }
1109
1110                throw new com.liferay.portal.SystemException(e);
1111            }
1112
1113            return (com.liferay.portlet.journal.model.JournalArticle)returnObj;
1114        }
1115        catch (com.liferay.portal.SystemException se) {
1116            _log.error(se, se);
1117
1118            throw se;
1119        }
1120    }
1121
1122    public static com.liferay.portlet.journal.model.JournalArticle updateContent(
1123        HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId,
1124        double version, java.lang.String content)
1125        throws com.liferay.portal.PortalException,
1126            com.liferay.portal.SystemException {
1127        try {
1128            Object paramObj0 = new LongWrapper(groupId);
1129
1130            Object paramObj1 = articleId;
1131
1132            if (articleId == null) {
1133                paramObj1 = new NullWrapper("java.lang.String");
1134            }
1135
1136            Object paramObj2 = new DoubleWrapper(version);
1137
1138            Object paramObj3 = content;
1139
1140            if (content == null) {
1141                paramObj3 = new NullWrapper("java.lang.String");
1142            }
1143
1144            MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
1145                    "updateContent",
1146                    new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1147
1148            Object returnObj = null;
1149
1150            try {
1151                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1152            }
1153            catch (Exception e) {
1154                if (e instanceof com.liferay.portal.PortalException) {
1155                    throw (com.liferay.portal.PortalException)e;
1156                }
1157
1158                if (e instanceof com.liferay.portal.SystemException) {
1159                    throw (com.liferay.portal.SystemException)e;
1160                }
1161
1162                throw new com.liferay.portal.SystemException(e);
1163            }
1164
1165            return (com.liferay.portlet.journal.model.JournalArticle)returnObj;
1166        }
1167        catch (com.liferay.portal.SystemException se) {
1168            _log.error(se, se);
1169
1170            throw se;
1171        }
1172    }
1173
1174    private static Log _log = LogFactoryUtil.getLog(JournalArticleServiceHttp.class);
1175}