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
052     * http://localhost:8080/api/secure/axis. Set the property
053     * <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
054     * security.
055     * </p>
056     *
057     * <p>
058     * The SOAP utility is only generated for remote services.
059     * </p>
060     *
061     * @author    Brian Wing Shun Chan
062     * @see       CalEventServiceHttp
063     * @see       com.liferay.portlet.calendar.model.CalEventSoap
064     * @see       com.liferay.portlet.calendar.service.CalEventServiceUtil
065     * @generated
066     */
067    public class CalEventServiceSoap {
068            public static com.liferay.portlet.calendar.model.CalEventSoap addEvent(
069                    java.lang.String title, java.lang.String description,
070                    java.lang.String location, int startDateMonth, int startDateDay,
071                    int startDateYear, int startDateHour, int startDateMinute,
072                    int durationHour, int durationMinute, boolean allDay,
073                    boolean timeZoneSensitive, java.lang.String type, boolean repeating,
074                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
075                    int firstReminder, int secondReminder,
076                    com.liferay.portal.service.ServiceContext serviceContext)
077                    throws RemoteException {
078                    try {
079                            com.liferay.portlet.calendar.model.CalEvent returnValue = CalEventServiceUtil.addEvent(title,
080                                            description, location, startDateMonth, startDateDay,
081                                            startDateYear, startDateHour, startDateMinute,
082                                            durationHour, durationMinute, allDay, timeZoneSensitive,
083                                            type, repeating, recurrence, remindBy, firstReminder,
084                                            secondReminder, serviceContext);
085    
086                            return com.liferay.portlet.calendar.model.CalEventSoap.toSoapModel(returnValue);
087                    }
088                    catch (Exception e) {
089                            _log.error(e, e);
090    
091                            throw new RemoteException(e.getMessage());
092                    }
093            }
094    
095            /**
096            * @deprecated {@link #addEvent(String, String, String, int, int, int, int,
097            int, int, int, boolean, boolean, String, boolean,
098            TZSRecurrence, int, int, int, 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 {@link #updateEvent(long, String, String, String, int, int,
319            int, int, int, int, int, boolean, boolean, String, boolean,
320            TZSRecurrence, int, int, int, ServiceContext)}
321            */
322            public static com.liferay.portlet.calendar.model.CalEventSoap updateEvent(
323                    long eventId, java.lang.String title, java.lang.String description,
324                    java.lang.String location, int startDateMonth, int startDateDay,
325                    int startDateYear, int startDateHour, int startDateMinute,
326                    int endDateMonth, int endDateDay, int endDateYear, int durationHour,
327                    int durationMinute, boolean allDay, boolean timeZoneSensitive,
328                    java.lang.String type, boolean repeating,
329                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
330                    int firstReminder, int secondReminder,
331                    com.liferay.portal.service.ServiceContext serviceContext)
332                    throws RemoteException {
333                    try {
334                            com.liferay.portlet.calendar.model.CalEvent returnValue = CalEventServiceUtil.updateEvent(eventId,
335                                            title, description, location, startDateMonth, startDateDay,
336                                            startDateYear, startDateHour, startDateMinute,
337                                            endDateMonth, endDateDay, endDateYear, durationHour,
338                                            durationMinute, allDay, timeZoneSensitive, type, repeating,
339                                            recurrence, remindBy, firstReminder, secondReminder,
340                                            serviceContext);
341    
342                            return com.liferay.portlet.calendar.model.CalEventSoap.toSoapModel(returnValue);
343                    }
344                    catch (Exception e) {
345                            _log.error(e, e);
346    
347                            throw new RemoteException(e.getMessage());
348                    }
349            }
350    
351            private static Log _log = LogFactoryUtil.getLog(CalEventServiceSoap.class);
352    }