001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portlet.calendar.service.http;
022:
023: import com.liferay.portal.kernel.log.Log;
024: import com.liferay.portal.kernel.log.LogFactoryUtil;
025:
026: import com.liferay.portlet.calendar.service.CalEventServiceUtil;
027:
028: import java.rmi.RemoteException;
029:
030: /**
031: * <a href="CalEventServiceSoap.java.html"><b><i>View Source</i></b></a>
032: *
033: * <p>
034: * ServiceBuilder generated this class. Modifications in this class will be
035: * overwritten the next time is generated.
036: * </p>
037: *
038: * <p>
039: * This class provides a SOAP utility for the
040: * <code>com.liferay.portlet.calendar.service.CalEventServiceUtil</code> service
041: * utility. The static methods of this class calls the same methods of the
042: * service utility. However, the signatures are different because it is
043: * difficult for SOAP to support certain types.
044: * </p>
045: *
046: * <p>
047: * ServiceBuilder follows certain rules in translating the methods. For example,
048: * if the method in the service utility returns a <code>java.util.List</code>,
049: * that is translated to an array of
050: * <code>com.liferay.portlet.calendar.model.CalEventSoap</code>. If the method in the
051: * service utility returns a <code>com.liferay.portlet.calendar.model.CalEvent</code>,
052: * that is translated to a <code>com.liferay.portlet.calendar.model.CalEventSoap</code>.
053: * Methods that SOAP cannot safely wire are skipped.
054: * </p>
055: *
056: * <p>
057: * The benefits of using the SOAP utility is that it is cross platform
058: * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
059: * even Perl, to call the generated services. One drawback of SOAP is that it is
060: * slow because it needs to serialize all calls into a text format (XML).
061: * </p>
062: *
063: * <p>
064: * You can see a list of services at
065: * http://localhost:8080/tunnel-web/secure/axis. Set the property
066: * <code>tunnel.servlet.hosts.allowed</code> in portal.properties to configure
067: * security.
068: * </p>
069: *
070: * <p>
071: * The SOAP utility is only generated for remote services.
072: * </p>
073: *
074: * @author Brian Wing Shun Chan
075: *
076: * @see com.liferay.portlet.calendar.service.CalEventServiceUtil
077: * @see com.liferay.portlet.calendar.service.http.CalEventServiceHttp
078: * @see com.liferay.portlet.calendar.service.model.CalEventSoap
079: *
080: */
081: public class CalEventServiceSoap {
082: public static com.liferay.portlet.calendar.model.CalEventSoap addEvent(
083: long plid, java.lang.String title,
084: java.lang.String description, int startDateMonth,
085: int startDateDay, int startDateYear, int startDateHour,
086: int startDateMinute, int endDateMonth, int endDateDay,
087: int endDateYear, int durationHour, int durationMinute,
088: boolean allDay, boolean timeZoneSensitive,
089: java.lang.String type, boolean repeating,
090: com.liferay.portal.kernel.cal.Recurrence recurrence,
091: java.lang.String remindBy, int firstReminder,
092: int secondReminder, boolean addCommunityPermissions,
093: boolean addGuestPermissions) throws RemoteException {
094: try {
095: com.liferay.portlet.calendar.model.CalEvent returnValue = CalEventServiceUtil
096: .addEvent(plid, title, description, startDateMonth,
097: startDateDay, startDateYear, startDateHour,
098: startDateMinute, endDateMonth, endDateDay,
099: endDateYear, durationHour, durationMinute,
100: allDay, timeZoneSensitive, type, repeating,
101: recurrence, remindBy, firstReminder,
102: secondReminder, addCommunityPermissions,
103: addGuestPermissions);
104:
105: return com.liferay.portlet.calendar.model.CalEventSoap
106: .toSoapModel(returnValue);
107: } catch (Exception e) {
108: _log.error(e, e);
109:
110: throw new RemoteException(e.getMessage());
111: }
112: }
113:
114: public static com.liferay.portlet.calendar.model.CalEventSoap addEvent(
115: long plid, java.lang.String title,
116: java.lang.String description, int startDateMonth,
117: int startDateDay, int startDateYear, int startDateHour,
118: int startDateMinute, int endDateMonth, int endDateDay,
119: int endDateYear, int durationHour, int durationMinute,
120: boolean allDay, boolean timeZoneSensitive,
121: java.lang.String type, boolean repeating,
122: com.liferay.portal.kernel.cal.Recurrence recurrence,
123: java.lang.String remindBy, int firstReminder,
124: int secondReminder,
125: java.lang.String[] communityPermissions,
126: java.lang.String[] guestPermissions) throws RemoteException {
127: try {
128: com.liferay.portlet.calendar.model.CalEvent returnValue = CalEventServiceUtil
129: .addEvent(plid, title, description, startDateMonth,
130: startDateDay, startDateYear, startDateHour,
131: startDateMinute, endDateMonth, endDateDay,
132: endDateYear, durationHour, durationMinute,
133: allDay, timeZoneSensitive, type, repeating,
134: recurrence, remindBy, firstReminder,
135: secondReminder, communityPermissions,
136: guestPermissions);
137:
138: return com.liferay.portlet.calendar.model.CalEventSoap
139: .toSoapModel(returnValue);
140: } catch (Exception e) {
141: _log.error(e, e);
142:
143: throw new RemoteException(e.getMessage());
144: }
145: }
146:
147: public static void deleteEvent(long eventId) throws RemoteException {
148: try {
149: CalEventServiceUtil.deleteEvent(eventId);
150: } catch (Exception e) {
151: _log.error(e, e);
152:
153: throw new RemoteException(e.getMessage());
154: }
155: }
156:
157: public static com.liferay.portlet.calendar.model.CalEventSoap getEvent(
158: long eventId) throws RemoteException {
159: try {
160: com.liferay.portlet.calendar.model.CalEvent returnValue = CalEventServiceUtil
161: .getEvent(eventId);
162:
163: return com.liferay.portlet.calendar.model.CalEventSoap
164: .toSoapModel(returnValue);
165: } catch (Exception e) {
166: _log.error(e, e);
167:
168: throw new RemoteException(e.getMessage());
169: }
170: }
171:
172: public static com.liferay.portlet.calendar.model.CalEventSoap updateEvent(
173: long eventId, java.lang.String title,
174: java.lang.String description, int startDateMonth,
175: int startDateDay, int startDateYear, int startDateHour,
176: int startDateMinute, int endDateMonth, int endDateDay,
177: int endDateYear, int durationHour, int durationMinute,
178: boolean allDay, boolean timeZoneSensitive,
179: java.lang.String type, boolean repeating,
180: com.liferay.portal.kernel.cal.Recurrence recurrence,
181: java.lang.String remindBy, int firstReminder,
182: int secondReminder) throws RemoteException {
183: try {
184: com.liferay.portlet.calendar.model.CalEvent returnValue = CalEventServiceUtil
185: .updateEvent(eventId, title, description,
186: startDateMonth, startDateDay,
187: startDateYear, startDateHour,
188: startDateMinute, endDateMonth, endDateDay,
189: endDateYear, durationHour, durationMinute,
190: allDay, timeZoneSensitive, type, repeating,
191: recurrence, remindBy, firstReminder,
192: secondReminder);
193:
194: return com.liferay.portlet.calendar.model.CalEventSoap
195: .toSoapModel(returnValue);
196: } catch (Exception e) {
197: _log.error(e, e);
198:
199: throw new RemoteException(e.getMessage());
200: }
201: }
202:
203: private static Log _log = LogFactoryUtil
204: .getLog(CalEventServiceSoap.class);
205: }
|