/portal-impl/src/com/liferay/portlet/documentlibrary/service/http/DLFileEntryServiceSoap.java

https://github.com/acs/liferay-portal · Java · 414 lines · 290 code · 68 blank · 56 comment · 0 complexity · 5efec7ec04b855bb989c773b15cd8977 MD5 · raw file

  1. /**
  2. * Copyright (c) 2000-2011 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.documentlibrary.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.documentlibrary.service.DLFileEntryServiceUtil;
  19. import java.rmi.RemoteException;
  20. /**
  21. * <p>
  22. * This class provides a SOAP utility for the
  23. * {@link com.liferay.portlet.documentlibrary.service.DLFileEntryServiceUtil} 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.documentlibrary.model.DLFileEntrySoap}.
  33. * If the method in the service utility returns a
  34. * {@link com.liferay.portlet.documentlibrary.model.DLFileEntry}, that is translated to a
  35. * {@link com.liferay.portlet.documentlibrary.model.DLFileEntrySoap}. 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
  48. * http://localhost:8080/tunnel-web/secure/axis. Set the property
  49. * <b>tunnel.servlet.hosts.allowed</b> in portal.properties to configure
  50. * security.
  51. * </p>
  52. *
  53. * <p>
  54. * The SOAP utility is only generated for remote services.
  55. * </p>
  56. *
  57. * @author Brian Wing Shun Chan
  58. * @see DLFileEntryServiceHttp
  59. * @see com.liferay.portlet.documentlibrary.model.DLFileEntrySoap
  60. * @see com.liferay.portlet.documentlibrary.service.DLFileEntryServiceUtil
  61. * @generated
  62. */
  63. public class DLFileEntryServiceSoap {
  64. public static void cancelCheckOut(long fileEntryId)
  65. throws RemoteException {
  66. try {
  67. DLFileEntryServiceUtil.cancelCheckOut(fileEntryId);
  68. }
  69. catch (Exception e) {
  70. _log.error(e, e);
  71. throw new RemoteException(e.getMessage());
  72. }
  73. }
  74. public static void checkInFileEntry(long fileEntryId, boolean major,
  75. java.lang.String changeLog,
  76. com.liferay.portal.service.ServiceContext serviceContext)
  77. throws RemoteException {
  78. try {
  79. DLFileEntryServiceUtil.checkInFileEntry(fileEntryId, major,
  80. changeLog, serviceContext);
  81. }
  82. catch (Exception e) {
  83. _log.error(e, e);
  84. throw new RemoteException(e.getMessage());
  85. }
  86. }
  87. public static void checkInFileEntry(long fileEntryId,
  88. java.lang.String lockUuid) throws RemoteException {
  89. try {
  90. DLFileEntryServiceUtil.checkInFileEntry(fileEntryId, lockUuid);
  91. }
  92. catch (Exception e) {
  93. _log.error(e, e);
  94. throw new RemoteException(e.getMessage());
  95. }
  96. }
  97. public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap checkOutFileEntry(
  98. long fileEntryId) throws RemoteException {
  99. try {
  100. com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.checkOutFileEntry(fileEntryId);
  101. return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
  102. }
  103. catch (Exception e) {
  104. _log.error(e, e);
  105. throw new RemoteException(e.getMessage());
  106. }
  107. }
  108. public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap checkOutFileEntry(
  109. long fileEntryId, java.lang.String owner, long expirationTime)
  110. throws RemoteException {
  111. try {
  112. com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.checkOutFileEntry(fileEntryId,
  113. owner, expirationTime);
  114. return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
  115. }
  116. catch (Exception e) {
  117. _log.error(e, e);
  118. throw new RemoteException(e.getMessage());
  119. }
  120. }
  121. public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap copyFileEntry(
  122. long groupId, long repositoryId, long fileEntryId, long destFolderId,
  123. com.liferay.portal.service.ServiceContext serviceContext)
  124. throws RemoteException {
  125. try {
  126. com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.copyFileEntry(groupId,
  127. repositoryId, fileEntryId, destFolderId, serviceContext);
  128. return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
  129. }
  130. catch (Exception e) {
  131. _log.error(e, e);
  132. throw new RemoteException(e.getMessage());
  133. }
  134. }
  135. public static void deleteFileEntry(long fileEntryId)
  136. throws RemoteException {
  137. try {
  138. DLFileEntryServiceUtil.deleteFileEntry(fileEntryId);
  139. }
  140. catch (Exception e) {
  141. _log.error(e, e);
  142. throw new RemoteException(e.getMessage());
  143. }
  144. }
  145. public static void deleteFileEntry(long groupId, long folderId,
  146. java.lang.String title) throws RemoteException {
  147. try {
  148. DLFileEntryServiceUtil.deleteFileEntry(groupId, folderId, title);
  149. }
  150. catch (Exception e) {
  151. _log.error(e, e);
  152. throw new RemoteException(e.getMessage());
  153. }
  154. }
  155. public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap[] getFileEntries(
  156. long groupId, long folderId, int start, int end,
  157. com.liferay.portal.kernel.util.OrderByComparator obc)
  158. throws RemoteException {
  159. try {
  160. java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> returnValue =
  161. DLFileEntryServiceUtil.getFileEntries(groupId, folderId, start,
  162. end, obc);
  163. return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModels(returnValue);
  164. }
  165. catch (Exception e) {
  166. _log.error(e, e);
  167. throw new RemoteException(e.getMessage());
  168. }
  169. }
  170. public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap[] getFileEntries(
  171. long groupId, long folderId, long fileEntryTypeId, int start, int end,
  172. com.liferay.portal.kernel.util.OrderByComparator obc)
  173. throws RemoteException {
  174. try {
  175. java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> returnValue =
  176. DLFileEntryServiceUtil.getFileEntries(groupId, folderId,
  177. fileEntryTypeId, start, end, obc);
  178. return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModels(returnValue);
  179. }
  180. catch (Exception e) {
  181. _log.error(e, e);
  182. throw new RemoteException(e.getMessage());
  183. }
  184. }
  185. public static int getFileEntriesCount(long groupId, long folderId)
  186. throws RemoteException {
  187. try {
  188. int returnValue = DLFileEntryServiceUtil.getFileEntriesCount(groupId,
  189. folderId);
  190. return returnValue;
  191. }
  192. catch (Exception e) {
  193. _log.error(e, e);
  194. throw new RemoteException(e.getMessage());
  195. }
  196. }
  197. public static int getFileEntriesCount(long groupId, long folderId,
  198. long fileEntryTypeId) throws RemoteException {
  199. try {
  200. int returnValue = DLFileEntryServiceUtil.getFileEntriesCount(groupId,
  201. folderId, fileEntryTypeId);
  202. return returnValue;
  203. }
  204. catch (Exception e) {
  205. _log.error(e, e);
  206. throw new RemoteException(e.getMessage());
  207. }
  208. }
  209. public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap getFileEntry(
  210. long fileEntryId) throws RemoteException {
  211. try {
  212. com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.getFileEntry(fileEntryId);
  213. return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
  214. }
  215. catch (Exception e) {
  216. _log.error(e, e);
  217. throw new RemoteException(e.getMessage());
  218. }
  219. }
  220. public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap getFileEntry(
  221. long groupId, long folderId, java.lang.String title)
  222. throws RemoteException {
  223. try {
  224. com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.getFileEntry(groupId,
  225. folderId, title);
  226. return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
  227. }
  228. catch (Exception e) {
  229. _log.error(e, e);
  230. throw new RemoteException(e.getMessage());
  231. }
  232. }
  233. public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap getFileEntryByUuidAndGroupId(
  234. java.lang.String uuid, long groupId) throws RemoteException {
  235. try {
  236. com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.getFileEntryByUuidAndGroupId(uuid,
  237. groupId);
  238. return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
  239. }
  240. catch (Exception e) {
  241. _log.error(e, e);
  242. throw new RemoteException(e.getMessage());
  243. }
  244. }
  245. public static int getFoldersFileEntriesCount(long groupId,
  246. Long[] folderIds, int status) throws RemoteException {
  247. try {
  248. int returnValue = DLFileEntryServiceUtil.getFoldersFileEntriesCount(groupId,
  249. ListUtil.toList(folderIds), status);
  250. return returnValue;
  251. }
  252. catch (Exception e) {
  253. _log.error(e, e);
  254. throw new RemoteException(e.getMessage());
  255. }
  256. }
  257. public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap[] getGroupFileEntries(
  258. long groupId, long userId, long rootFolderId, int start, int end,
  259. com.liferay.portal.kernel.util.OrderByComparator obc)
  260. throws RemoteException {
  261. try {
  262. java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> returnValue =
  263. DLFileEntryServiceUtil.getGroupFileEntries(groupId, userId,
  264. rootFolderId, start, end, obc);
  265. return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModels(returnValue);
  266. }
  267. catch (Exception e) {
  268. _log.error(e, e);
  269. throw new RemoteException(e.getMessage());
  270. }
  271. }
  272. public static int getGroupFileEntriesCount(long groupId, long userId,
  273. long rootFolderId) throws RemoteException {
  274. try {
  275. int returnValue = DLFileEntryServiceUtil.getGroupFileEntriesCount(groupId,
  276. userId, rootFolderId);
  277. return returnValue;
  278. }
  279. catch (Exception e) {
  280. _log.error(e, e);
  281. throw new RemoteException(e.getMessage());
  282. }
  283. }
  284. public static boolean hasFileEntryLock(long fileEntryId)
  285. throws RemoteException {
  286. try {
  287. boolean returnValue = DLFileEntryServiceUtil.hasFileEntryLock(fileEntryId);
  288. return returnValue;
  289. }
  290. catch (Exception e) {
  291. _log.error(e, e);
  292. throw new RemoteException(e.getMessage());
  293. }
  294. }
  295. public static boolean isFileEntryCheckedOut(long fileEntryId)
  296. throws RemoteException {
  297. try {
  298. boolean returnValue = DLFileEntryServiceUtil.isFileEntryCheckedOut(fileEntryId);
  299. return returnValue;
  300. }
  301. catch (Exception e) {
  302. _log.error(e, e);
  303. throw new RemoteException(e.getMessage());
  304. }
  305. }
  306. public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap moveFileEntry(
  307. long fileEntryId, long newFolderId,
  308. com.liferay.portal.service.ServiceContext serviceContext)
  309. throws RemoteException {
  310. try {
  311. com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.moveFileEntry(fileEntryId,
  312. newFolderId, serviceContext);
  313. return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
  314. }
  315. catch (Exception e) {
  316. _log.error(e, e);
  317. throw new RemoteException(e.getMessage());
  318. }
  319. }
  320. public static void revertFileEntry(long fileEntryId,
  321. java.lang.String version,
  322. com.liferay.portal.service.ServiceContext serviceContext)
  323. throws RemoteException {
  324. try {
  325. DLFileEntryServiceUtil.revertFileEntry(fileEntryId, version,
  326. serviceContext);
  327. }
  328. catch (Exception e) {
  329. _log.error(e, e);
  330. throw new RemoteException(e.getMessage());
  331. }
  332. }
  333. public static boolean verifyFileEntryCheckOut(long fileEntryId,
  334. java.lang.String lockUuid) throws RemoteException {
  335. try {
  336. boolean returnValue = DLFileEntryServiceUtil.verifyFileEntryCheckOut(fileEntryId,
  337. lockUuid);
  338. return returnValue;
  339. }
  340. catch (Exception e) {
  341. _log.error(e, e);
  342. throw new RemoteException(e.getMessage());
  343. }
  344. }
  345. private static Log _log = LogFactoryUtil.getLog(DLFileEntryServiceSoap.class);
  346. }