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