001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.messageboards.service.http;
016    
017    import com.liferay.portal.kernel.log.Log;
018    import com.liferay.portal.kernel.log.LogFactoryUtil;
019    import com.liferay.portal.kernel.util.BooleanWrapper;
020    import com.liferay.portal.kernel.util.DoubleWrapper;
021    import com.liferay.portal.kernel.util.IntegerWrapper;
022    import com.liferay.portal.kernel.util.LongWrapper;
023    import com.liferay.portal.kernel.util.MethodWrapper;
024    import com.liferay.portal.kernel.util.NullWrapper;
025    import com.liferay.portal.security.auth.HttpPrincipal;
026    import com.liferay.portal.service.http.TunnelUtil;
027    
028    import com.liferay.portlet.messageboards.service.MBMessageServiceUtil;
029    
030    /**
031     * <p>
032     * This class provides a HTTP utility for the
033     * {@link com.liferay.portlet.messageboards.service.MBMessageServiceUtil} service utility. The
034     * static methods of this class calls the same methods of the service utility.
035     * However, the signatures are different because it requires an additional
036     * {@link com.liferay.portal.security.auth.HttpPrincipal} parameter.
037     * </p>
038     *
039     * <p>
040     * The benefits of using the HTTP utility is that it is fast and allows for
041     * tunneling without the cost of serializing to text. The drawback is that it
042     * only works with Java.
043     * </p>
044     *
045     * <p>
046     * Set the property <b>tunnel.servlet.hosts.allowed</b> in portal.properties to
047     * configure security.
048     * </p>
049     *
050     * <p>
051     * The HTTP utility is only generated for remote services.
052     * </p>
053     *
054     * @author    Brian Wing Shun Chan
055     * @see       MBMessageServiceSoap
056     * @see       com.liferay.portal.security.auth.HttpPrincipal
057     * @see       com.liferay.portlet.messageboards.service.MBMessageServiceUtil
058     * @generated
059     */
060    public class MBMessageServiceHttp {
061            public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
062                    HttpPrincipal httpPrincipal, long groupId, java.lang.String className,
063                    long classPK, java.lang.String permissionClassName,
064                    long permissionClassPK, long threadId, long parentMessageId,
065                    java.lang.String subject, java.lang.String body,
066                    com.liferay.portal.service.ServiceContext serviceContext)
067                    throws com.liferay.portal.kernel.exception.PortalException,
068                            com.liferay.portal.kernel.exception.SystemException {
069                    try {
070                            Object paramObj0 = new LongWrapper(groupId);
071    
072                            Object paramObj1 = className;
073    
074                            if (className == null) {
075                                    paramObj1 = new NullWrapper("java.lang.String");
076                            }
077    
078                            Object paramObj2 = new LongWrapper(classPK);
079    
080                            Object paramObj3 = permissionClassName;
081    
082                            if (permissionClassName == null) {
083                                    paramObj3 = new NullWrapper("java.lang.String");
084                            }
085    
086                            Object paramObj4 = new LongWrapper(permissionClassPK);
087    
088                            Object paramObj5 = new LongWrapper(threadId);
089    
090                            Object paramObj6 = new LongWrapper(parentMessageId);
091    
092                            Object paramObj7 = subject;
093    
094                            if (subject == null) {
095                                    paramObj7 = new NullWrapper("java.lang.String");
096                            }
097    
098                            Object paramObj8 = body;
099    
100                            if (body == null) {
101                                    paramObj8 = new NullWrapper("java.lang.String");
102                            }
103    
104                            Object paramObj9 = serviceContext;
105    
106                            if (serviceContext == null) {
107                                    paramObj9 = new NullWrapper(
108                                                    "com.liferay.portal.service.ServiceContext");
109                            }
110    
111                            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
112                                            "addDiscussionMessage",
113                                            new Object[] {
114                                                    paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
115                                                    paramObj5, paramObj6, paramObj7, paramObj8, paramObj9
116                                            });
117    
118                            Object returnObj = null;
119    
120                            try {
121                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
122                            }
123                            catch (Exception e) {
124                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
125                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
126                                    }
127    
128                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
129                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
130                                    }
131    
132                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
133                            }
134    
135                            return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
136                    }
137                    catch (com.liferay.portal.kernel.exception.SystemException se) {
138                            _log.error(se, se);
139    
140                            throw se;
141                    }
142            }
143    
144            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
145                    HttpPrincipal httpPrincipal, long groupId, long categoryId,
146                    long threadId, long parentMessageId, java.lang.String subject,
147                    java.lang.String body,
148                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
149                    boolean anonymous, double priority, boolean allowPingbacks,
150                    com.liferay.portal.service.ServiceContext serviceContext)
151                    throws com.liferay.portal.kernel.exception.PortalException,
152                            com.liferay.portal.kernel.exception.SystemException {
153                    try {
154                            Object paramObj0 = new LongWrapper(groupId);
155    
156                            Object paramObj1 = new LongWrapper(categoryId);
157    
158                            Object paramObj2 = new LongWrapper(threadId);
159    
160                            Object paramObj3 = new LongWrapper(parentMessageId);
161    
162                            Object paramObj4 = subject;
163    
164                            if (subject == null) {
165                                    paramObj4 = new NullWrapper("java.lang.String");
166                            }
167    
168                            Object paramObj5 = body;
169    
170                            if (body == null) {
171                                    paramObj5 = new NullWrapper("java.lang.String");
172                            }
173    
174                            Object paramObj6 = files;
175    
176                            if (files == null) {
177                                    paramObj6 = new NullWrapper("java.util.List");
178                            }
179    
180                            Object paramObj7 = new BooleanWrapper(anonymous);
181    
182                            Object paramObj8 = new DoubleWrapper(priority);
183    
184                            Object paramObj9 = new BooleanWrapper(allowPingbacks);
185    
186                            Object paramObj10 = serviceContext;
187    
188                            if (serviceContext == null) {
189                                    paramObj10 = new NullWrapper(
190                                                    "com.liferay.portal.service.ServiceContext");
191                            }
192    
193                            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
194                                            "addMessage",
195                                            new Object[] {
196                                                    paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
197                                                    paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
198                                                    paramObj10
199                                            });
200    
201                            Object returnObj = null;
202    
203                            try {
204                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
205                            }
206                            catch (Exception e) {
207                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
208                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
209                                    }
210    
211                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
212                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
213                                    }
214    
215                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
216                            }
217    
218                            return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
219                    }
220                    catch (com.liferay.portal.kernel.exception.SystemException se) {
221                            _log.error(se, se);
222    
223                            throw se;
224                    }
225            }
226    
227            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
228                    HttpPrincipal httpPrincipal, long groupId, long categoryId,
229                    java.lang.String subject, java.lang.String body,
230                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
231                    boolean anonymous, double priority, boolean allowPingbacks,
232                    com.liferay.portal.service.ServiceContext serviceContext)
233                    throws com.liferay.portal.kernel.exception.PortalException,
234                            com.liferay.portal.kernel.exception.SystemException {
235                    try {
236                            Object paramObj0 = new LongWrapper(groupId);
237    
238                            Object paramObj1 = new LongWrapper(categoryId);
239    
240                            Object paramObj2 = subject;
241    
242                            if (subject == null) {
243                                    paramObj2 = new NullWrapper("java.lang.String");
244                            }
245    
246                            Object paramObj3 = body;
247    
248                            if (body == null) {
249                                    paramObj3 = new NullWrapper("java.lang.String");
250                            }
251    
252                            Object paramObj4 = files;
253    
254                            if (files == null) {
255                                    paramObj4 = new NullWrapper("java.util.List");
256                            }
257    
258                            Object paramObj5 = new BooleanWrapper(anonymous);
259    
260                            Object paramObj6 = new DoubleWrapper(priority);
261    
262                            Object paramObj7 = new BooleanWrapper(allowPingbacks);
263    
264                            Object paramObj8 = serviceContext;
265    
266                            if (serviceContext == null) {
267                                    paramObj8 = new NullWrapper(
268                                                    "com.liferay.portal.service.ServiceContext");
269                            }
270    
271                            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
272                                            "addMessage",
273                                            new Object[] {
274                                                    paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
275                                                    paramObj5, paramObj6, paramObj7, paramObj8
276                                            });
277    
278                            Object returnObj = null;
279    
280                            try {
281                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
282                            }
283                            catch (Exception e) {
284                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
285                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
286                                    }
287    
288                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
289                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
290                                    }
291    
292                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
293                            }
294    
295                            return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
296                    }
297                    catch (com.liferay.portal.kernel.exception.SystemException se) {
298                            _log.error(se, se);
299    
300                            throw se;
301                    }
302            }
303    
304            public static void deleteDiscussionMessage(HttpPrincipal httpPrincipal,
305                    long groupId, java.lang.String className, long classPK,
306                    java.lang.String permissionClassName, long permissionClassPK,
307                    long messageId)
308                    throws com.liferay.portal.kernel.exception.PortalException,
309                            com.liferay.portal.kernel.exception.SystemException {
310                    try {
311                            Object paramObj0 = new LongWrapper(groupId);
312    
313                            Object paramObj1 = className;
314    
315                            if (className == null) {
316                                    paramObj1 = new NullWrapper("java.lang.String");
317                            }
318    
319                            Object paramObj2 = new LongWrapper(classPK);
320    
321                            Object paramObj3 = permissionClassName;
322    
323                            if (permissionClassName == null) {
324                                    paramObj3 = new NullWrapper("java.lang.String");
325                            }
326    
327                            Object paramObj4 = new LongWrapper(permissionClassPK);
328    
329                            Object paramObj5 = new LongWrapper(messageId);
330    
331                            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
332                                            "deleteDiscussionMessage",
333                                            new Object[] {
334                                                    paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
335                                                    paramObj5
336                                            });
337    
338                            try {
339                                    TunnelUtil.invoke(httpPrincipal, methodWrapper);
340                            }
341                            catch (Exception e) {
342                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
343                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
344                                    }
345    
346                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
347                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
348                                    }
349    
350                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
351                            }
352                    }
353                    catch (com.liferay.portal.kernel.exception.SystemException se) {
354                            _log.error(se, se);
355    
356                            throw se;
357                    }
358            }
359    
360            public static void deleteMessage(HttpPrincipal httpPrincipal, long messageId)
361                    throws com.liferay.portal.kernel.exception.PortalException,
362                            com.liferay.portal.kernel.exception.SystemException {
363                    try {
364                            Object paramObj0 = new LongWrapper(messageId);
365    
366                            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
367                                            "deleteMessage", new Object[] { paramObj0 });
368    
369                            try {
370                                    TunnelUtil.invoke(httpPrincipal, methodWrapper);
371                            }
372                            catch (Exception e) {
373                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
374                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
375                                    }
376    
377                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
378                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
379                                    }
380    
381                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
382                            }
383                    }
384                    catch (com.liferay.portal.kernel.exception.SystemException se) {
385                            _log.error(se, se);
386    
387                            throw se;
388                    }
389            }
390    
391            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
392                    HttpPrincipal httpPrincipal, long groupId, long categoryId, int status,
393                    int start, int end)
394                    throws com.liferay.portal.kernel.exception.PortalException,
395                            com.liferay.portal.kernel.exception.SystemException {
396                    try {
397                            Object paramObj0 = new LongWrapper(groupId);
398    
399                            Object paramObj1 = new LongWrapper(categoryId);
400    
401                            Object paramObj2 = new IntegerWrapper(status);
402    
403                            Object paramObj3 = new IntegerWrapper(start);
404    
405                            Object paramObj4 = new IntegerWrapper(end);
406    
407                            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
408                                            "getCategoryMessages",
409                                            new Object[] {
410                                                    paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
411                                            });
412    
413                            Object returnObj = null;
414    
415                            try {
416                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
417                            }
418                            catch (Exception e) {
419                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
420                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
421                                    }
422    
423                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
424                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
425                                    }
426    
427                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
428                            }
429    
430                            return (java.util.List<com.liferay.portlet.messageboards.model.MBMessage>)returnObj;
431                    }
432                    catch (com.liferay.portal.kernel.exception.SystemException se) {
433                            _log.error(se, se);
434    
435                            throw se;
436                    }
437            }
438    
439            public static int getCategoryMessagesCount(HttpPrincipal httpPrincipal,
440                    long groupId, long categoryId, int status)
441                    throws com.liferay.portal.kernel.exception.SystemException {
442                    try {
443                            Object paramObj0 = new LongWrapper(groupId);
444    
445                            Object paramObj1 = new LongWrapper(categoryId);
446    
447                            Object paramObj2 = new IntegerWrapper(status);
448    
449                            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
450                                            "getCategoryMessagesCount",
451                                            new Object[] { paramObj0, paramObj1, paramObj2 });
452    
453                            Object returnObj = null;
454    
455                            try {
456                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
457                            }
458                            catch (Exception e) {
459                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
460                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
461                                    }
462    
463                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
464                            }
465    
466                            return ((Integer)returnObj).intValue();
467                    }
468                    catch (com.liferay.portal.kernel.exception.SystemException se) {
469                            _log.error(se, se);
470    
471                            throw se;
472                    }
473            }
474    
475            public static java.lang.String getCategoryMessagesRSS(
476                    HttpPrincipal httpPrincipal, long groupId, long categoryId, int status,
477                    int max, java.lang.String type, double version,
478                    java.lang.String displayStyle, java.lang.String feedURL,
479                    java.lang.String entryURL,
480                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
481                    throws com.liferay.portal.kernel.exception.PortalException,
482                            com.liferay.portal.kernel.exception.SystemException {
483                    try {
484                            Object paramObj0 = new LongWrapper(groupId);
485    
486                            Object paramObj1 = new LongWrapper(categoryId);
487    
488                            Object paramObj2 = new IntegerWrapper(status);
489    
490                            Object paramObj3 = new IntegerWrapper(max);
491    
492                            Object paramObj4 = type;
493    
494                            if (type == null) {
495                                    paramObj4 = new NullWrapper("java.lang.String");
496                            }
497    
498                            Object paramObj5 = new DoubleWrapper(version);
499    
500                            Object paramObj6 = displayStyle;
501    
502                            if (displayStyle == null) {
503                                    paramObj6 = new NullWrapper("java.lang.String");
504                            }
505    
506                            Object paramObj7 = feedURL;
507    
508                            if (feedURL == null) {
509                                    paramObj7 = new NullWrapper("java.lang.String");
510                            }
511    
512                            Object paramObj8 = entryURL;
513    
514                            if (entryURL == null) {
515                                    paramObj8 = new NullWrapper("java.lang.String");
516                            }
517    
518                            Object paramObj9 = themeDisplay;
519    
520                            if (themeDisplay == null) {
521                                    paramObj9 = new NullWrapper(
522                                                    "com.liferay.portal.theme.ThemeDisplay");
523                            }
524    
525                            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
526                                            "getCategoryMessagesRSS",
527                                            new Object[] {
528                                                    paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
529                                                    paramObj5, paramObj6, paramObj7, paramObj8, paramObj9
530                                            });
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.kernel.exception.PortalException) {
539                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
540                                    }
541    
542                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
543                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
544                                    }
545    
546                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
547                            }
548    
549                            return (java.lang.String)returnObj;
550                    }
551                    catch (com.liferay.portal.kernel.exception.SystemException se) {
552                            _log.error(se, se);
553    
554                            throw se;
555                    }
556            }
557    
558            public static java.lang.String getCompanyMessagesRSS(
559                    HttpPrincipal httpPrincipal, long companyId, int status, int max,
560                    java.lang.String type, double version, java.lang.String displayStyle,
561                    java.lang.String feedURL, java.lang.String entryURL,
562                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
563                    throws com.liferay.portal.kernel.exception.PortalException,
564                            com.liferay.portal.kernel.exception.SystemException {
565                    try {
566                            Object paramObj0 = new LongWrapper(companyId);
567    
568                            Object paramObj1 = new IntegerWrapper(status);
569    
570                            Object paramObj2 = new IntegerWrapper(max);
571    
572                            Object paramObj3 = type;
573    
574                            if (type == null) {
575                                    paramObj3 = new NullWrapper("java.lang.String");
576                            }
577    
578                            Object paramObj4 = new DoubleWrapper(version);
579    
580                            Object paramObj5 = displayStyle;
581    
582                            if (displayStyle == null) {
583                                    paramObj5 = new NullWrapper("java.lang.String");
584                            }
585    
586                            Object paramObj6 = feedURL;
587    
588                            if (feedURL == null) {
589                                    paramObj6 = new NullWrapper("java.lang.String");
590                            }
591    
592                            Object paramObj7 = entryURL;
593    
594                            if (entryURL == null) {
595                                    paramObj7 = new NullWrapper("java.lang.String");
596                            }
597    
598                            Object paramObj8 = themeDisplay;
599    
600                            if (themeDisplay == null) {
601                                    paramObj8 = new NullWrapper(
602                                                    "com.liferay.portal.theme.ThemeDisplay");
603                            }
604    
605                            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
606                                            "getCompanyMessagesRSS",
607                                            new Object[] {
608                                                    paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
609                                                    paramObj5, paramObj6, paramObj7, paramObj8
610                                            });
611    
612                            Object returnObj = null;
613    
614                            try {
615                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
616                            }
617                            catch (Exception e) {
618                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
619                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
620                                    }
621    
622                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
623                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
624                                    }
625    
626                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
627                            }
628    
629                            return (java.lang.String)returnObj;
630                    }
631                    catch (com.liferay.portal.kernel.exception.SystemException se) {
632                            _log.error(se, se);
633    
634                            throw se;
635                    }
636            }
637    
638            public static java.lang.String getGroupMessagesRSS(
639                    HttpPrincipal httpPrincipal, long groupId, int status, int max,
640                    java.lang.String type, double version, java.lang.String displayStyle,
641                    java.lang.String feedURL, java.lang.String entryURL,
642                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
643                    throws com.liferay.portal.kernel.exception.PortalException,
644                            com.liferay.portal.kernel.exception.SystemException {
645                    try {
646                            Object paramObj0 = new LongWrapper(groupId);
647    
648                            Object paramObj1 = new IntegerWrapper(status);
649    
650                            Object paramObj2 = new IntegerWrapper(max);
651    
652                            Object paramObj3 = type;
653    
654                            if (type == null) {
655                                    paramObj3 = new NullWrapper("java.lang.String");
656                            }
657    
658                            Object paramObj4 = new DoubleWrapper(version);
659    
660                            Object paramObj5 = displayStyle;
661    
662                            if (displayStyle == null) {
663                                    paramObj5 = new NullWrapper("java.lang.String");
664                            }
665    
666                            Object paramObj6 = feedURL;
667    
668                            if (feedURL == null) {
669                                    paramObj6 = new NullWrapper("java.lang.String");
670                            }
671    
672                            Object paramObj7 = entryURL;
673    
674                            if (entryURL == null) {
675                                    paramObj7 = new NullWrapper("java.lang.String");
676                            }
677    
678                            Object paramObj8 = themeDisplay;
679    
680                            if (themeDisplay == null) {
681                                    paramObj8 = new NullWrapper(
682                                                    "com.liferay.portal.theme.ThemeDisplay");
683                            }
684    
685                            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
686                                            "getGroupMessagesRSS",
687                                            new Object[] {
688                                                    paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
689                                                    paramObj5, paramObj6, paramObj7, paramObj8
690                                            });
691    
692                            Object returnObj = null;
693    
694                            try {
695                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
696                            }
697                            catch (Exception e) {
698                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
699                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
700                                    }
701    
702                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
703                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
704                                    }
705    
706                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
707                            }
708    
709                            return (java.lang.String)returnObj;
710                    }
711                    catch (com.liferay.portal.kernel.exception.SystemException se) {
712                            _log.error(se, se);
713    
714                            throw se;
715                    }
716            }
717    
718            public static java.lang.String getGroupMessagesRSS(
719                    HttpPrincipal httpPrincipal, long groupId, long userId, int status,
720                    int max, java.lang.String type, double version,
721                    java.lang.String displayStyle, java.lang.String feedURL,
722                    java.lang.String entryURL,
723                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
724                    throws com.liferay.portal.kernel.exception.PortalException,
725                            com.liferay.portal.kernel.exception.SystemException {
726                    try {
727                            Object paramObj0 = new LongWrapper(groupId);
728    
729                            Object paramObj1 = new LongWrapper(userId);
730    
731                            Object paramObj2 = new IntegerWrapper(status);
732    
733                            Object paramObj3 = new IntegerWrapper(max);
734    
735                            Object paramObj4 = type;
736    
737                            if (type == null) {
738                                    paramObj4 = new NullWrapper("java.lang.String");
739                            }
740    
741                            Object paramObj5 = new DoubleWrapper(version);
742    
743                            Object paramObj6 = displayStyle;
744    
745                            if (displayStyle == null) {
746                                    paramObj6 = new NullWrapper("java.lang.String");
747                            }
748    
749                            Object paramObj7 = feedURL;
750    
751                            if (feedURL == null) {
752                                    paramObj7 = new NullWrapper("java.lang.String");
753                            }
754    
755                            Object paramObj8 = entryURL;
756    
757                            if (entryURL == null) {
758                                    paramObj8 = new NullWrapper("java.lang.String");
759                            }
760    
761                            Object paramObj9 = themeDisplay;
762    
763                            if (themeDisplay == null) {
764                                    paramObj9 = new NullWrapper(
765                                                    "com.liferay.portal.theme.ThemeDisplay");
766                            }
767    
768                            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
769                                            "getGroupMessagesRSS",
770                                            new Object[] {
771                                                    paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
772                                                    paramObj5, paramObj6, paramObj7, paramObj8, paramObj9
773                                            });
774    
775                            Object returnObj = null;
776    
777                            try {
778                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
779                            }
780                            catch (Exception e) {
781                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
782                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
783                                    }
784    
785                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
786                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
787                                    }
788    
789                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
790                            }
791    
792                            return (java.lang.String)returnObj;
793                    }
794                    catch (com.liferay.portal.kernel.exception.SystemException se) {
795                            _log.error(se, se);
796    
797                            throw se;
798                    }
799            }
800    
801            public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
802                    HttpPrincipal httpPrincipal, long messageId)
803                    throws com.liferay.portal.kernel.exception.PortalException,
804                            com.liferay.portal.kernel.exception.SystemException {
805                    try {
806                            Object paramObj0 = new LongWrapper(messageId);
807    
808                            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
809                                            "getMessage", new Object[] { paramObj0 });
810    
811                            Object returnObj = null;
812    
813                            try {
814                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
815                            }
816                            catch (Exception e) {
817                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
818                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
819                                    }
820    
821                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
822                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
823                                    }
824    
825                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
826                            }
827    
828                            return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
829                    }
830                    catch (com.liferay.portal.kernel.exception.SystemException se) {
831                            _log.error(se, se);
832    
833                            throw se;
834                    }
835            }
836    
837            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
838                    HttpPrincipal httpPrincipal, long messageId, int status,
839                    java.lang.String threadView, boolean includePrevAndNext)
840                    throws com.liferay.portal.kernel.exception.PortalException,
841                            com.liferay.portal.kernel.exception.SystemException {
842                    try {
843                            Object paramObj0 = new LongWrapper(messageId);
844    
845                            Object paramObj1 = new IntegerWrapper(status);
846    
847                            Object paramObj2 = threadView;
848    
849                            if (threadView == null) {
850                                    paramObj2 = new NullWrapper("java.lang.String");
851                            }
852    
853                            Object paramObj3 = new BooleanWrapper(includePrevAndNext);
854    
855                            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
856                                            "getMessageDisplay",
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.kernel.exception.PortalException) {
866                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
867                                    }
868    
869                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
870                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
871                                    }
872    
873                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
874                            }
875    
876                            return (com.liferay.portlet.messageboards.model.MBMessageDisplay)returnObj;
877                    }
878                    catch (com.liferay.portal.kernel.exception.SystemException se) {
879                            _log.error(se, se);
880    
881                            throw se;
882                    }
883            }
884    
885            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
886                    HttpPrincipal httpPrincipal, long groupId, long categoryId,
887                    long threadId, int status, int start, int end)
888                    throws com.liferay.portal.kernel.exception.SystemException {
889                    try {
890                            Object paramObj0 = new LongWrapper(groupId);
891    
892                            Object paramObj1 = new LongWrapper(categoryId);
893    
894                            Object paramObj2 = new LongWrapper(threadId);
895    
896                            Object paramObj3 = new IntegerWrapper(status);
897    
898                            Object paramObj4 = new IntegerWrapper(start);
899    
900                            Object paramObj5 = new IntegerWrapper(end);
901    
902                            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
903                                            "getThreadMessages",
904                                            new Object[] {
905                                                    paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
906                                                    paramObj5
907                                            });
908    
909                            Object returnObj = null;
910    
911                            try {
912                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
913                            }
914                            catch (Exception e) {
915                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
916                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
917                                    }
918    
919                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
920                            }
921    
922                            return (java.util.List<com.liferay.portlet.messageboards.model.MBMessage>)returnObj;
923                    }
924                    catch (com.liferay.portal.kernel.exception.SystemException se) {
925                            _log.error(se, se);
926    
927                            throw se;
928                    }
929            }
930    
931            public static int getThreadMessagesCount(HttpPrincipal httpPrincipal,
932                    long groupId, long categoryId, long threadId, int status)
933                    throws com.liferay.portal.kernel.exception.SystemException {
934                    try {
935                            Object paramObj0 = new LongWrapper(groupId);
936    
937                            Object paramObj1 = new LongWrapper(categoryId);
938    
939                            Object paramObj2 = new LongWrapper(threadId);
940    
941                            Object paramObj3 = new IntegerWrapper(status);
942    
943                            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
944                                            "getThreadMessagesCount",
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.kernel.exception.SystemException) {
954                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
955                                    }
956    
957                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
958                            }
959    
960                            return ((Integer)returnObj).intValue();
961                    }
962                    catch (com.liferay.portal.kernel.exception.SystemException se) {
963                            _log.error(se, se);
964    
965                            throw se;
966                    }
967            }
968    
969            public static java.lang.String getThreadMessagesRSS(
970                    HttpPrincipal httpPrincipal, long threadId, int status, int max,
971                    java.lang.String type, double version, java.lang.String displayStyle,
972                    java.lang.String feedURL, java.lang.String entryURL,
973                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
974                    throws com.liferay.portal.kernel.exception.PortalException,
975                            com.liferay.portal.kernel.exception.SystemException {
976                    try {
977                            Object paramObj0 = new LongWrapper(threadId);
978    
979                            Object paramObj1 = new IntegerWrapper(status);
980    
981                            Object paramObj2 = new IntegerWrapper(max);
982    
983                            Object paramObj3 = type;
984    
985                            if (type == null) {
986                                    paramObj3 = new NullWrapper("java.lang.String");
987                            }
988    
989                            Object paramObj4 = new DoubleWrapper(version);
990    
991                            Object paramObj5 = displayStyle;
992    
993                            if (displayStyle == null) {
994                                    paramObj5 = new NullWrapper("java.lang.String");
995                            }
996    
997                            Object paramObj6 = feedURL;
998    
999                            if (feedURL == null) {
1000                                    paramObj6 = new NullWrapper("java.lang.String");
1001                            }
1002    
1003                            Object paramObj7 = entryURL;
1004    
1005                            if (entryURL == null) {
1006                                    paramObj7 = new NullWrapper("java.lang.String");
1007                            }
1008    
1009                            Object paramObj8 = themeDisplay;
1010    
1011                            if (themeDisplay == null) {
1012                                    paramObj8 = new NullWrapper(
1013                                                    "com.liferay.portal.theme.ThemeDisplay");
1014                            }
1015    
1016                            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
1017                                            "getThreadMessagesRSS",
1018                                            new Object[] {
1019                                                    paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1020                                                    paramObj5, paramObj6, paramObj7, paramObj8
1021                                            });
1022    
1023                            Object returnObj = null;
1024    
1025                            try {
1026                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1027                            }
1028                            catch (Exception e) {
1029                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1030                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1031                                    }
1032    
1033                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1034                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1035                                    }
1036    
1037                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1038                            }
1039    
1040                            return (java.lang.String)returnObj;
1041                    }
1042                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1043                            _log.error(se, se);
1044    
1045                            throw se;
1046                    }
1047            }
1048    
1049            public static void subscribeMessage(HttpPrincipal httpPrincipal,
1050                    long messageId)
1051                    throws com.liferay.portal.kernel.exception.PortalException,
1052                            com.liferay.portal.kernel.exception.SystemException {
1053                    try {
1054                            Object paramObj0 = new LongWrapper(messageId);
1055    
1056                            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
1057                                            "subscribeMessage", new Object[] { paramObj0 });
1058    
1059                            try {
1060                                    TunnelUtil.invoke(httpPrincipal, methodWrapper);
1061                            }
1062                            catch (Exception e) {
1063                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1064                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1065                                    }
1066    
1067                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1068                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1069                                    }
1070    
1071                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1072                            }
1073                    }
1074                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1075                            _log.error(se, se);
1076    
1077                            throw se;
1078                    }
1079            }
1080    
1081            public static void unsubscribeMessage(HttpPrincipal httpPrincipal,
1082                    long messageId)
1083                    throws com.liferay.portal.kernel.exception.PortalException,
1084                            com.liferay.portal.kernel.exception.SystemException {
1085                    try {
1086                            Object paramObj0 = new LongWrapper(messageId);
1087    
1088                            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
1089                                            "unsubscribeMessage", new Object[] { paramObj0 });
1090    
1091                            try {
1092                                    TunnelUtil.invoke(httpPrincipal, methodWrapper);
1093                            }
1094                            catch (Exception e) {
1095                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1096                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1097                                    }
1098    
1099                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1100                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1101                                    }
1102    
1103                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1104                            }
1105                    }
1106                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1107                            _log.error(se, se);
1108    
1109                            throw se;
1110                    }
1111            }
1112    
1113            public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
1114                    HttpPrincipal httpPrincipal, java.lang.String className, long classPK,
1115                    java.lang.String permissionClassName, long permissionClassPK,
1116                    long messageId, java.lang.String subject, java.lang.String body,
1117                    com.liferay.portal.service.ServiceContext serviceContext)
1118                    throws com.liferay.portal.kernel.exception.PortalException,
1119                            com.liferay.portal.kernel.exception.SystemException {
1120                    try {
1121                            Object paramObj0 = className;
1122    
1123                            if (className == null) {
1124                                    paramObj0 = new NullWrapper("java.lang.String");
1125                            }
1126    
1127                            Object paramObj1 = new LongWrapper(classPK);
1128    
1129                            Object paramObj2 = permissionClassName;
1130    
1131                            if (permissionClassName == null) {
1132                                    paramObj2 = new NullWrapper("java.lang.String");
1133                            }
1134    
1135                            Object paramObj3 = new LongWrapper(permissionClassPK);
1136    
1137                            Object paramObj4 = new LongWrapper(messageId);
1138    
1139                            Object paramObj5 = subject;
1140    
1141                            if (subject == null) {
1142                                    paramObj5 = new NullWrapper("java.lang.String");
1143                            }
1144    
1145                            Object paramObj6 = body;
1146    
1147                            if (body == null) {
1148                                    paramObj6 = new NullWrapper("java.lang.String");
1149                            }
1150    
1151                            Object paramObj7 = serviceContext;
1152    
1153                            if (serviceContext == null) {
1154                                    paramObj7 = new NullWrapper(
1155                                                    "com.liferay.portal.service.ServiceContext");
1156                            }
1157    
1158                            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
1159                                            "updateDiscussionMessage",
1160                                            new Object[] {
1161                                                    paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1162                                                    paramObj5, paramObj6, paramObj7
1163                                            });
1164    
1165                            Object returnObj = null;
1166    
1167                            try {
1168                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1169                            }
1170                            catch (Exception e) {
1171                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1172                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1173                                    }
1174    
1175                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1176                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1177                                    }
1178    
1179                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1180                            }
1181    
1182                            return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
1183                    }
1184                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1185                            _log.error(se, se);
1186    
1187                            throw se;
1188                    }
1189            }
1190    
1191            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
1192                    HttpPrincipal httpPrincipal, long messageId, java.lang.String subject,
1193                    java.lang.String body,
1194                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
1195                    java.util.List<java.lang.String> existingFiles, double priority,
1196                    boolean allowPingbacks,
1197                    com.liferay.portal.service.ServiceContext serviceContext)
1198                    throws com.liferay.portal.kernel.exception.PortalException,
1199                            com.liferay.portal.kernel.exception.SystemException {
1200                    try {
1201                            Object paramObj0 = new LongWrapper(messageId);
1202    
1203                            Object paramObj1 = subject;
1204    
1205                            if (subject == null) {
1206                                    paramObj1 = new NullWrapper("java.lang.String");
1207                            }
1208    
1209                            Object paramObj2 = body;
1210    
1211                            if (body == null) {
1212                                    paramObj2 = new NullWrapper("java.lang.String");
1213                            }
1214    
1215                            Object paramObj3 = files;
1216    
1217                            if (files == null) {
1218                                    paramObj3 = new NullWrapper("java.util.List");
1219                            }
1220    
1221                            Object paramObj4 = existingFiles;
1222    
1223                            if (existingFiles == null) {
1224                                    paramObj4 = new NullWrapper("java.util.List");
1225                            }
1226    
1227                            Object paramObj5 = new DoubleWrapper(priority);
1228    
1229                            Object paramObj6 = new BooleanWrapper(allowPingbacks);
1230    
1231                            Object paramObj7 = serviceContext;
1232    
1233                            if (serviceContext == null) {
1234                                    paramObj7 = new NullWrapper(
1235                                                    "com.liferay.portal.service.ServiceContext");
1236                            }
1237    
1238                            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
1239                                            "updateMessage",
1240                                            new Object[] {
1241                                                    paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1242                                                    paramObj5, paramObj6, paramObj7
1243                                            });
1244    
1245                            Object returnObj = null;
1246    
1247                            try {
1248                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1249                            }
1250                            catch (Exception e) {
1251                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1252                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1253                                    }
1254    
1255                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1256                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1257                                    }
1258    
1259                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1260                            }
1261    
1262                            return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
1263                    }
1264                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1265                            _log.error(se, se);
1266    
1267                            throw se;
1268                    }
1269            }
1270    
1271            private static Log _log = LogFactoryUtil.getLog(MBMessageServiceHttp.class);
1272    }