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