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