001    /**
002     * Copyright (c) 2000-2012 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 endDateMonth, int endDateDay, int endDateYear, int durationHour,
073                    int durationMinute, boolean allDay, boolean timeZoneSensitive,
074                    java.lang.String type, boolean repeating,
075                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
076                    int firstReminder, int secondReminder,
077                    com.liferay.portal.service.ServiceContext serviceContext)
078                    throws RemoteException {
079                    try {
080                            com.liferay.portlet.calendar.model.CalEvent returnValue = CalEventServiceUtil.addEvent(title,
081                                            description, location, startDateMonth, startDateDay,
082                                            startDateYear, startDateHour, startDateMinute,
083                                            endDateMonth, endDateDay, endDateYear, durationHour,
084                                            durationMinute, allDay, timeZoneSensitive, type, repeating,
085                                            recurrence, remindBy, firstReminder, secondReminder,
086                                            serviceContext);
087    
088                            return com.liferay.portlet.calendar.model.CalEventSoap.toSoapModel(returnValue);
089                    }
090                    catch (Exception e) {
091                            _log.error(e, e);
092    
093                            throw new RemoteException(e.getMessage());
094                    }
095            }
096    
097            public static void deleteEvent(long eventId) throws RemoteException {
098                    try {
099                            CalEventServiceUtil.deleteEvent(eventId);
100                    }
101                    catch (Exception e) {
102                            _log.error(e, e);
103    
104                            throw new RemoteException(e.getMessage());
105                    }
106            }
107    
108            public static com.liferay.portlet.calendar.model.CalEventSoap getEvent(
109                    long eventId) throws RemoteException {
110                    try {
111                            com.liferay.portlet.calendar.model.CalEvent returnValue = CalEventServiceUtil.getEvent(eventId);
112    
113                            return com.liferay.portlet.calendar.model.CalEventSoap.toSoapModel(returnValue);
114                    }
115                    catch (Exception e) {
116                            _log.error(e, e);
117    
118                            throw new RemoteException(e.getMessage());
119                    }
120            }
121    
122            public static com.liferay.portlet.calendar.model.CalEventSoap[] getEvents(
123                    long groupId, java.util.Calendar cal, java.lang.String type)
124                    throws RemoteException {
125                    try {
126                            java.util.List<com.liferay.portlet.calendar.model.CalEvent> returnValue =
127                                    CalEventServiceUtil.getEvents(groupId, cal, type);
128    
129                            return com.liferay.portlet.calendar.model.CalEventSoap.toSoapModels(returnValue);
130                    }
131                    catch (Exception e) {
132                            _log.error(e, e);
133    
134                            throw new RemoteException(e.getMessage());
135                    }
136            }
137    
138            public static com.liferay.portlet.calendar.model.CalEventSoap[] getEvents(
139                    long groupId, java.util.Calendar cal, java.lang.String[] types)
140                    throws RemoteException {
141                    try {
142                            java.util.List<com.liferay.portlet.calendar.model.CalEvent> returnValue =
143                                    CalEventServiceUtil.getEvents(groupId, cal, types);
144    
145                            return com.liferay.portlet.calendar.model.CalEventSoap.toSoapModels(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.lang.String type, int start, int end)
156                    throws RemoteException {
157                    try {
158                            java.util.List<com.liferay.portlet.calendar.model.CalEvent> returnValue =
159                                    CalEventServiceUtil.getEvents(groupId, type, start, end);
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.lang.String[] types, int start, int end)
172                    throws RemoteException {
173                    try {
174                            java.util.List<com.liferay.portlet.calendar.model.CalEvent> returnValue =
175                                    CalEventServiceUtil.getEvents(groupId, types, start, end);
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 int getEventsCount(long groupId, java.lang.String type)
187                    throws RemoteException {
188                    try {
189                            int returnValue = CalEventServiceUtil.getEventsCount(groupId, type);
190    
191                            return returnValue;
192                    }
193                    catch (Exception e) {
194                            _log.error(e, e);
195    
196                            throw new RemoteException(e.getMessage());
197                    }
198            }
199    
200            public static int getEventsCount(long groupId, java.lang.String[] types)
201                    throws RemoteException {
202                    try {
203                            int returnValue = CalEventServiceUtil.getEventsCount(groupId, types);
204    
205                            return returnValue;
206                    }
207                    catch (Exception e) {
208                            _log.error(e, e);
209    
210                            throw new RemoteException(e.getMessage());
211                    }
212            }
213    
214            public static boolean hasEvents(long groupId, java.util.Calendar cal)
215                    throws RemoteException {
216                    try {
217                            boolean returnValue = CalEventServiceUtil.hasEvents(groupId, cal);
218    
219                            return returnValue;
220                    }
221                    catch (Exception e) {
222                            _log.error(e, e);
223    
224                            throw new RemoteException(e.getMessage());
225                    }
226            }
227    
228            public static boolean hasEvents(long groupId, java.util.Calendar cal,
229                    java.lang.String type) throws RemoteException {
230                    try {
231                            boolean returnValue = CalEventServiceUtil.hasEvents(groupId, cal,
232                                            type);
233    
234                            return returnValue;
235                    }
236                    catch (Exception e) {
237                            _log.error(e, e);
238    
239                            throw new RemoteException(e.getMessage());
240                    }
241            }
242    
243            public static boolean hasEvents(long groupId, java.util.Calendar cal,
244                    java.lang.String[] types) throws RemoteException {
245                    try {
246                            boolean returnValue = CalEventServiceUtil.hasEvents(groupId, cal,
247                                            types);
248    
249                            return returnValue;
250                    }
251                    catch (Exception e) {
252                            _log.error(e, e);
253    
254                            throw new RemoteException(e.getMessage());
255                    }
256            }
257    
258            public static com.liferay.portlet.calendar.model.CalEventSoap updateEvent(
259                    long eventId, java.lang.String title, java.lang.String description,
260                    java.lang.String location, int startDateMonth, int startDateDay,
261                    int startDateYear, int startDateHour, int startDateMinute,
262                    int endDateMonth, int endDateDay, int endDateYear, int durationHour,
263                    int durationMinute, boolean allDay, boolean timeZoneSensitive,
264                    java.lang.String type, boolean repeating,
265                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
266                    int firstReminder, int secondReminder,
267                    com.liferay.portal.service.ServiceContext serviceContext)
268                    throws RemoteException {
269                    try {
270                            com.liferay.portlet.calendar.model.CalEvent returnValue = CalEventServiceUtil.updateEvent(eventId,
271                                            title, description, location, startDateMonth, startDateDay,
272                                            startDateYear, startDateHour, startDateMinute,
273                                            endDateMonth, endDateDay, endDateYear, durationHour,
274                                            durationMinute, allDay, timeZoneSensitive, type, repeating,
275                                            recurrence, remindBy, firstReminder, secondReminder,
276                                            serviceContext);
277    
278                            return com.liferay.portlet.calendar.model.CalEventSoap.toSoapModel(returnValue);
279                    }
280                    catch (Exception e) {
281                            _log.error(e, e);
282    
283                            throw new RemoteException(e.getMessage());
284                    }
285            }
286    
287            private static Log _log = LogFactoryUtil.getLog(CalEventServiceSoap.class);
288    }