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            * @param serviceContext the service context to be applied
215            * @throws PortalException if the file entry could not be found
216            * @throws SystemException if a system exception occurred
217            * @see #cancelCheckOut(long)
218            * @see #checkInFileEntry(long, boolean, String, ServiceContext)
219            */
220            public static void checkOutFileEntry(long fileEntryId,
221                    com.liferay.portal.service.ServiceContext serviceContext)
222                    throws RemoteException {
223                    try {
224                            DLAppServiceUtil.checkOutFileEntry(fileEntryId, serviceContext);
225                    }
226                    catch (Exception e) {
227                            _log.error(e, e);
228    
229                            throw new RemoteException(e.getMessage());
230                    }
231            }
232    
233            /**
234            * Deletes the file entry with the primary key.
235            *
236            * @param fileEntryId the primary key of the file entry
237            * @throws PortalException if the file entry could not be found
238            * @throws SystemException if a system exception occurred
239            */
240            public static void deleteFileEntry(long fileEntryId)
241                    throws RemoteException {
242                    try {
243                            DLAppServiceUtil.deleteFileEntry(fileEntryId);
244                    }
245                    catch (Exception e) {
246                            _log.error(e, e);
247    
248                            throw new RemoteException(e.getMessage());
249                    }
250            }
251    
252            /**
253            * Deletes the file entry with the title in the folder.
254            *
255            * @param repositoryId the primary key of the repository
256            * @param folderId the primary key of the file entry's parent folder
257            * @param title the file entry's title
258            * @throws PortalException if the file entry could not be found
259            * @throws SystemException if a system exception occurred
260            */
261            public static void deleteFileEntryByTitle(long repositoryId, long folderId,
262                    java.lang.String title) throws RemoteException {
263                    try {
264                            DLAppServiceUtil.deleteFileEntryByTitle(repositoryId, folderId,
265                                    title);
266                    }
267                    catch (Exception e) {
268                            _log.error(e, e);
269    
270                            throw new RemoteException(e.getMessage());
271                    }
272            }
273    
274            /**
275            * Deletes the file shortcut with the primary key. This method is only
276            * supported by the Liferay repository.
277            *
278            * @param fileShortcutId the primary key of the file shortcut
279            * @throws PortalException if the file shortcut could not be found
280            * @throws SystemException if a system exception occurred
281            */
282            public static void deleteFileShortcut(long fileShortcutId)
283                    throws RemoteException {
284                    try {
285                            DLAppServiceUtil.deleteFileShortcut(fileShortcutId);
286                    }
287                    catch (Exception e) {
288                            _log.error(e, e);
289    
290                            throw new RemoteException(e.getMessage());
291                    }
292            }
293    
294            /**
295            * Deletes the folder with the primary key and all of its subfolders and
296            * file entries.
297            *
298            * @param folderId the primary key of the folder
299            * @throws PortalException if the folder could not be found
300            * @throws SystemException if a system exception occurred
301            */
302            public static void deleteFolder(long folderId) throws RemoteException {
303                    try {
304                            DLAppServiceUtil.deleteFolder(folderId);
305                    }
306                    catch (Exception e) {
307                            _log.error(e, e);
308    
309                            throw new RemoteException(e.getMessage());
310                    }
311            }
312    
313            /**
314            * Deletes the folder with the name in the parent folder and all of its
315            * subfolders and file entries.
316            *
317            * @param repositoryId the primary key of the repository
318            * @param parentFolderId the primary key of the folder's parent folder
319            * @param name the folder's name
320            * @throws PortalException if the folder could not be found
321            * @throws SystemException if a system exception occurred
322            */
323            public static void deleteFolder(long repositoryId, long parentFolderId,
324                    java.lang.String name) throws RemoteException {
325                    try {
326                            DLAppServiceUtil.deleteFolder(repositoryId, parentFolderId, name);
327                    }
328                    catch (Exception e) {
329                            _log.error(e, e);
330    
331                            throw new RemoteException(e.getMessage());
332                    }
333            }
334    
335            /**
336            * Deletes the temporary file entry.
337            *
338            * @param groupId the primary key of the group
339            * @param folderId the primary key of the folder where the file entry was
340            eventually to reside
341            * @param fileName the file's original name
342            * @param tempFolderName the temporary folder's name
343            * @throws PortalException if the file name was invalid
344            * @throws SystemException if a system exception occurred
345            * @see com.liferay.portal.kernel.util.TempFileUtil
346            */
347            public static void deleteTempFileEntry(long groupId, long folderId,
348                    java.lang.String fileName, java.lang.String tempFolderName)
349                    throws RemoteException {
350                    try {
351                            DLAppServiceUtil.deleteTempFileEntry(groupId, folderId, fileName,
352                                    tempFolderName);
353                    }
354                    catch (Exception e) {
355                            _log.error(e, e);
356    
357                            throw new RemoteException(e.getMessage());
358                    }
359            }
360    
361            /**
362            * Returns the number of file entries and shortcuts in the folder.
363            *
364            * @param repositoryId the primary key of the repository
365            * @param folderId the primary key of the folder
366            * @param status the workflow status
367            * @return the number of file entries and shortcuts in the folder
368            * @throws PortalException if the folder ould not be found
369            * @throws SystemException if a system exception occurred
370            */
371            public static int getFileEntriesAndFileShortcutsCount(long repositoryId,
372                    long folderId, int status) throws RemoteException {
373                    try {
374                            int returnValue = DLAppServiceUtil.getFileEntriesAndFileShortcutsCount(repositoryId,
375                                            folderId, status);
376    
377                            return returnValue;
378                    }
379                    catch (Exception e) {
380                            _log.error(e, e);
381    
382                            throw new RemoteException(e.getMessage());
383                    }
384            }
385    
386            /**
387            * Returns the number of file entries and shortcuts in the folder.
388            *
389            * @param repositoryId the primary key of the repository
390            * @param folderId the primary key of the folder
391            * @param status the workflow status
392            * @param mimeTypes allowed media types
393            * @return the number of file entries and shortcuts in the folder
394            * @throws PortalException if the folder ould not be found
395            * @throws SystemException if a system exception occurred
396            */
397            public static int getFileEntriesAndFileShortcutsCount(long repositoryId,
398                    long folderId, int status, java.lang.String[] mimeTypes)
399                    throws RemoteException {
400                    try {
401                            int returnValue = DLAppServiceUtil.getFileEntriesAndFileShortcutsCount(repositoryId,
402                                            folderId, status, mimeTypes);
403    
404                            return returnValue;
405                    }
406                    catch (Exception e) {
407                            _log.error(e, e);
408    
409                            throw new RemoteException(e.getMessage());
410                    }
411            }
412    
413            /**
414            * Returns the number of file entries in the folder.
415            *
416            * @param repositoryId the primary key of the file entry's repository
417            * @param folderId the primary key of the file entry's folder
418            * @return the number of file entries in the folder
419            * @throws PortalException if the folder could not be found
420            * @throws SystemException if a system exception occurred
421            */
422            public static int getFileEntriesCount(long repositoryId, long folderId)
423                    throws RemoteException {
424                    try {
425                            int returnValue = DLAppServiceUtil.getFileEntriesCount(repositoryId,
426                                            folderId);
427    
428                            return returnValue;
429                    }
430                    catch (Exception e) {
431                            _log.error(e, e);
432    
433                            throw new RemoteException(e.getMessage());
434                    }
435            }
436    
437            /**
438            * Returns the number of file entries with the file entry type in the
439            * folder.
440            *
441            * @param repositoryId the primary key of the file entry's repository
442            * @param folderId the primary key of the file entry's folder
443            * @param fileEntryTypeId the primary key of the file entry type
444            * @return the number of file entries with the file entry type in the folder
445            * @throws PortalException if the folder could not be found
446            * @throws SystemException if a system exception occurred
447            */
448            public static int getFileEntriesCount(long repositoryId, long folderId,
449                    long fileEntryTypeId) throws RemoteException {
450                    try {
451                            int returnValue = DLAppServiceUtil.getFileEntriesCount(repositoryId,
452                                            folderId, fileEntryTypeId);
453    
454                            return returnValue;
455                    }
456                    catch (Exception e) {
457                            _log.error(e, e);
458    
459                            throw new RemoteException(e.getMessage());
460                    }
461            }
462    
463            /**
464            * Returns the file shortcut with the primary key. This method is only
465            * supported by the Liferay repository.
466            *
467            * @param fileShortcutId the primary key of the file shortcut
468            * @return the file shortcut with the primary key
469            * @throws PortalException if the file shortcut could not be found
470            * @throws SystemException if a system exception occurred
471            */
472            public static com.liferay.portlet.documentlibrary.model.DLFileShortcutSoap getFileShortcut(
473                    long fileShortcutId) throws RemoteException {
474                    try {
475                            com.liferay.portlet.documentlibrary.model.DLFileShortcut returnValue =
476                                    DLAppServiceUtil.getFileShortcut(fileShortcutId);
477    
478                            return com.liferay.portlet.documentlibrary.model.DLFileShortcutSoap.toSoapModel(returnValue);
479                    }
480                    catch (Exception e) {
481                            _log.error(e, e);
482    
483                            throw new RemoteException(e.getMessage());
484                    }
485            }
486    
487            /**
488            * Returns the number of immediate subfolders, file entries, and file
489            * shortcuts in the parent folder.
490            *
491            * @param repositoryId the primary key of the repository
492            * @param folderId the primary key of the parent folder
493            * @param status the workflow status
494            * @param includeMountFolders whether to include mount folders for
495            third-party repositories
496            * @return the number of immediate subfolders, file entries, and file
497            shortcuts in the parent folder
498            * @throws PortalException if the folder could not be found
499            * @throws SystemException if a system exception occurred
500            */
501            public static int getFoldersAndFileEntriesAndFileShortcutsCount(
502                    long repositoryId, long folderId, int status,
503                    boolean includeMountFolders) throws RemoteException {
504                    try {
505                            int returnValue = DLAppServiceUtil.getFoldersAndFileEntriesAndFileShortcutsCount(repositoryId,
506                                            folderId, status, includeMountFolders);
507    
508                            return returnValue;
509                    }
510                    catch (Exception e) {
511                            _log.error(e, e);
512    
513                            throw new RemoteException(e.getMessage());
514                    }
515            }
516    
517            public static int getFoldersAndFileEntriesAndFileShortcutsCount(
518                    long repositoryId, long folderId, int status,
519                    java.lang.String[] mimeTypes, boolean includeMountFolders)
520                    throws RemoteException {
521                    try {
522                            int returnValue = DLAppServiceUtil.getFoldersAndFileEntriesAndFileShortcutsCount(repositoryId,
523                                            folderId, status, mimeTypes, includeMountFolders);
524    
525                            return returnValue;
526                    }
527                    catch (Exception e) {
528                            _log.error(e, e);
529    
530                            throw new RemoteException(e.getMessage());
531                    }
532            }
533    
534            /**
535            * Returns the number of immediate subfolders of the parent folder.
536            *
537            * @param repositoryId the primary key of the folder's repository
538            * @param parentFolderId the primary key of the folder's parent folder
539            * @return the number of immediate subfolders of the parent folder
540            * @throws PortalException if the parent folder could not be found
541            * @throws SystemException if a system exception occurred
542            */
543            public static int getFoldersCount(long repositoryId, long parentFolderId)
544                    throws RemoteException {
545                    try {
546                            int returnValue = DLAppServiceUtil.getFoldersCount(repositoryId,
547                                            parentFolderId);
548    
549                            return returnValue;
550                    }
551                    catch (Exception e) {
552                            _log.error(e, e);
553    
554                            throw new RemoteException(e.getMessage());
555                    }
556            }
557    
558            /**
559            * Returns the number of immediate subfolders of the parent folder,
560            * optionally including mount folders for third-party repositories.
561            *
562            * @param repositoryId the primary key of the folder's repository
563            * @param parentFolderId the primary key of the folder's parent folder
564            * @param includeMountFolders whether to include mount folders for
565            third-party repositories
566            * @return the number of immediate subfolders of the parent folder
567            * @throws PortalException if the parent folder could not be found
568            * @throws SystemException if a system exception occurred
569            */
570            public static int getFoldersCount(long repositoryId, long parentFolderId,
571                    boolean includeMountFolders) throws RemoteException {
572                    try {
573                            int returnValue = DLAppServiceUtil.getFoldersCount(repositoryId,
574                                            parentFolderId, includeMountFolders);
575    
576                            return returnValue;
577                    }
578                    catch (Exception e) {
579                            _log.error(e, e);
580    
581                            throw new RemoteException(e.getMessage());
582                    }
583            }
584    
585            /**
586            * Returns the number of immediate subfolders and file entries across the
587            * folders.
588            *
589            * @param repositoryId the primary key of the repository
590            * @param folderIds the primary keys of folders from which to count
591            immediate subfolders and file entries
592            * @param status the workflow status
593            * @return the number of immediate subfolders and file entries across the
594            folders
595            * @throws PortalException if the repository could not be found
596            * @throws SystemException if a system exception occurred
597            */
598            public static int getFoldersFileEntriesCount(long repositoryId,
599                    Long[] folderIds, int status) throws RemoteException {
600                    try {
601                            int returnValue = DLAppServiceUtil.getFoldersFileEntriesCount(repositoryId,
602                                            ListUtil.toList(folderIds), status);
603    
604                            return returnValue;
605                    }
606                    catch (Exception e) {
607                            _log.error(e, e);
608    
609                            throw new RemoteException(e.getMessage());
610                    }
611            }
612    
613            /**
614            * Returns the number of file entries in a group starting at the repository
615            * default parent folder that are stored within the Liferay repository. This
616            * method is primarily used to search for recently modified file entries. It
617            * can be limited to the file entries modified by a given user.
618            *
619            * @param groupId the primary key of the group
620            * @param userId the primary key of the user who created the file
621            (optionally <code>0</code>)
622            * @return the number of matching file entries
623            * @throws PortalException if the group could not be found
624            * @throws SystemException if a system exception occurred
625            */
626            public static int getGroupFileEntriesCount(long groupId, long userId)
627                    throws RemoteException {
628                    try {
629                            int returnValue = DLAppServiceUtil.getGroupFileEntriesCount(groupId,
630                                            userId);
631    
632                            return returnValue;
633                    }
634                    catch (Exception e) {
635                            _log.error(e, e);
636    
637                            throw new RemoteException(e.getMessage());
638                    }
639            }
640    
641            /**
642            * Returns the number of file entries in a group starting at the root folder
643            * that are stored within the Liferay repository. This method is primarily
644            * used to search for recently modified file entries. It can be limited to
645            * the file entries modified by a given user.
646            *
647            * @param groupId the primary key of the group
648            * @param userId the primary key of the user who created the file
649            (optionally <code>0</code>)
650            * @param rootFolderId the primary key of the root folder to begin the
651            search
652            * @return the number of matching file entries
653            * @throws PortalException if the group could not be found
654            * @throws SystemException if a system exception occurred
655            */
656            public static int getGroupFileEntriesCount(long groupId, long userId,
657                    long rootFolderId) throws RemoteException {
658                    try {
659                            int returnValue = DLAppServiceUtil.getGroupFileEntriesCount(groupId,
660                                            userId, rootFolderId);
661    
662                            return returnValue;
663                    }
664                    catch (Exception e) {
665                            _log.error(e, e);
666    
667                            throw new RemoteException(e.getMessage());
668                    }
669            }
670    
671            public static int getGroupFileEntriesCount(long groupId, long userId,
672                    long rootFolderId, java.lang.String[] mimeTypes, int status)
673                    throws RemoteException {
674                    try {
675                            int returnValue = DLAppServiceUtil.getGroupFileEntriesCount(groupId,
676                                            userId, rootFolderId, mimeTypes, status);
677    
678                            return returnValue;
679                    }
680                    catch (Exception e) {
681                            _log.error(e, e);
682    
683                            throw new RemoteException(e.getMessage());
684                    }
685            }
686    
687            /**
688            * Returns the number of immediate subfolders of the parent folder that are
689            * used for mounting third-party repositories. This method is only supported
690            * by the Liferay repository.
691            *
692            * @param repositoryId the primary key of the repository
693            * @param parentFolderId the primary key of the parent folder
694            * @return the number of folders of the parent folder that are used for
695            mounting third-party repositories
696            * @throws PortalException if the repository or parent folder could not be
697            found
698            * @throws SystemException if a system exception occurred
699            */
700            public static int getMountFoldersCount(long repositoryId,
701                    long parentFolderId) throws RemoteException {
702                    try {
703                            int returnValue = DLAppServiceUtil.getMountFoldersCount(repositoryId,
704                                            parentFolderId);
705    
706                            return returnValue;
707                    }
708                    catch (Exception e) {
709                            _log.error(e, e);
710    
711                            throw new RemoteException(e.getMessage());
712                    }
713            }
714    
715            public static void getSubfolderIds(long repositoryId, Long[] folderIds,
716                    long folderId) throws RemoteException {
717                    try {
718                            DLAppServiceUtil.getSubfolderIds(repositoryId,
719                                    ListUtil.toList(folderIds), folderId);
720                    }
721                    catch (Exception e) {
722                            _log.error(e, e);
723    
724                            throw new RemoteException(e.getMessage());
725                    }
726            }
727    
728            /**
729            * Returns all the descendant folders of the folder with the primary key.
730            *
731            * @param repositoryId the primary key of the repository
732            * @param folderId the primary key of the folder
733            * @return the descendant folders of the folder with the primary key
734            * @throws PortalException if the repository or parent folder could not be
735            found
736            * @throws SystemException if a system exception occurred
737            */
738            public static java.lang.Long[] getSubfolderIds(long repositoryId,
739                    long folderId) throws RemoteException {
740                    try {
741                            java.util.List<java.lang.Long> returnValue = DLAppServiceUtil.getSubfolderIds(repositoryId,
742                                            folderId);
743    
744                            return returnValue.toArray(new java.lang.Long[returnValue.size()]);
745                    }
746                    catch (Exception e) {
747                            _log.error(e, e);
748    
749                            throw new RemoteException(e.getMessage());
750                    }
751            }
752    
753            /**
754            * Returns descendant folders of the folder with the primary key, optionally
755            * limiting to one level deep.
756            *
757            * @param repositoryId the primary key of the repository
758            * @param folderId the primary key of the folder
759            * @param recurse whether to recurse through each subfolder
760            * @return the descendant folders of the folder with the primary key
761            * @throws PortalException if the repository or parent folder could not be
762            found
763            * @throws SystemException if a system exception occurred
764            */
765            public static java.lang.Long[] getSubfolderIds(long repositoryId,
766                    long folderId, boolean recurse) throws RemoteException {
767                    try {
768                            java.util.List<java.lang.Long> returnValue = DLAppServiceUtil.getSubfolderIds(repositoryId,
769                                            folderId, recurse);
770    
771                            return returnValue.toArray(new java.lang.Long[returnValue.size()]);
772                    }
773                    catch (Exception e) {
774                            _log.error(e, e);
775    
776                            throw new RemoteException(e.getMessage());
777                    }
778            }
779    
780            /**
781            * Returns all the temporary file entry names.
782            *
783            * @param groupId the primary key of the group
784            * @param folderId the primary key of the folder where the file entry will
785            eventually reside
786            * @param tempFolderName the temporary folder's name
787            * @return the temporary file entry names
788            * @throws PortalException if the folder was invalid
789            * @throws SystemException if a system exception occurred
790            * @see #addTempFileEntry(long, long, String, String, File)
791            * @see com.liferay.portal.kernel.util.TempFileUtil
792            */
793            public static java.lang.String[] getTempFileEntryNames(long groupId,
794                    long folderId, java.lang.String tempFolderName)
795                    throws RemoteException {
796                    try {
797                            java.lang.String[] returnValue = DLAppServiceUtil.getTempFileEntryNames(groupId,
798                                            folderId, tempFolderName);
799    
800                            return returnValue;
801                    }
802                    catch (Exception e) {
803                            _log.error(e, e);
804    
805                            throw new RemoteException(e.getMessage());
806                    }
807            }
808    
809            /**
810            * Reverts the file entry to a previous version. A new version will be
811            * created based on the previous version and metadata.
812            *
813            * @param fileEntryId the primary key of the file entry
814            * @param version the version to revert back to
815            * @param serviceContext the service context to be applied
816            * @throws PortalException if the file entry or version could not be found
817            * @throws SystemException if a system exception occurred
818            */
819            public static void revertFileEntry(long fileEntryId,
820                    java.lang.String version,
821                    com.liferay.portal.service.ServiceContext serviceContext)
822                    throws RemoteException {
823                    try {
824                            DLAppServiceUtil.revertFileEntry(fileEntryId, version,
825                                    serviceContext);
826                    }
827                    catch (Exception e) {
828                            _log.error(e, e);
829    
830                            throw new RemoteException(e.getMessage());
831                    }
832            }
833    
834            public static void unlockFileEntry(long fileEntryId)
835                    throws RemoteException {
836                    try {
837                            DLAppServiceUtil.unlockFileEntry(fileEntryId);
838                    }
839                    catch (Exception e) {
840                            _log.error(e, e);
841    
842                            throw new RemoteException(e.getMessage());
843                    }
844            }
845    
846            public static void unlockFileEntry(long fileEntryId,
847                    java.lang.String lockUuid) throws RemoteException {
848                    try {
849                            DLAppServiceUtil.unlockFileEntry(fileEntryId, lockUuid);
850                    }
851                    catch (Exception e) {
852                            _log.error(e, e);
853    
854                            throw new RemoteException(e.getMessage());
855                    }
856            }
857    
858            /**
859            * Unlocks the folder. This method is primarily used by WebDAV.
860            *
861            * @param repositoryId the primary key of the repository
862            * @param folderId the primary key of the folder
863            * @param lockUuid the lock's universally unique identifier
864            * @throws PortalException if the repository or folder could not be found
865            * @throws SystemException if a system exception occurred
866            */
867            public static void unlockFolder(long repositoryId, long folderId,
868                    java.lang.String lockUuid) throws RemoteException {
869                    try {
870                            DLAppServiceUtil.unlockFolder(repositoryId, folderId, lockUuid);
871                    }
872                    catch (Exception e) {
873                            _log.error(e, e);
874    
875                            throw new RemoteException(e.getMessage());
876                    }
877            }
878    
879            /**
880            * Unlocks the folder. This method is primarily used by WebDAV.
881            *
882            * @param repositoryId the primary key of the repository
883            * @param parentFolderId the primary key of the parent folder
884            * @param name the folder's name
885            * @param lockUuid the lock's universally unique identifier
886            * @throws PortalException if the repository or folder could not be found
887            * @throws SystemException if a system exception occurred
888            */
889            public static void unlockFolder(long repositoryId, long parentFolderId,
890                    java.lang.String name, java.lang.String lockUuid)
891                    throws RemoteException {
892                    try {
893                            DLAppServiceUtil.unlockFolder(repositoryId, parentFolderId, name,
894                                    lockUuid);
895                    }
896                    catch (Exception e) {
897                            _log.error(e, e);
898    
899                            throw new RemoteException(e.getMessage());
900                    }
901            }
902    
903            /**
904            * Updates a file shortcut to the existing file entry. This method is only
905            * supported by the Liferay repository.
906            *
907            * @param fileShortcutId the primary key of the file shortcut
908            * @param folderId the primary key of the file shortcut's parent folder
909            * @param toFileEntryId the primary key of the file shortcut's file entry
910            * @param serviceContext the service context to be applied. Can set the
911            asset category IDs, asset tag names, and expando bridge
912            attributes for the file entry.
913            * @return the file shortcut
914            * @throws PortalException if the file shortcut, folder, or file entry could
915            not be found
916            * @throws SystemException if a system exception occurred
917            */
918            public static com.liferay.portlet.documentlibrary.model.DLFileShortcutSoap updateFileShortcut(
919                    long fileShortcutId, long folderId, long toFileEntryId,
920                    com.liferay.portal.service.ServiceContext serviceContext)
921                    throws RemoteException {
922                    try {
923                            com.liferay.portlet.documentlibrary.model.DLFileShortcut returnValue =
924                                    DLAppServiceUtil.updateFileShortcut(fileShortcutId, folderId,
925                                            toFileEntryId, serviceContext);
926    
927                            return com.liferay.portlet.documentlibrary.model.DLFileShortcutSoap.toSoapModel(returnValue);
928                    }
929                    catch (Exception e) {
930                            _log.error(e, e);
931    
932                            throw new RemoteException(e.getMessage());
933                    }
934            }
935    
936            /**
937            * Returns <code>true</code> if the file entry is checked out. This method
938            * is primarily used by WebDAV.
939            *
940            * @param repositoryId the primary key for the repository
941            * @param fileEntryId the primary key for the file entry
942            * @param lockUuid the lock's universally unique identifier
943            * @return <code>true</code> if the file entry is checked out;
944            <code>false</code> otherwise
945            * @throws PortalException if the file entry could not be found
946            * @throws SystemException if a system exception occurred
947            */
948            public static boolean verifyFileEntryCheckOut(long repositoryId,
949                    long fileEntryId, java.lang.String lockUuid) throws RemoteException {
950                    try {
951                            boolean returnValue = DLAppServiceUtil.verifyFileEntryCheckOut(repositoryId,
952                                            fileEntryId, lockUuid);
953    
954                            return returnValue;
955                    }
956                    catch (Exception e) {
957                            _log.error(e, e);
958    
959                            throw new RemoteException(e.getMessage());
960                    }
961            }
962    
963            public static boolean verifyFileEntryLock(long repositoryId,
964                    long fileEntryId, java.lang.String lockUuid) throws RemoteException {
965                    try {
966                            boolean returnValue = DLAppServiceUtil.verifyFileEntryLock(repositoryId,
967                                            fileEntryId, lockUuid);
968    
969                            return returnValue;
970                    }
971                    catch (Exception e) {
972                            _log.error(e, e);
973    
974                            throw new RemoteException(e.getMessage());
975                    }
976            }
977    
978            /**
979            * Returns <code>true</code> if the inheritable lock exists. This method is
980            * primarily used by WebDAV.
981            *
982            * @param repositoryId the primary key for the repository
983            * @param folderId the primary key for the folder
984            * @param lockUuid the lock's universally unique identifier
985            * @return <code>true</code> if the inheritable lock exists;
986            <code>false</code> otherwise
987            * @throws PortalException if the folder could not be found
988            * @throws SystemException if a system exception occurred
989            */
990            public static boolean verifyInheritableLock(long repositoryId,
991                    long folderId, java.lang.String lockUuid) throws RemoteException {
992                    try {
993                            boolean returnValue = DLAppServiceUtil.verifyInheritableLock(repositoryId,
994                                            folderId, lockUuid);
995    
996                            return returnValue;
997                    }
998                    catch (Exception e) {
999                            _log.error(e, e);
1000    
1001                            throw new RemoteException(e.getMessage());
1002                    }
1003            }
1004    
1005            private static Log _log = LogFactoryUtil.getLog(DLAppServiceSoap.class);
1006    }