/portal-impl/src/com/liferay/portlet/calendar/service/http/CalEventServiceSoap.java

https://github.com/azzazzel/liferay-portal · Java · 288 lines · 189 code · 43 blank · 56 comment · 0 complexity · 9f228d818cf1ee70358c3234c2a64860 MD5 · raw file

  1. /**
  2. * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
  3. *
  4. * This library is free software; you can redistribute it and/or modify it under
  5. * the terms of the GNU Lesser General Public License as published by the Free
  6. * Software Foundation; either version 2.1 of the License, or (at your option)
  7. * any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  11. * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
  12. * details.
  13. */
  14. package com.liferay.portlet.calendar.service.http;
  15. import com.liferay.portal.kernel.log.Log;
  16. import com.liferay.portal.kernel.log.LogFactoryUtil;
  17. import com.liferay.portlet.calendar.service.CalEventServiceUtil;
  18. import java.rmi.RemoteException;
  19. /**
  20. * <p>
  21. * This class provides a SOAP utility for the
  22. * {@link com.liferay.portlet.calendar.service.CalEventServiceUtil} service utility. The
  23. * static methods of this class calls the same methods of the service utility.
  24. * However, the signatures are different because it is difficult for SOAP to
  25. * support certain types.
  26. * </p>
  27. *
  28. * <p>
  29. * ServiceBuilder follows certain rules in translating the methods. For example,
  30. * if the method in the service utility returns a {@link java.util.List}, that
  31. * is translated to an array of {@link com.liferay.portlet.calendar.model.CalEventSoap}.
  32. * If the method in the service utility returns a
  33. * {@link com.liferay.portlet.calendar.model.CalEvent}, that is translated to a
  34. * {@link com.liferay.portlet.calendar.model.CalEventSoap}. Methods that SOAP cannot
  35. * safely wire are skipped.
  36. * </p>
  37. *
  38. * <p>
  39. * The benefits of using the SOAP utility is that it is cross platform
  40. * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
  41. * even Perl, to call the generated services. One drawback of SOAP is that it is
  42. * slow because it needs to serialize all calls into a text format (XML).
  43. * </p>
  44. *
  45. * <p>
  46. * You can see a list of services at
  47. * http://localhost:8080/api/secure/axis. Set the property
  48. * <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
  49. * security.
  50. * </p>
  51. *
  52. * <p>
  53. * The SOAP utility is only generated for remote services.
  54. * </p>
  55. *
  56. * @author Brian Wing Shun Chan
  57. * @see CalEventServiceHttp
  58. * @see com.liferay.portlet.calendar.model.CalEventSoap
  59. * @see com.liferay.portlet.calendar.service.CalEventServiceUtil
  60. * @generated
  61. */
  62. public class CalEventServiceSoap {
  63. public static com.liferay.portlet.calendar.model.CalEventSoap addEvent(
  64. java.lang.String title, java.lang.String description,
  65. java.lang.String location, int startDateMonth, int startDateDay,
  66. int startDateYear, int startDateHour, int startDateMinute,
  67. int endDateMonth, int endDateDay, int endDateYear, int durationHour,
  68. int durationMinute, boolean allDay, boolean timeZoneSensitive,
  69. java.lang.String type, boolean repeating,
  70. com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
  71. int firstReminder, int secondReminder,
  72. com.liferay.portal.service.ServiceContext serviceContext)
  73. throws RemoteException {
  74. try {
  75. com.liferay.portlet.calendar.model.CalEvent returnValue = CalEventServiceUtil.addEvent(title,
  76. description, location, startDateMonth, startDateDay,
  77. startDateYear, startDateHour, startDateMinute,
  78. endDateMonth, endDateDay, endDateYear, durationHour,
  79. durationMinute, allDay, timeZoneSensitive, type, repeating,
  80. recurrence, remindBy, firstReminder, secondReminder,
  81. serviceContext);
  82. return com.liferay.portlet.calendar.model.CalEventSoap.toSoapModel(returnValue);
  83. }
  84. catch (Exception e) {
  85. _log.error(e, e);
  86. throw new RemoteException(e.getMessage());
  87. }
  88. }
  89. public static void deleteEvent(long eventId) throws RemoteException {
  90. try {
  91. CalEventServiceUtil.deleteEvent(eventId);
  92. }
  93. catch (Exception e) {
  94. _log.error(e, e);
  95. throw new RemoteException(e.getMessage());
  96. }
  97. }
  98. public static com.liferay.portlet.calendar.model.CalEventSoap getEvent(
  99. long eventId) throws RemoteException {
  100. try {
  101. com.liferay.portlet.calendar.model.CalEvent returnValue = CalEventServiceUtil.getEvent(eventId);
  102. return com.liferay.portlet.calendar.model.CalEventSoap.toSoapModel(returnValue);
  103. }
  104. catch (Exception e) {
  105. _log.error(e, e);
  106. throw new RemoteException(e.getMessage());
  107. }
  108. }
  109. public static com.liferay.portlet.calendar.model.CalEventSoap[] getEvents(
  110. long groupId, java.util.Calendar cal, java.lang.String type)
  111. throws RemoteException {
  112. try {
  113. java.util.List<com.liferay.portlet.calendar.model.CalEvent> returnValue =
  114. CalEventServiceUtil.getEvents(groupId, cal, type);
  115. return com.liferay.portlet.calendar.model.CalEventSoap.toSoapModels(returnValue);
  116. }
  117. catch (Exception e) {
  118. _log.error(e, e);
  119. throw new RemoteException(e.getMessage());
  120. }
  121. }
  122. public static com.liferay.portlet.calendar.model.CalEventSoap[] getEvents(
  123. long groupId, java.util.Calendar cal, java.lang.String[] types)
  124. throws RemoteException {
  125. try {
  126. java.util.List<com.liferay.portlet.calendar.model.CalEvent> returnValue =
  127. CalEventServiceUtil.getEvents(groupId, cal, types);
  128. return com.liferay.portlet.calendar.model.CalEventSoap.toSoapModels(returnValue);
  129. }
  130. catch (Exception e) {
  131. _log.error(e, e);
  132. throw new RemoteException(e.getMessage());
  133. }
  134. }
  135. public static com.liferay.portlet.calendar.model.CalEventSoap[] getEvents(
  136. long groupId, java.lang.String type, int start, int end)
  137. throws RemoteException {
  138. try {
  139. java.util.List<com.liferay.portlet.calendar.model.CalEvent> returnValue =
  140. CalEventServiceUtil.getEvents(groupId, type, start, end);
  141. return com.liferay.portlet.calendar.model.CalEventSoap.toSoapModels(returnValue);
  142. }
  143. catch (Exception e) {
  144. _log.error(e, e);
  145. throw new RemoteException(e.getMessage());
  146. }
  147. }
  148. public static com.liferay.portlet.calendar.model.CalEventSoap[] getEvents(
  149. long groupId, java.lang.String[] types, int start, int end)
  150. throws RemoteException {
  151. try {
  152. java.util.List<com.liferay.portlet.calendar.model.CalEvent> returnValue =
  153. CalEventServiceUtil.getEvents(groupId, types, start, end);
  154. return com.liferay.portlet.calendar.model.CalEventSoap.toSoapModels(returnValue);
  155. }
  156. catch (Exception e) {
  157. _log.error(e, e);
  158. throw new RemoteException(e.getMessage());
  159. }
  160. }
  161. public static int getEventsCount(long groupId, java.lang.String type)
  162. throws RemoteException {
  163. try {
  164. int returnValue = CalEventServiceUtil.getEventsCount(groupId, type);
  165. return returnValue;
  166. }
  167. catch (Exception e) {
  168. _log.error(e, e);
  169. throw new RemoteException(e.getMessage());
  170. }
  171. }
  172. public static int getEventsCount(long groupId, java.lang.String[] types)
  173. throws RemoteException {
  174. try {
  175. int returnValue = CalEventServiceUtil.getEventsCount(groupId, types);
  176. return returnValue;
  177. }
  178. catch (Exception e) {
  179. _log.error(e, e);
  180. throw new RemoteException(e.getMessage());
  181. }
  182. }
  183. public static boolean hasEvents(long groupId, java.util.Calendar cal)
  184. throws RemoteException {
  185. try {
  186. boolean returnValue = CalEventServiceUtil.hasEvents(groupId, cal);
  187. return returnValue;
  188. }
  189. catch (Exception e) {
  190. _log.error(e, e);
  191. throw new RemoteException(e.getMessage());
  192. }
  193. }
  194. public static boolean hasEvents(long groupId, java.util.Calendar cal,
  195. java.lang.String type) throws RemoteException {
  196. try {
  197. boolean returnValue = CalEventServiceUtil.hasEvents(groupId, cal,
  198. type);
  199. return returnValue;
  200. }
  201. catch (Exception e) {
  202. _log.error(e, e);
  203. throw new RemoteException(e.getMessage());
  204. }
  205. }
  206. public static boolean hasEvents(long groupId, java.util.Calendar cal,
  207. java.lang.String[] types) throws RemoteException {
  208. try {
  209. boolean returnValue = CalEventServiceUtil.hasEvents(groupId, cal,
  210. types);
  211. return returnValue;
  212. }
  213. catch (Exception e) {
  214. _log.error(e, e);
  215. throw new RemoteException(e.getMessage());
  216. }
  217. }
  218. public static com.liferay.portlet.calendar.model.CalEventSoap updateEvent(
  219. long eventId, java.lang.String title, java.lang.String description,
  220. java.lang.String location, int startDateMonth, int startDateDay,
  221. int startDateYear, int startDateHour, int startDateMinute,
  222. int endDateMonth, int endDateDay, int endDateYear, int durationHour,
  223. int durationMinute, boolean allDay, boolean timeZoneSensitive,
  224. java.lang.String type, boolean repeating,
  225. com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
  226. int firstReminder, int secondReminder,
  227. com.liferay.portal.service.ServiceContext serviceContext)
  228. throws RemoteException {
  229. try {
  230. com.liferay.portlet.calendar.model.CalEvent returnValue = CalEventServiceUtil.updateEvent(eventId,
  231. title, description, location, startDateMonth, startDateDay,
  232. startDateYear, startDateHour, startDateMinute,
  233. endDateMonth, endDateDay, endDateYear, durationHour,
  234. durationMinute, allDay, timeZoneSensitive, type, repeating,
  235. recurrence, remindBy, firstReminder, secondReminder,
  236. serviceContext);
  237. return com.liferay.portlet.calendar.model.CalEventSoap.toSoapModel(returnValue);
  238. }
  239. catch (Exception e) {
  240. _log.error(e, e);
  241. throw new RemoteException(e.getMessage());
  242. }
  243. }
  244. private static Log _log = LogFactoryUtil.getLog(CalEventServiceSoap.class);
  245. }