1   /**
2    * Copyright (c) 2000-2010 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  
15  package com.liferay.portlet.documentlibrary.service.http;
16  
17  import com.liferay.portal.kernel.log.Log;
18  import com.liferay.portal.kernel.log.LogFactoryUtil;
19  
20  import com.liferay.portlet.documentlibrary.service.DLFileEntryServiceUtil;
21  
22  import java.rmi.RemoteException;
23  
24  /**
25   * <a href="DLFileEntryServiceSoap.java.html"><b><i>View Source</i></b></a>
26   *
27   * <p>
28   * ServiceBuilder generated this class. Modifications in this class will be
29   * overwritten the next time is generated.
30   * </p>
31   *
32   * <p>
33   * This class provides a SOAP utility for the
34   * {@link com.liferay.portlet.documentlibrary.service.DLFileEntryServiceUtil} service utility. The
35   * static methods of this class calls the same methods of the service utility.
36   * However, the signatures are different because it is difficult for SOAP to
37   * support certain types.
38   * </p>
39   *
40   * <p>
41   * ServiceBuilder follows certain rules in translating the methods. For example,
42   * if the method in the service utility returns a {@link java.util.List}, that
43   * is translated to an array of {@link com.liferay.portlet.documentlibrary.model.DLFileEntrySoap}.
44   * If the method in the service utility returns a
45   * {@link com.liferay.portlet.documentlibrary.model.DLFileEntry}, that is translated to a
46   * {@link com.liferay.portlet.documentlibrary.model.DLFileEntrySoap}. Methods that SOAP cannot
47   * safely wire are skipped.
48   * </p>
49   *
50   * <p>
51   * The benefits of using the SOAP utility is that it is cross platform
52   * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
53   * even Perl, to call the generated services. One drawback of SOAP is that it is
54   * slow because it needs to serialize all calls into a text format (XML).
55   * </p>
56   *
57   * <p>
58   * You can see a list of services at
59   * http://localhost:8080/tunnel-web/secure/axis. Set the property
60   * <b>tunnel.servlet.hosts.allowed</b> in portal.properties to configure
61   * security.
62   * </p>
63   *
64   * <p>
65   * The SOAP utility is only generated for remote services.
66   * </p>
67   *
68   * @author    Brian Wing Shun Chan
69   * @see       DLFileEntryServiceHttp
70   * @see       com.liferay.portlet.documentlibrary.model.DLFileEntrySoap
71   * @see       com.liferay.portlet.documentlibrary.service.DLFileEntryServiceUtil
72   * @generated
73   */
74  public class DLFileEntryServiceSoap {
75      public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap addFileEntry(
76          long groupId, long folderId, java.lang.String name,
77          java.lang.String title, java.lang.String description,
78          java.lang.String versionDescription, java.lang.String extraSettings,
79          byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
80          throws RemoteException {
81          try {
82              com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.addFileEntry(groupId,
83                      folderId, name, title, description, versionDescription,
84                      extraSettings, bytes, serviceContext);
85  
86              return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
87          }
88          catch (Exception e) {
89              _log.error(e, e);
90  
91              throw new RemoteException(e.getMessage());
92          }
93      }
94  
95      public static void deleteFileEntry(long groupId, long folderId,
96          java.lang.String name) throws RemoteException {
97          try {
98              DLFileEntryServiceUtil.deleteFileEntry(groupId, folderId, name);
99          }
100         catch (Exception e) {
101             _log.error(e, e);
102 
103             throw new RemoteException(e.getMessage());
104         }
105     }
106 
107     public static void deleteFileEntry(long groupId, long folderId,
108         java.lang.String name, java.lang.String version)
109         throws RemoteException {
110         try {
111             DLFileEntryServiceUtil.deleteFileEntry(groupId, folderId, name,
112                 version);
113         }
114         catch (Exception e) {
115             _log.error(e, e);
116 
117             throw new RemoteException(e.getMessage());
118         }
119     }
120 
121     public static void deleteFileEntryByTitle(long groupId, long folderId,
122         java.lang.String titleWithExtension) throws RemoteException {
123         try {
124             DLFileEntryServiceUtil.deleteFileEntryByTitle(groupId, folderId,
125                 titleWithExtension);
126         }
127         catch (Exception e) {
128             _log.error(e, e);
129 
130             throw new RemoteException(e.getMessage());
131         }
132     }
133 
134     public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap[] getFileEntries(
135         long groupId, long folderId) throws RemoteException {
136         try {
137             java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> returnValue =
138                 DLFileEntryServiceUtil.getFileEntries(groupId, folderId);
139 
140             return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModels(returnValue);
141         }
142         catch (Exception e) {
143             _log.error(e, e);
144 
145             throw new RemoteException(e.getMessage());
146         }
147     }
148 
149     public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap getFileEntry(
150         long groupId, long folderId, java.lang.String name)
151         throws RemoteException {
152         try {
153             com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.getFileEntry(groupId,
154                     folderId, name);
155 
156             return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
157         }
158         catch (Exception e) {
159             _log.error(e, e);
160 
161             throw new RemoteException(e.getMessage());
162         }
163     }
164 
165     public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap getFileEntryByTitle(
166         long groupId, long folderId, java.lang.String titleWithExtension)
167         throws RemoteException {
168         try {
169             com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.getFileEntryByTitle(groupId,
170                     folderId, titleWithExtension);
171 
172             return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
173         }
174         catch (Exception e) {
175             _log.error(e, e);
176 
177             throw new RemoteException(e.getMessage());
178         }
179     }
180 
181     public static boolean hasFileEntryLock(long groupId, long folderId,
182         java.lang.String name) throws RemoteException {
183         try {
184             boolean returnValue = DLFileEntryServiceUtil.hasFileEntryLock(groupId,
185                     folderId, name);
186 
187             return returnValue;
188         }
189         catch (Exception e) {
190             _log.error(e, e);
191 
192             throw new RemoteException(e.getMessage());
193         }
194     }
195 
196     public static void unlockFileEntry(long groupId, long folderId,
197         java.lang.String name) throws RemoteException {
198         try {
199             DLFileEntryServiceUtil.unlockFileEntry(groupId, folderId, name);
200         }
201         catch (Exception e) {
202             _log.error(e, e);
203 
204             throw new RemoteException(e.getMessage());
205         }
206     }
207 
208     public static void unlockFileEntry(long groupId, long folderId,
209         java.lang.String name, java.lang.String lockUuid)
210         throws RemoteException {
211         try {
212             DLFileEntryServiceUtil.unlockFileEntry(groupId, folderId, name,
213                 lockUuid);
214         }
215         catch (Exception e) {
216             _log.error(e, e);
217 
218             throw new RemoteException(e.getMessage());
219         }
220     }
221 
222     public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap updateFileEntry(
223         long groupId, long folderId, long newFolderId, java.lang.String name,
224         java.lang.String sourceFileName, java.lang.String title,
225         java.lang.String description, java.lang.String versionDescription,
226         boolean majorVersion, java.lang.String extraSettings, byte[] bytes,
227         com.liferay.portal.service.ServiceContext serviceContext)
228         throws RemoteException {
229         try {
230             com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.updateFileEntry(groupId,
231                     folderId, newFolderId, name, sourceFileName, title,
232                     description, versionDescription, majorVersion,
233                     extraSettings, bytes, serviceContext);
234 
235             return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
236         }
237         catch (Exception e) {
238             _log.error(e, e);
239 
240             throw new RemoteException(e.getMessage());
241         }
242     }
243 
244     public static boolean verifyFileEntryLock(long groupId, long folderId,
245         java.lang.String name, java.lang.String lockUuid)
246         throws RemoteException {
247         try {
248             boolean returnValue = DLFileEntryServiceUtil.verifyFileEntryLock(groupId,
249                     folderId, name, lockUuid);
250 
251             return returnValue;
252         }
253         catch (Exception e) {
254             _log.error(e, e);
255 
256             throw new RemoteException(e.getMessage());
257         }
258     }
259 
260     private static Log _log = LogFactoryUtil.getLog(DLFileEntryServiceSoap.class);
261 }