001    /**
002     * Copyright (c) 2000-2013 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.MethodHandler;
020    import com.liferay.portal.kernel.util.MethodKey;
021    import com.liferay.portal.security.auth.HttpPrincipal;
022    import com.liferay.portal.service.http.TunnelUtil;
023    
024    import com.liferay.portlet.messageboards.service.MBThreadServiceUtil;
025    
026    /**
027     * Provides the HTTP utility for the
028     * {@link com.liferay.portlet.messageboards.service.MBThreadServiceUtil} service utility. The
029     * static methods of this class calls the same methods of the service utility.
030     * However, the signatures are different because it requires an additional
031     * {@link com.liferay.portal.security.auth.HttpPrincipal} parameter.
032     *
033     * <p>
034     * The benefits of using the HTTP utility is that it is fast and allows for
035     * tunneling without the cost of serializing to text. The drawback is that it
036     * only works with Java.
037     * </p>
038     *
039     * <p>
040     * Set the property <b>tunnel.servlet.hosts.allowed</b> in portal.properties to
041     * configure security.
042     * </p>
043     *
044     * <p>
045     * The HTTP utility is only generated for remote services.
046     * </p>
047     *
048     * @author Brian Wing Shun Chan
049     * @see MBThreadServiceSoap
050     * @see com.liferay.portal.security.auth.HttpPrincipal
051     * @see com.liferay.portlet.messageboards.service.MBThreadServiceUtil
052     * @generated
053     */
054    public class MBThreadServiceHttp {
055            public static void deleteThread(HttpPrincipal httpPrincipal, long threadId)
056                    throws com.liferay.portal.kernel.exception.PortalException,
057                            com.liferay.portal.kernel.exception.SystemException {
058                    try {
059                            MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
060                                            "deleteThread", _deleteThreadParameterTypes0);
061    
062                            MethodHandler methodHandler = new MethodHandler(methodKey, threadId);
063    
064                            try {
065                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
066                            }
067                            catch (Exception e) {
068                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
069                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
070                                    }
071    
072                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
073                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
074                                    }
075    
076                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
077                            }
078                    }
079                    catch (com.liferay.portal.kernel.exception.SystemException se) {
080                            _log.error(se, se);
081    
082                            throw se;
083                    }
084            }
085    
086            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
087                    HttpPrincipal httpPrincipal, long groupId, long userId,
088                    java.util.Date modifiedDate, int status, int start, int end)
089                    throws com.liferay.portal.kernel.exception.PortalException,
090                            com.liferay.portal.kernel.exception.SystemException {
091                    try {
092                            MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
093                                            "getGroupThreads", _getGroupThreadsParameterTypes1);
094    
095                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
096                                            userId, modifiedDate, status, start, end);
097    
098                            Object returnObj = null;
099    
100                            try {
101                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
102                            }
103                            catch (Exception e) {
104                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
105                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
106                                    }
107    
108                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
109                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
110                                    }
111    
112                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
113                            }
114    
115                            return (java.util.List<com.liferay.portlet.messageboards.model.MBThread>)returnObj;
116                    }
117                    catch (com.liferay.portal.kernel.exception.SystemException se) {
118                            _log.error(se, se);
119    
120                            throw se;
121                    }
122            }
123    
124            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
125                    HttpPrincipal httpPrincipal, long groupId, long userId, int status,
126                    boolean subscribed, boolean includeAnonymous, int start, int end)
127                    throws com.liferay.portal.kernel.exception.PortalException,
128                            com.liferay.portal.kernel.exception.SystemException {
129                    try {
130                            MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
131                                            "getGroupThreads", _getGroupThreadsParameterTypes2);
132    
133                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
134                                            userId, status, subscribed, includeAnonymous, start, end);
135    
136                            Object returnObj = null;
137    
138                            try {
139                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
140                            }
141                            catch (Exception e) {
142                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
143                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
144                                    }
145    
146                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
147                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
148                                    }
149    
150                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
151                            }
152    
153                            return (java.util.List<com.liferay.portlet.messageboards.model.MBThread>)returnObj;
154                    }
155                    catch (com.liferay.portal.kernel.exception.SystemException se) {
156                            _log.error(se, se);
157    
158                            throw se;
159                    }
160            }
161    
162            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
163                    HttpPrincipal httpPrincipal, long groupId, long userId, int status,
164                    boolean subscribed, int start, int end)
165                    throws com.liferay.portal.kernel.exception.PortalException,
166                            com.liferay.portal.kernel.exception.SystemException {
167                    try {
168                            MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
169                                            "getGroupThreads", _getGroupThreadsParameterTypes3);
170    
171                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
172                                            userId, status, subscribed, start, end);
173    
174                            Object returnObj = null;
175    
176                            try {
177                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
178                            }
179                            catch (Exception e) {
180                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
181                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
182                                    }
183    
184                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
185                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
186                                    }
187    
188                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
189                            }
190    
191                            return (java.util.List<com.liferay.portlet.messageboards.model.MBThread>)returnObj;
192                    }
193                    catch (com.liferay.portal.kernel.exception.SystemException se) {
194                            _log.error(se, se);
195    
196                            throw se;
197                    }
198            }
199    
200            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
201                    HttpPrincipal httpPrincipal, long groupId, long userId, int status,
202                    int start, int end)
203                    throws com.liferay.portal.kernel.exception.PortalException,
204                            com.liferay.portal.kernel.exception.SystemException {
205                    try {
206                            MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
207                                            "getGroupThreads", _getGroupThreadsParameterTypes4);
208    
209                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
210                                            userId, status, start, end);
211    
212                            Object returnObj = null;
213    
214                            try {
215                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
216                            }
217                            catch (Exception e) {
218                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
219                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
220                                    }
221    
222                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
223                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
224                                    }
225    
226                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
227                            }
228    
229                            return (java.util.List<com.liferay.portlet.messageboards.model.MBThread>)returnObj;
230                    }
231                    catch (com.liferay.portal.kernel.exception.SystemException se) {
232                            _log.error(se, se);
233    
234                            throw se;
235                    }
236            }
237    
238            public static int getGroupThreadsCount(HttpPrincipal httpPrincipal,
239                    long groupId, long userId, java.util.Date modifiedDate, int status)
240                    throws com.liferay.portal.kernel.exception.SystemException {
241                    try {
242                            MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
243                                            "getGroupThreadsCount", _getGroupThreadsCountParameterTypes5);
244    
245                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
246                                            userId, modifiedDate, status);
247    
248                            Object returnObj = null;
249    
250                            try {
251                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
252                            }
253                            catch (Exception e) {
254                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
255                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
256                                    }
257    
258                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
259                            }
260    
261                            return ((Integer)returnObj).intValue();
262                    }
263                    catch (com.liferay.portal.kernel.exception.SystemException se) {
264                            _log.error(se, se);
265    
266                            throw se;
267                    }
268            }
269    
270            public static int getGroupThreadsCount(HttpPrincipal httpPrincipal,
271                    long groupId, long userId, int status)
272                    throws com.liferay.portal.kernel.exception.SystemException {
273                    try {
274                            MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
275                                            "getGroupThreadsCount", _getGroupThreadsCountParameterTypes6);
276    
277                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
278                                            userId, status);
279    
280                            Object returnObj = null;
281    
282                            try {
283                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
284                            }
285                            catch (Exception e) {
286                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
287                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
288                                    }
289    
290                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
291                            }
292    
293                            return ((Integer)returnObj).intValue();
294                    }
295                    catch (com.liferay.portal.kernel.exception.SystemException se) {
296                            _log.error(se, se);
297    
298                            throw se;
299                    }
300            }
301    
302            public static int getGroupThreadsCount(HttpPrincipal httpPrincipal,
303                    long groupId, long userId, int status, boolean subscribed)
304                    throws com.liferay.portal.kernel.exception.SystemException {
305                    try {
306                            MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
307                                            "getGroupThreadsCount", _getGroupThreadsCountParameterTypes7);
308    
309                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
310                                            userId, status, subscribed);
311    
312                            Object returnObj = null;
313    
314                            try {
315                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
316                            }
317                            catch (Exception e) {
318                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
319                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
320                                    }
321    
322                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
323                            }
324    
325                            return ((Integer)returnObj).intValue();
326                    }
327                    catch (com.liferay.portal.kernel.exception.SystemException se) {
328                            _log.error(se, se);
329    
330                            throw se;
331                    }
332            }
333    
334            public static int getGroupThreadsCount(HttpPrincipal httpPrincipal,
335                    long groupId, long userId, int status, boolean subscribed,
336                    boolean includeAnonymous)
337                    throws com.liferay.portal.kernel.exception.SystemException {
338                    try {
339                            MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
340                                            "getGroupThreadsCount", _getGroupThreadsCountParameterTypes8);
341    
342                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
343                                            userId, status, subscribed, includeAnonymous);
344    
345                            Object returnObj = null;
346    
347                            try {
348                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
349                            }
350                            catch (Exception e) {
351                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
352                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
353                                    }
354    
355                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
356                            }
357    
358                            return ((Integer)returnObj).intValue();
359                    }
360                    catch (com.liferay.portal.kernel.exception.SystemException se) {
361                            _log.error(se, se);
362    
363                            throw se;
364                    }
365            }
366    
367            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getThreads(
368                    HttpPrincipal httpPrincipal, long groupId, long categoryId, int status,
369                    int start, int end)
370                    throws com.liferay.portal.kernel.exception.SystemException {
371                    try {
372                            MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
373                                            "getThreads", _getThreadsParameterTypes9);
374    
375                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
376                                            categoryId, status, start, end);
377    
378                            Object returnObj = null;
379    
380                            try {
381                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
382                            }
383                            catch (Exception e) {
384                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
385                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
386                                    }
387    
388                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
389                            }
390    
391                            return (java.util.List<com.liferay.portlet.messageboards.model.MBThread>)returnObj;
392                    }
393                    catch (com.liferay.portal.kernel.exception.SystemException se) {
394                            _log.error(se, se);
395    
396                            throw se;
397                    }
398            }
399    
400            public static int getThreadsCount(HttpPrincipal httpPrincipal,
401                    long groupId, long categoryId, int status)
402                    throws com.liferay.portal.kernel.exception.SystemException {
403                    try {
404                            MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
405                                            "getThreadsCount", _getThreadsCountParameterTypes10);
406    
407                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
408                                            categoryId, status);
409    
410                            Object returnObj = null;
411    
412                            try {
413                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
414                            }
415                            catch (Exception e) {
416                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
417                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
418                                    }
419    
420                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
421                            }
422    
423                            return ((Integer)returnObj).intValue();
424                    }
425                    catch (com.liferay.portal.kernel.exception.SystemException se) {
426                            _log.error(se, se);
427    
428                            throw se;
429                    }
430            }
431    
432            public static com.liferay.portal.model.Lock lockThread(
433                    HttpPrincipal httpPrincipal, long threadId)
434                    throws com.liferay.portal.kernel.exception.PortalException,
435                            com.liferay.portal.kernel.exception.SystemException {
436                    try {
437                            MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
438                                            "lockThread", _lockThreadParameterTypes11);
439    
440                            MethodHandler methodHandler = new MethodHandler(methodKey, threadId);
441    
442                            Object returnObj = null;
443    
444                            try {
445                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
446                            }
447                            catch (Exception e) {
448                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
449                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
450                                    }
451    
452                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
453                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
454                                    }
455    
456                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
457                            }
458    
459                            return (com.liferay.portal.model.Lock)returnObj;
460                    }
461                    catch (com.liferay.portal.kernel.exception.SystemException se) {
462                            _log.error(se, se);
463    
464                            throw se;
465                    }
466            }
467    
468            public static com.liferay.portlet.messageboards.model.MBThread moveThread(
469                    HttpPrincipal httpPrincipal, long categoryId, long threadId)
470                    throws com.liferay.portal.kernel.exception.PortalException,
471                            com.liferay.portal.kernel.exception.SystemException {
472                    try {
473                            MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
474                                            "moveThread", _moveThreadParameterTypes12);
475    
476                            MethodHandler methodHandler = new MethodHandler(methodKey,
477                                            categoryId, threadId);
478    
479                            Object returnObj = null;
480    
481                            try {
482                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
483                            }
484                            catch (Exception e) {
485                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
486                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
487                                    }
488    
489                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
490                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
491                                    }
492    
493                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
494                            }
495    
496                            return (com.liferay.portlet.messageboards.model.MBThread)returnObj;
497                    }
498                    catch (com.liferay.portal.kernel.exception.SystemException se) {
499                            _log.error(se, se);
500    
501                            throw se;
502                    }
503            }
504    
505            public static com.liferay.portlet.messageboards.model.MBThread moveThreadFromTrash(
506                    HttpPrincipal httpPrincipal, long categoryId, long threadId)
507                    throws com.liferay.portal.kernel.exception.PortalException,
508                            com.liferay.portal.kernel.exception.SystemException {
509                    try {
510                            MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
511                                            "moveThreadFromTrash", _moveThreadFromTrashParameterTypes13);
512    
513                            MethodHandler methodHandler = new MethodHandler(methodKey,
514                                            categoryId, threadId);
515    
516                            Object returnObj = null;
517    
518                            try {
519                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
520                            }
521                            catch (Exception e) {
522                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
523                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
524                                    }
525    
526                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
527                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
528                                    }
529    
530                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
531                            }
532    
533                            return (com.liferay.portlet.messageboards.model.MBThread)returnObj;
534                    }
535                    catch (com.liferay.portal.kernel.exception.SystemException se) {
536                            _log.error(se, se);
537    
538                            throw se;
539                    }
540            }
541    
542            public static com.liferay.portlet.messageboards.model.MBThread moveThreadToTrash(
543                    HttpPrincipal httpPrincipal, long threadId)
544                    throws com.liferay.portal.kernel.exception.PortalException,
545                            com.liferay.portal.kernel.exception.SystemException {
546                    try {
547                            MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
548                                            "moveThreadToTrash", _moveThreadToTrashParameterTypes14);
549    
550                            MethodHandler methodHandler = new MethodHandler(methodKey, threadId);
551    
552                            Object returnObj = null;
553    
554                            try {
555                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
556                            }
557                            catch (Exception e) {
558                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
559                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
560                                    }
561    
562                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
563                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
564                                    }
565    
566                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
567                            }
568    
569                            return (com.liferay.portlet.messageboards.model.MBThread)returnObj;
570                    }
571                    catch (com.liferay.portal.kernel.exception.SystemException se) {
572                            _log.error(se, se);
573    
574                            throw se;
575                    }
576            }
577    
578            public static void restoreThreadFromTrash(HttpPrincipal httpPrincipal,
579                    long threadId)
580                    throws com.liferay.portal.kernel.exception.PortalException,
581                            com.liferay.portal.kernel.exception.SystemException {
582                    try {
583                            MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
584                                            "restoreThreadFromTrash",
585                                            _restoreThreadFromTrashParameterTypes15);
586    
587                            MethodHandler methodHandler = new MethodHandler(methodKey, threadId);
588    
589                            try {
590                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
591                            }
592                            catch (Exception e) {
593                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
594                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
595                                    }
596    
597                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
598                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
599                                    }
600    
601                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
602                            }
603                    }
604                    catch (com.liferay.portal.kernel.exception.SystemException se) {
605                            _log.error(se, se);
606    
607                            throw se;
608                    }
609            }
610    
611            public static com.liferay.portal.kernel.search.Hits search(
612                    HttpPrincipal httpPrincipal, long groupId, long creatorUserId,
613                    int status, int start, int end)
614                    throws com.liferay.portal.kernel.exception.PortalException,
615                            com.liferay.portal.kernel.exception.SystemException {
616                    try {
617                            MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
618                                            "search", _searchParameterTypes16);
619    
620                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
621                                            creatorUserId, status, start, end);
622    
623                            Object returnObj = null;
624    
625                            try {
626                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
627                            }
628                            catch (Exception e) {
629                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
630                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
631                                    }
632    
633                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
634                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
635                                    }
636    
637                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
638                            }
639    
640                            return (com.liferay.portal.kernel.search.Hits)returnObj;
641                    }
642                    catch (com.liferay.portal.kernel.exception.SystemException se) {
643                            _log.error(se, se);
644    
645                            throw se;
646                    }
647            }
648    
649            public static com.liferay.portal.kernel.search.Hits search(
650                    HttpPrincipal httpPrincipal, long groupId, long creatorUserId,
651                    long startDate, long endDate, int status, int start, int end)
652                    throws com.liferay.portal.kernel.exception.PortalException,
653                            com.liferay.portal.kernel.exception.SystemException {
654                    try {
655                            MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
656                                            "search", _searchParameterTypes17);
657    
658                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
659                                            creatorUserId, startDate, endDate, status, start, end);
660    
661                            Object returnObj = null;
662    
663                            try {
664                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
665                            }
666                            catch (Exception e) {
667                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
668                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
669                                    }
670    
671                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
672                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
673                                    }
674    
675                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
676                            }
677    
678                            return (com.liferay.portal.kernel.search.Hits)returnObj;
679                    }
680                    catch (com.liferay.portal.kernel.exception.SystemException se) {
681                            _log.error(se, se);
682    
683                            throw se;
684                    }
685            }
686    
687            public static com.liferay.portlet.messageboards.model.MBThread splitThread(
688                    HttpPrincipal httpPrincipal, long messageId, java.lang.String subject,
689                    com.liferay.portal.service.ServiceContext serviceContext)
690                    throws com.liferay.portal.kernel.exception.PortalException,
691                            com.liferay.portal.kernel.exception.SystemException {
692                    try {
693                            MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
694                                            "splitThread", _splitThreadParameterTypes18);
695    
696                            MethodHandler methodHandler = new MethodHandler(methodKey,
697                                            messageId, subject, serviceContext);
698    
699                            Object returnObj = null;
700    
701                            try {
702                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
703                            }
704                            catch (Exception e) {
705                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
706                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
707                                    }
708    
709                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
710                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
711                                    }
712    
713                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
714                            }
715    
716                            return (com.liferay.portlet.messageboards.model.MBThread)returnObj;
717                    }
718                    catch (com.liferay.portal.kernel.exception.SystemException se) {
719                            _log.error(se, se);
720    
721                            throw se;
722                    }
723            }
724    
725            public static void unlockThread(HttpPrincipal httpPrincipal, long threadId)
726                    throws com.liferay.portal.kernel.exception.PortalException,
727                            com.liferay.portal.kernel.exception.SystemException {
728                    try {
729                            MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
730                                            "unlockThread", _unlockThreadParameterTypes19);
731    
732                            MethodHandler methodHandler = new MethodHandler(methodKey, threadId);
733    
734                            try {
735                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
736                            }
737                            catch (Exception e) {
738                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
739                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
740                                    }
741    
742                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
743                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
744                                    }
745    
746                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
747                            }
748                    }
749                    catch (com.liferay.portal.kernel.exception.SystemException se) {
750                            _log.error(se, se);
751    
752                            throw se;
753                    }
754            }
755    
756            private static Log _log = LogFactoryUtil.getLog(MBThreadServiceHttp.class);
757            private static final Class<?>[] _deleteThreadParameterTypes0 = new Class[] {
758                            long.class
759                    };
760            private static final Class<?>[] _getGroupThreadsParameterTypes1 = new Class[] {
761                            long.class, long.class, java.util.Date.class, int.class, int.class,
762                            int.class
763                    };
764            private static final Class<?>[] _getGroupThreadsParameterTypes2 = new Class[] {
765                            long.class, long.class, int.class, boolean.class, boolean.class,
766                            int.class, int.class
767                    };
768            private static final Class<?>[] _getGroupThreadsParameterTypes3 = new Class[] {
769                            long.class, long.class, int.class, boolean.class, int.class,
770                            int.class
771                    };
772            private static final Class<?>[] _getGroupThreadsParameterTypes4 = new Class[] {
773                            long.class, long.class, int.class, int.class, int.class
774                    };
775            private static final Class<?>[] _getGroupThreadsCountParameterTypes5 = new Class[] {
776                            long.class, long.class, java.util.Date.class, int.class
777                    };
778            private static final Class<?>[] _getGroupThreadsCountParameterTypes6 = new Class[] {
779                            long.class, long.class, int.class
780                    };
781            private static final Class<?>[] _getGroupThreadsCountParameterTypes7 = new Class[] {
782                            long.class, long.class, int.class, boolean.class
783                    };
784            private static final Class<?>[] _getGroupThreadsCountParameterTypes8 = new Class[] {
785                            long.class, long.class, int.class, boolean.class, boolean.class
786                    };
787            private static final Class<?>[] _getThreadsParameterTypes9 = new Class[] {
788                            long.class, long.class, int.class, int.class, int.class
789                    };
790            private static final Class<?>[] _getThreadsCountParameterTypes10 = new Class[] {
791                            long.class, long.class, int.class
792                    };
793            private static final Class<?>[] _lockThreadParameterTypes11 = new Class[] {
794                            long.class
795                    };
796            private static final Class<?>[] _moveThreadParameterTypes12 = new Class[] {
797                            long.class, long.class
798                    };
799            private static final Class<?>[] _moveThreadFromTrashParameterTypes13 = new Class[] {
800                            long.class, long.class
801                    };
802            private static final Class<?>[] _moveThreadToTrashParameterTypes14 = new Class[] {
803                            long.class
804                    };
805            private static final Class<?>[] _restoreThreadFromTrashParameterTypes15 = new Class[] {
806                            long.class
807                    };
808            private static final Class<?>[] _searchParameterTypes16 = new Class[] {
809                            long.class, long.class, int.class, int.class, int.class
810                    };
811            private static final Class<?>[] _searchParameterTypes17 = new Class[] {
812                            long.class, long.class, long.class, long.class, int.class, int.class,
813                            int.class
814                    };
815            private static final Class<?>[] _splitThreadParameterTypes18 = new Class[] {
816                            long.class, java.lang.String.class,
817                            com.liferay.portal.service.ServiceContext.class
818                    };
819            private static final Class<?>[] _unlockThreadParameterTypes19 = new Class[] {
820                            long.class
821                    };
822    }