1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
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 folderId, java.lang.String name, java.lang.String title,
77          java.lang.String description, java.lang.String extraSettings,
78          byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
79          throws RemoteException {
80          try {
81              com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.addFileEntry(folderId,
82                      name, title, description, extraSettings, bytes,
83                      serviceContext);
84  
85              return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
86          }
87          catch (Exception e) {
88              _log.error(e, e);
89  
90              throw new RemoteException(e.getMessage());
91          }
92      }
93  
94      public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap addFileEntry(
95          long folderId, java.lang.String name, java.lang.String title,
96          java.lang.String description, java.lang.String versionDescription,
97          java.lang.String extraSettings, byte[] bytes,
98          com.liferay.portal.service.ServiceContext serviceContext)
99          throws RemoteException {
100         try {
101             com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.addFileEntry(folderId,
102                     name, title, description, versionDescription,
103                     extraSettings, bytes, serviceContext);
104 
105             return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
106         }
107         catch (Exception e) {
108             _log.error(e, e);
109 
110             throw new RemoteException(e.getMessage());
111         }
112     }
113 
114     public static void deleteFileEntry(long folderId, java.lang.String name)
115         throws RemoteException {
116         try {
117             DLFileEntryServiceUtil.deleteFileEntry(folderId, name);
118         }
119         catch (Exception e) {
120             _log.error(e, e);
121 
122             throw new RemoteException(e.getMessage());
123         }
124     }
125 
126     public static void deleteFileEntry(long folderId, java.lang.String name,
127         double version) throws RemoteException {
128         try {
129             DLFileEntryServiceUtil.deleteFileEntry(folderId, name, version);
130         }
131         catch (Exception e) {
132             _log.error(e, e);
133 
134             throw new RemoteException(e.getMessage());
135         }
136     }
137 
138     public static void deleteFileEntryByTitle(long folderId,
139         java.lang.String titleWithExtension) throws RemoteException {
140         try {
141             DLFileEntryServiceUtil.deleteFileEntryByTitle(folderId,
142                 titleWithExtension);
143         }
144         catch (Exception e) {
145             _log.error(e, e);
146 
147             throw new RemoteException(e.getMessage());
148         }
149     }
150 
151     public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap[] getFileEntries(
152         long folderId) throws RemoteException {
153         try {
154             java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> returnValue =
155                 DLFileEntryServiceUtil.getFileEntries(folderId);
156 
157             return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModels(returnValue);
158         }
159         catch (Exception e) {
160             _log.error(e, e);
161 
162             throw new RemoteException(e.getMessage());
163         }
164     }
165 
166     public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap getFileEntry(
167         long folderId, java.lang.String name) throws RemoteException {
168         try {
169             com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.getFileEntry(folderId,
170                     name);
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 com.liferay.portlet.documentlibrary.model.DLFileEntrySoap getFileEntryByTitle(
182         long folderId, java.lang.String titleWithExtension)
183         throws RemoteException {
184         try {
185             com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.getFileEntryByTitle(folderId,
186                     titleWithExtension);
187 
188             return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
189         }
190         catch (Exception e) {
191             _log.error(e, e);
192 
193             throw new RemoteException(e.getMessage());
194         }
195     }
196 
197     public static boolean hasFileEntryLock(long folderId, java.lang.String name)
198         throws RemoteException {
199         try {
200             boolean returnValue = DLFileEntryServiceUtil.hasFileEntryLock(folderId,
201                     name);
202 
203             return returnValue;
204         }
205         catch (Exception e) {
206             _log.error(e, e);
207 
208             throw new RemoteException(e.getMessage());
209         }
210     }
211 
212     public static void unlockFileEntry(long folderId, java.lang.String name)
213         throws RemoteException {
214         try {
215             DLFileEntryServiceUtil.unlockFileEntry(folderId, name);
216         }
217         catch (Exception e) {
218             _log.error(e, e);
219 
220             throw new RemoteException(e.getMessage());
221         }
222     }
223 
224     public static void unlockFileEntry(long folderId, java.lang.String name,
225         java.lang.String lockUuid) throws RemoteException {
226         try {
227             DLFileEntryServiceUtil.unlockFileEntry(folderId, name, lockUuid);
228         }
229         catch (Exception e) {
230             _log.error(e, e);
231 
232             throw new RemoteException(e.getMessage());
233         }
234     }
235 
236     public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap updateFileEntry(
237         long folderId, long newFolderId, java.lang.String name,
238         java.lang.String sourceFileName, java.lang.String title,
239         java.lang.String description, java.lang.String extraSettings,
240         byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
241         throws RemoteException {
242         try {
243             com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.updateFileEntry(folderId,
244                     newFolderId, name, sourceFileName, title, description,
245                     extraSettings, bytes, serviceContext);
246 
247             return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
248         }
249         catch (Exception e) {
250             _log.error(e, e);
251 
252             throw new RemoteException(e.getMessage());
253         }
254     }
255 
256     public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap updateFileEntry(
257         long folderId, long newFolderId, java.lang.String name,
258         java.lang.String sourceFileName, java.lang.String title,
259         java.lang.String description, java.lang.String versionDescription,
260         java.lang.String extraSettings, byte[] bytes,
261         com.liferay.portal.service.ServiceContext serviceContext)
262         throws RemoteException {
263         try {
264             com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.updateFileEntry(folderId,
265                     newFolderId, name, sourceFileName, title, description,
266                     versionDescription, extraSettings, bytes, serviceContext);
267 
268             return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
269         }
270         catch (Exception e) {
271             _log.error(e, e);
272 
273             throw new RemoteException(e.getMessage());
274         }
275     }
276 
277     public static boolean verifyFileEntryLock(long folderId,
278         java.lang.String name, java.lang.String lockUuid)
279         throws RemoteException {
280         try {
281             boolean returnValue = DLFileEntryServiceUtil.verifyFileEntryLock(folderId,
282                     name, lockUuid);
283 
284             return returnValue;
285         }
286         catch (Exception e) {
287             _log.error(e, e);
288 
289             throw new RemoteException(e.getMessage());
290         }
291     }
292 
293     private static Log _log = LogFactoryUtil.getLog(DLFileEntryServiceSoap.class);
294 }