1   /**
2    * Copyright (c) 2000-2007 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 overwritten
43   * the next time is generated.
44   * </p>
45   *
46   * <p>
47   * This class provides a HTTP utility for the <code>com.liferay.portlet.journal.service.JournalArticleServiceUtil</code>
48   * service utility. The static methods of this class calls the same methods of the
49   * service utility. However, the signatures are different because it requires an
50   * additional <code>com.liferay.portal.security.auth.HttpPrincipal</code> parameter.
51   * </p>
52   *
53   * <p>
54   * The benefits of using the HTTP utility is that it is fast and allows for tunneling
55   * without the cost of serializing to text. The drawback is that it only works with
56   * Java.
57   * </p>
58   *
59   * <p>
60   * Set the property <code>tunnel.servlet.hosts.allowed</code> in portal.properties
61   * to configure security.
62   * </p>
63   *
64   * <p>
65   * The HTTP utility is only generated for remote services.
66   * </p>
67   *
68   * @author Brian Wing Shun Chan
69   *
70   * @see com.liferay.portal.security.auth.HttpPrincipal
71   * @see com.liferay.portlet.journal.service.JournalArticleServiceUtil
72   * @see com.liferay.portlet.journal.service.http.JournalArticleServiceSoap
73   *
74   */
75  public class JournalArticleServiceHttp {
76      public static com.liferay.portlet.journal.model.JournalArticle addArticle(
77          HttpPrincipal httpPrincipal, java.lang.String articleId,
78          boolean autoArticleId, long plid, java.lang.String title,
79          java.lang.String description, java.lang.String content,
80          java.lang.String type, java.lang.String structureId,
81          java.lang.String templateId, int displayDateMonth, int displayDateDay,
82          int displayDateYear, int displayDateHour, int displayDateMinute,
83          int expirationDateMonth, int expirationDateDay, int expirationDateYear,
84          int expirationDateHour, int expirationDateMinute, boolean neverExpire,
85          int reviewDateMonth, int reviewDateDay, int reviewDateYear,
86          int reviewDateHour, int reviewDateMinute, boolean neverReview,
87          boolean indexable, java.util.Map images, java.lang.String articleURL,
88          javax.portlet.PortletPreferences prefs, java.lang.String[] tagsEntries,
89          boolean addCommunityPermissions, boolean addGuestPermissions)
90          throws com.liferay.portal.SystemException, 
91              com.liferay.portal.PortalException {
92          try {
93              Object paramObj0 = articleId;
94  
95              if (articleId == null) {
96                  paramObj0 = new NullWrapper("java.lang.String");
97              }
98  
99              Object paramObj1 = new BooleanWrapper(autoArticleId);
100             Object paramObj2 = new LongWrapper(plid);
101             Object paramObj3 = title;
102 
103             if (title == null) {
104                 paramObj3 = new NullWrapper("java.lang.String");
105             }
106 
107             Object paramObj4 = description;
108 
109             if (description == null) {
110                 paramObj4 = new NullWrapper("java.lang.String");
111             }
112 
113             Object paramObj5 = content;
114 
115             if (content == null) {
116                 paramObj5 = new NullWrapper("java.lang.String");
117             }
118 
119             Object paramObj6 = type;
120 
121             if (type == null) {
122                 paramObj6 = new NullWrapper("java.lang.String");
123             }
124 
125             Object paramObj7 = structureId;
126 
127             if (structureId == null) {
128                 paramObj7 = new NullWrapper("java.lang.String");
129             }
130 
131             Object paramObj8 = templateId;
132 
133             if (templateId == null) {
134                 paramObj8 = new NullWrapper("java.lang.String");
135             }
136 
137             Object paramObj9 = new IntegerWrapper(displayDateMonth);
138             Object paramObj10 = new IntegerWrapper(displayDateDay);
139             Object paramObj11 = new IntegerWrapper(displayDateYear);
140             Object paramObj12 = new IntegerWrapper(displayDateHour);
141             Object paramObj13 = new IntegerWrapper(displayDateMinute);
142             Object paramObj14 = new IntegerWrapper(expirationDateMonth);
143             Object paramObj15 = new IntegerWrapper(expirationDateDay);
144             Object paramObj16 = new IntegerWrapper(expirationDateYear);
145             Object paramObj17 = new IntegerWrapper(expirationDateHour);
146             Object paramObj18 = new IntegerWrapper(expirationDateMinute);
147             Object paramObj19 = new BooleanWrapper(neverExpire);
148             Object paramObj20 = new IntegerWrapper(reviewDateMonth);
149             Object paramObj21 = new IntegerWrapper(reviewDateDay);
150             Object paramObj22 = new IntegerWrapper(reviewDateYear);
151             Object paramObj23 = new IntegerWrapper(reviewDateHour);
152             Object paramObj24 = new IntegerWrapper(reviewDateMinute);
153             Object paramObj25 = new BooleanWrapper(neverReview);
154             Object paramObj26 = new BooleanWrapper(indexable);
155             Object paramObj27 = images;
156 
157             if (images == null) {
158                 paramObj27 = new NullWrapper("java.util.Map");
159             }
160 
161             Object paramObj28 = articleURL;
162 
163             if (articleURL == null) {
164                 paramObj28 = new NullWrapper("java.lang.String");
165             }
166 
167             Object paramObj29 = prefs;
168 
169             if (prefs == null) {
170                 paramObj29 = new NullWrapper("javax.portlet.PortletPreferences");
171             }
172 
173             Object paramObj30 = tagsEntries;
174 
175             if (tagsEntries == null) {
176                 paramObj30 = new NullWrapper("[Ljava.lang.String;");
177             }
178 
179             Object paramObj31 = new BooleanWrapper(addCommunityPermissions);
180             Object paramObj32 = new BooleanWrapper(addGuestPermissions);
181             MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
182                     "addArticle",
183                     new Object[] {
184                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
185                         paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
186                         paramObj10, paramObj11, paramObj12, paramObj13,
187                         paramObj14, paramObj15, paramObj16, paramObj17,
188                         paramObj18, paramObj19, paramObj20, paramObj21,
189                         paramObj22, paramObj23, paramObj24, paramObj25,
190                         paramObj26, paramObj27, paramObj28, paramObj29,
191                         paramObj30, paramObj31, paramObj32
192                     });
193             Object returnObj = null;
194 
195             try {
196                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
197             }
198             catch (Exception e) {
199                 if (e instanceof com.liferay.portal.SystemException) {
200                     throw (com.liferay.portal.SystemException)e;
201                 }
202 
203                 if (e instanceof com.liferay.portal.PortalException) {
204                     throw (com.liferay.portal.PortalException)e;
205                 }
206 
207                 throw new com.liferay.portal.SystemException(e);
208             }
209 
210             return (com.liferay.portlet.journal.model.JournalArticle)returnObj;
211         }
212         catch (com.liferay.portal.SystemException se) {
213             _log.error(se, se);
214             throw se;
215         }
216     }
217 
218     public static com.liferay.portlet.journal.model.JournalArticle addArticle(
219         HttpPrincipal httpPrincipal, java.lang.String articleId,
220         boolean autoArticleId, long plid, java.lang.String title,
221         java.lang.String description, java.lang.String content,
222         java.lang.String type, java.lang.String structureId,
223         java.lang.String templateId, int displayDateMonth, int displayDateDay,
224         int displayDateYear, int displayDateHour, int displayDateMinute,
225         int expirationDateMonth, int expirationDateDay, int expirationDateYear,
226         int expirationDateHour, int expirationDateMinute, boolean neverExpire,
227         int reviewDateMonth, int reviewDateDay, int reviewDateYear,
228         int reviewDateHour, int reviewDateMinute, boolean neverReview,
229         boolean indexable, java.util.Map images, java.lang.String articleURL,
230         javax.portlet.PortletPreferences prefs, java.lang.String[] tagsEntries,
231         java.lang.String[] communityPermissions,
232         java.lang.String[] guestPermissions)
233         throws com.liferay.portal.SystemException, 
234             com.liferay.portal.PortalException {
235         try {
236             Object paramObj0 = articleId;
237 
238             if (articleId == null) {
239                 paramObj0 = new NullWrapper("java.lang.String");
240             }
241 
242             Object paramObj1 = new BooleanWrapper(autoArticleId);
243             Object paramObj2 = new LongWrapper(plid);
244             Object paramObj3 = title;
245 
246             if (title == null) {
247                 paramObj3 = new NullWrapper("java.lang.String");
248             }
249 
250             Object paramObj4 = description;
251 
252             if (description == null) {
253                 paramObj4 = new NullWrapper("java.lang.String");
254             }
255 
256             Object paramObj5 = content;
257 
258             if (content == null) {
259                 paramObj5 = new NullWrapper("java.lang.String");
260             }
261 
262             Object paramObj6 = type;
263 
264             if (type == null) {
265                 paramObj6 = new NullWrapper("java.lang.String");
266             }
267 
268             Object paramObj7 = structureId;
269 
270             if (structureId == null) {
271                 paramObj7 = new NullWrapper("java.lang.String");
272             }
273 
274             Object paramObj8 = templateId;
275 
276             if (templateId == null) {
277                 paramObj8 = new NullWrapper("java.lang.String");
278             }
279 
280             Object paramObj9 = new IntegerWrapper(displayDateMonth);
281             Object paramObj10 = new IntegerWrapper(displayDateDay);
282             Object paramObj11 = new IntegerWrapper(displayDateYear);
283             Object paramObj12 = new IntegerWrapper(displayDateHour);
284             Object paramObj13 = new IntegerWrapper(displayDateMinute);
285             Object paramObj14 = new IntegerWrapper(expirationDateMonth);
286             Object paramObj15 = new IntegerWrapper(expirationDateDay);
287             Object paramObj16 = new IntegerWrapper(expirationDateYear);
288             Object paramObj17 = new IntegerWrapper(expirationDateHour);
289             Object paramObj18 = new IntegerWrapper(expirationDateMinute);
290             Object paramObj19 = new BooleanWrapper(neverExpire);
291             Object paramObj20 = new IntegerWrapper(reviewDateMonth);
292             Object paramObj21 = new IntegerWrapper(reviewDateDay);
293             Object paramObj22 = new IntegerWrapper(reviewDateYear);
294             Object paramObj23 = new IntegerWrapper(reviewDateHour);
295             Object paramObj24 = new IntegerWrapper(reviewDateMinute);
296             Object paramObj25 = new BooleanWrapper(neverReview);
297             Object paramObj26 = new BooleanWrapper(indexable);
298             Object paramObj27 = images;
299 
300             if (images == null) {
301                 paramObj27 = new NullWrapper("java.util.Map");
302             }
303 
304             Object paramObj28 = articleURL;
305 
306             if (articleURL == null) {
307                 paramObj28 = new NullWrapper("java.lang.String");
308             }
309 
310             Object paramObj29 = prefs;
311 
312             if (prefs == null) {
313                 paramObj29 = new NullWrapper("javax.portlet.PortletPreferences");
314             }
315 
316             Object paramObj30 = tagsEntries;
317 
318             if (tagsEntries == null) {
319                 paramObj30 = new NullWrapper("[Ljava.lang.String;");
320             }
321 
322             Object paramObj31 = communityPermissions;
323 
324             if (communityPermissions == null) {
325                 paramObj31 = new NullWrapper("[Ljava.lang.String;");
326             }
327 
328             Object paramObj32 = guestPermissions;
329 
330             if (guestPermissions == null) {
331                 paramObj32 = new NullWrapper("[Ljava.lang.String;");
332             }
333 
334             MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
335                     "addArticle",
336                     new Object[] {
337                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
338                         paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
339                         paramObj10, paramObj11, paramObj12, paramObj13,
340                         paramObj14, paramObj15, paramObj16, paramObj17,
341                         paramObj18, paramObj19, paramObj20, paramObj21,
342                         paramObj22, paramObj23, paramObj24, paramObj25,
343                         paramObj26, paramObj27, paramObj28, paramObj29,
344                         paramObj30, paramObj31, paramObj32
345                     });
346             Object returnObj = null;
347 
348             try {
349                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
350             }
351             catch (Exception e) {
352                 if (e instanceof com.liferay.portal.SystemException) {
353                     throw (com.liferay.portal.SystemException)e;
354                 }
355 
356                 if (e instanceof com.liferay.portal.PortalException) {
357                     throw (com.liferay.portal.PortalException)e;
358                 }
359 
360                 throw new com.liferay.portal.SystemException(e);
361             }
362 
363             return (com.liferay.portlet.journal.model.JournalArticle)returnObj;
364         }
365         catch (com.liferay.portal.SystemException se) {
366             _log.error(se, se);
367             throw se;
368         }
369     }
370 
371     public static com.liferay.portlet.journal.model.JournalArticle approveArticle(
372         HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId,
373         double version, long plid, java.lang.String articleURL,
374         javax.portlet.PortletPreferences prefs)
375         throws com.liferay.portal.SystemException, 
376             com.liferay.portal.PortalException {
377         try {
378             Object paramObj0 = new LongWrapper(groupId);
379             Object paramObj1 = articleId;
380 
381             if (articleId == null) {
382                 paramObj1 = new NullWrapper("java.lang.String");
383             }
384 
385             Object paramObj2 = new DoubleWrapper(version);
386             Object paramObj3 = new LongWrapper(plid);
387             Object paramObj4 = articleURL;
388 
389             if (articleURL == null) {
390                 paramObj4 = new NullWrapper("java.lang.String");
391             }
392 
393             Object paramObj5 = prefs;
394 
395             if (prefs == null) {
396                 paramObj5 = new NullWrapper("javax.portlet.PortletPreferences");
397             }
398 
399             MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
400                     "approveArticle",
401                     new Object[] {
402                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
403                         paramObj5
404                     });
405             Object returnObj = null;
406 
407             try {
408                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
409             }
410             catch (Exception e) {
411                 if (e instanceof com.liferay.portal.SystemException) {
412                     throw (com.liferay.portal.SystemException)e;
413                 }
414 
415                 if (e instanceof com.liferay.portal.PortalException) {
416                     throw (com.liferay.portal.PortalException)e;
417                 }
418 
419                 throw new com.liferay.portal.SystemException(e);
420             }
421 
422             return (com.liferay.portlet.journal.model.JournalArticle)returnObj;
423         }
424         catch (com.liferay.portal.SystemException se) {
425             _log.error(se, se);
426             throw se;
427         }
428     }
429 
430     public static com.liferay.portlet.journal.model.JournalArticle getArticle(
431         HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId,
432         double version)
433         throws com.liferay.portal.SystemException, 
434             com.liferay.portal.PortalException {
435         try {
436             Object paramObj0 = new LongWrapper(groupId);
437             Object paramObj1 = articleId;
438 
439             if (articleId == null) {
440                 paramObj1 = new NullWrapper("java.lang.String");
441             }
442 
443             Object paramObj2 = new DoubleWrapper(version);
444             MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
445                     "getArticle",
446                     new Object[] { paramObj0, paramObj1, paramObj2 });
447             Object returnObj = null;
448 
449             try {
450                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
451             }
452             catch (Exception e) {
453                 if (e instanceof com.liferay.portal.SystemException) {
454                     throw (com.liferay.portal.SystemException)e;
455                 }
456 
457                 if (e instanceof com.liferay.portal.PortalException) {
458                     throw (com.liferay.portal.PortalException)e;
459                 }
460 
461                 throw new com.liferay.portal.SystemException(e);
462             }
463 
464             return (com.liferay.portlet.journal.model.JournalArticle)returnObj;
465         }
466         catch (com.liferay.portal.SystemException se) {
467             _log.error(se, se);
468             throw se;
469         }
470     }
471 
472     public static java.lang.String getArticleContent(
473         HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId,
474         java.lang.String languageId,
475         com.liferay.portal.theme.ThemeDisplay themeDisplay)
476         throws com.liferay.portal.SystemException, 
477             com.liferay.portal.PortalException {
478         try {
479             Object paramObj0 = new LongWrapper(groupId);
480             Object paramObj1 = articleId;
481 
482             if (articleId == null) {
483                 paramObj1 = new NullWrapper("java.lang.String");
484             }
485 
486             Object paramObj2 = languageId;
487 
488             if (languageId == null) {
489                 paramObj2 = new NullWrapper("java.lang.String");
490             }
491 
492             Object paramObj3 = themeDisplay;
493 
494             if (themeDisplay == null) {
495                 paramObj3 = new NullWrapper(
496                         "com.liferay.portal.theme.ThemeDisplay");
497             }
498 
499             MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
500                     "getArticleContent",
501                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
502             Object returnObj = null;
503 
504             try {
505                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
506             }
507             catch (Exception e) {
508                 if (e instanceof com.liferay.portal.SystemException) {
509                     throw (com.liferay.portal.SystemException)e;
510                 }
511 
512                 if (e instanceof com.liferay.portal.PortalException) {
513                     throw (com.liferay.portal.PortalException)e;
514                 }
515 
516                 throw new com.liferay.portal.SystemException(e);
517             }
518 
519             return (java.lang.String)returnObj;
520         }
521         catch (com.liferay.portal.SystemException se) {
522             _log.error(se, se);
523             throw se;
524         }
525     }
526 
527     public static java.lang.String getArticleContent(
528         HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId,
529         double version, java.lang.String languageId,
530         com.liferay.portal.theme.ThemeDisplay themeDisplay)
531         throws com.liferay.portal.SystemException, 
532             com.liferay.portal.PortalException {
533         try {
534             Object paramObj0 = new LongWrapper(groupId);
535             Object paramObj1 = articleId;
536 
537             if (articleId == null) {
538                 paramObj1 = new NullWrapper("java.lang.String");
539             }
540 
541             Object paramObj2 = new DoubleWrapper(version);
542             Object paramObj3 = languageId;
543 
544             if (languageId == null) {
545                 paramObj3 = new NullWrapper("java.lang.String");
546             }
547 
548             Object paramObj4 = themeDisplay;
549 
550             if (themeDisplay == null) {
551                 paramObj4 = new NullWrapper(
552                         "com.liferay.portal.theme.ThemeDisplay");
553             }
554 
555             MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
556                     "getArticleContent",
557                     new Object[] {
558                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
559                     });
560             Object returnObj = null;
561 
562             try {
563                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
564             }
565             catch (Exception e) {
566                 if (e instanceof com.liferay.portal.SystemException) {
567                     throw (com.liferay.portal.SystemException)e;
568                 }
569 
570                 if (e instanceof com.liferay.portal.PortalException) {
571                     throw (com.liferay.portal.PortalException)e;
572                 }
573 
574                 throw new com.liferay.portal.SystemException(e);
575             }
576 
577             return (java.lang.String)returnObj;
578         }
579         catch (com.liferay.portal.SystemException se) {
580             _log.error(se, se);
581             throw se;
582         }
583     }
584 
585     public static void deleteArticle(HttpPrincipal httpPrincipal, long groupId,
586         java.lang.String articleId, double version,
587         java.lang.String articleURL, javax.portlet.PortletPreferences prefs)
588         throws com.liferay.portal.SystemException, 
589             com.liferay.portal.PortalException {
590         try {
591             Object paramObj0 = new LongWrapper(groupId);
592             Object paramObj1 = articleId;
593 
594             if (articleId == null) {
595                 paramObj1 = new NullWrapper("java.lang.String");
596             }
597 
598             Object paramObj2 = new DoubleWrapper(version);
599             Object paramObj3 = articleURL;
600 
601             if (articleURL == null) {
602                 paramObj3 = new NullWrapper("java.lang.String");
603             }
604 
605             Object paramObj4 = prefs;
606 
607             if (prefs == null) {
608                 paramObj4 = new NullWrapper("javax.portlet.PortletPreferences");
609             }
610 
611             MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
612                     "deleteArticle",
613                     new Object[] {
614                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
615                     });
616 
617             try {
618                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
619             }
620             catch (Exception e) {
621                 if (e instanceof com.liferay.portal.SystemException) {
622                     throw (com.liferay.portal.SystemException)e;
623                 }
624 
625                 if (e instanceof com.liferay.portal.PortalException) {
626                     throw (com.liferay.portal.PortalException)e;
627                 }
628 
629                 throw new com.liferay.portal.SystemException(e);
630             }
631         }
632         catch (com.liferay.portal.SystemException se) {
633             _log.error(se, se);
634             throw se;
635         }
636     }
637 
638     public static void expireArticle(HttpPrincipal httpPrincipal, long groupId,
639         java.lang.String articleId, double version,
640         java.lang.String articleURL, javax.portlet.PortletPreferences prefs)
641         throws com.liferay.portal.SystemException, 
642             com.liferay.portal.PortalException {
643         try {
644             Object paramObj0 = new LongWrapper(groupId);
645             Object paramObj1 = articleId;
646 
647             if (articleId == null) {
648                 paramObj1 = new NullWrapper("java.lang.String");
649             }
650 
651             Object paramObj2 = new DoubleWrapper(version);
652             Object paramObj3 = articleURL;
653 
654             if (articleURL == null) {
655                 paramObj3 = new NullWrapper("java.lang.String");
656             }
657 
658             Object paramObj4 = prefs;
659 
660             if (prefs == null) {
661                 paramObj4 = new NullWrapper("javax.portlet.PortletPreferences");
662             }
663 
664             MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
665                     "expireArticle",
666                     new Object[] {
667                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
668                     });
669 
670             try {
671                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
672             }
673             catch (Exception e) {
674                 if (e instanceof com.liferay.portal.SystemException) {
675                     throw (com.liferay.portal.SystemException)e;
676                 }
677 
678                 if (e instanceof com.liferay.portal.PortalException) {
679                     throw (com.liferay.portal.PortalException)e;
680                 }
681 
682                 throw new com.liferay.portal.SystemException(e);
683             }
684         }
685         catch (com.liferay.portal.SystemException se) {
686             _log.error(se, se);
687             throw se;
688         }
689     }
690 
691     public static void removeArticleLocale(HttpPrincipal httpPrincipal,
692         long companyId, java.lang.String languageId)
693         throws com.liferay.portal.SystemException, 
694             com.liferay.portal.PortalException {
695         try {
696             Object paramObj0 = new LongWrapper(companyId);
697             Object paramObj1 = languageId;
698 
699             if (languageId == null) {
700                 paramObj1 = new NullWrapper("java.lang.String");
701             }
702 
703             MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
704                     "removeArticleLocale", new Object[] { paramObj0, paramObj1 });
705 
706             try {
707                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
708             }
709             catch (Exception e) {
710                 if (e instanceof com.liferay.portal.SystemException) {
711                     throw (com.liferay.portal.SystemException)e;
712                 }
713 
714                 if (e instanceof com.liferay.portal.PortalException) {
715                     throw (com.liferay.portal.PortalException)e;
716                 }
717 
718                 throw new com.liferay.portal.SystemException(e);
719             }
720         }
721         catch (com.liferay.portal.SystemException se) {
722             _log.error(se, se);
723             throw se;
724         }
725     }
726 
727     public static com.liferay.portlet.journal.model.JournalArticle removeArticleLocale(
728         HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId,
729         double version, java.lang.String languageId)
730         throws com.liferay.portal.SystemException, 
731             com.liferay.portal.PortalException {
732         try {
733             Object paramObj0 = new LongWrapper(groupId);
734             Object paramObj1 = articleId;
735 
736             if (articleId == null) {
737                 paramObj1 = new NullWrapper("java.lang.String");
738             }
739 
740             Object paramObj2 = new DoubleWrapper(version);
741             Object paramObj3 = languageId;
742 
743             if (languageId == null) {
744                 paramObj3 = new NullWrapper("java.lang.String");
745             }
746 
747             MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
748                     "removeArticleLocale",
749                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
750             Object returnObj = null;
751 
752             try {
753                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
754             }
755             catch (Exception e) {
756                 if (e instanceof com.liferay.portal.SystemException) {
757                     throw (com.liferay.portal.SystemException)e;
758                 }
759 
760                 if (e instanceof com.liferay.portal.PortalException) {
761                     throw (com.liferay.portal.PortalException)e;
762                 }
763 
764                 throw new com.liferay.portal.SystemException(e);
765             }
766 
767             return (com.liferay.portlet.journal.model.JournalArticle)returnObj;
768         }
769         catch (com.liferay.portal.SystemException se) {
770             _log.error(se, se);
771             throw se;
772         }
773     }
774 
775     public static com.liferay.portlet.journal.model.JournalArticle updateArticle(
776         HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId,
777         double version, boolean incrementVersion, java.lang.String title,
778         java.lang.String description, java.lang.String content,
779         java.lang.String type, java.lang.String structureId,
780         java.lang.String templateId, int displayDateMonth, int displayDateDay,
781         int displayDateYear, int displayDateHour, int displayDateMinute,
782         int expirationDateMonth, int expirationDateDay, int expirationDateYear,
783         int expirationDateHour, int expirationDateMinute, boolean neverExpire,
784         int reviewDateMonth, int reviewDateDay, int reviewDateYear,
785         int reviewDateHour, int reviewDateMinute, boolean neverReview,
786         boolean indexable, java.util.Map images, java.lang.String articleURL,
787         javax.portlet.PortletPreferences prefs, java.lang.String[] tagsEntries)
788         throws com.liferay.portal.SystemException, 
789             com.liferay.portal.PortalException {
790         try {
791             Object paramObj0 = new LongWrapper(groupId);
792             Object paramObj1 = articleId;
793 
794             if (articleId == null) {
795                 paramObj1 = new NullWrapper("java.lang.String");
796             }
797 
798             Object paramObj2 = new DoubleWrapper(version);
799             Object paramObj3 = new BooleanWrapper(incrementVersion);
800             Object paramObj4 = title;
801 
802             if (title == null) {
803                 paramObj4 = new NullWrapper("java.lang.String");
804             }
805 
806             Object paramObj5 = description;
807 
808             if (description == null) {
809                 paramObj5 = new NullWrapper("java.lang.String");
810             }
811 
812             Object paramObj6 = content;
813 
814             if (content == null) {
815                 paramObj6 = new NullWrapper("java.lang.String");
816             }
817 
818             Object paramObj7 = type;
819 
820             if (type == null) {
821                 paramObj7 = new NullWrapper("java.lang.String");
822             }
823 
824             Object paramObj8 = structureId;
825 
826             if (structureId == null) {
827                 paramObj8 = new NullWrapper("java.lang.String");
828             }
829 
830             Object paramObj9 = templateId;
831 
832             if (templateId == null) {
833                 paramObj9 = new NullWrapper("java.lang.String");
834             }
835 
836             Object paramObj10 = new IntegerWrapper(displayDateMonth);
837             Object paramObj11 = new IntegerWrapper(displayDateDay);
838             Object paramObj12 = new IntegerWrapper(displayDateYear);
839             Object paramObj13 = new IntegerWrapper(displayDateHour);
840             Object paramObj14 = new IntegerWrapper(displayDateMinute);
841             Object paramObj15 = new IntegerWrapper(expirationDateMonth);
842             Object paramObj16 = new IntegerWrapper(expirationDateDay);
843             Object paramObj17 = new IntegerWrapper(expirationDateYear);
844             Object paramObj18 = new IntegerWrapper(expirationDateHour);
845             Object paramObj19 = new IntegerWrapper(expirationDateMinute);
846             Object paramObj20 = new BooleanWrapper(neverExpire);
847             Object paramObj21 = new IntegerWrapper(reviewDateMonth);
848             Object paramObj22 = new IntegerWrapper(reviewDateDay);
849             Object paramObj23 = new IntegerWrapper(reviewDateYear);
850             Object paramObj24 = new IntegerWrapper(reviewDateHour);
851             Object paramObj25 = new IntegerWrapper(reviewDateMinute);
852             Object paramObj26 = new BooleanWrapper(neverReview);
853             Object paramObj27 = new BooleanWrapper(indexable);
854             Object paramObj28 = images;
855 
856             if (images == null) {
857                 paramObj28 = new NullWrapper("java.util.Map");
858             }
859 
860             Object paramObj29 = articleURL;
861 
862             if (articleURL == null) {
863                 paramObj29 = new NullWrapper("java.lang.String");
864             }
865 
866             Object paramObj30 = prefs;
867 
868             if (prefs == null) {
869                 paramObj30 = new NullWrapper("javax.portlet.PortletPreferences");
870             }
871 
872             Object paramObj31 = tagsEntries;
873 
874             if (tagsEntries == null) {
875                 paramObj31 = new NullWrapper("[Ljava.lang.String;");
876             }
877 
878             MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
879                     "updateArticle",
880                     new Object[] {
881                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
882                         paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
883                         paramObj10, paramObj11, paramObj12, paramObj13,
884                         paramObj14, paramObj15, paramObj16, paramObj17,
885                         paramObj18, paramObj19, paramObj20, paramObj21,
886                         paramObj22, paramObj23, paramObj24, paramObj25,
887                         paramObj26, paramObj27, paramObj28, paramObj29,
888                         paramObj30, paramObj31
889                     });
890             Object returnObj = null;
891 
892             try {
893                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
894             }
895             catch (Exception e) {
896                 if (e instanceof com.liferay.portal.SystemException) {
897                     throw (com.liferay.portal.SystemException)e;
898                 }
899 
900                 if (e instanceof com.liferay.portal.PortalException) {
901                     throw (com.liferay.portal.PortalException)e;
902                 }
903 
904                 throw new com.liferay.portal.SystemException(e);
905             }
906 
907             return (com.liferay.portlet.journal.model.JournalArticle)returnObj;
908         }
909         catch (com.liferay.portal.SystemException se) {
910             _log.error(se, se);
911             throw se;
912         }
913     }
914 
915     public static com.liferay.portlet.journal.model.JournalArticle updateContent(
916         HttpPrincipal httpPrincipal, long groupId, java.lang.String articleId,
917         double version, java.lang.String content)
918         throws com.liferay.portal.SystemException, 
919             com.liferay.portal.PortalException {
920         try {
921             Object paramObj0 = new LongWrapper(groupId);
922             Object paramObj1 = articleId;
923 
924             if (articleId == null) {
925                 paramObj1 = new NullWrapper("java.lang.String");
926             }
927 
928             Object paramObj2 = new DoubleWrapper(version);
929             Object paramObj3 = content;
930 
931             if (content == null) {
932                 paramObj3 = new NullWrapper("java.lang.String");
933             }
934 
935             MethodWrapper methodWrapper = new MethodWrapper(JournalArticleServiceUtil.class.getName(),
936                     "updateContent",
937                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
938             Object returnObj = null;
939 
940             try {
941                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
942             }
943             catch (Exception e) {
944                 if (e instanceof com.liferay.portal.SystemException) {
945                     throw (com.liferay.portal.SystemException)e;
946                 }
947 
948                 if (e instanceof com.liferay.portal.PortalException) {
949                     throw (com.liferay.portal.PortalException)e;
950                 }
951 
952                 throw new com.liferay.portal.SystemException(e);
953             }
954 
955             return (com.liferay.portlet.journal.model.JournalArticle)returnObj;
956         }
957         catch (com.liferay.portal.SystemException se) {
958             _log.error(se, se);
959             throw se;
960         }
961     }
962 
963     private static Log _log = LogFactoryUtil.getLog(JournalArticleServiceHttp.class);
964 }