001    /**
002     * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.document.library.kernel.service.DLFileEntryServiceUtil;
020    
021    import com.liferay.portal.kernel.log.Log;
022    import com.liferay.portal.kernel.log.LogFactoryUtil;
023    import com.liferay.portal.kernel.util.ListUtil;
024    
025    import java.rmi.RemoteException;
026    
027    /**
028     * Provides the SOAP utility for the
029     * {@link DLFileEntryServiceUtil} service utility. The
030     * static methods of this class calls the same methods of the service utility.
031     * However, the signatures are different because it is difficult for SOAP to
032     * support certain types.
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.document.library.kernel.model.DLFileEntrySoap}.
038     * If the method in the service utility returns a
039     * {@link com.liferay.document.library.kernel.model.DLFileEntry}, that is translated to a
040     * {@link com.liferay.document.library.kernel.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 http://localhost:8080/api/axis. Set the
053     * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
054     * security.
055     * </p>
056     *
057     * <p>
058     * The SOAP utility is only generated for remote services.
059     * </p>
060     *
061     * @author Brian Wing Shun Chan
062     * @see DLFileEntryServiceHttp
063     * @see com.liferay.document.library.kernel.model.DLFileEntrySoap
064     * @see DLFileEntryServiceUtil
065     * @generated
066     */
067    @ProviderType
068    public class DLFileEntryServiceSoap {
069            public static com.liferay.document.library.kernel.model.DLFileVersionSoap cancelCheckOut(
070                    long fileEntryId) throws RemoteException {
071                    try {
072                            com.liferay.document.library.kernel.model.DLFileVersion returnValue = DLFileEntryServiceUtil.cancelCheckOut(fileEntryId);
073    
074                            return com.liferay.document.library.kernel.model.DLFileVersionSoap.toSoapModel(returnValue);
075                    }
076                    catch (Exception e) {
077                            _log.error(e, e);
078    
079                            throw new RemoteException(e.getMessage());
080                    }
081            }
082    
083            public static void checkInFileEntry(long fileEntryId, boolean major,
084                    java.lang.String changeLog,
085                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
086                    throws RemoteException {
087                    try {
088                            DLFileEntryServiceUtil.checkInFileEntry(fileEntryId, major,
089                                    changeLog, serviceContext);
090                    }
091                    catch (Exception e) {
092                            _log.error(e, e);
093    
094                            throw new RemoteException(e.getMessage());
095                    }
096            }
097    
098            public static void checkInFileEntry(long fileEntryId,
099                    java.lang.String lockUuid,
100                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
101                    throws RemoteException {
102                    try {
103                            DLFileEntryServiceUtil.checkInFileEntry(fileEntryId, lockUuid,
104                                    serviceContext);
105                    }
106                    catch (Exception e) {
107                            _log.error(e, e);
108    
109                            throw new RemoteException(e.getMessage());
110                    }
111            }
112    
113            public static com.liferay.document.library.kernel.model.DLFileEntrySoap checkOutFileEntry(
114                    long fileEntryId,
115                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
116                    throws RemoteException {
117                    try {
118                            com.liferay.document.library.kernel.model.DLFileEntry returnValue = DLFileEntryServiceUtil.checkOutFileEntry(fileEntryId,
119                                            serviceContext);
120    
121                            return com.liferay.document.library.kernel.model.DLFileEntrySoap.toSoapModel(returnValue);
122                    }
123                    catch (Exception e) {
124                            _log.error(e, e);
125    
126                            throw new RemoteException(e.getMessage());
127                    }
128            }
129    
130            public static com.liferay.document.library.kernel.model.DLFileEntrySoap checkOutFileEntry(
131                    long fileEntryId, java.lang.String owner, long expirationTime,
132                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
133                    throws RemoteException {
134                    try {
135                            com.liferay.document.library.kernel.model.DLFileEntry returnValue = DLFileEntryServiceUtil.checkOutFileEntry(fileEntryId,
136                                            owner, expirationTime, serviceContext);
137    
138                            return com.liferay.document.library.kernel.model.DLFileEntrySoap.toSoapModel(returnValue);
139                    }
140                    catch (Exception e) {
141                            _log.error(e, e);
142    
143                            throw new RemoteException(e.getMessage());
144                    }
145            }
146    
147            public static com.liferay.document.library.kernel.model.DLFileEntrySoap copyFileEntry(
148                    long groupId, long repositoryId, long fileEntryId, long destFolderId,
149                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
150                    throws RemoteException {
151                    try {
152                            com.liferay.document.library.kernel.model.DLFileEntry returnValue = DLFileEntryServiceUtil.copyFileEntry(groupId,
153                                            repositoryId, fileEntryId, destFolderId, serviceContext);
154    
155                            return com.liferay.document.library.kernel.model.DLFileEntrySoap.toSoapModel(returnValue);
156                    }
157                    catch (Exception e) {
158                            _log.error(e, e);
159    
160                            throw new RemoteException(e.getMessage());
161                    }
162            }
163    
164            public static void deleteFileEntry(long fileEntryId)
165                    throws RemoteException {
166                    try {
167                            DLFileEntryServiceUtil.deleteFileEntry(fileEntryId);
168                    }
169                    catch (Exception e) {
170                            _log.error(e, e);
171    
172                            throw new RemoteException(e.getMessage());
173                    }
174            }
175    
176            public static void deleteFileEntry(long groupId, long folderId,
177                    java.lang.String title) throws RemoteException {
178                    try {
179                            DLFileEntryServiceUtil.deleteFileEntry(groupId, folderId, title);
180                    }
181                    catch (Exception e) {
182                            _log.error(e, e);
183    
184                            throw new RemoteException(e.getMessage());
185                    }
186            }
187    
188            public static void deleteFileVersion(long fileEntryId,
189                    java.lang.String version) throws RemoteException {
190                    try {
191                            DLFileEntryServiceUtil.deleteFileVersion(fileEntryId, version);
192                    }
193                    catch (Exception e) {
194                            _log.error(e, e);
195    
196                            throw new RemoteException(e.getMessage());
197                    }
198            }
199    
200            public static com.liferay.document.library.kernel.model.DLFileEntrySoap fetchFileEntryByImageId(
201                    long imageId) throws RemoteException {
202                    try {
203                            com.liferay.document.library.kernel.model.DLFileEntry returnValue = DLFileEntryServiceUtil.fetchFileEntryByImageId(imageId);
204    
205                            return com.liferay.document.library.kernel.model.DLFileEntrySoap.toSoapModel(returnValue);
206                    }
207                    catch (Exception e) {
208                            _log.error(e, e);
209    
210                            throw new RemoteException(e.getMessage());
211                    }
212            }
213    
214            public static com.liferay.document.library.kernel.model.DLFileEntrySoap[] getFileEntries(
215                    long groupId, long folderId, int status, int start, int end,
216                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFileEntry> obc)
217                    throws RemoteException {
218                    try {
219                            java.util.List<com.liferay.document.library.kernel.model.DLFileEntry> returnValue =
220                                    DLFileEntryServiceUtil.getFileEntries(groupId, folderId,
221                                            status, start, end, obc);
222    
223                            return com.liferay.document.library.kernel.model.DLFileEntrySoap.toSoapModels(returnValue);
224                    }
225                    catch (Exception e) {
226                            _log.error(e, e);
227    
228                            throw new RemoteException(e.getMessage());
229                    }
230            }
231    
232            public static com.liferay.document.library.kernel.model.DLFileEntrySoap[] getFileEntries(
233                    long groupId, long folderId, int start, int end,
234                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFileEntry> obc)
235                    throws RemoteException {
236                    try {
237                            java.util.List<com.liferay.document.library.kernel.model.DLFileEntry> returnValue =
238                                    DLFileEntryServiceUtil.getFileEntries(groupId, folderId, start,
239                                            end, obc);
240    
241                            return com.liferay.document.library.kernel.model.DLFileEntrySoap.toSoapModels(returnValue);
242                    }
243                    catch (Exception e) {
244                            _log.error(e, e);
245    
246                            throw new RemoteException(e.getMessage());
247                    }
248            }
249    
250            public static com.liferay.document.library.kernel.model.DLFileEntrySoap[] getFileEntries(
251                    long groupId, long folderId, long fileEntryTypeId, int start, int end,
252                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFileEntry> obc)
253                    throws RemoteException {
254                    try {
255                            java.util.List<com.liferay.document.library.kernel.model.DLFileEntry> returnValue =
256                                    DLFileEntryServiceUtil.getFileEntries(groupId, folderId,
257                                            fileEntryTypeId, start, end, obc);
258    
259                            return com.liferay.document.library.kernel.model.DLFileEntrySoap.toSoapModels(returnValue);
260                    }
261                    catch (Exception e) {
262                            _log.error(e, e);
263    
264                            throw new RemoteException(e.getMessage());
265                    }
266            }
267    
268            public static com.liferay.document.library.kernel.model.DLFileEntrySoap[] getFileEntries(
269                    long groupId, long folderId, java.lang.String[] mimeTypes, int start,
270                    int end,
271                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFileEntry> obc)
272                    throws RemoteException {
273                    try {
274                            java.util.List<com.liferay.document.library.kernel.model.DLFileEntry> returnValue =
275                                    DLFileEntryServiceUtil.getFileEntries(groupId, folderId,
276                                            mimeTypes, start, end, obc);
277    
278                            return com.liferay.document.library.kernel.model.DLFileEntrySoap.toSoapModels(returnValue);
279                    }
280                    catch (Exception e) {
281                            _log.error(e, e);
282    
283                            throw new RemoteException(e.getMessage());
284                    }
285            }
286    
287            public static int getFileEntriesCount(long groupId, long folderId)
288                    throws RemoteException {
289                    try {
290                            int returnValue = DLFileEntryServiceUtil.getFileEntriesCount(groupId,
291                                            folderId);
292    
293                            return returnValue;
294                    }
295                    catch (Exception e) {
296                            _log.error(e, e);
297    
298                            throw new RemoteException(e.getMessage());
299                    }
300            }
301    
302            public static int getFileEntriesCount(long groupId, long folderId,
303                    int status) throws RemoteException {
304                    try {
305                            int returnValue = DLFileEntryServiceUtil.getFileEntriesCount(groupId,
306                                            folderId, status);
307    
308                            return returnValue;
309                    }
310                    catch (Exception e) {
311                            _log.error(e, e);
312    
313                            throw new RemoteException(e.getMessage());
314                    }
315            }
316    
317            public static int getFileEntriesCount(long groupId, long folderId,
318                    long fileEntryTypeId) throws RemoteException {
319                    try {
320                            int returnValue = DLFileEntryServiceUtil.getFileEntriesCount(groupId,
321                                            folderId, fileEntryTypeId);
322    
323                            return returnValue;
324                    }
325                    catch (Exception e) {
326                            _log.error(e, e);
327    
328                            throw new RemoteException(e.getMessage());
329                    }
330            }
331    
332            public static int getFileEntriesCount(long groupId, long folderId,
333                    java.lang.String[] mimeTypes) throws RemoteException {
334                    try {
335                            int returnValue = DLFileEntryServiceUtil.getFileEntriesCount(groupId,
336                                            folderId, mimeTypes);
337    
338                            return 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.document.library.kernel.model.DLFileEntrySoap getFileEntry(
348                    long fileEntryId) throws RemoteException {
349                    try {
350                            com.liferay.document.library.kernel.model.DLFileEntry returnValue = DLFileEntryServiceUtil.getFileEntry(fileEntryId);
351    
352                            return com.liferay.document.library.kernel.model.DLFileEntrySoap.toSoapModel(returnValue);
353                    }
354                    catch (Exception e) {
355                            _log.error(e, e);
356    
357                            throw new RemoteException(e.getMessage());
358                    }
359            }
360    
361            public static com.liferay.document.library.kernel.model.DLFileEntrySoap getFileEntry(
362                    long groupId, long folderId, java.lang.String title)
363                    throws RemoteException {
364                    try {
365                            com.liferay.document.library.kernel.model.DLFileEntry returnValue = DLFileEntryServiceUtil.getFileEntry(groupId,
366                                            folderId, title);
367    
368                            return com.liferay.document.library.kernel.model.DLFileEntrySoap.toSoapModel(returnValue);
369                    }
370                    catch (Exception e) {
371                            _log.error(e, e);
372    
373                            throw new RemoteException(e.getMessage());
374                    }
375            }
376    
377            public static com.liferay.document.library.kernel.model.DLFileEntrySoap getFileEntryByUuidAndGroupId(
378                    java.lang.String uuid, long groupId) throws RemoteException {
379                    try {
380                            com.liferay.document.library.kernel.model.DLFileEntry returnValue = DLFileEntryServiceUtil.getFileEntryByUuidAndGroupId(uuid,
381                                            groupId);
382    
383                            return com.liferay.document.library.kernel.model.DLFileEntrySoap.toSoapModel(returnValue);
384                    }
385                    catch (Exception e) {
386                            _log.error(e, e);
387    
388                            throw new RemoteException(e.getMessage());
389                    }
390            }
391    
392            public static com.liferay.portal.kernel.lock.Lock getFileEntryLock(
393                    long fileEntryId) throws RemoteException {
394                    try {
395                            com.liferay.portal.kernel.lock.Lock returnValue = DLFileEntryServiceUtil.getFileEntryLock(fileEntryId);
396    
397                            return returnValue;
398                    }
399                    catch (Exception e) {
400                            _log.error(e, e);
401    
402                            throw new RemoteException(e.getMessage());
403                    }
404            }
405    
406            public static int getFoldersFileEntriesCount(long groupId,
407                    Long[] folderIds, int status) throws RemoteException {
408                    try {
409                            int returnValue = DLFileEntryServiceUtil.getFoldersFileEntriesCount(groupId,
410                                            ListUtil.toList(folderIds), status);
411    
412                            return returnValue;
413                    }
414                    catch (Exception e) {
415                            _log.error(e, e);
416    
417                            throw new RemoteException(e.getMessage());
418                    }
419            }
420    
421            public static com.liferay.document.library.kernel.model.DLFileEntrySoap[] getGroupFileEntries(
422                    long groupId, long userId, long rootFolderId, int start, int end,
423                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFileEntry> obc)
424                    throws RemoteException {
425                    try {
426                            java.util.List<com.liferay.document.library.kernel.model.DLFileEntry> returnValue =
427                                    DLFileEntryServiceUtil.getGroupFileEntries(groupId, userId,
428                                            rootFolderId, start, end, obc);
429    
430                            return com.liferay.document.library.kernel.model.DLFileEntrySoap.toSoapModels(returnValue);
431                    }
432                    catch (Exception e) {
433                            _log.error(e, e);
434    
435                            throw new RemoteException(e.getMessage());
436                    }
437            }
438    
439            public static com.liferay.document.library.kernel.model.DLFileEntrySoap[] getGroupFileEntries(
440                    long groupId, long userId, long repositoryId, long rootFolderId,
441                    java.lang.String[] mimeTypes, int status, int start, int end,
442                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFileEntry> obc)
443                    throws RemoteException {
444                    try {
445                            java.util.List<com.liferay.document.library.kernel.model.DLFileEntry> returnValue =
446                                    DLFileEntryServiceUtil.getGroupFileEntries(groupId, userId,
447                                            repositoryId, rootFolderId, mimeTypes, status, start, end,
448                                            obc);
449    
450                            return com.liferay.document.library.kernel.model.DLFileEntrySoap.toSoapModels(returnValue);
451                    }
452                    catch (Exception e) {
453                            _log.error(e, e);
454    
455                            throw new RemoteException(e.getMessage());
456                    }
457            }
458    
459            public static com.liferay.document.library.kernel.model.DLFileEntrySoap[] getGroupFileEntries(
460                    long groupId, long userId, long rootFolderId,
461                    java.lang.String[] mimeTypes, int status, int start, int end,
462                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFileEntry> obc)
463                    throws RemoteException {
464                    try {
465                            java.util.List<com.liferay.document.library.kernel.model.DLFileEntry> returnValue =
466                                    DLFileEntryServiceUtil.getGroupFileEntries(groupId, userId,
467                                            rootFolderId, mimeTypes, status, start, end, obc);
468    
469                            return com.liferay.document.library.kernel.model.DLFileEntrySoap.toSoapModels(returnValue);
470                    }
471                    catch (Exception e) {
472                            _log.error(e, e);
473    
474                            throw new RemoteException(e.getMessage());
475                    }
476            }
477    
478            public static int getGroupFileEntriesCount(long groupId, long userId,
479                    long rootFolderId) throws RemoteException {
480                    try {
481                            int returnValue = DLFileEntryServiceUtil.getGroupFileEntriesCount(groupId,
482                                            userId, rootFolderId);
483    
484                            return returnValue;
485                    }
486                    catch (Exception e) {
487                            _log.error(e, e);
488    
489                            throw new RemoteException(e.getMessage());
490                    }
491            }
492    
493            public static int getGroupFileEntriesCount(long groupId, long userId,
494                    long repositoryId, long rootFolderId, java.lang.String[] mimeTypes,
495                    int status) throws RemoteException {
496                    try {
497                            int returnValue = DLFileEntryServiceUtil.getGroupFileEntriesCount(groupId,
498                                            userId, repositoryId, rootFolderId, mimeTypes, status);
499    
500                            return returnValue;
501                    }
502                    catch (Exception e) {
503                            _log.error(e, e);
504    
505                            throw new RemoteException(e.getMessage());
506                    }
507            }
508    
509            public static int getGroupFileEntriesCount(long groupId, long userId,
510                    long rootFolderId, java.lang.String[] mimeTypes, int status)
511                    throws RemoteException {
512                    try {
513                            int returnValue = DLFileEntryServiceUtil.getGroupFileEntriesCount(groupId,
514                                            userId, rootFolderId, mimeTypes, status);
515    
516                            return returnValue;
517                    }
518                    catch (Exception e) {
519                            _log.error(e, e);
520    
521                            throw new RemoteException(e.getMessage());
522                    }
523            }
524    
525            public static boolean hasFileEntryLock(long fileEntryId)
526                    throws RemoteException {
527                    try {
528                            boolean returnValue = DLFileEntryServiceUtil.hasFileEntryLock(fileEntryId);
529    
530                            return returnValue;
531                    }
532                    catch (Exception e) {
533                            _log.error(e, e);
534    
535                            throw new RemoteException(e.getMessage());
536                    }
537            }
538    
539            public static boolean isFileEntryCheckedOut(long fileEntryId)
540                    throws RemoteException {
541                    try {
542                            boolean returnValue = DLFileEntryServiceUtil.isFileEntryCheckedOut(fileEntryId);
543    
544                            return returnValue;
545                    }
546                    catch (Exception e) {
547                            _log.error(e, e);
548    
549                            throw new RemoteException(e.getMessage());
550                    }
551            }
552    
553            public static boolean isKeepFileVersionLabel(long fileEntryId,
554                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
555                    throws RemoteException {
556                    try {
557                            boolean returnValue = DLFileEntryServiceUtil.isKeepFileVersionLabel(fileEntryId,
558                                            serviceContext);
559    
560                            return returnValue;
561                    }
562                    catch (Exception e) {
563                            _log.error(e, e);
564    
565                            throw new RemoteException(e.getMessage());
566                    }
567            }
568    
569            public static com.liferay.document.library.kernel.model.DLFileEntrySoap moveFileEntry(
570                    long fileEntryId, long newFolderId,
571                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
572                    throws RemoteException {
573                    try {
574                            com.liferay.document.library.kernel.model.DLFileEntry returnValue = DLFileEntryServiceUtil.moveFileEntry(fileEntryId,
575                                            newFolderId, serviceContext);
576    
577                            return com.liferay.document.library.kernel.model.DLFileEntrySoap.toSoapModel(returnValue);
578                    }
579                    catch (Exception e) {
580                            _log.error(e, e);
581    
582                            throw new RemoteException(e.getMessage());
583                    }
584            }
585    
586            public static com.liferay.portal.kernel.lock.Lock refreshFileEntryLock(
587                    java.lang.String lockUuid, long companyId, long expirationTime)
588                    throws RemoteException {
589                    try {
590                            com.liferay.portal.kernel.lock.Lock returnValue = DLFileEntryServiceUtil.refreshFileEntryLock(lockUuid,
591                                            companyId, expirationTime);
592    
593                            return returnValue;
594                    }
595                    catch (Exception e) {
596                            _log.error(e, e);
597    
598                            throw new RemoteException(e.getMessage());
599                    }
600            }
601    
602            public static void revertFileEntry(long fileEntryId,
603                    java.lang.String version,
604                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
605                    throws RemoteException {
606                    try {
607                            DLFileEntryServiceUtil.revertFileEntry(fileEntryId, version,
608                                    serviceContext);
609                    }
610                    catch (Exception e) {
611                            _log.error(e, e);
612    
613                            throw new RemoteException(e.getMessage());
614                    }
615            }
616    
617            public static boolean verifyFileEntryCheckOut(long fileEntryId,
618                    java.lang.String lockUuid) throws RemoteException {
619                    try {
620                            boolean returnValue = DLFileEntryServiceUtil.verifyFileEntryCheckOut(fileEntryId,
621                                            lockUuid);
622    
623                            return returnValue;
624                    }
625                    catch (Exception e) {
626                            _log.error(e, e);
627    
628                            throw new RemoteException(e.getMessage());
629                    }
630            }
631    
632            public static boolean verifyFileEntryLock(long fileEntryId,
633                    java.lang.String lockUuid) throws RemoteException {
634                    try {
635                            boolean returnValue = DLFileEntryServiceUtil.verifyFileEntryLock(fileEntryId,
636                                            lockUuid);
637    
638                            return returnValue;
639                    }
640                    catch (Exception e) {
641                            _log.error(e, e);
642    
643                            throw new RemoteException(e.getMessage());
644                    }
645            }
646    
647            private static Log _log = LogFactoryUtil.getLog(DLFileEntryServiceSoap.class);
648    }