001    /**
002     * Copyright (c) 2000-2012 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/api/secure/axis. Set the property
054     * <b>axis.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            /**
109            * @deprecated {@link #checkOutFileEntry(long, ServiceContext)}
110            */
111            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap checkOutFileEntry(
112                    long fileEntryId) throws RemoteException {
113                    try {
114                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.checkOutFileEntry(fileEntryId);
115    
116                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
117                    }
118                    catch (Exception e) {
119                            _log.error(e, e);
120    
121                            throw new RemoteException(e.getMessage());
122                    }
123            }
124    
125            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap checkOutFileEntry(
126                    long fileEntryId,
127                    com.liferay.portal.service.ServiceContext serviceContext)
128                    throws RemoteException {
129                    try {
130                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.checkOutFileEntry(fileEntryId,
131                                            serviceContext);
132    
133                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
134                    }
135                    catch (Exception e) {
136                            _log.error(e, e);
137    
138                            throw new RemoteException(e.getMessage());
139                    }
140            }
141    
142            /**
143            * @deprecated {@link #checkOutFileEntry(long, String, long,
144            ServiceContext)}
145            */
146            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap checkOutFileEntry(
147                    long fileEntryId, java.lang.String owner, long expirationTime)
148                    throws RemoteException {
149                    try {
150                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.checkOutFileEntry(fileEntryId,
151                                            owner, expirationTime);
152    
153                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
154                    }
155                    catch (Exception e) {
156                            _log.error(e, e);
157    
158                            throw new RemoteException(e.getMessage());
159                    }
160            }
161    
162            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap checkOutFileEntry(
163                    long fileEntryId, java.lang.String owner, long expirationTime,
164                    com.liferay.portal.service.ServiceContext serviceContext)
165                    throws RemoteException {
166                    try {
167                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.checkOutFileEntry(fileEntryId,
168                                            owner, expirationTime, serviceContext);
169    
170                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
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 copyFileEntry(
180                    long groupId, long repositoryId, long fileEntryId, long destFolderId,
181                    com.liferay.portal.service.ServiceContext serviceContext)
182                    throws RemoteException {
183                    try {
184                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.copyFileEntry(groupId,
185                                            repositoryId, fileEntryId, destFolderId, serviceContext);
186    
187                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(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 deleteFileEntry(long fileEntryId)
197                    throws RemoteException {
198                    try {
199                            DLFileEntryServiceUtil.deleteFileEntry(fileEntryId);
200                    }
201                    catch (Exception e) {
202                            _log.error(e, e);
203    
204                            throw new RemoteException(e.getMessage());
205                    }
206            }
207    
208            public static void deleteFileEntry(long groupId, long folderId,
209                    java.lang.String title) throws RemoteException {
210                    try {
211                            DLFileEntryServiceUtil.deleteFileEntry(groupId, folderId, title);
212                    }
213                    catch (Exception e) {
214                            _log.error(e, e);
215    
216                            throw new RemoteException(e.getMessage());
217                    }
218            }
219    
220            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap fetchFileEntryByImageId(
221                    long imageId) throws RemoteException {
222                    try {
223                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.fetchFileEntryByImageId(imageId);
224    
225                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
226                    }
227                    catch (Exception e) {
228                            _log.error(e, e);
229    
230                            throw new RemoteException(e.getMessage());
231                    }
232            }
233    
234            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap[] getFileEntries(
235                    long groupId, long folderId, int start, int end,
236                    com.liferay.portal.kernel.util.OrderByComparator obc)
237                    throws RemoteException {
238                    try {
239                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> returnValue =
240                                    DLFileEntryServiceUtil.getFileEntries(groupId, folderId, start,
241                                            end, obc);
242    
243                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModels(returnValue);
244                    }
245                    catch (Exception e) {
246                            _log.error(e, e);
247    
248                            throw new RemoteException(e.getMessage());
249                    }
250            }
251    
252            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap[] getFileEntries(
253                    long groupId, long folderId, long fileEntryTypeId, int start, int end,
254                    com.liferay.portal.kernel.util.OrderByComparator obc)
255                    throws RemoteException {
256                    try {
257                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> returnValue =
258                                    DLFileEntryServiceUtil.getFileEntries(groupId, folderId,
259                                            fileEntryTypeId, start, end, obc);
260    
261                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModels(returnValue);
262                    }
263                    catch (Exception e) {
264                            _log.error(e, e);
265    
266                            throw new RemoteException(e.getMessage());
267                    }
268            }
269    
270            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap[] getFileEntries(
271                    long groupId, long folderId, java.lang.String[] mimeTypes, int start,
272                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
273                    throws RemoteException {
274                    try {
275                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> returnValue =
276                                    DLFileEntryServiceUtil.getFileEntries(groupId, folderId,
277                                            mimeTypes, start, end, obc);
278    
279                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModels(returnValue);
280                    }
281                    catch (Exception e) {
282                            _log.error(e, e);
283    
284                            throw new RemoteException(e.getMessage());
285                    }
286            }
287    
288            public static int getFileEntriesCount(long groupId, long folderId)
289                    throws RemoteException {
290                    try {
291                            int returnValue = DLFileEntryServiceUtil.getFileEntriesCount(groupId,
292                                            folderId);
293    
294                            return returnValue;
295                    }
296                    catch (Exception e) {
297                            _log.error(e, e);
298    
299                            throw new RemoteException(e.getMessage());
300                    }
301            }
302    
303            public static int getFileEntriesCount(long groupId, long folderId,
304                    long fileEntryTypeId) throws RemoteException {
305                    try {
306                            int returnValue = DLFileEntryServiceUtil.getFileEntriesCount(groupId,
307                                            folderId, fileEntryTypeId);
308    
309                            return returnValue;
310                    }
311                    catch (Exception e) {
312                            _log.error(e, e);
313    
314                            throw new RemoteException(e.getMessage());
315                    }
316            }
317    
318            public static int getFileEntriesCount(long groupId, long folderId,
319                    java.lang.String[] mimeTypes) throws RemoteException {
320                    try {
321                            int returnValue = DLFileEntryServiceUtil.getFileEntriesCount(groupId,
322                                            folderId, mimeTypes);
323    
324                            return returnValue;
325                    }
326                    catch (Exception e) {
327                            _log.error(e, e);
328    
329                            throw new RemoteException(e.getMessage());
330                    }
331            }
332    
333            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap getFileEntry(
334                    long fileEntryId) throws RemoteException {
335                    try {
336                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.getFileEntry(fileEntryId);
337    
338                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
339                    }
340                    catch (Exception e) {
341                            _log.error(e, e);
342    
343                            throw new RemoteException(e.getMessage());
344                    }
345            }
346    
347            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap getFileEntry(
348                    long groupId, long folderId, java.lang.String title)
349                    throws RemoteException {
350                    try {
351                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.getFileEntry(groupId,
352                                            folderId, title);
353    
354                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
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 getFileEntryByUuidAndGroupId(
364                    java.lang.String uuid, long groupId) throws RemoteException {
365                    try {
366                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.getFileEntryByUuidAndGroupId(uuid,
367                                            groupId);
368    
369                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
370                    }
371                    catch (Exception e) {
372                            _log.error(e, e);
373    
374                            throw new RemoteException(e.getMessage());
375                    }
376            }
377    
378            public static int getFoldersFileEntriesCount(long groupId,
379                    Long[] folderIds, int status) throws RemoteException {
380                    try {
381                            int returnValue = DLFileEntryServiceUtil.getFoldersFileEntriesCount(groupId,
382                                            ListUtil.toList(folderIds), status);
383    
384                            return returnValue;
385                    }
386                    catch (Exception e) {
387                            _log.error(e, e);
388    
389                            throw new RemoteException(e.getMessage());
390                    }
391            }
392    
393            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap[] getGroupFileEntries(
394                    long groupId, long userId, long rootFolderId, int start, int end,
395                    com.liferay.portal.kernel.util.OrderByComparator obc)
396                    throws RemoteException {
397                    try {
398                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> returnValue =
399                                    DLFileEntryServiceUtil.getGroupFileEntries(groupId, userId,
400                                            rootFolderId, start, end, obc);
401    
402                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModels(returnValue);
403                    }
404                    catch (Exception e) {
405                            _log.error(e, e);
406    
407                            throw new RemoteException(e.getMessage());
408                    }
409            }
410    
411            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap[] getGroupFileEntries(
412                    long groupId, long userId, long rootFolderId,
413                    java.lang.String[] mimeTypes, int status, int start, int end,
414                    com.liferay.portal.kernel.util.OrderByComparator obc)
415                    throws RemoteException {
416                    try {
417                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> returnValue =
418                                    DLFileEntryServiceUtil.getGroupFileEntries(groupId, userId,
419                                            rootFolderId, mimeTypes, status, start, end, obc);
420    
421                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModels(returnValue);
422                    }
423                    catch (Exception e) {
424                            _log.error(e, e);
425    
426                            throw new RemoteException(e.getMessage());
427                    }
428            }
429    
430            public static int getGroupFileEntriesCount(long groupId, long userId,
431                    long rootFolderId) throws RemoteException {
432                    try {
433                            int returnValue = DLFileEntryServiceUtil.getGroupFileEntriesCount(groupId,
434                                            userId, rootFolderId);
435    
436                            return returnValue;
437                    }
438                    catch (Exception e) {
439                            _log.error(e, e);
440    
441                            throw new RemoteException(e.getMessage());
442                    }
443            }
444    
445            public static int getGroupFileEntriesCount(long groupId, long userId,
446                    long rootFolderId, java.lang.String[] mimeTypes, int status)
447                    throws RemoteException {
448                    try {
449                            int returnValue = DLFileEntryServiceUtil.getGroupFileEntriesCount(groupId,
450                                            userId, rootFolderId, mimeTypes, status);
451    
452                            return returnValue;
453                    }
454                    catch (Exception e) {
455                            _log.error(e, e);
456    
457                            throw new RemoteException(e.getMessage());
458                    }
459            }
460    
461            public static boolean hasFileEntryLock(long fileEntryId)
462                    throws RemoteException {
463                    try {
464                            boolean returnValue = DLFileEntryServiceUtil.hasFileEntryLock(fileEntryId);
465    
466                            return returnValue;
467                    }
468                    catch (Exception e) {
469                            _log.error(e, e);
470    
471                            throw new RemoteException(e.getMessage());
472                    }
473            }
474    
475            public static boolean isFileEntryCheckedOut(long fileEntryId)
476                    throws RemoteException {
477                    try {
478                            boolean returnValue = DLFileEntryServiceUtil.isFileEntryCheckedOut(fileEntryId);
479    
480                            return returnValue;
481                    }
482                    catch (Exception e) {
483                            _log.error(e, e);
484    
485                            throw new RemoteException(e.getMessage());
486                    }
487            }
488    
489            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap moveFileEntry(
490                    long fileEntryId, long newFolderId,
491                    com.liferay.portal.service.ServiceContext serviceContext)
492                    throws RemoteException {
493                    try {
494                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.moveFileEntry(fileEntryId,
495                                            newFolderId, serviceContext);
496    
497                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
498                    }
499                    catch (Exception e) {
500                            _log.error(e, e);
501    
502                            throw new RemoteException(e.getMessage());
503                    }
504            }
505    
506            public static void revertFileEntry(long fileEntryId,
507                    java.lang.String version,
508                    com.liferay.portal.service.ServiceContext serviceContext)
509                    throws RemoteException {
510                    try {
511                            DLFileEntryServiceUtil.revertFileEntry(fileEntryId, version,
512                                    serviceContext);
513                    }
514                    catch (Exception e) {
515                            _log.error(e, e);
516    
517                            throw new RemoteException(e.getMessage());
518                    }
519            }
520    
521            public static void unlockFileEntry(long fileEntryId)
522                    throws RemoteException {
523                    try {
524                            DLFileEntryServiceUtil.unlockFileEntry(fileEntryId);
525                    }
526                    catch (Exception e) {
527                            _log.error(e, e);
528    
529                            throw new RemoteException(e.getMessage());
530                    }
531            }
532    
533            public static void unlockFileEntry(long fileEntryId,
534                    java.lang.String lockUuid) throws RemoteException {
535                    try {
536                            DLFileEntryServiceUtil.unlockFileEntry(fileEntryId, lockUuid);
537                    }
538                    catch (Exception e) {
539                            _log.error(e, e);
540    
541                            throw new RemoteException(e.getMessage());
542                    }
543            }
544    
545            public static boolean verifyFileEntryCheckOut(long fileEntryId,
546                    java.lang.String lockUuid) throws RemoteException {
547                    try {
548                            boolean returnValue = DLFileEntryServiceUtil.verifyFileEntryCheckOut(fileEntryId,
549                                            lockUuid);
550    
551                            return returnValue;
552                    }
553                    catch (Exception e) {
554                            _log.error(e, e);
555    
556                            throw new RemoteException(e.getMessage());
557                    }
558            }
559    
560            public static boolean verifyFileEntryLock(long fileEntryId,
561                    java.lang.String lockUuid) throws RemoteException {
562                    try {
563                            boolean returnValue = DLFileEntryServiceUtil.verifyFileEntryLock(fileEntryId,
564                                            lockUuid);
565    
566                            return returnValue;
567                    }
568                    catch (Exception e) {
569                            _log.error(e, e);
570    
571                            throw new RemoteException(e.getMessage());
572                    }
573            }
574    
575            private static Log _log = LogFactoryUtil.getLog(DLFileEntryServiceSoap.class);
576    }