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