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