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.DLAppServiceUtil;
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.DLAppServiceUtil} 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     * The benefits of using the SOAP utility is that it is cross platform
036     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
037     * even Perl, to call the generated services. One drawback of SOAP is that it is
038     * slow because it needs to serialize all calls into a text format (XML).
039     * </p>
040     *
041     * <p>
042     * You can see a list of services at
043     * http://localhost:8080/api/secure/axis. Set the property
044     * <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
045     * security.
046     * </p>
047     *
048     * <p>
049     * The SOAP utility is only generated for remote services.
050     * </p>
051     *
052     * @author    Brian Wing Shun Chan
053     * @see       DLAppServiceHttp
054     * @see       com.liferay.portlet.documentlibrary.service.DLAppServiceUtil
055     * @generated
056     */
057    public class DLAppServiceSoap {
058            /**
059            * Adds a file shortcut to the existing file entry. This method is only
060            * supported by the Liferay repository.
061            *
062            * @param repositoryId the primary key of the repository
063            * @param folderId the primary key of the file shortcut's parent folder
064            * @param toFileEntryId the primary key of the file shortcut's file entry
065            * @param serviceContext the service context to be applied. Can set the
066            asset category IDs, asset tag names, and expando bridge
067            attributes for the file entry.
068            * @return the file shortcut
069            * @throws PortalException if the parent folder or file entry could not be
070            found, or if the file shortcut's information was invalid
071            * @throws SystemException if a system exception occurred
072            */
073            public static com.liferay.portlet.documentlibrary.model.DLFileShortcutSoap addFileShortcut(
074                    long repositoryId, long folderId, long toFileEntryId,
075                    com.liferay.portal.service.ServiceContext serviceContext)
076                    throws RemoteException {
077                    try {
078                            com.liferay.portlet.documentlibrary.model.DLFileShortcut returnValue =
079                                    DLAppServiceUtil.addFileShortcut(repositoryId, folderId,
080                                            toFileEntryId, serviceContext);
081    
082                            return com.liferay.portlet.documentlibrary.model.DLFileShortcutSoap.toSoapModel(returnValue);
083                    }
084                    catch (Exception e) {
085                            _log.error(e, e);
086    
087                            throw new RemoteException(e.getMessage());
088                    }
089            }
090    
091            /**
092            * Cancels the check out of the file entry. If a user has not checked out
093            * the specified file entry, invoking this method will result in no changes.
094            *
095            * <p>
096            * When a file entry is checked out, a PWC (private working copy) is created
097            * and the original file entry is locked. A client can make as many changes
098            * to the PWC as he desires without those changes being visible to other
099            * users. If the user is satisfied with the changes, he may elect to check
100            * in his changes, resulting in a new file version based on the PWC; the PWC
101            * will be removed and the file entry will be unlocked. If the user is not
102            * satisfied with the changes, he may elect to cancel his check out; this
103            * results in the deletion of the PWC and unlocking of the file entry.
104            * </p>
105            *
106            * @param fileEntryId the primary key of the file entry to cancel the
107            checkout
108            * @throws PortalException if the file entry could not be found
109            * @throws SystemException if a system exception occurred
110            * @see #checkInFileEntry(long, boolean, String, ServiceContext)
111            * @see #checkOutFileEntry(long)
112            */
113            public static void cancelCheckOut(long fileEntryId)
114                    throws RemoteException {
115                    try {
116                            DLAppServiceUtil.cancelCheckOut(fileEntryId);
117                    }
118                    catch (Exception e) {
119                            _log.error(e, e);
120    
121                            throw new RemoteException(e.getMessage());
122                    }
123            }
124    
125            /**
126            * Checks in the file entry. If a user has not checked out the specified
127            * file entry, invoking this method will result in no changes.
128            *
129            * <p>
130            * When a file entry is checked out, a PWC (private working copy) is created
131            * and the original file entry is locked. A client can make as many changes
132            * to the PWC as he desires without those changes being visible to other
133            * users. If the user is satisfied with the changes, he may elect to check
134            * in his changes, resulting in a new file version based on the PWC; the PWC
135            * will be removed and the file entry will be unlocked. If the user is not
136            * satisfied with the changes, he may elect to cancel his check out; this
137            * results in the deletion of the PWC and unlocking of the file entry.
138            * </p>
139            *
140            * @param fileEntryId the primary key of the file entry to check in
141            * @param majorVersion whether the new file version is a major version
142            * @param changeLog the file's version change log
143            * @param serviceContext the service context to be applied
144            * @throws PortalException if the file entry could not be found
145            * @throws SystemException if a system exception occurred
146            * @see #cancelCheckOut(long)
147            * @see #checkOutFileEntry(long)
148            */
149            public static void checkInFileEntry(long fileEntryId, boolean majorVersion,
150                    java.lang.String changeLog,
151                    com.liferay.portal.service.ServiceContext serviceContext)
152                    throws RemoteException {
153                    try {
154                            DLAppServiceUtil.checkInFileEntry(fileEntryId, majorVersion,
155                                    changeLog, serviceContext);
156                    }
157                    catch (Exception e) {
158                            _log.error(e, e);
159    
160                            throw new RemoteException(e.getMessage());
161                    }
162            }
163    
164            /**
165            * Checks in the file entry using the lock's UUID. If a user has not checked
166            * out the specified file entry, invoking this method will result in no
167            * changes. This method is primarily used by WebDAV.
168            *
169            * <p>
170            * When a file entry is checked out, a PWC (private working copy) is created
171            * and the original file entry is locked. A client can make as many changes
172            * to the PWC as he desires without those changes being visible to other
173            * users. If the user is satisfied with the changes, he may elect to check
174            * in his changes, resulting in a new file version based on the PWC; the PWC
175            * will be removed and the file entry will be unlocked. If the user is not
176            * satisfied with the changes, he may elect to cancel his check out; this
177            * results in the deletion of the PWC and unlocking of the file entry.
178            * </p>
179            *
180            * @param fileEntryId the primary key of the file entry to check in
181            * @param lockUuid the lock's universally unique identifier
182            * @throws PortalException if the file entry could not be found
183            * @throws SystemException if a system exception occurred
184            * @see #cancelCheckOut(long)
185            * @see #checkOutFileEntry(long, String, long)
186            */
187            public static void checkInFileEntry(long fileEntryId,
188                    java.lang.String lockUuid) throws RemoteException {
189                    try {
190                            DLAppServiceUtil.checkInFileEntry(fileEntryId, lockUuid);
191                    }
192                    catch (Exception e) {
193                            _log.error(e, e);
194    
195                            throw new RemoteException(e.getMessage());
196                    }
197            }
198    
199            /**
200            * Check out a file entry.
201            *
202            * <p>
203            * When a file entry is checked out, a PWC (private working copy) is created
204            * and the original file entry is locked. A client can make as many changes
205            * to the PWC as he desires without those changes being visible to other
206            * users. If the user is satisfied with the changes, he may elect to check
207            * in his changes, resulting in a new file version based on the PWC; the PWC
208            * will be removed and the file entry will be unlocked. If the user is not
209            * satisfied with the changes, he may elect to cancel his check out; this
210            * results in the deletion of the PWC and unlocking of the file entry.
211            * </p>
212            *
213            * @param fileEntryId the file entry to check out
214            * @throws PortalException if the file entry could not be found
215            * @throws SystemException if a system exception occurred
216            * @see #cancelCheckOut(long)
217            * @see #checkInFileEntry(long, boolean, String, ServiceContext)
218            */
219            public static void checkOutFileEntry(long fileEntryId)
220                    throws RemoteException {
221                    try {
222                            DLAppServiceUtil.checkOutFileEntry(fileEntryId);
223                    }
224                    catch (Exception e) {
225                            _log.error(e, e);
226    
227                            throw new RemoteException(e.getMessage());
228                    }
229            }
230    
231            /**
232            * Deletes the file entry with the primary key.
233            *
234            * @param fileEntryId the primary key of the file entry
235            * @throws PortalException if the file entry could not be found
236            * @throws SystemException if a system exception occurred
237            */
238            public static void deleteFileEntry(long fileEntryId)
239                    throws RemoteException {
240                    try {
241                            DLAppServiceUtil.deleteFileEntry(fileEntryId);
242                    }
243                    catch (Exception e) {
244                            _log.error(e, e);
245    
246                            throw new RemoteException(e.getMessage());
247                    }
248            }
249    
250            /**
251            * Deletes the file entry with the title in the folder.
252            *
253            * @param repositoryId the primary key of the repository
254            * @param folderId the primary key of the file entry's parent folder
255            * @param title the file entry's title
256            * @throws PortalException if the file entry could not be found
257            * @throws SystemException if a system exception occurred
258            */
259            public static void deleteFileEntryByTitle(long repositoryId, long folderId,
260                    java.lang.String title) throws RemoteException {
261                    try {
262                            DLAppServiceUtil.deleteFileEntryByTitle(repositoryId, folderId,
263                                    title);
264                    }
265                    catch (Exception e) {
266                            _log.error(e, e);
267    
268                            throw new RemoteException(e.getMessage());
269                    }
270            }
271    
272            /**
273            * Deletes the file shortcut with the primary key. This method is only
274            * supported by the Liferay repository.
275            *
276            * @param fileShortcutId the primary key of the file shortcut
277            * @throws PortalException if the file shortcut could not be found
278            * @throws SystemException if a system exception occurred
279            */
280            public static void deleteFileShortcut(long fileShortcutId)
281                    throws RemoteException {
282                    try {
283                            DLAppServiceUtil.deleteFileShortcut(fileShortcutId);
284                    }
285                    catch (Exception e) {
286                            _log.error(e, e);
287    
288                            throw new RemoteException(e.getMessage());
289                    }
290            }
291    
292            /**
293            * Deletes the folder with the primary key and all of its subfolders and
294            * file entries.
295            *
296            * @param folderId the primary key of the folder
297            * @throws PortalException if the folder could not be found
298            * @throws SystemException if a system exception occurred
299            */
300            public static void deleteFolder(long folderId) throws RemoteException {
301                    try {
302                            DLAppServiceUtil.deleteFolder(folderId);
303                    }
304                    catch (Exception e) {
305                            _log.error(e, e);
306    
307                            throw new RemoteException(e.getMessage());
308                    }
309            }
310    
311            /**
312            * Deletes the folder with the name in the parent folder and all of its
313            * subfolders and file entries.
314            *
315            * @param repositoryId the primary key of the repository
316            * @param parentFolderId the primary key of the folder's parent folder
317            * @param name the folder's name
318            * @throws PortalException if the folder could not be found
319            * @throws SystemException if a system exception occurred
320            */
321            public static void deleteFolder(long repositoryId, long parentFolderId,
322                    java.lang.String name) throws RemoteException {
323                    try {
324                            DLAppServiceUtil.deleteFolder(repositoryId, parentFolderId, name);
325                    }
326                    catch (Exception e) {
327                            _log.error(e, e);
328    
329                            throw new RemoteException(e.getMessage());
330                    }
331            }
332    
333            /**
334            * Deletes the temporary file entry.
335            *
336            * @param groupId the primary key of the group
337            * @param folderId the primary key of the folder where the file entry was
338            eventually to reside
339            * @param fileName the file's original name
340            * @param tempFolderName the temporary folder's name
341            * @throws PortalException if the file name was invalid
342            * @throws SystemException if a system exception occurred
343            * @see com.liferay.portal.kernel.util.TempFileUtil
344            */
345            public static void deleteTempFileEntry(long groupId, long folderId,
346                    java.lang.String fileName, java.lang.String tempFolderName)
347                    throws RemoteException {
348                    try {
349                            DLAppServiceUtil.deleteTempFileEntry(groupId, folderId, fileName,
350                                    tempFolderName);
351                    }
352                    catch (Exception e) {
353                            _log.error(e, e);
354    
355                            throw new RemoteException(e.getMessage());
356                    }
357            }
358    
359            /**
360            * Returns the number of file entries and shortcuts in the folder.
361            *
362            * @param repositoryId the primary key of the repository
363            * @param folderId the primary key of the folder
364            * @param status the workflow status
365            * @return the number of file entries and shortcuts in the folder
366            * @throws PortalException if the folder ould not be found
367            * @throws SystemException if a system exception occurred
368            */
369            public static int getFileEntriesAndFileShortcutsCount(long repositoryId,
370                    long folderId, int status) throws RemoteException {
371                    try {
372                            int returnValue = DLAppServiceUtil.getFileEntriesAndFileShortcutsCount(repositoryId,
373                                            folderId, status);
374    
375                            return returnValue;
376                    }
377                    catch (Exception e) {
378                            _log.error(e, e);
379    
380                            throw new RemoteException(e.getMessage());
381                    }
382            }
383    
384            /**
385            * Returns the number of file entries and shortcuts in the folder.
386            *
387            * @param repositoryId the primary key of the repository
388            * @param folderId the primary key of the folder
389            * @param status the workflow status
390            * @param mimeTypes allowed media types
391            * @return the number of file entries and shortcuts in the folder
392            * @throws PortalException if the folder ould not be found
393            * @throws SystemException if a system exception occurred
394            */
395            public static int getFileEntriesAndFileShortcutsCount(long repositoryId,
396                    long folderId, int status, java.lang.String[] mimeTypes)
397                    throws RemoteException {
398                    try {
399                            int returnValue = DLAppServiceUtil.getFileEntriesAndFileShortcutsCount(repositoryId,
400                                            folderId, status, mimeTypes);
401    
402                            return returnValue;
403                    }
404                    catch (Exception e) {
405                            _log.error(e, e);
406    
407                            throw new RemoteException(e.getMessage());
408                    }
409            }
410    
411            /**
412            * Returns the number of file entries in the folder.
413            *
414            * @param repositoryId the primary key of the file entry's repository
415            * @param folderId the primary key of the file entry's folder
416            * @return the number of file entries in the folder
417            * @throws PortalException if the folder could not be found
418            * @throws SystemException if a system exception occurred
419            */
420            public static int getFileEntriesCount(long repositoryId, long folderId)
421                    throws RemoteException {
422                    try {
423                            int returnValue = DLAppServiceUtil.getFileEntriesCount(repositoryId,
424                                            folderId);
425    
426                            return returnValue;
427                    }
428                    catch (Exception e) {
429                            _log.error(e, e);
430    
431                            throw new RemoteException(e.getMessage());
432                    }
433            }
434    
435            /**
436            * Returns the number of file entries with the file entry type in the
437            * folder.
438            *
439            * @param repositoryId the primary key of the file entry's repository
440            * @param folderId the primary key of the file entry's folder
441            * @param fileEntryTypeId the primary key of the file entry type
442            * @return the number of file entries with the file entry type in the folder
443            * @throws PortalException if the folder could not be found
444            * @throws SystemException if a system exception occurred
445            */
446            public static int getFileEntriesCount(long repositoryId, long folderId,
447                    long fileEntryTypeId) throws RemoteException {
448                    try {
449                            int returnValue = DLAppServiceUtil.getFileEntriesCount(repositoryId,
450                                            folderId, fileEntryTypeId);
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            /**
462            * Returns the file shortcut with the primary key. This method is only
463            * supported by the Liferay repository.
464            *
465            * @param fileShortcutId the primary key of the file shortcut
466            * @return the file shortcut with the primary key
467            * @throws PortalException if the file shortcut could not be found
468            * @throws SystemException if a system exception occurred
469            */
470            public static com.liferay.portlet.documentlibrary.model.DLFileShortcutSoap getFileShortcut(
471                    long fileShortcutId) throws RemoteException {
472                    try {
473                            com.liferay.portlet.documentlibrary.model.DLFileShortcut returnValue =
474                                    DLAppServiceUtil.getFileShortcut(fileShortcutId);
475    
476                            return com.liferay.portlet.documentlibrary.model.DLFileShortcutSoap.toSoapModel(returnValue);
477                    }
478                    catch (Exception e) {
479                            _log.error(e, e);
480    
481                            throw new RemoteException(e.getMessage());
482                    }
483            }
484    
485            /**
486            * Returns the number of immediate subfolders, file entries, and file
487            * shortcuts in the parent folder.
488            *
489            * @param repositoryId the primary key of the repository
490            * @param folderId the primary key of the parent folder
491            * @param status the workflow status
492            * @param includeMountFolders whether to include mount folders for
493            third-party repositories
494            * @return the number of immediate subfolders, file entries, and file
495            shortcuts in the parent folder
496            * @throws PortalException if the folder could not be found
497            * @throws SystemException if a system exception occurred
498            */
499            public static int getFoldersAndFileEntriesAndFileShortcutsCount(
500                    long repositoryId, long folderId, int status,
501                    boolean includeMountFolders) throws RemoteException {
502                    try {
503                            int returnValue = DLAppServiceUtil.getFoldersAndFileEntriesAndFileShortcutsCount(repositoryId,
504                                            folderId, status, includeMountFolders);
505    
506                            return returnValue;
507                    }
508                    catch (Exception e) {
509                            _log.error(e, e);
510    
511                            throw new RemoteException(e.getMessage());
512                    }
513            }
514    
515            public static int getFoldersAndFileEntriesAndFileShortcutsCount(
516                    long repositoryId, long folderId, int status,
517                    java.lang.String[] mimeTypes, boolean includeMountFolders)
518                    throws RemoteException {
519                    try {
520                            int returnValue = DLAppServiceUtil.getFoldersAndFileEntriesAndFileShortcutsCount(repositoryId,
521                                            folderId, status, mimeTypes, includeMountFolders);
522    
523                            return returnValue;
524                    }
525                    catch (Exception e) {
526                            _log.error(e, e);
527    
528                            throw new RemoteException(e.getMessage());
529                    }
530            }
531    
532            /**
533            * Returns the number of immediate subfolders of the parent folder.
534            *
535            * @param repositoryId the primary key of the folder's repository
536            * @param parentFolderId the primary key of the folder's parent folder
537            * @return the number of immediate subfolders of the parent folder
538            * @throws PortalException if the parent folder could not be found
539            * @throws SystemException if a system exception occurred
540            */
541            public static int getFoldersCount(long repositoryId, long parentFolderId)
542                    throws RemoteException {
543                    try {
544                            int returnValue = DLAppServiceUtil.getFoldersCount(repositoryId,
545                                            parentFolderId);
546    
547                            return returnValue;
548                    }
549                    catch (Exception e) {
550                            _log.error(e, e);
551    
552                            throw new RemoteException(e.getMessage());
553                    }
554            }
555    
556            /**
557            * Returns the number of immediate subfolders of the parent folder,
558            * optionally including mount folders for third-party repositories.
559            *
560            * @param repositoryId the primary key of the folder's repository
561            * @param parentFolderId the primary key of the folder's parent folder
562            * @param includeMountFolders whether to include mount folders for
563            third-party repositories
564            * @return the number of immediate subfolders of the parent folder
565            * @throws PortalException if the parent folder could not be found
566            * @throws SystemException if a system exception occurred
567            */
568            public static int getFoldersCount(long repositoryId, long parentFolderId,
569                    boolean includeMountFolders) throws RemoteException {
570                    try {
571                            int returnValue = DLAppServiceUtil.getFoldersCount(repositoryId,
572                                            parentFolderId, includeMountFolders);
573    
574                            return returnValue;
575                    }
576                    catch (Exception e) {
577                            _log.error(e, e);
578    
579                            throw new RemoteException(e.getMessage());
580                    }
581            }
582    
583            /**
584            * Returns the number of immediate subfolders and file entries across the
585            * folders.
586            *
587            * @param repositoryId the primary key of the repository
588            * @param folderIds the primary keys of folders from which to count
589            immediate subfolders and file entries
590            * @param status the workflow status
591            * @return the number of immediate subfolders and file entries across the
592            folders
593            * @throws PortalException if the repository could not be found
594            * @throws SystemException if a system exception occurred
595            */
596            public static int getFoldersFileEntriesCount(long repositoryId,
597                    Long[] folderIds, int status) throws RemoteException {
598                    try {
599                            int returnValue = DLAppServiceUtil.getFoldersFileEntriesCount(repositoryId,
600                                            ListUtil.toList(folderIds), status);
601    
602                            return returnValue;
603                    }
604                    catch (Exception e) {
605                            _log.error(e, e);
606    
607                            throw new RemoteException(e.getMessage());
608                    }
609            }
610    
611            /**
612            * Returns the number of file entries in a group starting at the repository
613            * default parent folder that are stored within the Liferay repository. This
614            * method is primarily used to search for recently modified file entries. It
615            * can be limited to the file entries modified by a given user.
616            *
617            * @param groupId the primary key of the group
618            * @param userId the primary key of the user who created the file
619            (optionally <code>0</code>)
620            * @return the number of matching file entries
621            * @throws PortalException if the group could not be found
622            * @throws SystemException if a system exception occurred
623            */
624            public static int getGroupFileEntriesCount(long groupId, long userId)
625                    throws RemoteException {
626                    try {
627                            int returnValue = DLAppServiceUtil.getGroupFileEntriesCount(groupId,
628                                            userId);
629    
630                            return returnValue;
631                    }
632                    catch (Exception e) {
633                            _log.error(e, e);
634    
635                            throw new RemoteException(e.getMessage());
636                    }
637            }
638    
639            /**
640            * Returns the number of file entries in a group starting at the root folder
641            * that are stored within the Liferay repository. This method is primarily
642            * used to search for recently modified file entries. It can be limited to
643            * the file entries modified by a given user.
644            *
645            * @param groupId the primary key of the group
646            * @param userId the primary key of the user who created the file
647            (optionally <code>0</code>)
648            * @param rootFolderId the primary key of the root folder to begin the
649            search
650            * @return the number of matching file entries
651            * @throws PortalException if the group could not be found
652            * @throws SystemException if a system exception occurred
653            */
654            public static int getGroupFileEntriesCount(long groupId, long userId,
655                    long rootFolderId) throws RemoteException {
656                    try {
657                            int returnValue = DLAppServiceUtil.getGroupFileEntriesCount(groupId,
658                                            userId, rootFolderId);
659    
660                            return returnValue;
661                    }
662                    catch (Exception e) {
663                            _log.error(e, e);
664    
665                            throw new RemoteException(e.getMessage());
666                    }
667            }
668    
669            public static int getGroupFileEntriesCount(long groupId, long userId,
670                    long rootFolderId, java.lang.String[] mimeTypes, int status)
671                    throws RemoteException {
672                    try {
673                            int returnValue = DLAppServiceUtil.getGroupFileEntriesCount(groupId,
674                                            userId, rootFolderId, mimeTypes, status);
675    
676                            return returnValue;
677                    }
678                    catch (Exception e) {
679                            _log.error(e, e);
680    
681                            throw new RemoteException(e.getMessage());
682                    }
683            }
684    
685            /**
686            * Returns the number of immediate subfolders of the parent folder that are
687            * used for mounting third-party repositories. This method is only supported
688            * by the Liferay repository.
689            *
690            * @param repositoryId the primary key of the repository
691            * @param parentFolderId the primary key of the parent folder
692            * @return the number of folders of the parent folder that are used for
693            mounting third-party repositories
694            * @throws PortalException if the repository or parent folder could not be
695            found
696            * @throws SystemException if a system exception occurred
697            */
698            public static int getMountFoldersCount(long repositoryId,
699                    long parentFolderId) throws RemoteException {
700                    try {
701                            int returnValue = DLAppServiceUtil.getMountFoldersCount(repositoryId,
702                                            parentFolderId);
703    
704                            return returnValue;
705                    }
706                    catch (Exception e) {
707                            _log.error(e, e);
708    
709                            throw new RemoteException(e.getMessage());
710                    }
711            }
712    
713            public static void getSubfolderIds(long repositoryId, Long[] folderIds,
714                    long folderId) throws RemoteException {
715                    try {
716                            DLAppServiceUtil.getSubfolderIds(repositoryId,
717                                    ListUtil.toList(folderIds), folderId);
718                    }
719                    catch (Exception e) {
720                            _log.error(e, e);
721    
722                            throw new RemoteException(e.getMessage());
723                    }
724            }
725    
726            /**
727            * Returns all the descendant folders of the folder with the primary key.
728            *
729            * @param repositoryId the primary key of the repository
730            * @param folderId the primary key of the folder
731            * @return the descendant folders of the folder with the primary key
732            * @throws PortalException if the repository or parent folder could not be
733            found
734            * @throws SystemException if a system exception occurred
735            */
736            public static java.lang.Long[] getSubfolderIds(long repositoryId,
737                    long folderId) throws RemoteException {
738                    try {
739                            java.util.List<java.lang.Long> returnValue = DLAppServiceUtil.getSubfolderIds(repositoryId,
740                                            folderId);
741    
742                            return returnValue.toArray(new java.lang.Long[returnValue.size()]);
743                    }
744                    catch (Exception e) {
745                            _log.error(e, e);
746    
747                            throw new RemoteException(e.getMessage());
748                    }
749            }
750    
751            /**
752            * Returns descendant folders of the folder with the primary key, optionally
753            * limiting to one level deep.
754            *
755            * @param repositoryId the primary key of the repository
756            * @param folderId the primary key of the folder
757            * @param recurse whether to recurse through each subfolder
758            * @return the descendant folders of the folder with the primary key
759            * @throws PortalException if the repository or parent folder could not be
760            found
761            * @throws SystemException if a system exception occurred
762            */
763            public static java.lang.Long[] getSubfolderIds(long repositoryId,
764                    long folderId, boolean recurse) throws RemoteException {
765                    try {
766                            java.util.List<java.lang.Long> returnValue = DLAppServiceUtil.getSubfolderIds(repositoryId,
767                                            folderId, recurse);
768    
769                            return returnValue.toArray(new java.lang.Long[returnValue.size()]);
770                    }
771                    catch (Exception e) {
772                            _log.error(e, e);
773    
774                            throw new RemoteException(e.getMessage());
775                    }
776            }
777    
778            /**
779            * Returns all the temporary file entry names.
780            *
781            * @param groupId the primary key of the group
782            * @param folderId the primary key of the folder where the file entry will
783            eventually reside
784            * @param tempFolderName the temporary folder's name
785            * @return the temporary file entry names
786            * @throws PortalException if the folder was invalid
787            * @throws SystemException if a system exception occurred
788            * @see #addTempFileEntry(long, long, String, String, File)
789            * @see com.liferay.portal.kernel.util.TempFileUtil
790            */
791            public static java.lang.String[] getTempFileEntryNames(long groupId,
792                    long folderId, java.lang.String tempFolderName)
793                    throws RemoteException {
794                    try {
795                            java.lang.String[] returnValue = DLAppServiceUtil.getTempFileEntryNames(groupId,
796                                            folderId, tempFolderName);
797    
798                            return returnValue;
799                    }
800                    catch (Exception e) {
801                            _log.error(e, e);
802    
803                            throw new RemoteException(e.getMessage());
804                    }
805            }
806    
807            /**
808            * Reverts the file entry to a previous version. A new version will be
809            * created based on the previous version and metadata.
810            *
811            * @param fileEntryId the primary key of the file entry
812            * @param version the version to revert back to
813            * @param serviceContext the service context to be applied
814            * @throws PortalException if the file entry or version could not be found
815            * @throws SystemException if a system exception occurred
816            */
817            public static void revertFileEntry(long fileEntryId,
818                    java.lang.String version,
819                    com.liferay.portal.service.ServiceContext serviceContext)
820                    throws RemoteException {
821                    try {
822                            DLAppServiceUtil.revertFileEntry(fileEntryId, version,
823                                    serviceContext);
824                    }
825                    catch (Exception e) {
826                            _log.error(e, e);
827    
828                            throw new RemoteException(e.getMessage());
829                    }
830            }
831    
832            public static void unlockFileEntry(long fileEntryId)
833                    throws RemoteException {
834                    try {
835                            DLAppServiceUtil.unlockFileEntry(fileEntryId);
836                    }
837                    catch (Exception e) {
838                            _log.error(e, e);
839    
840                            throw new RemoteException(e.getMessage());
841                    }
842            }
843    
844            public static void unlockFileEntry(long fileEntryId,
845                    java.lang.String lockUuid) throws RemoteException {
846                    try {
847                            DLAppServiceUtil.unlockFileEntry(fileEntryId, lockUuid);
848                    }
849                    catch (Exception e) {
850                            _log.error(e, e);
851    
852                            throw new RemoteException(e.getMessage());
853                    }
854            }
855    
856            /**
857            * Unlocks the folder. This method is primarily used by WebDAV.
858            *
859            * @param repositoryId the primary key of the repository
860            * @param folderId the primary key of the folder
861            * @param lockUuid the lock's universally unique identifier
862            * @throws PortalException if the repository or folder could not be found
863            * @throws SystemException if a system exception occurred
864            */
865            public static void unlockFolder(long repositoryId, long folderId,
866                    java.lang.String lockUuid) throws RemoteException {
867                    try {
868                            DLAppServiceUtil.unlockFolder(repositoryId, folderId, lockUuid);
869                    }
870                    catch (Exception e) {
871                            _log.error(e, e);
872    
873                            throw new RemoteException(e.getMessage());
874                    }
875            }
876    
877            /**
878            * Unlocks the folder. This method is primarily used by WebDAV.
879            *
880            * @param repositoryId the primary key of the repository
881            * @param parentFolderId the primary key of the parent folder
882            * @param name the folder's name
883            * @param lockUuid the lock's universally unique identifier
884            * @throws PortalException if the repository or folder could not be found
885            * @throws SystemException if a system exception occurred
886            */
887            public static void unlockFolder(long repositoryId, long parentFolderId,
888                    java.lang.String name, java.lang.String lockUuid)
889                    throws RemoteException {
890                    try {
891                            DLAppServiceUtil.unlockFolder(repositoryId, parentFolderId, name,
892                                    lockUuid);
893                    }
894                    catch (Exception e) {
895                            _log.error(e, e);
896    
897                            throw new RemoteException(e.getMessage());
898                    }
899            }
900    
901            /**
902            * Updates a file shortcut to the existing file entry. This method is only
903            * supported by the Liferay repository.
904            *
905            * @param fileShortcutId the primary key of the file shortcut
906            * @param folderId the primary key of the file shortcut's parent folder
907            * @param toFileEntryId the primary key of the file shortcut's file entry
908            * @param serviceContext the service context to be applied. Can set the
909            asset category IDs, asset tag names, and expando bridge
910            attributes for the file entry.
911            * @return the file shortcut
912            * @throws PortalException if the file shortcut, folder, or file entry could
913            not be found
914            * @throws SystemException if a system exception occurred
915            */
916            public static com.liferay.portlet.documentlibrary.model.DLFileShortcutSoap updateFileShortcut(
917                    long fileShortcutId, long folderId, long toFileEntryId,
918                    com.liferay.portal.service.ServiceContext serviceContext)
919                    throws RemoteException {
920                    try {
921                            com.liferay.portlet.documentlibrary.model.DLFileShortcut returnValue =
922                                    DLAppServiceUtil.updateFileShortcut(fileShortcutId, folderId,
923                                            toFileEntryId, serviceContext);
924    
925                            return com.liferay.portlet.documentlibrary.model.DLFileShortcutSoap.toSoapModel(returnValue);
926                    }
927                    catch (Exception e) {
928                            _log.error(e, e);
929    
930                            throw new RemoteException(e.getMessage());
931                    }
932            }
933    
934            /**
935            * Returns <code>true</code> if the file entry is checked out. This method
936            * is primarily used by WebDAV.
937            *
938            * @param repositoryId the primary key for the repository
939            * @param fileEntryId the primary key for the file entry
940            * @param lockUuid the lock's universally unique identifier
941            * @return <code>true</code> if the file entry is checked out;
942            <code>false</code> otherwise
943            * @throws PortalException if the file entry could not be found
944            * @throws SystemException if a system exception occurred
945            */
946            public static boolean verifyFileEntryCheckOut(long repositoryId,
947                    long fileEntryId, java.lang.String lockUuid) throws RemoteException {
948                    try {
949                            boolean returnValue = DLAppServiceUtil.verifyFileEntryCheckOut(repositoryId,
950                                            fileEntryId, lockUuid);
951    
952                            return returnValue;
953                    }
954                    catch (Exception e) {
955                            _log.error(e, e);
956    
957                            throw new RemoteException(e.getMessage());
958                    }
959            }
960    
961            public static boolean verifyFileEntryLock(long repositoryId,
962                    long fileEntryId, java.lang.String lockUuid) throws RemoteException {
963                    try {
964                            boolean returnValue = DLAppServiceUtil.verifyFileEntryLock(repositoryId,
965                                            fileEntryId, lockUuid);
966    
967                            return returnValue;
968                    }
969                    catch (Exception e) {
970                            _log.error(e, e);
971    
972                            throw new RemoteException(e.getMessage());
973                    }
974            }
975    
976            /**
977            * Returns <code>true</code> if the inheritable lock exists. This method is
978            * primarily used by WebDAV.
979            *
980            * @param repositoryId the primary key for the repository
981            * @param folderId the primary key for the folder
982            * @param lockUuid the lock's universally unique identifier
983            * @return <code>true</code> if the inheritable lock exists;
984            <code>false</code> otherwise
985            * @throws PortalException if the folder could not be found
986            * @throws SystemException if a system exception occurred
987            */
988            public static boolean verifyInheritableLock(long repositoryId,
989                    long folderId, java.lang.String lockUuid) throws RemoteException {
990                    try {
991                            boolean returnValue = DLAppServiceUtil.verifyInheritableLock(repositoryId,
992                                            folderId, lockUuid);
993    
994                            return returnValue;
995                    }
996                    catch (Exception e) {
997                            _log.error(e, e);
998    
999                            throw new RemoteException(e.getMessage());
1000                    }
1001            }
1002    
1003            private static Log _log = LogFactoryUtil.getLog(DLAppServiceSoap.class);
1004    }