001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.documentlibrary.service.http;
016    
017    import com.liferay.portal.kernel.log.Log;
018    import com.liferay.portal.kernel.log.LogFactoryUtil;
019    import com.liferay.portal.kernel.util.ListUtil;
020    
021    import com.liferay.portlet.documentlibrary.service.DLFileEntryServiceUtil;
022    
023    import java.rmi.RemoteException;
024    
025    /**
026     * <p>
027     * This class provides a SOAP utility for the
028     * {@link com.liferay.portlet.documentlibrary.service.DLFileEntryServiceUtil} service utility. The
029     * static methods of this class calls the same methods of the service utility.
030     * However, the signatures are different because it is difficult for SOAP to
031     * support certain types.
032     * </p>
033     *
034     * <p>
035     * ServiceBuilder follows certain rules in translating the methods. For example,
036     * if the method in the service utility returns a {@link java.util.List}, that
037     * is translated to an array of {@link com.liferay.portlet.documentlibrary.model.DLFileEntrySoap}.
038     * If the method in the service utility returns a
039     * {@link com.liferay.portlet.documentlibrary.model.DLFileEntry}, that is translated to a
040     * {@link com.liferay.portlet.documentlibrary.model.DLFileEntrySoap}. Methods that SOAP cannot
041     * safely wire are skipped.
042     * </p>
043     *
044     * <p>
045     * The benefits of using the SOAP utility is that it is cross platform
046     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
047     * even Perl, to call the generated services. One drawback of SOAP is that it is
048     * slow because it needs to serialize all calls into a text format (XML).
049     * </p>
050     *
051     * <p>
052     * You can see a list of services at
053     * http://localhost:8080/tunnel-web/secure/axis. Set the property
054     * <b>tunnel.servlet.hosts.allowed</b> in portal.properties to configure
055     * security.
056     * </p>
057     *
058     * <p>
059     * The SOAP utility is only generated for remote services.
060     * </p>
061     *
062     * @author    Brian Wing Shun Chan
063     * @see       DLFileEntryServiceHttp
064     * @see       com.liferay.portlet.documentlibrary.model.DLFileEntrySoap
065     * @see       com.liferay.portlet.documentlibrary.service.DLFileEntryServiceUtil
066     * @generated
067     */
068    public class DLFileEntryServiceSoap {
069            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap addFileEntry(
070                    long groupId, long folderId, java.lang.String name,
071                    java.lang.String title, java.lang.String description,
072                    java.lang.String changeLog, java.lang.String extraSettings,
073                    byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
074                    throws RemoteException {
075                    try {
076                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.addFileEntry(groupId,
077                                            folderId, name, title, description, changeLog,
078                                            extraSettings, bytes, serviceContext);
079    
080                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
081                    }
082                    catch (Exception e) {
083                            _log.error(e, e);
084    
085                            throw new RemoteException(e.getMessage());
086                    }
087            }
088    
089            public static void deleteFileEntry(long groupId, long folderId,
090                    java.lang.String name) throws RemoteException {
091                    try {
092                            DLFileEntryServiceUtil.deleteFileEntry(groupId, folderId, name);
093                    }
094                    catch (Exception e) {
095                            _log.error(e, e);
096    
097                            throw new RemoteException(e.getMessage());
098                    }
099            }
100    
101            public static void deleteFileEntry(long groupId, long folderId,
102                    java.lang.String name, java.lang.String version)
103                    throws RemoteException {
104                    try {
105                            DLFileEntryServiceUtil.deleteFileEntry(groupId, folderId, name,
106                                    version);
107                    }
108                    catch (Exception e) {
109                            _log.error(e, e);
110    
111                            throw new RemoteException(e.getMessage());
112                    }
113            }
114    
115            public static void deleteFileEntryByTitle(long groupId, long folderId,
116                    java.lang.String titleWithExtension) throws RemoteException {
117                    try {
118                            DLFileEntryServiceUtil.deleteFileEntryByTitle(groupId, folderId,
119                                    titleWithExtension);
120                    }
121                    catch (Exception e) {
122                            _log.error(e, e);
123    
124                            throw new RemoteException(e.getMessage());
125                    }
126            }
127    
128            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap[] getFileEntries(
129                    long groupId, long folderId) throws RemoteException {
130                    try {
131                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> returnValue =
132                                    DLFileEntryServiceUtil.getFileEntries(groupId, folderId);
133    
134                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModels(returnValue);
135                    }
136                    catch (Exception e) {
137                            _log.error(e, e);
138    
139                            throw new RemoteException(e.getMessage());
140                    }
141            }
142    
143            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap[] getFileEntries(
144                    long groupId, long folderId, int start, int end)
145                    throws RemoteException {
146                    try {
147                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> returnValue =
148                                    DLFileEntryServiceUtil.getFileEntries(groupId, folderId, start,
149                                            end);
150    
151                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModels(returnValue);
152                    }
153                    catch (Exception e) {
154                            _log.error(e, e);
155    
156                            throw new RemoteException(e.getMessage());
157                    }
158            }
159    
160            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap[] getFileEntries(
161                    long groupId, long folderId, int start, int end,
162                    com.liferay.portal.kernel.util.OrderByComparator obc)
163                    throws RemoteException {
164                    try {
165                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> returnValue =
166                                    DLFileEntryServiceUtil.getFileEntries(groupId, folderId, start,
167                                            end, obc);
168    
169                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModels(returnValue);
170                    }
171                    catch (Exception e) {
172                            _log.error(e, e);
173    
174                            throw new RemoteException(e.getMessage());
175                    }
176            }
177    
178            public static int getFileEntriesCount(long groupId, long folderId)
179                    throws RemoteException {
180                    try {
181                            int returnValue = DLFileEntryServiceUtil.getFileEntriesCount(groupId,
182                                            folderId);
183    
184                            return returnValue;
185                    }
186                    catch (Exception e) {
187                            _log.error(e, e);
188    
189                            throw new RemoteException(e.getMessage());
190                    }
191            }
192    
193            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap getFileEntry(
194                    long groupId, long folderId, java.lang.String name)
195                    throws RemoteException {
196                    try {
197                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.getFileEntry(groupId,
198                                            folderId, name);
199    
200                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
201                    }
202                    catch (Exception e) {
203                            _log.error(e, e);
204    
205                            throw new RemoteException(e.getMessage());
206                    }
207            }
208    
209            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap getFileEntryByTitle(
210                    long groupId, long folderId, java.lang.String titleWithExtension)
211                    throws RemoteException {
212                    try {
213                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.getFileEntryByTitle(groupId,
214                                            folderId, titleWithExtension);
215    
216                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
217                    }
218                    catch (Exception e) {
219                            _log.error(e, e);
220    
221                            throw new RemoteException(e.getMessage());
222                    }
223            }
224    
225            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap getFileEntryByUuidAndGroupId(
226                    java.lang.String uuid, long groupId) throws RemoteException {
227                    try {
228                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.getFileEntryByUuidAndGroupId(uuid,
229                                            groupId);
230    
231                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
232                    }
233                    catch (Exception e) {
234                            _log.error(e, e);
235    
236                            throw new RemoteException(e.getMessage());
237                    }
238            }
239    
240            public static int getFoldersFileEntriesCount(long groupId,
241                    Long[] folderIds, int status) throws RemoteException {
242                    try {
243                            int returnValue = DLFileEntryServiceUtil.getFoldersFileEntriesCount(groupId,
244                                            ListUtil.toList(folderIds), status);
245    
246                            return returnValue;
247                    }
248                    catch (Exception e) {
249                            _log.error(e, e);
250    
251                            throw new RemoteException(e.getMessage());
252                    }
253            }
254    
255            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap[] getGroupFileEntries(
256                    long groupId, long userId, int start, int end)
257                    throws RemoteException {
258                    try {
259                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> returnValue =
260                                    DLFileEntryServiceUtil.getGroupFileEntries(groupId, userId,
261                                            start, end);
262    
263                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModels(returnValue);
264                    }
265                    catch (Exception e) {
266                            _log.error(e, e);
267    
268                            throw new RemoteException(e.getMessage());
269                    }
270            }
271    
272            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap[] getGroupFileEntries(
273                    long groupId, long userId, int start, int end,
274                    com.liferay.portal.kernel.util.OrderByComparator obc)
275                    throws RemoteException {
276                    try {
277                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> returnValue =
278                                    DLFileEntryServiceUtil.getGroupFileEntries(groupId, userId,
279                                            start, end, obc);
280    
281                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModels(returnValue);
282                    }
283                    catch (Exception e) {
284                            _log.error(e, e);
285    
286                            throw new RemoteException(e.getMessage());
287                    }
288            }
289    
290            public static int getGroupFileEntriesCount(long groupId, long userId)
291                    throws RemoteException {
292                    try {
293                            int returnValue = DLFileEntryServiceUtil.getGroupFileEntriesCount(groupId,
294                                            userId);
295    
296                            return returnValue;
297                    }
298                    catch (Exception e) {
299                            _log.error(e, e);
300    
301                            throw new RemoteException(e.getMessage());
302                    }
303            }
304    
305            public static boolean hasFileEntryLock(long groupId, long folderId,
306                    java.lang.String name) throws RemoteException {
307                    try {
308                            boolean returnValue = DLFileEntryServiceUtil.hasFileEntryLock(groupId,
309                                            folderId, name);
310    
311                            return returnValue;
312                    }
313                    catch (Exception e) {
314                            _log.error(e, e);
315    
316                            throw new RemoteException(e.getMessage());
317                    }
318            }
319    
320            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap moveFileEntry(
321                    long groupId, long folderId, long newFolderId, java.lang.String name,
322                    com.liferay.portal.service.ServiceContext serviceContext)
323                    throws RemoteException {
324                    try {
325                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.moveFileEntry(groupId,
326                                            folderId, newFolderId, name, serviceContext);
327    
328                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
329                    }
330                    catch (Exception e) {
331                            _log.error(e, e);
332    
333                            throw new RemoteException(e.getMessage());
334                    }
335            }
336    
337            public static void unlockFileEntry(long groupId, long folderId,
338                    java.lang.String name) throws RemoteException {
339                    try {
340                            DLFileEntryServiceUtil.unlockFileEntry(groupId, folderId, name);
341                    }
342                    catch (Exception e) {
343                            _log.error(e, e);
344    
345                            throw new RemoteException(e.getMessage());
346                    }
347            }
348    
349            public static void unlockFileEntry(long groupId, long folderId,
350                    java.lang.String name, java.lang.String lockUuid)
351                    throws RemoteException {
352                    try {
353                            DLFileEntryServiceUtil.unlockFileEntry(groupId, folderId, name,
354                                    lockUuid);
355                    }
356                    catch (Exception e) {
357                            _log.error(e, e);
358    
359                            throw new RemoteException(e.getMessage());
360                    }
361            }
362    
363            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap updateFileEntry(
364                    long groupId, long folderId, java.lang.String name,
365                    java.lang.String sourceFileName, java.lang.String title,
366                    java.lang.String description, java.lang.String changeLog,
367                    boolean majorVersion, java.lang.String extraSettings, byte[] bytes,
368                    com.liferay.portal.service.ServiceContext serviceContext)
369                    throws RemoteException {
370                    try {
371                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.updateFileEntry(groupId,
372                                            folderId, name, sourceFileName, title, description,
373                                            changeLog, majorVersion, extraSettings, bytes,
374                                            serviceContext);
375    
376                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
377                    }
378                    catch (Exception e) {
379                            _log.error(e, e);
380    
381                            throw new RemoteException(e.getMessage());
382                    }
383            }
384    
385            public static boolean verifyFileEntryLock(long groupId, long folderId,
386                    java.lang.String name, java.lang.String lockUuid)
387                    throws RemoteException {
388                    try {
389                            boolean returnValue = DLFileEntryServiceUtil.verifyFileEntryLock(groupId,
390                                            folderId, name, lockUuid);
391    
392                            return returnValue;
393                    }
394                    catch (Exception e) {
395                            _log.error(e, e);
396    
397                            throw new RemoteException(e.getMessage());
398                    }
399            }
400    
401            private static Log _log = LogFactoryUtil.getLog(DLFileEntryServiceSoap.class);
402    }