001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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 void cancelCheckOut(long fileEntryId)
070                    throws RemoteException {
071                    try {
072                            DLFileEntryServiceUtil.cancelCheckOut(fileEntryId);
073                    }
074                    catch (Exception e) {
075                            _log.error(e, e);
076    
077                            throw new RemoteException(e.getMessage());
078                    }
079            }
080    
081            public static void checkInFileEntry(long fileEntryId, boolean major,
082                    java.lang.String changeLog,
083                    com.liferay.portal.service.ServiceContext serviceContext)
084                    throws RemoteException {
085                    try {
086                            DLFileEntryServiceUtil.checkInFileEntry(fileEntryId, major,
087                                    changeLog, serviceContext);
088                    }
089                    catch (Exception e) {
090                            _log.error(e, e);
091    
092                            throw new RemoteException(e.getMessage());
093                    }
094            }
095    
096            public static void checkInFileEntry(long fileEntryId,
097                    java.lang.String lockUuid) throws RemoteException {
098                    try {
099                            DLFileEntryServiceUtil.checkInFileEntry(fileEntryId, lockUuid);
100                    }
101                    catch (Exception e) {
102                            _log.error(e, e);
103    
104                            throw new RemoteException(e.getMessage());
105                    }
106            }
107    
108            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap checkOutFileEntry(
109                    long fileEntryId) throws RemoteException {
110                    try {
111                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.checkOutFileEntry(fileEntryId);
112    
113                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
114                    }
115                    catch (Exception e) {
116                            _log.error(e, e);
117    
118                            throw new RemoteException(e.getMessage());
119                    }
120            }
121    
122            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap checkOutFileEntry(
123                    long fileEntryId, java.lang.String owner, long expirationTime)
124                    throws RemoteException {
125                    try {
126                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.checkOutFileEntry(fileEntryId,
127                                            owner, expirationTime);
128    
129                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
130                    }
131                    catch (Exception e) {
132                            _log.error(e, e);
133    
134                            throw new RemoteException(e.getMessage());
135                    }
136            }
137    
138            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap copyFileEntry(
139                    long groupId, long repositoryId, long fileEntryId, long destFolderId,
140                    com.liferay.portal.service.ServiceContext serviceContext)
141                    throws RemoteException {
142                    try {
143                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.copyFileEntry(groupId,
144                                            repositoryId, fileEntryId, destFolderId, serviceContext);
145    
146                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
147                    }
148                    catch (Exception e) {
149                            _log.error(e, e);
150    
151                            throw new RemoteException(e.getMessage());
152                    }
153            }
154    
155            public static void deleteFileEntry(long fileEntryId)
156                    throws RemoteException {
157                    try {
158                            DLFileEntryServiceUtil.deleteFileEntry(fileEntryId);
159                    }
160                    catch (Exception e) {
161                            _log.error(e, e);
162    
163                            throw new RemoteException(e.getMessage());
164                    }
165            }
166    
167            public static void deleteFileEntry(long groupId, long folderId,
168                    java.lang.String title) throws RemoteException {
169                    try {
170                            DLFileEntryServiceUtil.deleteFileEntry(groupId, folderId, title);
171                    }
172                    catch (Exception e) {
173                            _log.error(e, e);
174    
175                            throw new RemoteException(e.getMessage());
176                    }
177            }
178    
179            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap fetchFileEntryByImageId(
180                    long imageId) throws RemoteException {
181                    try {
182                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.fetchFileEntryByImageId(imageId);
183    
184                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(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[] getFileEntries(
194                    long groupId, long folderId, int start, int end,
195                    com.liferay.portal.kernel.util.OrderByComparator obc)
196                    throws RemoteException {
197                    try {
198                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> returnValue =
199                                    DLFileEntryServiceUtil.getFileEntries(groupId, folderId, start,
200                                            end, obc);
201    
202                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModels(returnValue);
203                    }
204                    catch (Exception e) {
205                            _log.error(e, e);
206    
207                            throw new RemoteException(e.getMessage());
208                    }
209            }
210    
211            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap[] getFileEntries(
212                    long groupId, long folderId, long fileEntryTypeId, int start, int end,
213                    com.liferay.portal.kernel.util.OrderByComparator obc)
214                    throws RemoteException {
215                    try {
216                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> returnValue =
217                                    DLFileEntryServiceUtil.getFileEntries(groupId, folderId,
218                                            fileEntryTypeId, start, end, obc);
219    
220                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModels(returnValue);
221                    }
222                    catch (Exception e) {
223                            _log.error(e, e);
224    
225                            throw new RemoteException(e.getMessage());
226                    }
227            }
228    
229            public static int getFileEntriesCount(long groupId, long folderId)
230                    throws RemoteException {
231                    try {
232                            int returnValue = DLFileEntryServiceUtil.getFileEntriesCount(groupId,
233                                            folderId);
234    
235                            return returnValue;
236                    }
237                    catch (Exception e) {
238                            _log.error(e, e);
239    
240                            throw new RemoteException(e.getMessage());
241                    }
242            }
243    
244            public static int getFileEntriesCount(long groupId, long folderId,
245                    long fileEntryTypeId) throws RemoteException {
246                    try {
247                            int returnValue = DLFileEntryServiceUtil.getFileEntriesCount(groupId,
248                                            folderId, fileEntryTypeId);
249    
250                            return returnValue;
251                    }
252                    catch (Exception e) {
253                            _log.error(e, e);
254    
255                            throw new RemoteException(e.getMessage());
256                    }
257            }
258    
259            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap getFileEntry(
260                    long fileEntryId) throws RemoteException {
261                    try {
262                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.getFileEntry(fileEntryId);
263    
264                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
265                    }
266                    catch (Exception e) {
267                            _log.error(e, e);
268    
269                            throw new RemoteException(e.getMessage());
270                    }
271            }
272    
273            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap getFileEntry(
274                    long groupId, long folderId, java.lang.String title)
275                    throws RemoteException {
276                    try {
277                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.getFileEntry(groupId,
278                                            folderId, title);
279    
280                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
281                    }
282                    catch (Exception e) {
283                            _log.error(e, e);
284    
285                            throw new RemoteException(e.getMessage());
286                    }
287            }
288    
289            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap getFileEntryByUuidAndGroupId(
290                    java.lang.String uuid, long groupId) throws RemoteException {
291                    try {
292                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.getFileEntryByUuidAndGroupId(uuid,
293                                            groupId);
294    
295                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
296                    }
297                    catch (Exception e) {
298                            _log.error(e, e);
299    
300                            throw new RemoteException(e.getMessage());
301                    }
302            }
303    
304            public static int getFoldersFileEntriesCount(long groupId,
305                    Long[] folderIds, int status) throws RemoteException {
306                    try {
307                            int returnValue = DLFileEntryServiceUtil.getFoldersFileEntriesCount(groupId,
308                                            ListUtil.toList(folderIds), status);
309    
310                            return returnValue;
311                    }
312                    catch (Exception e) {
313                            _log.error(e, e);
314    
315                            throw new RemoteException(e.getMessage());
316                    }
317            }
318    
319            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap[] getGroupFileEntries(
320                    long groupId, long userId, long rootFolderId, int start, int end,
321                    com.liferay.portal.kernel.util.OrderByComparator obc)
322                    throws RemoteException {
323                    try {
324                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> returnValue =
325                                    DLFileEntryServiceUtil.getGroupFileEntries(groupId, userId,
326                                            rootFolderId, start, end, obc);
327    
328                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModels(returnValue);
329                    }
330                    catch (Exception e) {
331                            _log.error(e, e);
332    
333                            throw new RemoteException(e.getMessage());
334                    }
335            }
336    
337            public static int getGroupFileEntriesCount(long groupId, long userId,
338                    long rootFolderId) throws RemoteException {
339                    try {
340                            int returnValue = DLFileEntryServiceUtil.getGroupFileEntriesCount(groupId,
341                                            userId, rootFolderId);
342    
343                            return returnValue;
344                    }
345                    catch (Exception e) {
346                            _log.error(e, e);
347    
348                            throw new RemoteException(e.getMessage());
349                    }
350            }
351    
352            public static boolean hasFileEntryLock(long fileEntryId)
353                    throws RemoteException {
354                    try {
355                            boolean returnValue = DLFileEntryServiceUtil.hasFileEntryLock(fileEntryId);
356    
357                            return returnValue;
358                    }
359                    catch (Exception e) {
360                            _log.error(e, e);
361    
362                            throw new RemoteException(e.getMessage());
363                    }
364            }
365    
366            public static boolean isFileEntryCheckedOut(long fileEntryId)
367                    throws RemoteException {
368                    try {
369                            boolean returnValue = DLFileEntryServiceUtil.isFileEntryCheckedOut(fileEntryId);
370    
371                            return returnValue;
372                    }
373                    catch (Exception e) {
374                            _log.error(e, e);
375    
376                            throw new RemoteException(e.getMessage());
377                    }
378            }
379    
380            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap moveFileEntry(
381                    long fileEntryId, long newFolderId,
382                    com.liferay.portal.service.ServiceContext serviceContext)
383                    throws RemoteException {
384                    try {
385                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.moveFileEntry(fileEntryId,
386                                            newFolderId, serviceContext);
387    
388                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
389                    }
390                    catch (Exception e) {
391                            _log.error(e, e);
392    
393                            throw new RemoteException(e.getMessage());
394                    }
395            }
396    
397            public static void revertFileEntry(long fileEntryId,
398                    java.lang.String version,
399                    com.liferay.portal.service.ServiceContext serviceContext)
400                    throws RemoteException {
401                    try {
402                            DLFileEntryServiceUtil.revertFileEntry(fileEntryId, version,
403                                    serviceContext);
404                    }
405                    catch (Exception e) {
406                            _log.error(e, e);
407    
408                            throw new RemoteException(e.getMessage());
409                    }
410            }
411    
412            public static boolean verifyFileEntryCheckOut(long fileEntryId,
413                    java.lang.String lockUuid) throws RemoteException {
414                    try {
415                            boolean returnValue = DLFileEntryServiceUtil.verifyFileEntryCheckOut(fileEntryId,
416                                            lockUuid);
417    
418                            return returnValue;
419                    }
420                    catch (Exception e) {
421                            _log.error(e, e);
422    
423                            throw new RemoteException(e.getMessage());
424                    }
425            }
426    
427            private static Log _log = LogFactoryUtil.getLog(DLFileEntryServiceSoap.class);
428    }