PageRenderTime 25ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/portal-impl/src/com/liferay/portlet/messageboards/service/http/MBCategoryServiceSoap.java

https://github.com/lululiferay/liferay-portal
Java | 322 lines | 220 code | 47 blank | 55 comment | 0 complexity | 6f2449497f1730cebc34e31bb274d5da 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.messageboards.service.http;
  15. import com.liferay.portal.kernel.log.Log;
  16. import com.liferay.portal.kernel.log.LogFactoryUtil;
  17. import com.liferay.portal.kernel.util.ListUtil;
  18. import com.liferay.portlet.messageboards.service.MBCategoryServiceUtil;
  19. import java.rmi.RemoteException;
  20. /**
  21. * <p>
  22. * This class provides a SOAP utility for the
  23. * {@link com.liferay.portlet.messageboards.service.MBCategoryServiceUtil} service utility. The
  24. * static methods of this class calls the same methods of the service utility.
  25. * However, the signatures are different because it is difficult for SOAP to
  26. * support certain types.
  27. * </p>
  28. *
  29. * <p>
  30. * ServiceBuilder follows certain rules in translating the methods. For example,
  31. * if the method in the service utility returns a {@link java.util.List}, that
  32. * is translated to an array of {@link com.liferay.portlet.messageboards.model.MBCategorySoap}.
  33. * If the method in the service utility returns a
  34. * {@link com.liferay.portlet.messageboards.model.MBCategory}, that is translated to a
  35. * {@link com.liferay.portlet.messageboards.model.MBCategorySoap}. Methods that SOAP cannot
  36. * safely wire are skipped.
  37. * </p>
  38. *
  39. * <p>
  40. * The benefits of using the SOAP utility is that it is cross platform
  41. * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
  42. * even Perl, to call the generated services. One drawback of SOAP is that it is
  43. * slow because it needs to serialize all calls into a text format (XML).
  44. * </p>
  45. *
  46. * <p>
  47. * You can see a list of services at http://localhost:8080/api/axis. Set the
  48. * property <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 MBCategoryServiceHttp
  58. * @see com.liferay.portlet.messageboards.model.MBCategorySoap
  59. * @see com.liferay.portlet.messageboards.service.MBCategoryServiceUtil
  60. * @generated
  61. */
  62. public class MBCategoryServiceSoap {
  63. public static com.liferay.portlet.messageboards.model.MBCategorySoap addCategory(
  64. long parentCategoryId, java.lang.String name,
  65. java.lang.String description, java.lang.String displayStyle,
  66. java.lang.String emailAddress, java.lang.String inProtocol,
  67. java.lang.String inServerName, int inServerPort, boolean inUseSSL,
  68. java.lang.String inUserName, java.lang.String inPassword,
  69. int inReadInterval, java.lang.String outEmailAddress,
  70. boolean outCustom, java.lang.String outServerName, int outServerPort,
  71. boolean outUseSSL, java.lang.String outUserName,
  72. java.lang.String outPassword, boolean mailingListActive,
  73. boolean allowAnonymousEmail,
  74. com.liferay.portal.service.ServiceContext serviceContext)
  75. throws RemoteException {
  76. try {
  77. com.liferay.portlet.messageboards.model.MBCategory returnValue = MBCategoryServiceUtil.addCategory(parentCategoryId,
  78. name, description, displayStyle, emailAddress, inProtocol,
  79. inServerName, inServerPort, inUseSSL, inUserName,
  80. inPassword, inReadInterval, outEmailAddress, outCustom,
  81. outServerName, outServerPort, outUseSSL, outUserName,
  82. outPassword, mailingListActive, allowAnonymousEmail,
  83. serviceContext);
  84. return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModel(returnValue);
  85. }
  86. catch (Exception e) {
  87. _log.error(e, e);
  88. throw new RemoteException(e.getMessage());
  89. }
  90. }
  91. public static void deleteCategory(long groupId, long categoryId)
  92. throws RemoteException {
  93. try {
  94. MBCategoryServiceUtil.deleteCategory(groupId, categoryId);
  95. }
  96. catch (Exception e) {
  97. _log.error(e, e);
  98. throw new RemoteException(e.getMessage());
  99. }
  100. }
  101. public static com.liferay.portlet.messageboards.model.MBCategorySoap[] getCategories(
  102. long groupId) throws RemoteException {
  103. try {
  104. java.util.List<com.liferay.portlet.messageboards.model.MBCategory> returnValue =
  105. MBCategoryServiceUtil.getCategories(groupId);
  106. return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModels(returnValue);
  107. }
  108. catch (Exception e) {
  109. _log.error(e, e);
  110. throw new RemoteException(e.getMessage());
  111. }
  112. }
  113. public static com.liferay.portlet.messageboards.model.MBCategorySoap[] getCategories(
  114. long groupId, long parentCategoryId, int start, int end)
  115. throws RemoteException {
  116. try {
  117. java.util.List<com.liferay.portlet.messageboards.model.MBCategory> returnValue =
  118. MBCategoryServiceUtil.getCategories(groupId, parentCategoryId,
  119. start, end);
  120. return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModels(returnValue);
  121. }
  122. catch (Exception e) {
  123. _log.error(e, e);
  124. throw new RemoteException(e.getMessage());
  125. }
  126. }
  127. public static com.liferay.portlet.messageboards.model.MBCategorySoap[] getCategories(
  128. long groupId, long[] parentCategoryIds, int start, int end)
  129. throws RemoteException {
  130. try {
  131. java.util.List<com.liferay.portlet.messageboards.model.MBCategory> returnValue =
  132. MBCategoryServiceUtil.getCategories(groupId, parentCategoryIds,
  133. start, end);
  134. return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModels(returnValue);
  135. }
  136. catch (Exception e) {
  137. _log.error(e, e);
  138. throw new RemoteException(e.getMessage());
  139. }
  140. }
  141. public static int getCategoriesCount(long groupId, long parentCategoryId)
  142. throws RemoteException {
  143. try {
  144. int returnValue = MBCategoryServiceUtil.getCategoriesCount(groupId,
  145. parentCategoryId);
  146. return returnValue;
  147. }
  148. catch (Exception e) {
  149. _log.error(e, e);
  150. throw new RemoteException(e.getMessage());
  151. }
  152. }
  153. public static int getCategoriesCount(long groupId, long[] parentCategoryIds)
  154. throws RemoteException {
  155. try {
  156. int returnValue = MBCategoryServiceUtil.getCategoriesCount(groupId,
  157. parentCategoryIds);
  158. return returnValue;
  159. }
  160. catch (Exception e) {
  161. _log.error(e, e);
  162. throw new RemoteException(e.getMessage());
  163. }
  164. }
  165. public static com.liferay.portlet.messageboards.model.MBCategorySoap getCategory(
  166. long categoryId) throws RemoteException {
  167. try {
  168. com.liferay.portlet.messageboards.model.MBCategory returnValue = MBCategoryServiceUtil.getCategory(categoryId);
  169. return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModel(returnValue);
  170. }
  171. catch (Exception e) {
  172. _log.error(e, e);
  173. throw new RemoteException(e.getMessage());
  174. }
  175. }
  176. public static long[] getCategoryIds(long groupId, long categoryId)
  177. throws RemoteException {
  178. try {
  179. long[] returnValue = MBCategoryServiceUtil.getCategoryIds(groupId,
  180. categoryId);
  181. return returnValue;
  182. }
  183. catch (Exception e) {
  184. _log.error(e, e);
  185. throw new RemoteException(e.getMessage());
  186. }
  187. }
  188. public static java.lang.Long[] getSubcategoryIds(Long[] categoryIds,
  189. long groupId, long categoryId) throws RemoteException {
  190. try {
  191. java.util.List<java.lang.Long> returnValue = MBCategoryServiceUtil.getSubcategoryIds(ListUtil.toList(
  192. categoryIds), groupId, categoryId);
  193. return returnValue.toArray(new java.lang.Long[returnValue.size()]);
  194. }
  195. catch (Exception e) {
  196. _log.error(e, e);
  197. throw new RemoteException(e.getMessage());
  198. }
  199. }
  200. public static com.liferay.portlet.messageboards.model.MBCategorySoap[] getSubscribedCategories(
  201. long groupId, long userId, int start, int end)
  202. throws RemoteException {
  203. try {
  204. java.util.List<com.liferay.portlet.messageboards.model.MBCategory> returnValue =
  205. MBCategoryServiceUtil.getSubscribedCategories(groupId, userId,
  206. start, end);
  207. return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModels(returnValue);
  208. }
  209. catch (Exception e) {
  210. _log.error(e, e);
  211. throw new RemoteException(e.getMessage());
  212. }
  213. }
  214. public static int getSubscribedCategoriesCount(long groupId, long userId)
  215. throws RemoteException {
  216. try {
  217. int returnValue = MBCategoryServiceUtil.getSubscribedCategoriesCount(groupId,
  218. userId);
  219. return returnValue;
  220. }
  221. catch (Exception e) {
  222. _log.error(e, e);
  223. throw new RemoteException(e.getMessage());
  224. }
  225. }
  226. public static void subscribeCategory(long groupId, long categoryId)
  227. throws RemoteException {
  228. try {
  229. MBCategoryServiceUtil.subscribeCategory(groupId, categoryId);
  230. }
  231. catch (Exception e) {
  232. _log.error(e, e);
  233. throw new RemoteException(e.getMessage());
  234. }
  235. }
  236. public static void unsubscribeCategory(long groupId, long categoryId)
  237. throws RemoteException {
  238. try {
  239. MBCategoryServiceUtil.unsubscribeCategory(groupId, categoryId);
  240. }
  241. catch (Exception e) {
  242. _log.error(e, e);
  243. throw new RemoteException(e.getMessage());
  244. }
  245. }
  246. public static com.liferay.portlet.messageboards.model.MBCategorySoap updateCategory(
  247. long categoryId, long parentCategoryId, java.lang.String name,
  248. java.lang.String description, java.lang.String displayStyle,
  249. java.lang.String emailAddress, java.lang.String inProtocol,
  250. java.lang.String inServerName, int inServerPort, boolean inUseSSL,
  251. java.lang.String inUserName, java.lang.String inPassword,
  252. int inReadInterval, java.lang.String outEmailAddress,
  253. boolean outCustom, java.lang.String outServerName, int outServerPort,
  254. boolean outUseSSL, java.lang.String outUserName,
  255. java.lang.String outPassword, boolean mailingListActive,
  256. boolean allowAnonymousEmail, boolean mergeWithParentCategory,
  257. com.liferay.portal.service.ServiceContext serviceContext)
  258. throws RemoteException {
  259. try {
  260. com.liferay.portlet.messageboards.model.MBCategory returnValue = MBCategoryServiceUtil.updateCategory(categoryId,
  261. parentCategoryId, name, description, displayStyle,
  262. emailAddress, inProtocol, inServerName, inServerPort,
  263. inUseSSL, inUserName, inPassword, inReadInterval,
  264. outEmailAddress, outCustom, outServerName, outServerPort,
  265. outUseSSL, outUserName, outPassword, mailingListActive,
  266. allowAnonymousEmail, mergeWithParentCategory, serviceContext);
  267. return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModel(returnValue);
  268. }
  269. catch (Exception e) {
  270. _log.error(e, e);
  271. throw new RemoteException(e.getMessage());
  272. }
  273. }
  274. private static Log _log = LogFactoryUtil.getLog(MBCategoryServiceSoap.class);
  275. }