001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.documentlibrary.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the remote service utility for DLApp. This utility wraps
024     * {@link com.liferay.portlet.documentlibrary.service.impl.DLAppServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on a remote server. Methods of this service are expected to have security
027     * checks based on the propagated JAAS credentials because this service can be
028     * accessed remotely.
029     *
030     * @author Brian Wing Shun Chan
031     * @see DLAppService
032     * @see com.liferay.portlet.documentlibrary.service.base.DLAppServiceBaseImpl
033     * @see com.liferay.portlet.documentlibrary.service.impl.DLAppServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class DLAppServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLAppServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds a file entry and associated metadata. It is created based on a byte
046            * array.
047            *
048            * <p>
049            * This method takes two file names, the <code>sourceFileName</code> and the
050            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
051            * name of the actual file being uploaded. The <code>title</code>
052            * corresponds to a name the client wishes to assign this file after it has
053            * been uploaded to the portal. If it is <code>null</code>, the <code>
054            * sourceFileName</code> will be used.
055            * </p>
056            *
057            * @param repositoryId the primary key of the repository
058            * @param folderId the primary key of the file entry's parent folder
059            * @param sourceFileName the original file's name
060            * @param mimeType the file's MIME type
061            * @param title the name to be assigned to the file (optionally <code>null
062            </code>)
063            * @param description the file's description
064            * @param changeLog the file's version change log
065            * @param bytes the file's data (optionally <code>null</code>)
066            * @param serviceContext the service context to be applied. Can set the
067            asset category IDs, asset tag names, and expando bridge
068            attributes for the file entry. In a Liferay repository, it may
069            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
070            type </li> <li> fieldsMap - mapping for fields associated with a
071            custom file entry type </li> </ul>
072            * @return the file entry
073            */
074            public static com.liferay.portal.kernel.repository.model.FileEntry addFileEntry(
075                    long repositoryId, long folderId, java.lang.String sourceFileName,
076                    java.lang.String mimeType, java.lang.String title,
077                    java.lang.String description, java.lang.String changeLog, byte[] bytes,
078                    com.liferay.portal.service.ServiceContext serviceContext)
079                    throws com.liferay.portal.kernel.exception.PortalException {
080                    return getService()
081                                       .addFileEntry(repositoryId, folderId, sourceFileName,
082                            mimeType, title, description, changeLog, bytes, serviceContext);
083            }
084    
085            /**
086            * Adds a file entry and associated metadata. It is created based on a
087            * {@link File} object.
088            *
089            * <p>
090            * This method takes two file names, the <code>sourceFileName</code> and the
091            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
092            * name of the actual file being uploaded. The <code>title</code>
093            * corresponds to a name the client wishes to assign this file after it has
094            * been uploaded to the portal. If it is <code>null</code>, the <code>
095            * sourceFileName</code> will be used.
096            * </p>
097            *
098            * @param repositoryId the primary key of the repository
099            * @param folderId the primary key of the file entry's parent folder
100            * @param sourceFileName the original file's name
101            * @param mimeType the file's MIME type
102            * @param title the name to be assigned to the file (optionally <code>null
103            </code>)
104            * @param description the file's description
105            * @param changeLog the file's version change log
106            * @param file the file's data (optionally <code>null</code>)
107            * @param serviceContext the service context to be applied. Can set the
108            asset category IDs, asset tag names, and expando bridge
109            attributes for the file entry. In a Liferay repository, it may
110            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
111            type </li> <li> fieldsMap - mapping for fields associated with a
112            custom file entry type </li> </ul>
113            * @return the file entry
114            */
115            public static com.liferay.portal.kernel.repository.model.FileEntry addFileEntry(
116                    long repositoryId, long folderId, java.lang.String sourceFileName,
117                    java.lang.String mimeType, java.lang.String title,
118                    java.lang.String description, java.lang.String changeLog,
119                    java.io.File file,
120                    com.liferay.portal.service.ServiceContext serviceContext)
121                    throws com.liferay.portal.kernel.exception.PortalException {
122                    return getService()
123                                       .addFileEntry(repositoryId, folderId, sourceFileName,
124                            mimeType, title, description, changeLog, file, serviceContext);
125            }
126    
127            /**
128            * Adds a file entry and associated metadata. It is created based on a
129            * {@link InputStream} object.
130            *
131            * <p>
132            * This method takes two file names, the <code>sourceFileName</code> and the
133            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
134            * name of the actual file being uploaded. The <code>title</code>
135            * corresponds to a name the client wishes to assign this file after it has
136            * been uploaded to the portal. If it is <code>null</code>, the <code>
137            * sourceFileName</code> will be used.
138            * </p>
139            *
140            * @param repositoryId the primary key of the repository
141            * @param folderId the primary key of the file entry's parent folder
142            * @param sourceFileName the original file's name
143            * @param mimeType the file's MIME type
144            * @param title the name to be assigned to the file (optionally <code>null
145            </code>)
146            * @param description the file's description
147            * @param changeLog the file's version change log
148            * @param is the file's data (optionally <code>null</code>)
149            * @param size the file's size (optionally <code>0</code>)
150            * @param serviceContext the service context to be applied. Can set the
151            asset category IDs, asset tag names, and expando bridge
152            attributes for the file entry. In a Liferay repository, it may
153            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
154            type </li> <li> fieldsMap - mapping for fields associated with a
155            custom file entry type </li> </ul>
156            * @return the file entry
157            */
158            public static com.liferay.portal.kernel.repository.model.FileEntry addFileEntry(
159                    long repositoryId, long folderId, java.lang.String sourceFileName,
160                    java.lang.String mimeType, java.lang.String title,
161                    java.lang.String description, java.lang.String changeLog,
162                    java.io.InputStream is, long size,
163                    com.liferay.portal.service.ServiceContext serviceContext)
164                    throws com.liferay.portal.kernel.exception.PortalException {
165                    return getService()
166                                       .addFileEntry(repositoryId, folderId, sourceFileName,
167                            mimeType, title, description, changeLog, is, size, serviceContext);
168            }
169    
170            /**
171            * Adds a file shortcut to the existing file entry. This method is only
172            * supported by the Liferay repository.
173            *
174            * @param repositoryId the primary key of the repository
175            * @param folderId the primary key of the file shortcut's parent folder
176            * @param toFileEntryId the primary key of the file shortcut's file entry
177            * @param serviceContext the service context to be applied. Can set the
178            asset category IDs, asset tag names, and expando bridge
179            attributes for the file entry.
180            * @return the file shortcut
181            */
182            public static com.liferay.portal.kernel.repository.model.FileShortcut addFileShortcut(
183                    long repositoryId, long folderId, long toFileEntryId,
184                    com.liferay.portal.service.ServiceContext serviceContext)
185                    throws com.liferay.portal.kernel.exception.PortalException {
186                    return getService()
187                                       .addFileShortcut(repositoryId, folderId, toFileEntryId,
188                            serviceContext);
189            }
190    
191            /**
192            * Adds a folder.
193            *
194            * @param repositoryId the primary key of the repository
195            * @param parentFolderId the primary key of the folder's parent folder
196            * @param name the folder's name
197            * @param description the folder's description
198            * @param serviceContext the service context to be applied. In a Liferay
199            repository, it may include boolean mountPoint specifying whether
200            folder is a facade for mounting a third-party repository
201            * @return the folder
202            */
203            public static com.liferay.portal.kernel.repository.model.Folder addFolder(
204                    long repositoryId, long parentFolderId, java.lang.String name,
205                    java.lang.String description,
206                    com.liferay.portal.service.ServiceContext serviceContext)
207                    throws com.liferay.portal.kernel.exception.PortalException {
208                    return getService()
209                                       .addFolder(repositoryId, parentFolderId, name, description,
210                            serviceContext);
211            }
212    
213            /**
214            * Adds a temporary file entry.
215            *
216            * <p>
217            * This allows a client to upload a file into a temporary location and
218            * manipulate its metadata prior to making it available for public usage.
219            * This is different from checking in and checking out a file entry.
220            * </p>
221            *
222            * @param groupId the primary key of the group
223            * @param folderId the primary key of the folder where the file entry will
224            eventually reside
225            * @param folderName the temporary folder's name
226            * @param fileName the file's original name
227            * @param file the file's data (optionally <code>null</code>)
228            * @param mimeType the file's MIME type
229            * @return the temporary file entry
230            * @see TempFileEntryUtil
231            */
232            public static com.liferay.portal.kernel.repository.model.FileEntry addTempFileEntry(
233                    long groupId, long folderId, java.lang.String folderName,
234                    java.lang.String fileName, java.io.File file, java.lang.String mimeType)
235                    throws com.liferay.portal.kernel.exception.PortalException {
236                    return getService()
237                                       .addTempFileEntry(groupId, folderId, folderName, fileName,
238                            file, mimeType);
239            }
240    
241            /**
242            * Adds a temporary file entry. It is created based on the {@link
243            * InputStream} object.
244            *
245            * <p>
246            * This allows a client to upload a file into a temporary location and
247            * manipulate its metadata prior to making it available for public usage.
248            * This is different from checking in and checking out a file entry.
249            * </p>
250            *
251            * @param groupId the primary key of the group
252            * @param folderId the primary key of the folder where the file entry will
253            eventually reside
254            * @param folderName the temporary folder's name
255            * @param fileName the file's original name
256            * @param inputStream the file's data
257            * @param mimeType the file's MIME type
258            * @return the temporary file entry
259            * @see TempFileEntryUtil
260            */
261            public static com.liferay.portal.kernel.repository.model.FileEntry addTempFileEntry(
262                    long groupId, long folderId, java.lang.String folderName,
263                    java.lang.String fileName, java.io.InputStream inputStream,
264                    java.lang.String mimeType)
265                    throws com.liferay.portal.kernel.exception.PortalException {
266                    return getService()
267                                       .addTempFileEntry(groupId, folderId, folderName, fileName,
268                            inputStream, mimeType);
269            }
270    
271            /**
272            * Cancels the check out of the file entry. If a user has not checked out
273            * the specified file entry, invoking this method will result in no changes.
274            *
275            * <p>
276            * When a file entry is checked out, a PWC (private working copy) is created
277            * and the original file entry is locked. A client can make as many changes
278            * to the PWC as he desires without those changes being visible to other
279            * users. If the user is satisfied with the changes, he may elect to check
280            * in his changes, resulting in a new file version based on the PWC; the PWC
281            * will be removed and the file entry will be unlocked. If the user is not
282            * satisfied with the changes, he may elect to cancel his check out; this
283            * results in the deletion of the PWC and unlocking of the file entry.
284            * </p>
285            *
286            * @param fileEntryId the primary key of the file entry to cancel the
287            checkout
288            * @see #checkInFileEntry(long, boolean, String, ServiceContext)
289            * @see #checkOutFileEntry(long, ServiceContext)
290            */
291            public static void cancelCheckOut(long fileEntryId)
292                    throws com.liferay.portal.kernel.exception.PortalException {
293                    getService().cancelCheckOut(fileEntryId);
294            }
295    
296            /**
297            * @deprecated As of 6.2.0, replaced by {@link #checkInFileEntry(long,
298            String, ServiceContext)}
299            */
300            @Deprecated
301            public static void checkInFileEntry(long fileEntryId,
302                    java.lang.String lockUuid)
303                    throws com.liferay.portal.kernel.exception.PortalException {
304                    getService().checkInFileEntry(fileEntryId, lockUuid);
305            }
306    
307            /**
308            * Checks in the file entry using the lock's UUID. If a user has not checked
309            * out the specified file entry, invoking this method will result in no
310            * changes. This method is primarily used by WebDAV.
311            *
312            * <p>
313            * When a file entry is checked out, a PWC (private working copy) is created
314            * and the original file entry is locked. A client can make as many changes
315            * to the PWC as he desires without those changes being visible to other
316            * users. If the user is satisfied with the changes, he may elect to check
317            * in his changes, resulting in a new file version based on the PWC; the PWC
318            * will be removed and the file entry will be unlocked. If the user is not
319            * satisfied with the changes, he may elect to cancel his check out; this
320            * results in the deletion of the PWC and unlocking of the file entry.
321            * </p>
322            *
323            * @param fileEntryId the primary key of the file entry to check in
324            * @param lockUuid the lock's UUID
325            * @param serviceContext the service context to be applied
326            * @see #cancelCheckOut(long)
327            * @see #checkOutFileEntry(long, String, long, ServiceContext)
328            */
329            public static void checkInFileEntry(long fileEntryId,
330                    java.lang.String lockUuid,
331                    com.liferay.portal.service.ServiceContext serviceContext)
332                    throws com.liferay.portal.kernel.exception.PortalException {
333                    getService().checkInFileEntry(fileEntryId, lockUuid, serviceContext);
334            }
335    
336            /**
337            * Checks in the file entry. If a user has not checked out the specified
338            * file entry, invoking this method will result in no changes.
339            *
340            * <p>
341            * When a file entry is checked out, a PWC (private working copy) is created
342            * and the original file entry is locked. A client can make as many changes
343            * to the PWC as he desires without those changes being visible to other
344            * users. If the user is satisfied with the changes, he may elect to check
345            * in his changes, resulting in a new file version based on the PWC; the PWC
346            * will be removed and the file entry will be unlocked. If the user is not
347            * satisfied with the changes, he may elect to cancel his check out; this
348            * results in the deletion of the PWC and unlocking of the file entry.
349            * </p>
350            *
351            * @param fileEntryId the primary key of the file entry to check in
352            * @param majorVersion whether the new file version is a major version
353            * @param changeLog the file's version change log
354            * @param serviceContext the service context to be applied
355            * @see #cancelCheckOut(long)
356            * @see #checkOutFileEntry(long, ServiceContext)
357            */
358            public static void checkInFileEntry(long fileEntryId, boolean majorVersion,
359                    java.lang.String changeLog,
360                    com.liferay.portal.service.ServiceContext serviceContext)
361                    throws com.liferay.portal.kernel.exception.PortalException {
362                    getService()
363                            .checkInFileEntry(fileEntryId, majorVersion, changeLog,
364                            serviceContext);
365            }
366    
367            /**
368            * Checks out the file entry. This method is primarily used by WebDAV.
369            *
370            * <p>
371            * When a file entry is checked out, a PWC (private working copy) is created
372            * and the original file entry is locked. A client can make as many changes
373            * to the PWC as he desires without those changes being visible to other
374            * users. If the user is satisfied with the changes, he may elect to check
375            * in his changes, resulting in a new file version based on the PWC; the PWC
376            * will be removed and the file entry will be unlocked. If the user is not
377            * satisfied with the changes, he may elect to cancel his check out; this
378            * results in the deletion of the PWC and unlocking of the file entry.
379            * </p>
380            *
381            * @param fileEntryId the file entry to check out
382            * @param owner the owner string for the checkout (optionally
383            <code>null</code>)
384            * @param expirationTime the time in milliseconds before the lock expires.
385            If the value is <code>0</code>, the default expiration time will
386            be used from <code>portal.properties>.
387            * @param serviceContext the service context to be applied
388            * @return the file entry
389            * @see #cancelCheckOut(long)
390            * @see #checkInFileEntry(long, String)
391            */
392            public static com.liferay.portal.kernel.repository.model.FileEntry checkOutFileEntry(
393                    long fileEntryId, java.lang.String owner, long expirationTime,
394                    com.liferay.portal.service.ServiceContext serviceContext)
395                    throws com.liferay.portal.kernel.exception.PortalException {
396                    return getService()
397                                       .checkOutFileEntry(fileEntryId, owner, expirationTime,
398                            serviceContext);
399            }
400    
401            /**
402            * Check out a file entry.
403            *
404            * <p>
405            * When a file entry is checked out, a PWC (private working copy) is created
406            * and the original file entry is locked. A client can make as many changes
407            * to the PWC as he desires without those changes being visible to other
408            * users. If the user is satisfied with the changes, he may elect to check
409            * in his changes, resulting in a new file version based on the PWC; the PWC
410            * will be removed and the file entry will be unlocked. If the user is not
411            * satisfied with the changes, he may elect to cancel his check out; this
412            * results in the deletion of the PWC and unlocking of the file entry.
413            * </p>
414            *
415            * @param fileEntryId the file entry to check out
416            * @param serviceContext the service context to be applied
417            * @see #cancelCheckOut(long)
418            * @see #checkInFileEntry(long, boolean, String, ServiceContext)
419            */
420            public static void checkOutFileEntry(long fileEntryId,
421                    com.liferay.portal.service.ServiceContext serviceContext)
422                    throws com.liferay.portal.kernel.exception.PortalException {
423                    getService().checkOutFileEntry(fileEntryId, serviceContext);
424            }
425    
426            /**
427            * Performs a deep copy of the folder.
428            *
429            * @param repositoryId the primary key of the repository
430            * @param sourceFolderId the primary key of the folder to copy
431            * @param parentFolderId the primary key of the new folder's parent folder
432            * @param name the new folder's name
433            * @param description the new folder's description
434            * @param serviceContext the service context to be applied
435            * @return the folder
436            */
437            public static com.liferay.portal.kernel.repository.model.Folder copyFolder(
438                    long repositoryId, long sourceFolderId, long parentFolderId,
439                    java.lang.String name, java.lang.String description,
440                    com.liferay.portal.service.ServiceContext serviceContext)
441                    throws com.liferay.portal.kernel.exception.PortalException {
442                    return getService()
443                                       .copyFolder(repositoryId, sourceFolderId, parentFolderId,
444                            name, description, serviceContext);
445            }
446    
447            /**
448            * Deletes the file entry with the primary key.
449            *
450            * @param fileEntryId the primary key of the file entry
451            */
452            public static void deleteFileEntry(long fileEntryId)
453                    throws com.liferay.portal.kernel.exception.PortalException {
454                    getService().deleteFileEntry(fileEntryId);
455            }
456    
457            /**
458            * Deletes the file entry with the title in the folder.
459            *
460            * @param repositoryId the primary key of the repository
461            * @param folderId the primary key of the file entry's parent folder
462            * @param title the file entry's title
463            */
464            public static void deleteFileEntryByTitle(long repositoryId, long folderId,
465                    java.lang.String title)
466                    throws com.liferay.portal.kernel.exception.PortalException {
467                    getService().deleteFileEntryByTitle(repositoryId, folderId, title);
468            }
469    
470            /**
471            * Deletes the file shortcut with the primary key. This method is only
472            * supported by the Liferay repository.
473            *
474            * @param fileShortcutId the primary key of the file shortcut
475            */
476            public static void deleteFileShortcut(long fileShortcutId)
477                    throws com.liferay.portal.kernel.exception.PortalException {
478                    getService().deleteFileShortcut(fileShortcutId);
479            }
480    
481            /**
482            * Deletes the file version. File versions can only be deleted if it is
483            * approved and there are other approved file versions available. This
484            * method is only supported by the Liferay repository.
485            *
486            * @param fileEntryId the primary key of the file entry
487            * @param version the version label of the file version
488            */
489            public static void deleteFileVersion(long fileEntryId,
490                    java.lang.String version)
491                    throws com.liferay.portal.kernel.exception.PortalException {
492                    getService().deleteFileVersion(fileEntryId, version);
493            }
494    
495            /**
496            * Deletes the folder with the primary key and all of its subfolders and
497            * file entries.
498            *
499            * @param folderId the primary key of the folder
500            */
501            public static void deleteFolder(long folderId)
502                    throws com.liferay.portal.kernel.exception.PortalException {
503                    getService().deleteFolder(folderId);
504            }
505    
506            /**
507            * Deletes the folder with the name in the parent folder and all of its
508            * subfolders and file entries.
509            *
510            * @param repositoryId the primary key of the repository
511            * @param parentFolderId the primary key of the folder's parent folder
512            * @param name the folder's name
513            */
514            public static void deleteFolder(long repositoryId, long parentFolderId,
515                    java.lang.String name)
516                    throws com.liferay.portal.kernel.exception.PortalException {
517                    getService().deleteFolder(repositoryId, parentFolderId, name);
518            }
519    
520            /**
521            * Deletes the temporary file entry.
522            *
523            * @param groupId the primary key of the group
524            * @param folderId the primary key of the folder where the file entry was
525            eventually to reside
526            * @param folderName the temporary folder's name
527            * @param fileName the file's original name
528            * @see TempFileEntryUtil
529            */
530            public static void deleteTempFileEntry(long groupId, long folderId,
531                    java.lang.String folderName, java.lang.String fileName)
532                    throws com.liferay.portal.kernel.exception.PortalException {
533                    getService().deleteTempFileEntry(groupId, folderId, folderName, fileName);
534            }
535    
536            /**
537            * Returns all the file entries in the folder.
538            *
539            * @param repositoryId the primary key of the file entry's repository
540            * @param folderId the primary key of the file entry's folder
541            * @return the file entries in the folder
542            */
543            public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getFileEntries(
544                    long repositoryId, long folderId)
545                    throws com.liferay.portal.kernel.exception.PortalException {
546                    return getService().getFileEntries(repositoryId, folderId);
547            }
548    
549            /**
550            * Returns the file entries with the file entry type in the folder.
551            *
552            * @param repositoryId the primary key of the file entry's repository
553            * @param folderId the primary key of the file entry's folder
554            * @param fileEntryTypeId the primary key of the file entry type
555            * @return the file entries with the file entry type in the folder
556            */
557            public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getFileEntries(
558                    long repositoryId, long folderId, long fileEntryTypeId)
559                    throws com.liferay.portal.kernel.exception.PortalException {
560                    return getService()
561                                       .getFileEntries(repositoryId, folderId, fileEntryTypeId);
562            }
563    
564            /**
565            * Returns a name-ordered range of all the file entries with the file entry
566            * type in the folder.
567            *
568            * @param repositoryId the primary key of the file entry's repository
569            * @param folderId the primary key of the file entry's folder
570            * @param fileEntryTypeId the primary key of the file entry type
571            * @param start the lower bound of the range of results
572            * @param end the upper bound of the range of results (not inclusive)
573            * @return the name-ordered range of the file entries in the folder
574            */
575            public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getFileEntries(
576                    long repositoryId, long folderId, long fileEntryTypeId, int start,
577                    int end) throws com.liferay.portal.kernel.exception.PortalException {
578                    return getService()
579                                       .getFileEntries(repositoryId, folderId, fileEntryTypeId,
580                            start, end);
581            }
582    
583            /**
584            * Returns an ordered range of all the file entries with the file entry type
585            * in the folder.
586            *
587            * @param repositoryId the primary key of the repository
588            * @param folderId the primary key of the folder
589            * @param fileEntryTypeId the primary key of the file entry type
590            * @param start the lower bound of the range of results
591            * @param end the upper bound of the range of results (not inclusive)
592            * @param obc the comparator to order the results by (optionally
593            <code>null</code>)
594            * @return the range of file entries with the file entry type in the folder
595            ordered by <code>null</code>
596            */
597            public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getFileEntries(
598                    long repositoryId, long folderId, long fileEntryTypeId, int start,
599                    int end,
600                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.repository.model.FileEntry> obc)
601                    throws com.liferay.portal.kernel.exception.PortalException {
602                    return getService()
603                                       .getFileEntries(repositoryId, folderId, fileEntryTypeId,
604                            start, end, obc);
605            }
606    
607            public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getFileEntries(
608                    long repositoryId, long folderId, java.lang.String[] mimeTypes)
609                    throws com.liferay.portal.kernel.exception.PortalException {
610                    return getService().getFileEntries(repositoryId, folderId, mimeTypes);
611            }
612    
613            public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getFileEntries(
614                    long repositoryId, long folderId, java.lang.String[] mimeTypes,
615                    int start, int end,
616                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.repository.model.FileEntry> obc)
617                    throws com.liferay.portal.kernel.exception.PortalException {
618                    return getService()
619                                       .getFileEntries(repositoryId, folderId, mimeTypes, start,
620                            end, obc);
621            }
622    
623            /**
624            * Returns a name-ordered range of all the file entries in the folder.
625            *
626            * <p>
627            * Useful when paginating results. Returns a maximum of <code>end -
628            * start</code> instances. <code>start</code> and <code>end</code> are not
629            * primary keys, they are indexes in the result set. Thus, <code>0</code>
630            * refers to the first result in the set. Setting both <code>start</code>
631            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
632            * result set.
633            * </p>
634            *
635            * @param repositoryId the primary key of the file entry's repository
636            * @param folderId the primary key of the file entry's folder
637            * @param start the lower bound of the range of results
638            * @param end the upper bound of the range of results (not inclusive)
639            * @return the name-ordered range of file entries in the folder
640            */
641            public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getFileEntries(
642                    long repositoryId, long folderId, int start, int end)
643                    throws com.liferay.portal.kernel.exception.PortalException {
644                    return getService().getFileEntries(repositoryId, folderId, start, end);
645            }
646    
647            /**
648            * Returns an ordered range of all the file entries in the folder.
649            *
650            * <p>
651            * Useful when paginating results. Returns a maximum of <code>end -
652            * start</code> instances. <code>start</code> and <code>end</code> are not
653            * primary keys, they are indexes in the result set. Thus, <code>0</code>
654            * refers to the first result in the set. Setting both <code>start</code>
655            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
656            * result set.
657            * </p>
658            *
659            * @param repositoryId the primary key of the file entry's repository
660            * @param folderId the primary key of the file entry's folder
661            * @param start the lower bound of the range of results
662            * @param end the upper bound of the range of results (not inclusive)
663            * @param obc the comparator to order the file entries (optionally
664            <code>null</code>)
665            * @return the range of file entries in the folder ordered by comparator
666            <code>obc</code>
667            */
668            public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getFileEntries(
669                    long repositoryId, long folderId, int start, int end,
670                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.repository.model.FileEntry> obc)
671                    throws com.liferay.portal.kernel.exception.PortalException {
672                    return getService()
673                                       .getFileEntries(repositoryId, folderId, start, end, obc);
674            }
675    
676            /**
677            * Returns a range of all the file entries and shortcuts in the folder.
678            *
679            * <p>
680            * Useful when paginating results. Returns a maximum of <code>end -
681            * start</code> instances. <code>start</code> and <code>end</code> are not
682            * primary keys, they are indexes in the result set. Thus, <code>0</code>
683            * refers to the first result in the set. Setting both <code>start</code>
684            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
685            * result set.
686            * </p>
687            *
688            * @param repositoryId the primary key of the repository
689            * @param folderId the primary key of the folder
690            * @param status the workflow status
691            * @param start the lower bound of the range of results
692            * @param end the upper bound of the range of results (not inclusive)
693            * @return the range of file entries and shortcuts in the folder
694            */
695            public static java.util.List<java.lang.Object> getFileEntriesAndFileShortcuts(
696                    long repositoryId, long folderId, int status, int start, int end)
697                    throws com.liferay.portal.kernel.exception.PortalException {
698                    return getService()
699                                       .getFileEntriesAndFileShortcuts(repositoryId, folderId,
700                            status, start, end);
701            }
702    
703            /**
704            * Returns the number of file entries and shortcuts in the folder.
705            *
706            * @param repositoryId the primary key of the repository
707            * @param folderId the primary key of the folder
708            * @param status the workflow status
709            * @return the number of file entries and shortcuts in the folder
710            */
711            public static int getFileEntriesAndFileShortcutsCount(long repositoryId,
712                    long folderId, int status)
713                    throws com.liferay.portal.kernel.exception.PortalException {
714                    return getService()
715                                       .getFileEntriesAndFileShortcutsCount(repositoryId, folderId,
716                            status);
717            }
718    
719            /**
720            * Returns the number of file entries and shortcuts in the folder.
721            *
722            * @param repositoryId the primary key of the repository
723            * @param folderId the primary key of the folder
724            * @param status the workflow status
725            * @param mimeTypes allowed media types
726            * @return the number of file entries and shortcuts in the folder
727            */
728            public static int getFileEntriesAndFileShortcutsCount(long repositoryId,
729                    long folderId, int status, java.lang.String[] mimeTypes)
730                    throws com.liferay.portal.kernel.exception.PortalException {
731                    return getService()
732                                       .getFileEntriesAndFileShortcutsCount(repositoryId, folderId,
733                            status, mimeTypes);
734            }
735    
736            /**
737            * Returns the number of file entries in the folder.
738            *
739            * @param repositoryId the primary key of the file entry's repository
740            * @param folderId the primary key of the file entry's folder
741            * @return the number of file entries in the folder
742            */
743            public static int getFileEntriesCount(long repositoryId, long folderId)
744                    throws com.liferay.portal.kernel.exception.PortalException {
745                    return getService().getFileEntriesCount(repositoryId, folderId);
746            }
747    
748            /**
749            * Returns the number of file entries with the file entry type in the
750            * folder.
751            *
752            * @param repositoryId the primary key of the file entry's repository
753            * @param folderId the primary key of the file entry's folder
754            * @param fileEntryTypeId the primary key of the file entry type
755            * @return the number of file entries with the file entry type in the folder
756            */
757            public static int getFileEntriesCount(long repositoryId, long folderId,
758                    long fileEntryTypeId)
759                    throws com.liferay.portal.kernel.exception.PortalException {
760                    return getService()
761                                       .getFileEntriesCount(repositoryId, folderId, fileEntryTypeId);
762            }
763    
764            public static int getFileEntriesCount(long repositoryId, long folderId,
765                    java.lang.String[] mimeTypes)
766                    throws com.liferay.portal.kernel.exception.PortalException {
767                    return getService()
768                                       .getFileEntriesCount(repositoryId, folderId, mimeTypes);
769            }
770    
771            /**
772            * Returns the file entry with the primary key.
773            *
774            * @param fileEntryId the primary key of the file entry
775            * @return the file entry with the primary key
776            */
777            public static com.liferay.portal.kernel.repository.model.FileEntry getFileEntry(
778                    long fileEntryId)
779                    throws com.liferay.portal.kernel.exception.PortalException {
780                    return getService().getFileEntry(fileEntryId);
781            }
782    
783            /**
784            * Returns the file entry with the title in the folder.
785            *
786            * @param groupId the primary key of the file entry's group
787            * @param folderId the primary key of the file entry's folder
788            * @param title the file entry's title
789            * @return the file entry with the title in the folder
790            */
791            public static com.liferay.portal.kernel.repository.model.FileEntry getFileEntry(
792                    long groupId, long folderId, java.lang.String title)
793                    throws com.liferay.portal.kernel.exception.PortalException {
794                    return getService().getFileEntry(groupId, folderId, title);
795            }
796    
797            /**
798            * Returns the file entry with the UUID and group.
799            *
800            * @param uuid the file entry's UUID
801            * @param groupId the primary key of the file entry's group
802            * @return the file entry with the UUID and group
803            */
804            public static com.liferay.portal.kernel.repository.model.FileEntry getFileEntryByUuidAndGroupId(
805                    java.lang.String uuid, long groupId)
806                    throws com.liferay.portal.kernel.exception.PortalException {
807                    return getService().getFileEntryByUuidAndGroupId(uuid, groupId);
808            }
809    
810            /**
811            * Returns the file shortcut with the primary key. This method is only
812            * supported by the Liferay repository.
813            *
814            * @param fileShortcutId the primary key of the file shortcut
815            * @return the file shortcut with the primary key
816            */
817            public static com.liferay.portal.kernel.repository.model.FileShortcut getFileShortcut(
818                    long fileShortcutId)
819                    throws com.liferay.portal.kernel.exception.PortalException {
820                    return getService().getFileShortcut(fileShortcutId);
821            }
822    
823            /**
824            * Returns the file version with the primary key.
825            *
826            * @param fileVersionId the primary key of the file version
827            * @return the file version with the primary key
828            */
829            public static com.liferay.portal.kernel.repository.model.FileVersion getFileVersion(
830                    long fileVersionId)
831                    throws com.liferay.portal.kernel.exception.PortalException {
832                    return getService().getFileVersion(fileVersionId);
833            }
834    
835            /**
836            * Returns the folder with the primary key.
837            *
838            * @param folderId the primary key of the folder
839            * @return the folder with the primary key
840            */
841            public static com.liferay.portal.kernel.repository.model.Folder getFolder(
842                    long folderId)
843                    throws com.liferay.portal.kernel.exception.PortalException {
844                    return getService().getFolder(folderId);
845            }
846    
847            /**
848            * Returns the folder with the name in the parent folder.
849            *
850            * @param repositoryId the primary key of the folder's repository
851            * @param parentFolderId the primary key of the folder's parent folder
852            * @param name the folder's name
853            * @return the folder with the name in the parent folder
854            */
855            public static com.liferay.portal.kernel.repository.model.Folder getFolder(
856                    long repositoryId, long parentFolderId, java.lang.String name)
857                    throws com.liferay.portal.kernel.exception.PortalException {
858                    return getService().getFolder(repositoryId, parentFolderId, name);
859            }
860    
861            /**
862            * Returns all immediate subfolders of the parent folder.
863            *
864            * @param repositoryId the primary key of the folder's repository
865            * @param parentFolderId the primary key of the folder's parent folder
866            * @return the immediate subfolders of the parent folder
867            */
868            public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders(
869                    long repositoryId, long parentFolderId)
870                    throws com.liferay.portal.kernel.exception.PortalException {
871                    return getService().getFolders(repositoryId, parentFolderId);
872            }
873    
874            /**
875            * Returns all immediate subfolders of the parent folder, optionally
876            * including mount folders for third-party repositories.
877            *
878            * @param repositoryId the primary key of the folder's repository
879            * @param parentFolderId the primary key of the folder's parent folder
880            * @param includeMountFolders whether to include mount folders for
881            third-party repositories
882            * @return the immediate subfolders of the parent folder
883            */
884            public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders(
885                    long repositoryId, long parentFolderId, boolean includeMountFolders)
886                    throws com.liferay.portal.kernel.exception.PortalException {
887                    return getService()
888                                       .getFolders(repositoryId, parentFolderId, includeMountFolders);
889            }
890    
891            /**
892            * Returns a name-ordered range of all the immediate subfolders of the
893            * parent folder, optionally including mount folders for third-party
894            * repositories.
895            *
896            * <p>
897            * Useful when paginating results. Returns a maximum of <code>end -
898            * start</code> instances. <code>start</code> and <code>end</code> are not
899            * primary keys, they are indexes in the result set. Thus, <code>0</code>
900            * refers to the first result in the set. Setting both <code>start</code>
901            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
902            * result set.
903            * </p>
904            *
905            * @param repositoryId the primary key of the folder's repository
906            * @param parentFolderId the primary key of the folder's parent folder
907            * @param includeMountFolders whether to include mount folders for
908            third-party repositories
909            * @param start the lower bound of the range of results
910            * @param end the upper bound of the range of results (not inclusive)
911            * @return the name-ordered range of immediate subfolders of the parent
912            folder
913            */
914            public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders(
915                    long repositoryId, long parentFolderId, boolean includeMountFolders,
916                    int start, int end)
917                    throws com.liferay.portal.kernel.exception.PortalException {
918                    return getService()
919                                       .getFolders(repositoryId, parentFolderId,
920                            includeMountFolders, start, end);
921            }
922    
923            /**
924            * Returns an ordered range of all the immediate subfolders of the parent
925            * folder.
926            *
927            * <p>
928            * Useful when paginating results. Returns a maximum of <code>end -
929            * start</code> instances. <code>start</code> and <code>end</code> are not
930            * primary keys, they are indexes in the result set. Thus, <code>0</code>
931            * refers to the first result in the set. Setting both <code>start</code>
932            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
933            * result set.
934            * </p>
935            *
936            * @param repositoryId the primary key of the folder's repository
937            * @param parentFolderId the primary key of the folder's parent folder
938            * @param includeMountFolders whether to include mount folders for
939            third-party repositories
940            * @param start the lower bound of the range of results
941            * @param end the upper bound of the range of results (not inclusive)
942            * @param obc the comparator to order the folders (optionally
943            <code>null</code>)
944            * @return the range of immediate subfolders of the parent folder ordered by
945            comparator <code>obc</code>
946            */
947            public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders(
948                    long repositoryId, long parentFolderId, boolean includeMountFolders,
949                    int start, int end,
950                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.repository.model.Folder> obc)
951                    throws com.liferay.portal.kernel.exception.PortalException {
952                    return getService()
953                                       .getFolders(repositoryId, parentFolderId,
954                            includeMountFolders, start, end, obc);
955            }
956    
957            /**
958            * Returns a name-ordered range of all the immediate subfolders of the
959            * parent folder.
960            *
961            * <p>
962            * Useful when paginating results. Returns a maximum of <code>end -
963            * start</code> instances. <code>start</code> and <code>end</code> are not
964            * primary keys, they are indexes in the result set. Thus, <code>0</code>
965            * refers to the first result in the set. Setting both <code>start</code>
966            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
967            * result set.
968            * </p>
969            *
970            * @param repositoryId the primary key of the folder's repository
971            * @param parentFolderId the primary key of the folder's parent folder
972            * @param start the lower bound of the range of results
973            * @param end the upper bound of the range of results (not inclusive)
974            * @return the name-ordered range of immediate subfolders of the parent
975            folder
976            */
977            public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders(
978                    long repositoryId, long parentFolderId, int start, int end)
979                    throws com.liferay.portal.kernel.exception.PortalException {
980                    return getService().getFolders(repositoryId, parentFolderId, start, end);
981            }
982    
983            /**
984            * Returns an ordered range of all the immediate subfolders of the parent
985            * folder.
986            *
987            * <p>
988            * Useful when paginating results. Returns a maximum of <code>end -
989            * start</code> instances. <code>start</code> and <code>end</code> are not
990            * primary keys, they are indexes in the result set. Thus, <code>0</code>
991            * refers to the first result in the set. Setting both <code>start</code>
992            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
993            * result set.
994            * </p>
995            *
996            * @param repositoryId the primary key of the folder's repository
997            * @param parentFolderId the primary key of the folder's parent folder
998            * @param start the lower bound of the range of results
999            * @param end the upper bound of the range of results (not inclusive)
1000            * @param obc the comparator to order the folders (optionally
1001            <code>null</code>)
1002            * @return the range of immediate subfolders of the parent folder ordered by
1003            comparator <code>obc</code>
1004            */
1005            public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders(
1006                    long repositoryId, long parentFolderId, int start, int end,
1007                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.repository.model.Folder> obc)
1008                    throws com.liferay.portal.kernel.exception.PortalException {
1009                    return getService()
1010                                       .getFolders(repositoryId, parentFolderId, start, end, obc);
1011            }
1012    
1013            /**
1014            * Returns an ordered range of all the immediate subfolders of the parent
1015            * folder.
1016            *
1017            * <p>
1018            * Useful when paginating results. Returns a maximum of <code>end -
1019            * start</code> instances. <code>start</code> and <code>end</code> are not
1020            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1021            * refers to the first result in the set. Setting both <code>start</code>
1022            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1023            * result set.
1024            * </p>
1025            *
1026            * @param repositoryId the primary key of the folder's repository
1027            * @param parentFolderId the primary key of the folder's parent folder
1028            * @param status the workflow status
1029            * @param includeMountFolders whether to include mount folders for
1030            third-party repositories
1031            * @param start the lower bound of the range of results
1032            * @param end the upper bound of the range of results (not inclusive)
1033            * @param obc the comparator to order the folders (optionally
1034            <code>null</code>)
1035            * @return the range of immediate subfolders of the parent folder ordered by
1036            comparator <code>obc</code>
1037            */
1038            public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders(
1039                    long repositoryId, long parentFolderId, int status,
1040                    boolean includeMountFolders, int start, int end,
1041                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.repository.model.Folder> obc)
1042                    throws com.liferay.portal.kernel.exception.PortalException {
1043                    return getService()
1044                                       .getFolders(repositoryId, parentFolderId, status,
1045                            includeMountFolders, start, end, obc);
1046            }
1047    
1048            /**
1049            * Returns a name-ordered range of all the immediate subfolders, file
1050            * entries, and file shortcuts in the parent folder.
1051            *
1052            * <p>
1053            * Useful when paginating results. Returns a maximum of <code>end -
1054            * start</code> instances. <code>start</code> and <code>end</code> are not
1055            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1056            * refers to the first result in the set. Setting both <code>start</code>
1057            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1058            * result set.
1059            * </p>
1060            *
1061            * @param repositoryId the primary key of the repository
1062            * @param folderId the primary key of the parent folder
1063            * @param status the workflow status
1064            * @param includeMountFolders whether to include mount folders for
1065            third-party repositories
1066            * @param start the lower bound of the range of results
1067            * @param end the upper bound of the range of results (not inclusive)
1068            * @return the name-ordered range of immediate subfolders, file entries, and
1069            file shortcuts in the parent folder
1070            */
1071            public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
1072                    long repositoryId, long folderId, int status,
1073                    boolean includeMountFolders, int start, int end)
1074                    throws com.liferay.portal.kernel.exception.PortalException {
1075                    return getService()
1076                                       .getFoldersAndFileEntriesAndFileShortcuts(repositoryId,
1077                            folderId, status, includeMountFolders, start, end);
1078            }
1079    
1080            /**
1081            * Returns an ordered range of all the immediate subfolders, file entries,
1082            * and file shortcuts in the parent folder.
1083            *
1084            * <p>
1085            * Useful when paginating results. Returns a maximum of <code>end -
1086            * start</code> instances. <code>start</code> and <code>end</code> are not
1087            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1088            * refers to the first result in the set. Setting both <code>start</code>
1089            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1090            * result set.
1091            * </p>
1092            *
1093            * @param repositoryId the primary key of the repository
1094            * @param folderId the primary key of the parent folder
1095            * @param status the workflow status
1096            * @param includeMountFolders whether to include mount folders for
1097            third-party repositories
1098            * @param start the lower bound of the range of results
1099            * @param end the upper bound of the range of results (not inclusive)
1100            * @param obc the comparator to order the results (optionally
1101            <code>null</code>)
1102            * @return the range of immediate subfolders, file entries, and file
1103            shortcuts in the parent folder ordered by comparator
1104            <code>obc</code>
1105            */
1106            public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
1107                    long repositoryId, long folderId, int status,
1108                    boolean includeMountFolders, int start, int end,
1109                    com.liferay.portal.kernel.util.OrderByComparator<?> obc)
1110                    throws com.liferay.portal.kernel.exception.PortalException {
1111                    return getService()
1112                                       .getFoldersAndFileEntriesAndFileShortcuts(repositoryId,
1113                            folderId, status, includeMountFolders, start, end, obc);
1114            }
1115    
1116            public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
1117                    long repositoryId, long folderId, int status,
1118                    java.lang.String[] mimeTypes, boolean includeMountFolders, int start,
1119                    int end, com.liferay.portal.kernel.util.OrderByComparator<?> obc)
1120                    throws com.liferay.portal.kernel.exception.PortalException {
1121                    return getService()
1122                                       .getFoldersAndFileEntriesAndFileShortcuts(repositoryId,
1123                            folderId, status, mimeTypes, includeMountFolders, start, end, obc);
1124            }
1125    
1126            /**
1127            * Returns the number of immediate subfolders, file entries, and file
1128            * shortcuts in the parent folder.
1129            *
1130            * @param repositoryId the primary key of the repository
1131            * @param folderId the primary key of the parent folder
1132            * @param status the workflow status
1133            * @param includeMountFolders whether to include mount folders for
1134            third-party repositories
1135            * @return the number of immediate subfolders, file entries, and file
1136            shortcuts in the parent folder
1137            */
1138            public static int getFoldersAndFileEntriesAndFileShortcutsCount(
1139                    long repositoryId, long folderId, int status,
1140                    boolean includeMountFolders)
1141                    throws com.liferay.portal.kernel.exception.PortalException {
1142                    return getService()
1143                                       .getFoldersAndFileEntriesAndFileShortcutsCount(repositoryId,
1144                            folderId, status, includeMountFolders);
1145            }
1146    
1147            public static int getFoldersAndFileEntriesAndFileShortcutsCount(
1148                    long repositoryId, long folderId, int status,
1149                    java.lang.String[] mimeTypes, boolean includeMountFolders)
1150                    throws com.liferay.portal.kernel.exception.PortalException {
1151                    return getService()
1152                                       .getFoldersAndFileEntriesAndFileShortcutsCount(repositoryId,
1153                            folderId, status, mimeTypes, includeMountFolders);
1154            }
1155    
1156            /**
1157            * Returns the number of immediate subfolders of the parent folder.
1158            *
1159            * @param repositoryId the primary key of the folder's repository
1160            * @param parentFolderId the primary key of the folder's parent folder
1161            * @return the number of immediate subfolders of the parent folder
1162            */
1163            public static int getFoldersCount(long repositoryId, long parentFolderId)
1164                    throws com.liferay.portal.kernel.exception.PortalException {
1165                    return getService().getFoldersCount(repositoryId, parentFolderId);
1166            }
1167    
1168            /**
1169            * Returns the number of immediate subfolders of the parent folder,
1170            * optionally including mount folders for third-party repositories.
1171            *
1172            * @param repositoryId the primary key of the folder's repository
1173            * @param parentFolderId the primary key of the folder's parent folder
1174            * @param includeMountFolders whether to include mount folders for
1175            third-party repositories
1176            * @return the number of immediate subfolders of the parent folder
1177            */
1178            public static int getFoldersCount(long repositoryId, long parentFolderId,
1179                    boolean includeMountFolders)
1180                    throws com.liferay.portal.kernel.exception.PortalException {
1181                    return getService()
1182                                       .getFoldersCount(repositoryId, parentFolderId,
1183                            includeMountFolders);
1184            }
1185    
1186            /**
1187            * Returns the number of immediate subfolders of the parent folder,
1188            * optionally including mount folders for third-party repositories.
1189            *
1190            * @param repositoryId the primary key of the folder's repository
1191            * @param parentFolderId the primary key of the folder's parent folder
1192            * @param status the workflow status
1193            * @param includeMountFolders whether to include mount folders for
1194            third-party repositories
1195            * @return the number of immediate subfolders of the parent folder
1196            */
1197            public static int getFoldersCount(long repositoryId, long parentFolderId,
1198                    int status, boolean includeMountFolders)
1199                    throws com.liferay.portal.kernel.exception.PortalException {
1200                    return getService()
1201                                       .getFoldersCount(repositoryId, parentFolderId, status,
1202                            includeMountFolders);
1203            }
1204    
1205            /**
1206            * Returns the number of immediate subfolders and file entries across the
1207            * folders.
1208            *
1209            * @param repositoryId the primary key of the repository
1210            * @param folderIds the primary keys of folders from which to count
1211            immediate subfolders and file entries
1212            * @param status the workflow status
1213            * @return the number of immediate subfolders and file entries across the
1214            folders
1215            */
1216            public static int getFoldersFileEntriesCount(long repositoryId,
1217                    java.util.List<java.lang.Long> folderIds, int status)
1218                    throws com.liferay.portal.kernel.exception.PortalException {
1219                    return getService()
1220                                       .getFoldersFileEntriesCount(repositoryId, folderIds, status);
1221            }
1222    
1223            public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getGroupFileEntries(
1224                    long groupId, long userId, long rootFolderId,
1225                    java.lang.String[] mimeTypes, int status, int start, int end,
1226                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.repository.model.FileEntry> obc)
1227                    throws com.liferay.portal.kernel.exception.PortalException {
1228                    return getService()
1229                                       .getGroupFileEntries(groupId, userId, rootFolderId,
1230                            mimeTypes, status, start, end, obc);
1231            }
1232    
1233            /**
1234            * Returns an ordered range of all the file entries in the group starting at
1235            * the root folder that are stored within the Liferay repository. This
1236            * method is primarily used to search for recently modified file entries. It
1237            * can be limited to the file entries modified by a given user.
1238            *
1239            * <p>
1240            * Useful when paginating results. Returns a maximum of <code>end -
1241            * start</code> instances. <code>start</code> and <code>end</code> are not
1242            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1243            * refers to the first result in the set. Setting both <code>start</code>
1244            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1245            * result set.
1246            * </p>
1247            *
1248            * @param groupId the primary key of the group
1249            * @param userId the primary key of the user who created the file
1250            (optionally <code>0</code>)
1251            * @param rootFolderId the primary key of the root folder to begin the
1252            search
1253            * @param start the lower bound of the range of results
1254            * @param end the upper bound of the range of results (not inclusive)
1255            * @return the range of matching file entries ordered by date modified
1256            */
1257            public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getGroupFileEntries(
1258                    long groupId, long userId, long rootFolderId, int start, int end)
1259                    throws com.liferay.portal.kernel.exception.PortalException {
1260                    return getService()
1261                                       .getGroupFileEntries(groupId, userId, rootFolderId, start,
1262                            end);
1263            }
1264    
1265            /**
1266            * Returns an ordered range of all the file entries in the group starting at
1267            * the root folder that are stored within the Liferay repository. This
1268            * method is primarily used to search for recently modified file entries. It
1269            * can be limited to the file entries modified by a given user.
1270            *
1271            * <p>
1272            * Useful when paginating results. Returns a maximum of <code>end -
1273            * start</code> instances. <code>start</code> and <code>end</code> are not
1274            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1275            * refers to the first result in the set. Setting both <code>start</code>
1276            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1277            * result set.
1278            * </p>
1279            *
1280            * @param groupId the primary key of the group
1281            * @param userId the primary key of the user who created the file
1282            (optionally <code>0</code>)
1283            * @param rootFolderId the primary key of the root folder to begin the
1284            search
1285            * @param start the lower bound of the range of results
1286            * @param end the upper bound of the range of results (not inclusive)
1287            * @param obc the comparator to order the file entries (optionally
1288            <code>null</code>)
1289            * @return the range of matching file entries ordered by comparator
1290            <code>obc</code>
1291            */
1292            public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getGroupFileEntries(
1293                    long groupId, long userId, long rootFolderId, int start, int end,
1294                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.repository.model.FileEntry> obc)
1295                    throws com.liferay.portal.kernel.exception.PortalException {
1296                    return getService()
1297                                       .getGroupFileEntries(groupId, userId, rootFolderId, start,
1298                            end, obc);
1299            }
1300    
1301            /**
1302            * Returns an ordered range of all the file entries in the group starting at
1303            * the repository default parent folder that are stored within the Liferay
1304            * repository. This method is primarily used to search for recently modified
1305            * file entries. It can be limited to the file entries modified by a given
1306            * user.
1307            *
1308            * <p>
1309            * Useful when paginating results. Returns a maximum of <code>end -
1310            * start</code> instances. <code>start</code> and <code>end</code> are not
1311            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1312            * refers to the first result in the set. Setting both <code>start</code>
1313            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1314            * result set.
1315            * </p>
1316            *
1317            * @param groupId the primary key of the group
1318            * @param userId the primary key of the user who created the file
1319            (optionally <code>0</code>)
1320            * @param start the lower bound of the range of results
1321            * @param end the upper bound of the range of results (not inclusive)
1322            * @return the range of matching file entries ordered by date modified
1323            */
1324            public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getGroupFileEntries(
1325                    long groupId, long userId, int start, int end)
1326                    throws com.liferay.portal.kernel.exception.PortalException {
1327                    return getService().getGroupFileEntries(groupId, userId, start, end);
1328            }
1329    
1330            /**
1331            * Returns an ordered range of all the file entries in the group that are
1332            * stored within the Liferay repository. This method is primarily used to
1333            * search for recently modified file entries. It can be limited to the file
1334            * entries modified by a given user.
1335            *
1336            * <p>
1337            * Useful when paginating results. Returns a maximum of <code>end -
1338            * start</code> instances. <code>start</code> and <code>end</code> are not
1339            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1340            * refers to the first result in the set. Setting both <code>start</code>
1341            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1342            * result set.
1343            * </p>
1344            *
1345            * @param groupId the primary key of the group
1346            * @param userId the primary key of the user who created the file
1347            (optionally <code>0</code>)
1348            * @param start the lower bound of the range of results
1349            * @param end the upper bound of the range of results (not inclusive)
1350            * @param obc the comparator to order the file entries (optionally
1351            <code>null</code>)
1352            * @return the range of matching file entries ordered by comparator
1353            <code>obc</code>
1354            */
1355            public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getGroupFileEntries(
1356                    long groupId, long userId, int start, int end,
1357                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.repository.model.FileEntry> obc)
1358                    throws com.liferay.portal.kernel.exception.PortalException {
1359                    return getService().getGroupFileEntries(groupId, userId, start, end, obc);
1360            }
1361    
1362            /**
1363            * Returns the number of file entries in a group starting at the repository
1364            * default parent folder that are stored within the Liferay repository. This
1365            * method is primarily used to search for recently modified file entries. It
1366            * can be limited to the file entries modified by a given user.
1367            *
1368            * @param groupId the primary key of the group
1369            * @param userId the primary key of the user who created the file
1370            (optionally <code>0</code>)
1371            * @return the number of matching file entries
1372            */
1373            public static int getGroupFileEntriesCount(long groupId, long userId)
1374                    throws com.liferay.portal.kernel.exception.PortalException {
1375                    return getService().getGroupFileEntriesCount(groupId, userId);
1376            }
1377    
1378            /**
1379            * Returns the number of file entries in a group starting at the root folder
1380            * that are stored within the Liferay repository. This method is primarily
1381            * used to search for recently modified file entries. It can be limited to
1382            * the file entries modified by a given user.
1383            *
1384            * @param groupId the primary key of the group
1385            * @param userId the primary key of the user who created the file
1386            (optionally <code>0</code>)
1387            * @param rootFolderId the primary key of the root folder to begin the
1388            search
1389            * @return the number of matching file entries
1390            */
1391            public static int getGroupFileEntriesCount(long groupId, long userId,
1392                    long rootFolderId)
1393                    throws com.liferay.portal.kernel.exception.PortalException {
1394                    return getService()
1395                                       .getGroupFileEntriesCount(groupId, userId, rootFolderId);
1396            }
1397    
1398            public static int getGroupFileEntriesCount(long groupId, long userId,
1399                    long rootFolderId, java.lang.String[] mimeTypes, int status)
1400                    throws com.liferay.portal.kernel.exception.PortalException {
1401                    return getService()
1402                                       .getGroupFileEntriesCount(groupId, userId, rootFolderId,
1403                            mimeTypes, status);
1404            }
1405    
1406            /**
1407            * Returns all immediate subfolders of the parent folder that are used for
1408            * mounting third-party repositories. This method is only supported by the
1409            * Liferay repository.
1410            *
1411            * @param repositoryId the primary key of the folder's repository
1412            * @param parentFolderId the primary key of the folder's parent folder
1413            * @return the immediate subfolders of the parent folder that are used for
1414            mounting third-party repositories
1415            */
1416            public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getMountFolders(
1417                    long repositoryId, long parentFolderId)
1418                    throws com.liferay.portal.kernel.exception.PortalException {
1419                    return getService().getMountFolders(repositoryId, parentFolderId);
1420            }
1421    
1422            /**
1423            * Returns a name-ordered range of all the immediate subfolders of the
1424            * parent folder that are used for mounting third-party repositories. This
1425            * method is only supported by the Liferay repository.
1426            *
1427            * <p>
1428            * Useful when paginating results. Returns a maximum of <code>end -
1429            * start</code> instances. <code>start</code> and <code>end</code> are not
1430            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1431            * refers to the first result in the set. Setting both <code>start</code>
1432            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1433            * result set.
1434            * </p>
1435            *
1436            * @param repositoryId the primary key of the repository
1437            * @param parentFolderId the primary key of the parent folder
1438            * @param start the lower bound of the range of results
1439            * @param end the upper bound of the range of results (not inclusive)
1440            * @return the name-ordered range of immediate subfolders of the parent
1441            folder that are used for mounting third-party repositories
1442            */
1443            public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getMountFolders(
1444                    long repositoryId, long parentFolderId, int start, int end)
1445                    throws com.liferay.portal.kernel.exception.PortalException {
1446                    return getService()
1447                                       .getMountFolders(repositoryId, parentFolderId, start, end);
1448            }
1449    
1450            /**
1451            * Returns an ordered range of all the immediate subfolders of the parent
1452            * folder that are used for mounting third-party repositories. This method
1453            * is only supported by the Liferay repository.
1454            *
1455            * <p>
1456            * Useful when paginating results. Returns a maximum of <code>end -
1457            * start</code> instances. <code>start</code> and <code>end</code> are not
1458            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1459            * refers to the first result in the set. Setting both <code>start</code>
1460            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1461            * result set.
1462            * </p>
1463            *
1464            * @param repositoryId the primary key of the folder's repository
1465            * @param parentFolderId the primary key of the folder's parent folder
1466            * @param start the lower bound of the range of results
1467            * @param end the upper bound of the range of results (not inclusive)
1468            * @param obc the comparator to order the folders (optionally
1469            <code>null</code>)
1470            * @return the range of immediate subfolders of the parent folder that are
1471            used for mounting third-party repositories ordered by comparator
1472            <code>obc</code>
1473            */
1474            public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getMountFolders(
1475                    long repositoryId, long parentFolderId, int start, int end,
1476                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.repository.model.Folder> obc)
1477                    throws com.liferay.portal.kernel.exception.PortalException {
1478                    return getService()
1479                                       .getMountFolders(repositoryId, parentFolderId, start, end,
1480                            obc);
1481            }
1482    
1483            /**
1484            * Returns the number of immediate subfolders of the parent folder that are
1485            * used for mounting third-party repositories. This method is only supported
1486            * by the Liferay repository.
1487            *
1488            * @param repositoryId the primary key of the repository
1489            * @param parentFolderId the primary key of the parent folder
1490            * @return the number of folders of the parent folder that are used for
1491            mounting third-party repositories
1492            */
1493            public static int getMountFoldersCount(long repositoryId,
1494                    long parentFolderId)
1495                    throws com.liferay.portal.kernel.exception.PortalException {
1496                    return getService().getMountFoldersCount(repositoryId, parentFolderId);
1497            }
1498    
1499            /**
1500            * Returns the OSGi service identifier.
1501            *
1502            * @return the OSGi service identifier
1503            */
1504            public static java.lang.String getOSGiServiceIdentifier() {
1505                    return getService().getOSGiServiceIdentifier();
1506            }
1507    
1508            /**
1509            * Returns all the descendant folders of the folder with the primary key.
1510            *
1511            * @param repositoryId the primary key of the repository
1512            * @param folderId the primary key of the folder
1513            * @return the descendant folders of the folder with the primary key
1514            */
1515            public static java.util.List<java.lang.Long> getSubfolderIds(
1516                    long repositoryId, long folderId)
1517                    throws com.liferay.portal.kernel.exception.PortalException {
1518                    return getService().getSubfolderIds(repositoryId, folderId);
1519            }
1520    
1521            /**
1522            * Returns descendant folders of the folder with the primary key, optionally
1523            * limiting to one level deep.
1524            *
1525            * @param repositoryId the primary key of the repository
1526            * @param folderId the primary key of the folder
1527            * @param recurse whether to recurse through each subfolder
1528            * @return the descendant folders of the folder with the primary key
1529            */
1530            public static java.util.List<java.lang.Long> getSubfolderIds(
1531                    long repositoryId, long folderId, boolean recurse)
1532                    throws com.liferay.portal.kernel.exception.PortalException {
1533                    return getService().getSubfolderIds(repositoryId, folderId, recurse);
1534            }
1535    
1536            public static void getSubfolderIds(long repositoryId,
1537                    java.util.List<java.lang.Long> folderIds, long folderId)
1538                    throws com.liferay.portal.kernel.exception.PortalException {
1539                    getService().getSubfolderIds(repositoryId, folderIds, folderId);
1540            }
1541    
1542            /**
1543            * Returns all the temporary file entry names.
1544            *
1545            * @param groupId the primary key of the group
1546            * @param folderId the primary key of the folder where the file entry will
1547            eventually reside
1548            * @param folderName the temporary folder's name
1549            * @return the temporary file entry names
1550            * @see #addTempFileEntry(long, long, String, String, File, String)
1551            * @see TempFileEntryUtil
1552            */
1553            public static java.lang.String[] getTempFileNames(long groupId,
1554                    long folderId, java.lang.String folderName)
1555                    throws com.liferay.portal.kernel.exception.PortalException {
1556                    return getService().getTempFileNames(groupId, folderId, folderName);
1557            }
1558    
1559            /**
1560            * Locks the folder. This method is primarily used by WebDAV.
1561            *
1562            * @param repositoryId the primary key of the repository
1563            * @param folderId the primary key of the folder
1564            * @return the lock object
1565            */
1566            public static com.liferay.portal.kernel.lock.Lock lockFolder(
1567                    long repositoryId, long folderId)
1568                    throws com.liferay.portal.kernel.exception.PortalException {
1569                    return getService().lockFolder(repositoryId, folderId);
1570            }
1571    
1572            /**
1573            * Locks the folder. This method is primarily used by WebDAV.
1574            *
1575            * @param repositoryId the primary key of the repository
1576            * @param folderId the primary key of the folder
1577            * @param owner the owner string for the checkout (optionally
1578            <code>null</code>)
1579            * @param inheritable whether the lock must propagate to descendants
1580            * @param expirationTime the time in milliseconds before the lock expires.
1581            If the value is <code>0</code>, the default expiration time will
1582            be used from <code>portal.properties>.
1583            * @return the lock object
1584            */
1585            public static com.liferay.portal.kernel.lock.Lock lockFolder(
1586                    long repositoryId, long folderId, java.lang.String owner,
1587                    boolean inheritable, long expirationTime)
1588                    throws com.liferay.portal.kernel.exception.PortalException {
1589                    return getService()
1590                                       .lockFolder(repositoryId, folderId, owner, inheritable,
1591                            expirationTime);
1592            }
1593    
1594            /**
1595            * Moves the file entry to the new folder.
1596            *
1597            * @param fileEntryId the primary key of the file entry
1598            * @param newFolderId the primary key of the new folder
1599            * @param serviceContext the service context to be applied
1600            * @return the file entry
1601            */
1602            public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntry(
1603                    long fileEntryId, long newFolderId,
1604                    com.liferay.portal.service.ServiceContext serviceContext)
1605                    throws com.liferay.portal.kernel.exception.PortalException {
1606                    return getService()
1607                                       .moveFileEntry(fileEntryId, newFolderId, serviceContext);
1608            }
1609    
1610            /**
1611            * Moves the file entry from a trashed folder to the new folder.
1612            *
1613            * @param fileEntryId the primary key of the file entry
1614            * @param newFolderId the primary key of the new folder
1615            * @param serviceContext the service context to be applied
1616            * @return the file entry
1617            */
1618            public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryFromTrash(
1619                    long fileEntryId, long newFolderId,
1620                    com.liferay.portal.service.ServiceContext serviceContext)
1621                    throws com.liferay.portal.kernel.exception.PortalException {
1622                    return getService()
1623                                       .moveFileEntryFromTrash(fileEntryId, newFolderId,
1624                            serviceContext);
1625            }
1626    
1627            /**
1628            * Moves the file entry with the primary key to the trash portlet.
1629            *
1630            * @param fileEntryId the primary key of the file entry
1631            * @return the file entry
1632            */
1633            public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryToTrash(
1634                    long fileEntryId)
1635                    throws com.liferay.portal.kernel.exception.PortalException {
1636                    return getService().moveFileEntryToTrash(fileEntryId);
1637            }
1638    
1639            /**
1640            * Moves the file shortcut from a trashed folder to the new folder.
1641            *
1642            * @param fileShortcutId the primary key of the file shortcut
1643            * @param newFolderId the primary key of the new folder
1644            * @param serviceContext the service context to be applied
1645            * @return the file shortcut
1646            */
1647            public static com.liferay.portal.kernel.repository.model.FileShortcut moveFileShortcutFromTrash(
1648                    long fileShortcutId, long newFolderId,
1649                    com.liferay.portal.service.ServiceContext serviceContext)
1650                    throws com.liferay.portal.kernel.exception.PortalException {
1651                    return getService()
1652                                       .moveFileShortcutFromTrash(fileShortcutId, newFolderId,
1653                            serviceContext);
1654            }
1655    
1656            /**
1657            * Moves the file shortcut with the primary key to the trash portlet.
1658            *
1659            * @param fileShortcutId the primary key of the file shortcut
1660            * @return the file shortcut
1661            */
1662            public static com.liferay.portal.kernel.repository.model.FileShortcut moveFileShortcutToTrash(
1663                    long fileShortcutId)
1664                    throws com.liferay.portal.kernel.exception.PortalException {
1665                    return getService().moveFileShortcutToTrash(fileShortcutId);
1666            }
1667    
1668            /**
1669            * Moves the folder to the new parent folder with the primary key.
1670            *
1671            * @param folderId the primary key of the folder
1672            * @param parentFolderId the primary key of the new parent folder
1673            * @param serviceContext the service context to be applied
1674            * @return the file entry
1675            */
1676            public static com.liferay.portal.kernel.repository.model.Folder moveFolder(
1677                    long folderId, long parentFolderId,
1678                    com.liferay.portal.service.ServiceContext serviceContext)
1679                    throws com.liferay.portal.kernel.exception.PortalException {
1680                    return getService().moveFolder(folderId, parentFolderId, serviceContext);
1681            }
1682    
1683            /**
1684            * Moves the folder with the primary key from the trash portlet to the new
1685            * parent folder with the primary key.
1686            *
1687            * @param folderId the primary key of the folder
1688            * @param parentFolderId the primary key of the new parent folder
1689            * @param serviceContext the service context to be applied
1690            * @return the file entry
1691            */
1692            public static com.liferay.portal.kernel.repository.model.Folder moveFolderFromTrash(
1693                    long folderId, long parentFolderId,
1694                    com.liferay.portal.service.ServiceContext serviceContext)
1695                    throws com.liferay.portal.kernel.exception.PortalException {
1696                    return getService()
1697                                       .moveFolderFromTrash(folderId, parentFolderId, serviceContext);
1698            }
1699    
1700            /**
1701            * Moves the folder with the primary key to the trash portlet.
1702            *
1703            * @param folderId the primary key of the folder
1704            * @return the file entry
1705            */
1706            public static com.liferay.portal.kernel.repository.model.Folder moveFolderToTrash(
1707                    long folderId)
1708                    throws com.liferay.portal.kernel.exception.PortalException {
1709                    return getService().moveFolderToTrash(folderId);
1710            }
1711    
1712            /**
1713            * Refreshes the lock for the file entry. This method is primarily used by
1714            * WebDAV.
1715            *
1716            * @param lockUuid the lock's UUID
1717            * @param companyId the primary key of the file entry's company
1718            * @param expirationTime the time in milliseconds before the lock expires.
1719            If the value is <code>0</code>, the default expiration time will
1720            be used from <code>portal.properties>.
1721            * @return the lock object
1722            */
1723            public static com.liferay.portal.kernel.lock.Lock refreshFileEntryLock(
1724                    java.lang.String lockUuid, long companyId, long expirationTime)
1725                    throws com.liferay.portal.kernel.exception.PortalException {
1726                    return getService()
1727                                       .refreshFileEntryLock(lockUuid, companyId, expirationTime);
1728            }
1729    
1730            /**
1731            * Refreshes the lock for the folder. This method is primarily used by
1732            * WebDAV.
1733            *
1734            * @param lockUuid the lock's UUID
1735            * @param companyId the primary key of the file entry's company
1736            * @param expirationTime the time in milliseconds before the lock expires.
1737            If the value is <code>0</code>, the default expiration time will
1738            be used from <code>portal.properties>.
1739            * @return the lock object
1740            */
1741            public static com.liferay.portal.kernel.lock.Lock refreshFolderLock(
1742                    java.lang.String lockUuid, long companyId, long expirationTime)
1743                    throws com.liferay.portal.kernel.exception.PortalException {
1744                    return getService()
1745                                       .refreshFolderLock(lockUuid, companyId, expirationTime);
1746            }
1747    
1748            /**
1749            * Restores the file entry with the primary key from the trash portlet.
1750            *
1751            * @param fileEntryId the primary key of the file entry
1752            */
1753            public static void restoreFileEntryFromTrash(long fileEntryId)
1754                    throws com.liferay.portal.kernel.exception.PortalException {
1755                    getService().restoreFileEntryFromTrash(fileEntryId);
1756            }
1757    
1758            /**
1759            * Restores the file shortcut with the primary key from the trash portlet.
1760            *
1761            * @param fileShortcutId the primary key of the file shortcut
1762            */
1763            public static void restoreFileShortcutFromTrash(long fileShortcutId)
1764                    throws com.liferay.portal.kernel.exception.PortalException {
1765                    getService().restoreFileShortcutFromTrash(fileShortcutId);
1766            }
1767    
1768            /**
1769            * Restores the folder with the primary key from the trash portlet.
1770            *
1771            * @param folderId the primary key of the folder
1772            */
1773            public static void restoreFolderFromTrash(long folderId)
1774                    throws com.liferay.portal.kernel.exception.PortalException {
1775                    getService().restoreFolderFromTrash(folderId);
1776            }
1777    
1778            /**
1779            * Reverts the file entry to a previous version. A new version will be
1780            * created based on the previous version and metadata.
1781            *
1782            * @param fileEntryId the primary key of the file entry
1783            * @param version the version to revert back to
1784            * @param serviceContext the service context to be applied
1785            */
1786            public static void revertFileEntry(long fileEntryId,
1787                    java.lang.String version,
1788                    com.liferay.portal.service.ServiceContext serviceContext)
1789                    throws com.liferay.portal.kernel.exception.PortalException {
1790                    getService().revertFileEntry(fileEntryId, version, serviceContext);
1791            }
1792    
1793            public static com.liferay.portal.kernel.search.Hits search(
1794                    long repositoryId, long creatorUserId, long folderId,
1795                    java.lang.String[] mimeTypes, int status, int start, int end)
1796                    throws com.liferay.portal.kernel.exception.PortalException {
1797                    return getService()
1798                                       .search(repositoryId, creatorUserId, folderId, mimeTypes,
1799                            status, start, end);
1800            }
1801    
1802            public static com.liferay.portal.kernel.search.Hits search(
1803                    long repositoryId, long creatorUserId, int status, int start, int end)
1804                    throws com.liferay.portal.kernel.exception.PortalException {
1805                    return getService()
1806                                       .search(repositoryId, creatorUserId, status, start, end);
1807            }
1808    
1809            public static com.liferay.portal.kernel.search.Hits search(
1810                    long repositoryId,
1811                    com.liferay.portal.kernel.search.SearchContext searchContext)
1812                    throws com.liferay.portal.kernel.search.SearchException {
1813                    return getService().search(repositoryId, searchContext);
1814            }
1815    
1816            public static com.liferay.portal.kernel.search.Hits search(
1817                    long repositoryId,
1818                    com.liferay.portal.kernel.search.SearchContext searchContext,
1819                    com.liferay.portal.kernel.search.Query query)
1820                    throws com.liferay.portal.kernel.search.SearchException {
1821                    return getService().search(repositoryId, searchContext, query);
1822            }
1823    
1824            /**
1825            * Subscribe the user to changes in documents of the file entry type. This
1826            * method is only supported by the Liferay repository.
1827            *
1828            * @param groupId the primary key of the file entry type's group
1829            * @param fileEntryTypeId the primary key of the file entry type
1830            */
1831            public static void subscribeFileEntryType(long groupId, long fileEntryTypeId)
1832                    throws com.liferay.portal.kernel.exception.PortalException {
1833                    getService().subscribeFileEntryType(groupId, fileEntryTypeId);
1834            }
1835    
1836            /**
1837            * Subscribe the user to document changes in the folder. This method is only
1838            * supported by the Liferay repository.
1839            *
1840            * @param groupId the primary key of the folder's group
1841            * @param folderId the primary key of the folder
1842            */
1843            public static void subscribeFolder(long groupId, long folderId)
1844                    throws com.liferay.portal.kernel.exception.PortalException {
1845                    getService().subscribeFolder(groupId, folderId);
1846            }
1847    
1848            /**
1849            * @deprecated As of 6.2.0, replaced by {@link #checkInFileEntry(long,
1850            boolean, String, ServiceContext)}.
1851            */
1852            @Deprecated
1853            public static void unlockFileEntry(long fileEntryId)
1854                    throws com.liferay.portal.kernel.exception.PortalException {
1855                    getService().unlockFileEntry(fileEntryId);
1856            }
1857    
1858            /**
1859            * @deprecated As of 6.2.0, replaced by {@link #checkInFileEntry(long,
1860            String)}.
1861            */
1862            @Deprecated
1863            public static void unlockFileEntry(long fileEntryId,
1864                    java.lang.String lockUuid)
1865                    throws com.liferay.portal.kernel.exception.PortalException {
1866                    getService().unlockFileEntry(fileEntryId, lockUuid);
1867            }
1868    
1869            /**
1870            * Unlocks the folder. This method is primarily used by WebDAV.
1871            *
1872            * @param repositoryId the primary key of the repository
1873            * @param folderId the primary key of the folder
1874            * @param lockUuid the lock's UUID
1875            */
1876            public static void unlockFolder(long repositoryId, long folderId,
1877                    java.lang.String lockUuid)
1878                    throws com.liferay.portal.kernel.exception.PortalException {
1879                    getService().unlockFolder(repositoryId, folderId, lockUuid);
1880            }
1881    
1882            /**
1883            * Unlocks the folder. This method is primarily used by WebDAV.
1884            *
1885            * @param repositoryId the primary key of the repository
1886            * @param parentFolderId the primary key of the parent folder
1887            * @param name the folder's name
1888            * @param lockUuid the lock's UUID
1889            */
1890            public static void unlockFolder(long repositoryId, long parentFolderId,
1891                    java.lang.String name, java.lang.String lockUuid)
1892                    throws com.liferay.portal.kernel.exception.PortalException {
1893                    getService().unlockFolder(repositoryId, parentFolderId, name, lockUuid);
1894            }
1895    
1896            /**
1897            * Unsubscribe the user from changes in documents of the file entry type.
1898            * This method is only supported by the Liferay repository.
1899            *
1900            * @param groupId the primary key of the file entry type's group
1901            * @param fileEntryTypeId the primary key of the file entry type
1902            */
1903            public static void unsubscribeFileEntryType(long groupId,
1904                    long fileEntryTypeId)
1905                    throws com.liferay.portal.kernel.exception.PortalException {
1906                    getService().unsubscribeFileEntryType(groupId, fileEntryTypeId);
1907            }
1908    
1909            /**
1910            * Unsubscribe the user from document changes in the folder. This method is
1911            * only supported by the Liferay repository.
1912            *
1913            * @param groupId the primary key of the folder's group
1914            * @param folderId the primary key of the folder
1915            */
1916            public static void unsubscribeFolder(long groupId, long folderId)
1917                    throws com.liferay.portal.kernel.exception.PortalException {
1918                    getService().unsubscribeFolder(groupId, folderId);
1919            }
1920    
1921            /**
1922            * Updates a file entry and associated metadata based on a byte array
1923            * object. If the file data is <code>null</code>, then only the associated
1924            * metadata (i.e., <code>title</code>, <code>description</code>, and
1925            * parameters in the <code>serviceContext</code>) will be updated.
1926            *
1927            * <p>
1928            * This method takes two file names, the <code>sourceFileName</code> and the
1929            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
1930            * name of the actual file being uploaded. The <code>title</code>
1931            * corresponds to a name the client wishes to assign this file after it has
1932            * been uploaded to the portal.
1933            * </p>
1934            *
1935            * @param fileEntryId the primary key of the file entry
1936            * @param sourceFileName the original file's name (optionally
1937            <code>null</code>)
1938            * @param mimeType the file's MIME type (optionally <code>null</code>)
1939            * @param title the new name to be assigned to the file (optionally <code>
1940            <code>null</code></code>)
1941            * @param description the file's new description
1942            * @param changeLog the file's version change log (optionally
1943            <code>null</code>)
1944            * @param majorVersion whether the new file version is a major version
1945            * @param bytes the file's data (optionally <code>null</code>)
1946            * @param serviceContext the service context to be applied. Can set the
1947            asset category IDs, asset tag names, and expando bridge
1948            attributes for the file entry. In a Liferay repository, it may
1949            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
1950            type </li> <li> fieldsMap - mapping for fields associated with a
1951            custom file entry type </li> </ul>
1952            * @return the file entry
1953            */
1954            public static com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry(
1955                    long fileEntryId, java.lang.String sourceFileName,
1956                    java.lang.String mimeType, java.lang.String title,
1957                    java.lang.String description, java.lang.String changeLog,
1958                    boolean majorVersion, byte[] bytes,
1959                    com.liferay.portal.service.ServiceContext serviceContext)
1960                    throws com.liferay.portal.kernel.exception.PortalException {
1961                    return getService()
1962                                       .updateFileEntry(fileEntryId, sourceFileName, mimeType,
1963                            title, description, changeLog, majorVersion, bytes, serviceContext);
1964            }
1965    
1966            /**
1967            * Updates a file entry and associated metadata based on a {@link File}
1968            * object. If the file data is <code>null</code>, then only the associated
1969            * metadata (i.e., <code>title</code>, <code>description</code>, and
1970            * parameters in the <code>serviceContext</code>) will be updated.
1971            *
1972            * <p>
1973            * This method takes two file names, the <code>sourceFileName</code> and the
1974            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
1975            * name of the actual file being uploaded. The <code>title</code>
1976            * corresponds to a name the client wishes to assign this file after it has
1977            * been uploaded to the portal.
1978            * </p>
1979            *
1980            * @param fileEntryId the primary key of the file entry
1981            * @param sourceFileName the original file's name (optionally
1982            <code>null</code>)
1983            * @param mimeType the file's MIME type (optionally <code>null</code>)
1984            * @param title the new name to be assigned to the file (optionally <code>
1985            <code>null</code></code>)
1986            * @param description the file's new description
1987            * @param changeLog the file's version change log (optionally
1988            <code>null</code>)
1989            * @param majorVersion whether the new file version is a major version
1990            * @param file the file's data (optionally <code>null</code>)
1991            * @param serviceContext the service context to be applied. Can set the
1992            asset category IDs, asset tag names, and expando bridge
1993            attributes for the file entry. In a Liferay repository, it may
1994            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
1995            type </li> <li> fieldsMap - mapping for fields associated with a
1996            custom file entry type </li> </ul>
1997            * @return the file entry
1998            */
1999            public static com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry(
2000                    long fileEntryId, java.lang.String sourceFileName,
2001                    java.lang.String mimeType, java.lang.String title,
2002                    java.lang.String description, java.lang.String changeLog,
2003                    boolean majorVersion, java.io.File file,
2004                    com.liferay.portal.service.ServiceContext serviceContext)
2005                    throws com.liferay.portal.kernel.exception.PortalException {
2006                    return getService()
2007                                       .updateFileEntry(fileEntryId, sourceFileName, mimeType,
2008                            title, description, changeLog, majorVersion, file, serviceContext);
2009            }
2010    
2011            /**
2012            * Updates a file entry and associated metadata based on an {@link
2013            * InputStream} object. If the file data is <code>null</code>, then only the
2014            * associated metadata (i.e., <code>title</code>, <code>description</code>,
2015            * and parameters in the <code>serviceContext</code>) will be updated.
2016            *
2017            * <p>
2018            * This method takes two file names, the <code>sourceFileName</code> and the
2019            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
2020            * name of the actual file being uploaded. The <code>title</code>
2021            * corresponds to a name the client wishes to assign this file after it has
2022            * been uploaded to the portal.
2023            * </p>
2024            *
2025            * @param fileEntryId the primary key of the file entry
2026            * @param sourceFileName the original file's name (optionally
2027            <code>null</code>)
2028            * @param mimeType the file's MIME type (optionally <code>null</code>)
2029            * @param title the new name to be assigned to the file (optionally <code>
2030            <code>null</code></code>)
2031            * @param description the file's new description
2032            * @param changeLog the file's version change log (optionally
2033            <code>null</code>)
2034            * @param majorVersion whether the new file version is a major version
2035            * @param is the file's data (optionally <code>null</code>)
2036            * @param size the file's size (optionally <code>0</code>)
2037            * @param serviceContext the service context to be applied. Can set the
2038            asset category IDs, asset tag names, and expando bridge
2039            attributes for the file entry. In a Liferay repository, it may
2040            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
2041            type </li> <li> fieldsMap - mapping for fields associated with a
2042            custom file entry type </li> </ul>
2043            * @return the file entry
2044            */
2045            public static com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry(
2046                    long fileEntryId, java.lang.String sourceFileName,
2047                    java.lang.String mimeType, java.lang.String title,
2048                    java.lang.String description, java.lang.String changeLog,
2049                    boolean majorVersion, java.io.InputStream is, long size,
2050                    com.liferay.portal.service.ServiceContext serviceContext)
2051                    throws com.liferay.portal.kernel.exception.PortalException {
2052                    return getService()
2053                                       .updateFileEntry(fileEntryId, sourceFileName, mimeType,
2054                            title, description, changeLog, majorVersion, is, size,
2055                            serviceContext);
2056            }
2057    
2058            public static com.liferay.portal.kernel.repository.model.FileEntry updateFileEntryAndCheckIn(
2059                    long fileEntryId, java.lang.String sourceFileName,
2060                    java.lang.String mimeType, java.lang.String title,
2061                    java.lang.String description, java.lang.String changeLog,
2062                    boolean majorVersion, java.io.File file,
2063                    com.liferay.portal.service.ServiceContext serviceContext)
2064                    throws com.liferay.portal.kernel.exception.PortalException {
2065                    return getService()
2066                                       .updateFileEntryAndCheckIn(fileEntryId, sourceFileName,
2067                            mimeType, title, description, changeLog, majorVersion, file,
2068                            serviceContext);
2069            }
2070    
2071            public static com.liferay.portal.kernel.repository.model.FileEntry updateFileEntryAndCheckIn(
2072                    long fileEntryId, java.lang.String sourceFileName,
2073                    java.lang.String mimeType, java.lang.String title,
2074                    java.lang.String description, java.lang.String changeLog,
2075                    boolean majorVersion, java.io.InputStream is, long size,
2076                    com.liferay.portal.service.ServiceContext serviceContext)
2077                    throws com.liferay.portal.kernel.exception.PortalException {
2078                    return getService()
2079                                       .updateFileEntryAndCheckIn(fileEntryId, sourceFileName,
2080                            mimeType, title, description, changeLog, majorVersion, is, size,
2081                            serviceContext);
2082            }
2083    
2084            /**
2085            * Updates a file shortcut to the existing file entry. This method is only
2086            * supported by the Liferay repository.
2087            *
2088            * @param fileShortcutId the primary key of the file shortcut
2089            * @param folderId the primary key of the file shortcut's parent folder
2090            * @param toFileEntryId the primary key of the file shortcut's file entry
2091            * @param serviceContext the service context to be applied. Can set the
2092            asset category IDs, asset tag names, and expando bridge
2093            attributes for the file entry.
2094            * @return the file shortcut
2095            */
2096            public static com.liferay.portal.kernel.repository.model.FileShortcut updateFileShortcut(
2097                    long fileShortcutId, long folderId, long toFileEntryId,
2098                    com.liferay.portal.service.ServiceContext serviceContext)
2099                    throws com.liferay.portal.kernel.exception.PortalException {
2100                    return getService()
2101                                       .updateFileShortcut(fileShortcutId, folderId, toFileEntryId,
2102                            serviceContext);
2103            }
2104    
2105            /**
2106            * Updates the folder.
2107            *
2108            * @param folderId the primary key of the folder
2109            * @param name the folder's new name
2110            * @param description the folder's new description
2111            * @param serviceContext the service context to be applied. In a Liferay
2112            repository, it may include:  <ul> <li> defaultFileEntryTypeId -
2113            the file entry type to default all Liferay file entries to </li>
2114            <li> dlFileEntryTypesSearchContainerPrimaryKeys - a
2115            comma-delimited list of file entry type primary keys allowed in
2116            the given folder and all descendants </li> <li> restrictionType -
2117            specifying restriction type of file entry types allowed </li>
2118            <li> workflowDefinitionXYZ - the workflow definition name
2119            specified per file entry type. The parameter name must be the
2120            string <code>workflowDefinition</code> appended by the
2121            <code>fileEntryTypeId</code> (optionally <code>0</code>).</li>
2122            </ul>
2123            * @return the folder
2124            */
2125            public static com.liferay.portal.kernel.repository.model.Folder updateFolder(
2126                    long folderId, java.lang.String name, java.lang.String description,
2127                    com.liferay.portal.service.ServiceContext serviceContext)
2128                    throws com.liferay.portal.kernel.exception.PortalException {
2129                    return getService()
2130                                       .updateFolder(folderId, name, description, serviceContext);
2131            }
2132    
2133            /**
2134            * Returns <code>true</code> if the file entry is checked out. This method
2135            * is primarily used by WebDAV.
2136            *
2137            * @param repositoryId the primary key for the repository
2138            * @param fileEntryId the primary key for the file entry
2139            * @param lockUuid the lock's UUID
2140            * @return <code>true</code> if the file entry is checked out;
2141            <code>false</code> otherwise
2142            */
2143            public static boolean verifyFileEntryCheckOut(long repositoryId,
2144                    long fileEntryId, java.lang.String lockUuid)
2145                    throws com.liferay.portal.kernel.exception.PortalException {
2146                    return getService()
2147                                       .verifyFileEntryCheckOut(repositoryId, fileEntryId, lockUuid);
2148            }
2149    
2150            public static boolean verifyFileEntryLock(long repositoryId,
2151                    long fileEntryId, java.lang.String lockUuid)
2152                    throws com.liferay.portal.kernel.exception.PortalException {
2153                    return getService()
2154                                       .verifyFileEntryLock(repositoryId, fileEntryId, lockUuid);
2155            }
2156    
2157            /**
2158            * Returns <code>true</code> if the inheritable lock exists. This method is
2159            * primarily used by WebDAV.
2160            *
2161            * @param repositoryId the primary key for the repository
2162            * @param folderId the primary key for the folder
2163            * @param lockUuid the lock's UUID
2164            * @return <code>true</code> if the inheritable lock exists;
2165            <code>false</code> otherwise
2166            */
2167            public static boolean verifyInheritableLock(long repositoryId,
2168                    long folderId, java.lang.String lockUuid)
2169                    throws com.liferay.portal.kernel.exception.PortalException {
2170                    return getService()
2171                                       .verifyInheritableLock(repositoryId, folderId, lockUuid);
2172            }
2173    
2174            public static DLAppService getService() {
2175                    if (_service == null) {
2176                            _service = (DLAppService)PortalBeanLocatorUtil.locate(DLAppService.class.getName());
2177    
2178                            ReferenceRegistry.registerReference(DLAppServiceUtil.class,
2179                                    "_service");
2180                    }
2181    
2182                    return _service;
2183            }
2184    
2185            /**
2186             * @deprecated As of 6.2.0
2187             */
2188            @Deprecated
2189            public void setService(DLAppService service) {
2190            }
2191    
2192            private static DLAppService _service;
2193    }