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    
020    import com.liferay.portlet.calendar.service.CalEventServiceUtil;
021    
022    import java.rmi.RemoteException;
023    
024    /**
025     * <p>
026     * This class provides a SOAP utility for the
027     * {@link com.liferay.portlet.calendar.service.CalEventServiceUtil} service utility. The
028     * static methods of this class calls the same methods of the service utility.
029     * However, the signatures are different because it is difficult for SOAP to
030     * support certain types.
031     * </p>
032     *
033     * <p>
034     * ServiceBuilder follows certain rules in translating the methods. For example,
035     * if the method in the service utility returns a {@link java.util.List}, that
036     * is translated to an array of {@link com.liferay.portlet.calendar.model.CalEventSoap}.
037     * If the method in the service utility returns a
038     * {@link com.liferay.portlet.calendar.model.CalEvent}, that is translated to a
039     * {@link com.liferay.portlet.calendar.model.CalEventSoap}. Methods that SOAP cannot
040     * safely wire are skipped.
041     * </p>
042     *
043     * <p>
044     * The benefits of using the SOAP utility is that it is cross platform
045     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
046     * even Perl, to call the generated services. One drawback of SOAP is that it is
047     * slow because it needs to serialize all calls into a text format (XML).
048     * </p>
049     *
050     * <p>
051     * You can see a list of services at http://localhost:8080/api/axis. Set the
052     * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
053     * security.
054     * </p>
055     *
056     * <p>
057     * The SOAP utility is only generated for remote services.
058     * </p>
059     *
060     * @author    Brian Wing Shun Chan
061     * @see       CalEventServiceHttp
062     * @see       com.liferay.portlet.calendar.model.CalEventSoap
063     * @see       com.liferay.portlet.calendar.service.CalEventServiceUtil
064     * @generated
065     */
066    public class CalEventServiceSoap {
067            public static com.liferay.portlet.calendar.model.CalEventSoap addEvent(
068                    java.lang.String title, java.lang.String description,
069                    java.lang.String location, int startDateMonth, int startDateDay,
070                    int startDateYear, int startDateHour, int startDateMinute,
071                    int durationHour, int durationMinute, boolean allDay,
072                    boolean timeZoneSensitive, java.lang.String type, boolean repeating,
073                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
074                    int firstReminder, int secondReminder,
075                    com.liferay.portal.service.ServiceContext serviceContext)
076                    throws RemoteException {
077                    try {
078                            com.liferay.portlet.calendar.model.CalEvent returnValue = CalEventServiceUtil.addEvent(title,
079                                            description, location, startDateMonth, startDateDay,
080                                            startDateYear, startDateHour, startDateMinute,
081                                            durationHour, durationMinute, allDay, timeZoneSensitive,
082                                            type, repeating, recurrence, remindBy, firstReminder,
083                                            secondReminder, serviceContext);
084    
085                            return com.liferay.portlet.calendar.model.CalEventSoap.toSoapModel(returnValue);
086                    }
087                    catch (Exception e) {
088                            _log.error(e, e);
089    
090                            throw new RemoteException(e.getMessage());
091                    }
092            }
093    
094            /**
095            * @deprecated As of 6.2.0, replaced by {@link #addEvent(String, String,
096            String, int, int, int, int, int, int, int, boolean, boolean,
097            String, boolean, TZSRecurrence, int, int, int,
098            ServiceContext)}
099            */
100            public static com.liferay.portlet.calendar.model.CalEventSoap addEvent(
101                    java.lang.String title, java.lang.String description,
102                    java.lang.String location, int startDateMonth, int startDateDay,
103                    int startDateYear, int startDateHour, int startDateMinute,
104                    int endDateMonth, int endDateDay, int endDateYear, int durationHour,
105                    int durationMinute, boolean allDay, boolean timeZoneSensitive,
106                    java.lang.String type, boolean repeating,
107                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
108                    int firstReminder, int secondReminder,
109                    com.liferay.portal.service.ServiceContext serviceContext)
110                    throws RemoteException {
111                    try {
112                            com.liferay.portlet.calendar.model.CalEvent returnValue = CalEventServiceUtil.addEvent(title,
113                                            description, location, startDateMonth, startDateDay,
114                                            startDateYear, startDateHour, startDateMinute,
115                                            endDateMonth, endDateDay, endDateYear, durationHour,
116                                            durationMinute, allDay, timeZoneSensitive, type, repeating,
117                                            recurrence, remindBy, firstReminder, secondReminder,
118                                            serviceContext);
119    
120                            return com.liferay.portlet.calendar.model.CalEventSoap.toSoapModel(returnValue);
121                    }
122                    catch (Exception e) {
123                            _log.error(e, e);
124    
125                            throw new RemoteException(e.getMessage());
126                    }
127            }
128    
129            public static void deleteEvent(long eventId) throws RemoteException {
130                    try {
131                            CalEventServiceUtil.deleteEvent(eventId);
132                    }
133                    catch (Exception e) {
134                            _log.error(e, e);
135    
136                            throw new RemoteException(e.getMessage());
137                    }
138            }
139    
140            public static com.liferay.portlet.calendar.model.CalEventSoap getEvent(
141                    long eventId) throws RemoteException {
142                    try {
143                            com.liferay.portlet.calendar.model.CalEvent returnValue = CalEventServiceUtil.getEvent(eventId);
144    
145                            return com.liferay.portlet.calendar.model.CalEventSoap.toSoapModel(returnValue);
146                    }
147                    catch (Exception e) {
148                            _log.error(e, e);
149    
150                            throw new RemoteException(e.getMessage());
151                    }
152            }
153    
154            public static com.liferay.portlet.calendar.model.CalEventSoap[] getEvents(
155                    long groupId, java.util.Calendar cal, java.lang.String type)
156                    throws RemoteException {
157                    try {
158                            java.util.List<com.liferay.portlet.calendar.model.CalEvent> returnValue =
159                                    CalEventServiceUtil.getEvents(groupId, cal, type);
160    
161                            return com.liferay.portlet.calendar.model.CalEventSoap.toSoapModels(returnValue);
162                    }
163                    catch (Exception e) {
164                            _log.error(e, e);
165    
166                            throw new RemoteException(e.getMessage());
167                    }
168            }
169    
170            public static com.liferay.portlet.calendar.model.CalEventSoap[] getEvents(
171                    long groupId, java.util.Calendar cal, java.lang.String[] types)
172                    throws RemoteException {
173                    try {
174                            java.util.List<com.liferay.portlet.calendar.model.CalEvent> returnValue =
175                                    CalEventServiceUtil.getEvents(groupId, cal, types);
176    
177                            return com.liferay.portlet.calendar.model.CalEventSoap.toSoapModels(returnValue);
178                    }
179                    catch (Exception e) {
180                            _log.error(e, e);
181    
182                            throw new RemoteException(e.getMessage());
183                    }
184            }
185    
186            public static com.liferay.portlet.calendar.model.CalEventSoap[] getEvents(
187                    long groupId, java.lang.String type, int start, int end)
188                    throws RemoteException {
189                    try {
190                            java.util.List<com.liferay.portlet.calendar.model.CalEvent> returnValue =
191                                    CalEventServiceUtil.getEvents(groupId, type, start, end);
192    
193                            return com.liferay.portlet.calendar.model.CalEventSoap.toSoapModels(returnValue);
194                    }
195                    catch (Exception e) {
196                            _log.error(e, e);
197    
198                            throw new RemoteException(e.getMessage());
199                    }
200            }
201    
202            public static com.liferay.portlet.calendar.model.CalEventSoap[] getEvents(
203                    long groupId, java.lang.String[] types, int start, int end)
204                    throws RemoteException {
205                    try {
206                            java.util.List<com.liferay.portlet.calendar.model.CalEvent> returnValue =
207                                    CalEventServiceUtil.getEvents(groupId, types, start, end);
208    
209                            return com.liferay.portlet.calendar.model.CalEventSoap.toSoapModels(returnValue);
210                    }
211                    catch (Exception e) {
212                            _log.error(e, e);
213    
214                            throw new RemoteException(e.getMessage());
215                    }
216            }
217    
218            public static int getEventsCount(long groupId, java.lang.String type)
219                    throws RemoteException {
220                    try {
221                            int returnValue = CalEventServiceUtil.getEventsCount(groupId, type);
222    
223                            return returnValue;
224                    }
225                    catch (Exception e) {
226                            _log.error(e, e);
227    
228                            throw new RemoteException(e.getMessage());
229                    }
230            }
231    
232            public static int getEventsCount(long groupId, java.lang.String[] types)
233                    throws RemoteException {
234                    try {
235                            int returnValue = CalEventServiceUtil.getEventsCount(groupId, types);
236    
237                            return returnValue;
238                    }
239                    catch (Exception e) {
240                            _log.error(e, e);
241    
242                            throw new RemoteException(e.getMessage());
243                    }
244            }
245    
246            public static boolean hasEvents(long groupId, java.util.Calendar cal)
247                    throws RemoteException {
248                    try {
249                            boolean returnValue = CalEventServiceUtil.hasEvents(groupId, cal);
250    
251                            return returnValue;
252                    }
253                    catch (Exception e) {
254                            _log.error(e, e);
255    
256                            throw new RemoteException(e.getMessage());
257                    }
258            }
259    
260            public static boolean hasEvents(long groupId, java.util.Calendar cal,
261                    java.lang.String type) throws RemoteException {
262                    try {
263                            boolean returnValue = CalEventServiceUtil.hasEvents(groupId, cal,
264                                            type);
265    
266                            return returnValue;
267                    }
268                    catch (Exception e) {
269                            _log.error(e, e);
270    
271                            throw new RemoteException(e.getMessage());
272                    }
273            }
274    
275            public static boolean hasEvents(long groupId, java.util.Calendar cal,
276                    java.lang.String[] types) throws RemoteException {
277                    try {
278                            boolean returnValue = CalEventServiceUtil.hasEvents(groupId, cal,
279                                            types);
280    
281                            return returnValue;
282                    }
283                    catch (Exception e) {
284                            _log.error(e, e);
285    
286                            throw new RemoteException(e.getMessage());
287                    }
288            }
289    
290            public static com.liferay.portlet.calendar.model.CalEventSoap updateEvent(
291                    long eventId, java.lang.String title, java.lang.String description,
292                    java.lang.String location, int startDateMonth, int startDateDay,
293                    int startDateYear, int startDateHour, int startDateMinute,
294                    int durationHour, int durationMinute, boolean allDay,
295                    boolean timeZoneSensitive, java.lang.String type, boolean repeating,
296                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
297                    int firstReminder, int secondReminder,
298                    com.liferay.portal.service.ServiceContext serviceContext)
299                    throws RemoteException {
300                    try {
301                            com.liferay.portlet.calendar.model.CalEvent returnValue = CalEventServiceUtil.updateEvent(eventId,
302                                            title, description, location, startDateMonth, startDateDay,
303                                            startDateYear, startDateHour, startDateMinute,
304                                            durationHour, durationMinute, allDay, timeZoneSensitive,
305                                            type, repeating, recurrence, remindBy, firstReminder,
306                                            secondReminder, serviceContext);
307    
308                            return com.liferay.portlet.calendar.model.CalEventSoap.toSoapModel(returnValue);
309                    }
310                    catch (Exception e) {
311                            _log.error(e, e);
312    
313                            throw new RemoteException(e.getMessage());
314                    }
315            }
316    
317            /**
318            * @deprecated As of 6.2.0, replaced by {@link #updateEvent(long, String,
319            String, String, int, int, int, int, int, int, int, boolean,
320            boolean, String, boolean, TZSRecurrence, int, int, int,
321            ServiceContext)}
322            */
323            public static com.liferay.portlet.calendar.model.CalEventSoap updateEvent(
324                    long eventId, java.lang.String title, java.lang.String description,
325                    java.lang.String location, int startDateMonth, int startDateDay,
326                    int startDateYear, int startDateHour, int startDateMinute,
327                    int endDateMonth, int endDateDay, int endDateYear, int durationHour,
328                    int durationMinute, boolean allDay, boolean timeZoneSensitive,
329                    java.lang.String type, boolean repeating,
330                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
331                    int firstReminder, int secondReminder,
332                    com.liferay.portal.service.ServiceContext serviceContext)
333                    throws RemoteException {
334                    try {
335                            com.liferay.portlet.calendar.model.CalEvent returnValue = CalEventServiceUtil.updateEvent(eventId,
336                                            title, description, location, startDateMonth, startDateDay,
337                                            startDateYear, startDateHour, startDateMinute,
338                                            endDateMonth, endDateDay, endDateYear, durationHour,
339                                            durationMinute, allDay, timeZoneSensitive, type, repeating,
340                                            recurrence, remindBy, firstReminder, secondReminder,
341                                            serviceContext);
342    
343                            return com.liferay.portlet.calendar.model.CalEventSoap.toSoapModel(returnValue);
344                    }
345                    catch (Exception e) {
346                            _log.error(e, e);
347    
348                            throw new RemoteException(e.getMessage());
349                    }
350            }
351    
352            private static Log _log = LogFactoryUtil.getLog(CalEventServiceSoap.class);
353    }