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.SystemException,
95              com.liferay.portal.PortalException {
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.SystemException) {
242                     throw (com.liferay.portal.SystemException)e;
243                 }
244 
245                 if (e instanceof com.liferay.portal.PortalException) {
246                     throw (com.liferay.portal.PortalException)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.SystemException,
279             com.liferay.portal.PortalException {
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.SystemException) {
434                     throw (com.liferay.portal.SystemException)e;
435                 }
436 
437                 if (e instanceof com.liferay.portal.PortalException) {
438                     throw (com.liferay.portal.PortalException)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.SystemException,
458             com.liferay.portal.PortalException {
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.SystemException) {
498                     throw (com.liferay.portal.SystemException)e;
499                 }
500 
501                 if (e instanceof com.liferay.portal.PortalException) {
502                     throw (com.liferay.portal.PortalException)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 getArticle(
518         HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId,
519         double version)
520         throws com.liferay.portal.SystemException,
521             com.liferay.portal.PortalException {
522         try {
523             Object paramObj0 = new LongWrapper(groupId);
524 
525             Object paramObj1 = articleId;
526 
527             if (articleId == null) {
528                 paramObj1 = new NullWrapper("java.lang.String");
529             }
530 
531             Object paramObj2 = new DoubleWrapper(version);
532 
533             MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
534                     "getArticle",
535                     new Object[] { paramObj0, paramObj1, paramObj2 });
536 
537             Object returnObj = null;
538 
539             try {
540                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
541             }
542             catch (Exception e) {
543                 if (e instanceof com.liferay.portal.SystemException) {
544                     throw (com.liferay.portal.SystemException)e;
545                 }
546 
547                 if (e instanceof com.liferay.portal.PortalException) {
548                     throw (com.liferay.portal.PortalException)e;
549                 }
550 
551                 throw new com.liferay.portal.SystemException(e);
552             }
553 
554             return (com.liferay.portlet.journal.model.JournalArticle)returnObj;
555         }
556         catch (com.liferay.portal.SystemException se) {
557             _log.error(se, se);
558 
559             throw se;
560         }
561     }
562 
563     public static java.lang.String getArticleContent(
564         HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId,
565         java.lang.String languageId,
566         com.liferay.portal.theme.ThemeDisplay themeDisplay)
567         throws com.liferay.portal.SystemException,
568             com.liferay.portal.PortalException {
569         try {
570             Object paramObj0 = new LongWrapper(groupId);
571 
572             Object paramObj1 = articleId;
573 
574             if (articleId == null) {
575                 paramObj1 = new NullWrapper("java.lang.String");
576             }
577 
578             Object paramObj2 = languageId;
579 
580             if (languageId == null) {
581                 paramObj2 = new NullWrapper("java.lang.String");
582             }
583 
584             Object paramObj3 = themeDisplay;
585 
586             if (themeDisplay == null) {
587                 paramObj3 = new NullWrapper(
588                         "com.liferay.portal.theme.ThemeDisplay");
589             }
590 
591             MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
592                     "getArticleContent",
593                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
594 
595             Object returnObj = null;
596 
597             try {
598                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
599             }
600             catch (Exception e) {
601                 if (e instanceof com.liferay.portal.SystemException) {
602                     throw (com.liferay.portal.SystemException)e;
603                 }
604 
605                 if (e instanceof com.liferay.portal.PortalException) {
606                     throw (com.liferay.portal.PortalException)e;
607                 }
608 
609                 throw new com.liferay.portal.SystemException(e);
610             }
611 
612             return (java.lang.String)returnObj;
613         }
614         catch (com.liferay.portal.SystemException se) {
615             _log.error(se, se);
616 
617             throw se;
618         }
619     }
620 
621     public static java.lang.String getArticleContent(
622         HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId,
623         double version, java.lang.String languageId,
624         com.liferay.portal.theme.ThemeDisplay themeDisplay)
625         throws com.liferay.portal.SystemException,
626             com.liferay.portal.PortalException {
627         try {
628             Object paramObj0 = new LongWrapper(groupId);
629 
630             Object paramObj1 = articleId;
631 
632             if (articleId == null) {
633                 paramObj1 = new NullWrapper("java.lang.String");
634             }
635 
636             Object paramObj2 = new DoubleWrapper(version);
637 
638             Object paramObj3 = languageId;
639 
640             if (languageId == null) {
641                 paramObj3 = new NullWrapper("java.lang.String");
642             }
643 
644             Object paramObj4 = themeDisplay;
645 
646             if (themeDisplay == null) {
647                 paramObj4 = new NullWrapper(
648                         "com.liferay.portal.theme.ThemeDisplay");
649             }
650 
651             MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
652                     "getArticleContent",
653                     new Object[] {
654                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
655                     });
656 
657             Object returnObj = null;
658 
659             try {
660                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
661             }
662             catch (Exception e) {
663                 if (e instanceof com.liferay.portal.SystemException) {
664                     throw (com.liferay.portal.SystemException)e;
665                 }
666 
667                 if (e instanceof com.liferay.portal.PortalException) {
668                     throw (com.liferay.portal.PortalException)e;
669                 }
670 
671                 throw new com.liferay.portal.SystemException(e);
672             }
673 
674             return (java.lang.String)returnObj;
675         }
676         catch (com.liferay.portal.SystemException se) {
677             _log.error(se, se);
678 
679             throw se;
680         }
681     }
682 
683     public static void deleteArticle(HttpPrincipal httpPrincipal, long groupId,
684         java.lang.String articleId, double version,
685         java.lang.String articleURL, javax.portlet.PortletPreferences prefs)
686         throws com.liferay.portal.SystemException,
687             com.liferay.portal.PortalException {
688         try {
689             Object paramObj0 = new LongWrapper(groupId);
690 
691             Object paramObj1 = articleId;
692 
693             if (articleId == null) {
694                 paramObj1 = new NullWrapper("java.lang.String");
695             }
696 
697             Object paramObj2 = new DoubleWrapper(version);
698 
699             Object paramObj3 = articleURL;
700 
701             if (articleURL == null) {
702                 paramObj3 = new NullWrapper("java.lang.String");
703             }
704 
705             Object paramObj4 = prefs;
706 
707             if (prefs == null) {
708                 paramObj4 = new NullWrapper("javax.portlet.PortletPreferences");
709             }
710 
711             MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
712                     "deleteArticle",
713                     new Object[] {
714                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
715                     });
716 
717             try {
718                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
719             }
720             catch (Exception e) {
721                 if (e instanceof com.liferay.portal.SystemException) {
722                     throw (com.liferay.portal.SystemException)e;
723                 }
724 
725                 if (e instanceof com.liferay.portal.PortalException) {
726                     throw (com.liferay.portal.PortalException)e;
727                 }
728 
729                 throw new com.liferay.portal.SystemException(e);
730             }
731         }
732         catch (com.liferay.portal.SystemException se) {
733             _log.error(se, se);
734 
735             throw se;
736         }
737     }
738 
739     public static void expireArticle(HttpPrincipal httpPrincipal, long groupId,
740         java.lang.String articleId, double version,
741         java.lang.String articleURL, javax.portlet.PortletPreferences prefs)
742         throws com.liferay.portal.SystemException,
743             com.liferay.portal.PortalException {
744         try {
745             Object paramObj0 = new LongWrapper(groupId);
746 
747             Object paramObj1 = articleId;
748 
749             if (articleId == null) {
750                 paramObj1 = new NullWrapper("java.lang.String");
751             }
752 
753             Object paramObj2 = new DoubleWrapper(version);
754 
755             Object paramObj3 = articleURL;
756 
757             if (articleURL == null) {
758                 paramObj3 = new NullWrapper("java.lang.String");
759             }
760 
761             Object paramObj4 = prefs;
762 
763             if (prefs == null) {
764                 paramObj4 = new NullWrapper("javax.portlet.PortletPreferences");
765             }
766 
767             MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
768                     "expireArticle",
769                     new Object[] {
770                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
771                     });
772 
773             try {
774                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
775             }
776             catch (Exception e) {
777                 if (e instanceof com.liferay.portal.SystemException) {
778                     throw (com.liferay.portal.SystemException)e;
779                 }
780 
781                 if (e instanceof com.liferay.portal.PortalException) {
782                     throw (com.liferay.portal.PortalException)e;
783                 }
784 
785                 throw new com.liferay.portal.SystemException(e);
786             }
787         }
788         catch (com.liferay.portal.SystemException se) {
789             _log.error(se, se);
790 
791             throw se;
792         }
793     }
794 
795     public static void removeArticleLocale(HttpPrincipal httpPrincipal,
796         long companyId, java.lang.String languageId)
797         throws com.liferay.portal.SystemException,
798             com.liferay.portal.PortalException {
799         try {
800             Object paramObj0 = new LongWrapper(companyId);
801 
802             Object paramObj1 = languageId;
803 
804             if (languageId == null) {
805                 paramObj1 = new NullWrapper("java.lang.String");
806             }
807 
808             MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
809                     "removeArticleLocale", new Object[] { paramObj0, paramObj1 });
810 
811             try {
812                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
813             }
814             catch (Exception e) {
815                 if (e instanceof com.liferay.portal.SystemException) {
816                     throw (com.liferay.portal.SystemException)e;
817                 }
818 
819                 if (e instanceof com.liferay.portal.PortalException) {
820                     throw (com.liferay.portal.PortalException)e;
821                 }
822 
823                 throw new com.liferay.portal.SystemException(e);
824             }
825         }
826         catch (com.liferay.portal.SystemException se) {
827             _log.error(se, se);
828 
829             throw se;
830         }
831     }
832 
833     public static com.liferay.portlet.journal.model.JournalArticle removeArticleLocale(
834         HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId,
835         double version, java.lang.String languageId)
836         throws com.liferay.portal.SystemException,
837             com.liferay.portal.PortalException {
838         try {
839             Object paramObj0 = new LongWrapper(groupId);
840 
841             Object paramObj1 = articleId;
842 
843             if (articleId == null) {
844                 paramObj1 = new NullWrapper("java.lang.String");
845             }
846 
847             Object paramObj2 = new DoubleWrapper(version);
848 
849             Object paramObj3 = languageId;
850 
851             if (languageId == null) {
852                 paramObj3 = new NullWrapper("java.lang.String");
853             }
854 
855             MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
856                     "removeArticleLocale",
857                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
858 
859             Object returnObj = null;
860 
861             try {
862                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
863             }
864             catch (Exception e) {
865                 if (e instanceof com.liferay.portal.SystemException) {
866                     throw (com.liferay.portal.SystemException)e;
867                 }
868 
869                 if (e instanceof com.liferay.portal.PortalException) {
870                     throw (com.liferay.portal.PortalException)e;
871                 }
872 
873                 throw new com.liferay.portal.SystemException(e);
874             }
875 
876             return (com.liferay.portlet.journal.model.JournalArticle)returnObj;
877         }
878         catch (com.liferay.portal.SystemException se) {
879             _log.error(se, se);
880 
881             throw se;
882         }
883     }
884 
885     public static com.liferay.portlet.journal.model.JournalArticle updateArticle(
886         HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId,
887         double version, boolean incrementVersion, java.lang.String title,
888         java.lang.String description, java.lang.String content,
889         java.lang.String type, java.lang.String structureId,
890         java.lang.String templateId, int displayDateMonth, int displayDateDay,
891         int displayDateYear, int displayDateHour, int displayDateMinute,
892         int expirationDateMonth, int expirationDateDay, int expirationDateYear,
893         int expirationDateHour, int expirationDateMinute, boolean neverExpire,
894         int reviewDateMonth, int reviewDateDay, int reviewDateYear,
895         int reviewDateHour, int reviewDateMinute, boolean neverReview,
896         boolean indexable, boolean smallImage, java.lang.String smallImageURL,
897         java.io.File smallFile, java.util.Map<String, byte[]> images,
898         java.lang.String articleURL, javax.portlet.PortletPreferences prefs,
899         java.lang.String[] tagsEntries)
900         throws com.liferay.portal.SystemException,
901             com.liferay.portal.PortalException {
902         try {
903             Object paramObj0 = new LongWrapper(groupId);
904 
905             Object paramObj1 = articleId;
906 
907             if (articleId == null) {
908                 paramObj1 = new NullWrapper("java.lang.String");
909             }
910 
911             Object paramObj2 = new DoubleWrapper(version);
912 
913             Object paramObj3 = new BooleanWrapper(incrementVersion);
914 
915             Object paramObj4 = title;
916 
917             if (title == null) {
918                 paramObj4 = new NullWrapper("java.lang.String");
919             }
920 
921             Object paramObj5 = description;
922 
923             if (description == null) {
924                 paramObj5 = new NullWrapper("java.lang.String");
925             }
926 
927             Object paramObj6 = content;
928 
929             if (content == null) {
930                 paramObj6 = new NullWrapper("java.lang.String");
931             }
932 
933             Object paramObj7 = type;
934 
935             if (type == null) {
936                 paramObj7 = new NullWrapper("java.lang.String");
937             }
938 
939             Object paramObj8 = structureId;
940 
941             if (structureId == null) {
942                 paramObj8 = new NullWrapper("java.lang.String");
943             }
944 
945             Object paramObj9 = templateId;
946 
947             if (templateId == null) {
948                 paramObj9 = new NullWrapper("java.lang.String");
949             }
950 
951             Object paramObj10 = new IntegerWrapper(displayDateMonth);
952 
953             Object paramObj11 = new IntegerWrapper(displayDateDay);
954 
955             Object paramObj12 = new IntegerWrapper(displayDateYear);
956 
957             Object paramObj13 = new IntegerWrapper(displayDateHour);
958 
959             Object paramObj14 = new IntegerWrapper(displayDateMinute);
960 
961             Object paramObj15 = new IntegerWrapper(expirationDateMonth);
962 
963             Object paramObj16 = new IntegerWrapper(expirationDateDay);
964 
965             Object paramObj17 = new IntegerWrapper(expirationDateYear);
966 
967             Object paramObj18 = new IntegerWrapper(expirationDateHour);
968 
969             Object paramObj19 = new IntegerWrapper(expirationDateMinute);
970 
971             Object paramObj20 = new BooleanWrapper(neverExpire);
972 
973             Object paramObj21 = new IntegerWrapper(reviewDateMonth);
974 
975             Object paramObj22 = new IntegerWrapper(reviewDateDay);
976 
977             Object paramObj23 = new IntegerWrapper(reviewDateYear);
978 
979             Object paramObj24 = new IntegerWrapper(reviewDateHour);
980 
981             Object paramObj25 = new IntegerWrapper(reviewDateMinute);
982 
983             Object paramObj26 = new BooleanWrapper(neverReview);
984 
985             Object paramObj27 = new BooleanWrapper(indexable);
986 
987             Object paramObj28 = new BooleanWrapper(smallImage);
988 
989             Object paramObj29 = smallImageURL;
990 
991             if (smallImageURL == null) {
992                 paramObj29 = new NullWrapper("java.lang.String");
993             }
994 
995             Object paramObj30 = smallFile;
996 
997             if (smallFile == null) {
998                 paramObj30 = new NullWrapper("java.io.File");
999             }
1000
1001            Object paramObj31 = images;
1002
1003            if (images == null) {
1004                paramObj31 = new NullWrapper("java.util.Map");
1005            }
1006
1007            Object paramObj32 = articleURL;
1008
1009            if (articleURL == null) {
1010                paramObj32 = new NullWrapper("java.lang.String");
1011            }
1012
1013            Object paramObj33 = prefs;
1014
1015            if (prefs == null) {
1016                paramObj33 = new NullWrapper("javax.portlet.PortletPreferences");
1017            }
1018
1019            Object paramObj34 = tagsEntries;
1020
1021            if (tagsEntries == null) {
1022                paramObj34 = new NullWrapper("[Ljava.lang.String;");
1023            }
1024
1025            MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
1026                    "updateArticle",
1027                    new Object[] {
1028                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1029                        paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
1030                        paramObj10, paramObj11, paramObj12, paramObj13,
1031                        paramObj14, paramObj15, paramObj16, paramObj17,
1032                        paramObj18, paramObj19, paramObj20, paramObj21,
1033                        paramObj22, paramObj23, paramObj24, paramObj25,
1034                        paramObj26, paramObj27, paramObj28, paramObj29,
1035                        paramObj30, paramObj31, paramObj32, paramObj33,
1036                        paramObj34
1037                    });
1038
1039            Object returnObj = null;
1040
1041            try {
1042                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1043            }
1044            catch (Exception e) {
1045                if (e instanceof com.liferay.portal.SystemException) {
1046                    throw (com.liferay.portal.SystemException)e;
1047                }
1048
1049                if (e instanceof com.liferay.portal.PortalException) {
1050                    throw (com.liferay.portal.PortalException)e;
1051                }
1052
1053                throw new com.liferay.portal.SystemException(e);
1054            }
1055
1056            return (com.liferay.portlet.journal.model.JournalArticle)returnObj;
1057        }
1058        catch (com.liferay.portal.SystemException se) {
1059            _log.error(se, se);
1060
1061            throw se;
1062        }
1063    }
1064
1065    public static com.liferay.portlet.journal.model.JournalArticle updateContent(
1066        HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId,
1067        double version, java.lang.String content)
1068        throws com.liferay.portal.SystemException,
1069            com.liferay.portal.PortalException {
1070        try {
1071            Object paramObj0 = new LongWrapper(groupId);
1072
1073            Object paramObj1 = articleId;
1074
1075            if (articleId == null) {
1076                paramObj1 = new NullWrapper("java.lang.String");
1077            }
1078
1079            Object paramObj2 = new DoubleWrapper(version);
1080
1081            Object paramObj3 = content;
1082
1083            if (content == null) {
1084                paramObj3 = new NullWrapper("java.lang.String");
1085            }
1086
1087            MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
1088                    "updateContent",
1089                    new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1090
1091            Object returnObj = null;
1092
1093            try {
1094                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1095            }
1096            catch (Exception e) {
1097                if (e instanceof com.liferay.portal.SystemException) {
1098                    throw (com.liferay.portal.SystemException)e;
1099                }
1100
1101                if (e instanceof com.liferay.portal.PortalException) {
1102                    throw (com.liferay.portal.PortalException)e;
1103                }
1104
1105                throw new com.liferay.portal.SystemException(e);
1106            }
1107
1108            return (com.liferay.portlet.journal.model.JournalArticle)returnObj;
1109        }
1110        catch (com.liferay.portal.SystemException se) {
1111            _log.error(se, se);
1112
1113            throw se;
1114        }
1115    }
1116
1117    private static Log _log = LogFactoryUtil.getLog(JournalArticleServiceHttp.class);
1118}