001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.document.library.kernel.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.exception.PortalException;
020    import com.liferay.portal.kernel.exception.SystemException;
021    import com.liferay.portal.kernel.jsonwebservice.JSONWebService;
022    import com.liferay.portal.kernel.lock.Lock;
023    import com.liferay.portal.kernel.repository.model.FileEntry;
024    import com.liferay.portal.kernel.repository.model.FileShortcut;
025    import com.liferay.portal.kernel.repository.model.FileVersion;
026    import com.liferay.portal.kernel.repository.model.Folder;
027    import com.liferay.portal.kernel.search.Hits;
028    import com.liferay.portal.kernel.search.Query;
029    import com.liferay.portal.kernel.search.SearchContext;
030    import com.liferay.portal.kernel.search.SearchException;
031    import com.liferay.portal.kernel.security.access.control.AccessControlled;
032    import com.liferay.portal.kernel.service.BaseService;
033    import com.liferay.portal.kernel.service.ServiceContext;
034    import com.liferay.portal.kernel.transaction.Isolation;
035    import com.liferay.portal.kernel.transaction.Propagation;
036    import com.liferay.portal.kernel.transaction.Transactional;
037    import com.liferay.portal.kernel.util.OrderByComparator;
038    
039    import java.io.File;
040    import java.io.InputStream;
041    
042    import java.util.List;
043    
044    /**
045     * Provides the remote service interface for DLApp. Methods of this
046     * service are expected to have security checks based on the propagated JAAS
047     * credentials because this service can be accessed remotely.
048     *
049     * @author Brian Wing Shun Chan
050     * @see DLAppServiceUtil
051     * @see com.liferay.portlet.documentlibrary.service.base.DLAppServiceBaseImpl
052     * @see com.liferay.portlet.documentlibrary.service.impl.DLAppServiceImpl
053     * @generated
054     */
055    @AccessControlled
056    @JSONWebService
057    @ProviderType
058    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
059            PortalException.class, SystemException.class})
060    public interface DLAppService extends BaseService {
061            /*
062             * NOTE FOR DEVELOPERS:
063             *
064             * Never modify or reference this interface directly. Always use {@link DLAppServiceUtil} to access the d l app remote service. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLAppServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
065             */
066    
067            /**
068            * Adds a file entry and associated metadata. It is created based on a byte
069            * array.
070            *
071            * <p>
072            * This method takes two file names, the <code>sourceFileName</code> and the
073            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
074            * name of the actual file being uploaded. The <code>title</code>
075            * corresponds to a name the client wishes to assign this file after it has
076            * been uploaded to the portal. If it is <code>null</code>, the <code>
077            * sourceFileName</code> will be used.
078            * </p>
079            *
080            * @param repositoryId the primary key of the repository
081            * @param folderId the primary key of the file entry's parent folder
082            * @param sourceFileName the original file's name
083            * @param mimeType the file's MIME type
084            * @param title the name to be assigned to the file (optionally <code>null
085            </code>)
086            * @param description the file's description
087            * @param changeLog the file's version change log
088            * @param bytes the file's data (optionally <code>null</code>)
089            * @param serviceContext the service context to be applied. Can set the
090            asset category IDs, asset tag names, and expando bridge
091            attributes for the file entry. In a Liferay repository, it may
092            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
093            type </li> <li> fieldsMap - mapping for fields associated with a
094            custom file entry type </li> </ul>
095            * @return the file entry
096            */
097            public FileEntry addFileEntry(long repositoryId, long folderId,
098                    java.lang.String sourceFileName, java.lang.String mimeType,
099                    java.lang.String title, java.lang.String description,
100                    java.lang.String changeLog, byte[] bytes, ServiceContext serviceContext)
101                    throws PortalException;
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            */
133            public FileEntry addFileEntry(long repositoryId, long folderId,
134                    java.lang.String sourceFileName, java.lang.String mimeType,
135                    java.lang.String title, java.lang.String description,
136                    java.lang.String changeLog, File file, ServiceContext serviceContext)
137                    throws PortalException;
138    
139            /**
140            * Adds a file entry and associated metadata. It is created based on a
141            * {@link InputStream} object.
142            *
143            * <p>
144            * This method takes two file names, the <code>sourceFileName</code> and the
145            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
146            * name of the actual file being uploaded. The <code>title</code>
147            * corresponds to a name the client wishes to assign this file after it has
148            * been uploaded to the portal. If it is <code>null</code>, the <code>
149            * sourceFileName</code> will be used.
150            * </p>
151            *
152            * @param repositoryId the primary key of the repository
153            * @param folderId the primary key of the file entry's parent folder
154            * @param sourceFileName the original file's name
155            * @param mimeType the file's MIME type
156            * @param title the name to be assigned to the file (optionally <code>null
157            </code>)
158            * @param description the file's description
159            * @param changeLog the file's version change log
160            * @param is the file's data (optionally <code>null</code>)
161            * @param size the file's size (optionally <code>0</code>)
162            * @param serviceContext the service context to be applied. Can set the
163            asset category IDs, asset tag names, and expando bridge
164            attributes for the file entry. In a Liferay repository, it may
165            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
166            type </li> <li> fieldsMap - mapping for fields associated with a
167            custom file entry type </li> </ul>
168            * @return the file entry
169            */
170            public FileEntry addFileEntry(long repositoryId, long folderId,
171                    java.lang.String sourceFileName, java.lang.String mimeType,
172                    java.lang.String title, java.lang.String description,
173                    java.lang.String changeLog, InputStream is, long size,
174                    ServiceContext serviceContext) throws PortalException;
175    
176            /**
177            * Adds a file shortcut to the existing file entry. This method is only
178            * supported by the Liferay repository.
179            *
180            * @param repositoryId the primary key of the repository
181            * @param folderId the primary key of the file shortcut's parent folder
182            * @param toFileEntryId the primary key of the file shortcut's file entry
183            * @param serviceContext the service context to be applied. Can set the
184            asset category IDs, asset tag names, and expando bridge
185            attributes for the file entry.
186            * @return the file shortcut
187            */
188            public FileShortcut addFileShortcut(long repositoryId, long folderId,
189                    long toFileEntryId, ServiceContext serviceContext)
190                    throws PortalException;
191    
192            /**
193            * Adds a folder.
194            *
195            * @param repositoryId the primary key of the repository
196            * @param parentFolderId the primary key of the folder's parent folder
197            * @param name the folder's name
198            * @param description the folder's description
199            * @param serviceContext the service context to be applied. In a Liferay
200            repository, it may include boolean mountPoint specifying whether
201            folder is a facade for mounting a third-party repository
202            * @return the folder
203            */
204            public Folder addFolder(long repositoryId, long parentFolderId,
205                    java.lang.String name, java.lang.String description,
206                    ServiceContext serviceContext) throws PortalException;
207    
208            /**
209            * Adds a temporary file entry.
210            *
211            * <p>
212            * This allows a client to upload a file into a temporary location and
213            * manipulate its metadata prior to making it available for public usage.
214            * This is different from checking in and checking out a file entry.
215            * </p>
216            *
217            * @param groupId the primary key of the group
218            * @param folderId the primary key of the folder where the file entry will
219            eventually reside
220            * @param folderName the temporary folder's name
221            * @param fileName the file's original name
222            * @param file the file's data (optionally <code>null</code>)
223            * @param mimeType the file's MIME type
224            * @return the temporary file entry
225            * @see TempFileEntryUtil
226            */
227            public FileEntry addTempFileEntry(long groupId, long folderId,
228                    java.lang.String folderName, java.lang.String fileName, File file,
229                    java.lang.String mimeType) throws PortalException;
230    
231            /**
232            * Adds a temporary file entry. It is created based on the {@link
233            * InputStream} object.
234            *
235            * <p>
236            * This allows a client to upload a file into a temporary location and
237            * manipulate its metadata prior to making it available for public usage.
238            * This is different from checking in and checking out a file entry.
239            * </p>
240            *
241            * @param groupId the primary key of the group
242            * @param folderId the primary key of the folder where the file entry will
243            eventually reside
244            * @param folderName the temporary folder's name
245            * @param fileName the file's original name
246            * @param inputStream the file's data
247            * @param mimeType the file's MIME type
248            * @return the temporary file entry
249            * @see TempFileEntryUtil
250            */
251            public FileEntry addTempFileEntry(long groupId, long folderId,
252                    java.lang.String folderName, java.lang.String fileName,
253                    InputStream inputStream, java.lang.String mimeType)
254                    throws PortalException;
255    
256            /**
257            * Cancels the check out of the file entry. If a user has not checked out
258            * the specified file entry, invoking this method will result in no changes.
259            *
260            * <p>
261            * When a file entry is checked out, a PWC (private working copy) is created
262            * and the original file entry is locked. A client can make as many changes
263            * to the PWC as he desires without those changes being visible to other
264            * users. If the user is satisfied with the changes, he may elect to check
265            * in his changes, resulting in a new file version based on the PWC; the PWC
266            * will be removed and the file entry will be unlocked. If the user is not
267            * satisfied with the changes, he may elect to cancel his check out; this
268            * results in the deletion of the PWC and unlocking of the file entry.
269            * </p>
270            *
271            * @param fileEntryId the primary key of the file entry to cancel the
272            checkout
273            * @see #checkInFileEntry(long, boolean, String, ServiceContext)
274            * @see #checkOutFileEntry(long, ServiceContext)
275            */
276            public void cancelCheckOut(long fileEntryId) throws PortalException;
277    
278            /**
279            * Checks in the file entry using the lock's UUID. If a user has not checked
280            * out the specified file entry, invoking this method will result in no
281            * changes. This method is primarily used by WebDAV.
282            *
283            * <p>
284            * When a file entry is checked out, a PWC (private working copy) is created
285            * and the original file entry is locked. A client can make as many changes
286            * to the PWC as he desires without those changes being visible to other
287            * users. If the user is satisfied with the changes, he may elect to check
288            * in his changes, resulting in a new file version based on the PWC; the PWC
289            * will be removed and the file entry will be unlocked. If the user is not
290            * satisfied with the changes, he may elect to cancel his check out; this
291            * results in the deletion of the PWC and unlocking of the file entry.
292            * </p>
293            *
294            * @param fileEntryId the primary key of the file entry to check in
295            * @param lockUuid the lock's UUID
296            * @param serviceContext the service context to be applied
297            * @see #cancelCheckOut(long)
298            * @see #checkOutFileEntry(long, String, long, ServiceContext)
299            */
300            public void checkInFileEntry(long fileEntryId, java.lang.String lockUuid,
301                    ServiceContext serviceContext) throws PortalException;
302    
303            /**
304            * Checks in the file entry. If a user has not checked out the specified
305            * file entry, invoking this method will result in no changes.
306            *
307            * <p>
308            * When a file entry is checked out, a PWC (private working copy) is created
309            * and the original file entry is locked. A client can make as many changes
310            * to the PWC as he desires without those changes being visible to other
311            * users. If the user is satisfied with the changes, he may elect to check
312            * in his changes, resulting in a new file version based on the PWC; the PWC
313            * will be removed and the file entry will be unlocked. If the user is not
314            * satisfied with the changes, he may elect to cancel his check out; this
315            * results in the deletion of the PWC and unlocking of the file entry.
316            * </p>
317            *
318            * @param fileEntryId the primary key of the file entry to check in
319            * @param majorVersion whether the new file version is a major version
320            * @param changeLog the file's version change log
321            * @param serviceContext the service context to be applied
322            * @see #cancelCheckOut(long)
323            * @see #checkOutFileEntry(long, ServiceContext)
324            */
325            public void checkInFileEntry(long fileEntryId, boolean majorVersion,
326                    java.lang.String changeLog, ServiceContext serviceContext)
327                    throws PortalException;
328    
329            /**
330            * Checks out the file entry. This method is primarily used by WebDAV.
331            *
332            * <p>
333            * When a file entry is checked out, a PWC (private working copy) is created
334            * and the original file entry is locked. A client can make as many changes
335            * to the PWC as he desires without those changes being visible to other
336            * users. If the user is satisfied with the changes, he may elect to check
337            * in his changes, resulting in a new file version based on the PWC; the PWC
338            * will be removed and the file entry will be unlocked. If the user is not
339            * satisfied with the changes, he may elect to cancel his check out; this
340            * results in the deletion of the PWC and unlocking of the file entry.
341            * </p>
342            *
343            * @param fileEntryId the file entry to check out
344            * @param owner the owner string for the checkout (optionally
345            <code>null</code>)
346            * @param expirationTime the time in milliseconds before the lock expires.
347            If the value is <code>0</code>, the default expiration time will
348            be used from <code>portal.properties>.
349            * @param serviceContext the service context to be applied
350            * @return the file entry
351            * @see #cancelCheckOut(long)
352            * @see #checkInFileEntry(long, String)
353            */
354            public FileEntry checkOutFileEntry(long fileEntryId,
355                    java.lang.String owner, long expirationTime,
356                    ServiceContext serviceContext) throws PortalException;
357    
358            /**
359            * Check out a file entry.
360            *
361            * <p>
362            * When a file entry is checked out, a PWC (private working copy) is created
363            * and the original file entry is locked. A client can make as many changes
364            * to the PWC as he desires without those changes being visible to other
365            * users. If the user is satisfied with the changes, he may elect to check
366            * in his changes, resulting in a new file version based on the PWC; the PWC
367            * will be removed and the file entry will be unlocked. If the user is not
368            * satisfied with the changes, he may elect to cancel his check out; this
369            * results in the deletion of the PWC and unlocking of the file entry.
370            * </p>
371            *
372            * @param fileEntryId the file entry to check out
373            * @param serviceContext the service context to be applied
374            * @see #cancelCheckOut(long)
375            * @see #checkInFileEntry(long, boolean, String, ServiceContext)
376            */
377            public void checkOutFileEntry(long fileEntryId,
378                    ServiceContext serviceContext) throws PortalException;
379    
380            /**
381            * Performs a deep copy of the folder.
382            *
383            * @param repositoryId the primary key of the repository
384            * @param sourceFolderId the primary key of the folder to copy
385            * @param parentFolderId the primary key of the new folder's parent folder
386            * @param name the new folder's name
387            * @param description the new folder's description
388            * @param serviceContext the service context to be applied
389            * @return the folder
390            */
391            public Folder copyFolder(long repositoryId, long sourceFolderId,
392                    long parentFolderId, java.lang.String name,
393                    java.lang.String description, ServiceContext serviceContext)
394                    throws PortalException;
395    
396            /**
397            * Deletes the file entry with the primary key.
398            *
399            * @param fileEntryId the primary key of the file entry
400            */
401            public void deleteFileEntry(long fileEntryId) throws PortalException;
402    
403            /**
404            * Deletes the file entry with the title in the folder.
405            *
406            * @param repositoryId the primary key of the repository
407            * @param folderId the primary key of the file entry's parent folder
408            * @param title the file entry's title
409            */
410            public void deleteFileEntryByTitle(long repositoryId, long folderId,
411                    java.lang.String title) throws PortalException;
412    
413            /**
414            * Deletes the file shortcut with the primary key. This method is only
415            * supported by the Liferay repository.
416            *
417            * @param fileShortcutId the primary key of the file shortcut
418            */
419            public void deleteFileShortcut(long fileShortcutId)
420                    throws PortalException;
421    
422            /**
423            * Deletes the file version. File versions can only be deleted if it is
424            * approved and there are other approved file versions available. This
425            * method is only supported by the Liferay repository.
426            *
427            * @param fileEntryId the primary key of the file entry
428            * @param version the version label of the file version
429            */
430            public void deleteFileVersion(long fileEntryId, java.lang.String version)
431                    throws PortalException;
432    
433            /**
434            * Deletes the folder with the primary key and all of its subfolders and
435            * file entries.
436            *
437            * @param folderId the primary key of the folder
438            */
439            public void deleteFolder(long folderId) throws PortalException;
440    
441            /**
442            * Deletes the folder with the name in the parent folder and all of its
443            * subfolders and file entries.
444            *
445            * @param repositoryId the primary key of the repository
446            * @param parentFolderId the primary key of the folder's parent folder
447            * @param name the folder's name
448            */
449            public void deleteFolder(long repositoryId, long parentFolderId,
450                    java.lang.String name) throws PortalException;
451    
452            /**
453            * Deletes the temporary file entry.
454            *
455            * @param groupId the primary key of the group
456            * @param folderId the primary key of the folder where the file entry was
457            eventually to reside
458            * @param folderName the temporary folder's name
459            * @param fileName the file's original name
460            * @see TempFileEntryUtil
461            */
462            public void deleteTempFileEntry(long groupId, long folderId,
463                    java.lang.String folderName, java.lang.String fileName)
464                    throws PortalException;
465    
466            /**
467            * Returns all the file entries in the folder.
468            *
469            * @param repositoryId the primary key of the file entry's repository
470            * @param folderId the primary key of the file entry's folder
471            * @return the file entries in the folder
472            */
473            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
474            public List<FileEntry> getFileEntries(long repositoryId, long folderId)
475                    throws PortalException;
476    
477            /**
478            * Returns the file entries with the file entry type in the folder.
479            *
480            * @param repositoryId the primary key of the file entry's repository
481            * @param folderId the primary key of the file entry's folder
482            * @param fileEntryTypeId the primary key of the file entry type
483            * @return the file entries with the file entry type in the folder
484            */
485            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
486            public List<FileEntry> getFileEntries(long repositoryId, long folderId,
487                    long fileEntryTypeId) throws PortalException;
488    
489            /**
490            * Returns a name-ordered range of all the file entries with the file entry
491            * type in the folder.
492            *
493            * @param repositoryId the primary key of the file entry's repository
494            * @param folderId the primary key of the file entry's folder
495            * @param fileEntryTypeId the primary key of the file entry type
496            * @param start the lower bound of the range of results
497            * @param end the upper bound of the range of results (not inclusive)
498            * @return the name-ordered range of the file entries in the folder
499            */
500            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
501            public List<FileEntry> getFileEntries(long repositoryId, long folderId,
502                    long fileEntryTypeId, int start, int end) throws PortalException;
503    
504            /**
505            * Returns an ordered range of all the file entries with the file entry type
506            * in the folder.
507            *
508            * @param repositoryId the primary key of the repository
509            * @param folderId the primary key of the folder
510            * @param fileEntryTypeId the primary key of the file entry type
511            * @param start the lower bound of the range of results
512            * @param end the upper bound of the range of results (not inclusive)
513            * @param obc the comparator to order the results by (optionally
514            <code>null</code>)
515            * @return the range of file entries with the file entry type in the folder
516            ordered by <code>null</code>
517            */
518            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
519            public List<FileEntry> getFileEntries(long repositoryId, long folderId,
520                    long fileEntryTypeId, int start, int end,
521                    OrderByComparator<FileEntry> obc) throws PortalException;
522    
523            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
524            public List<FileEntry> getFileEntries(long repositoryId, long folderId,
525                    java.lang.String[] mimeTypes) throws PortalException;
526    
527            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
528            public List<FileEntry> getFileEntries(long repositoryId, long folderId,
529                    java.lang.String[] mimeTypes, int start, int end,
530                    OrderByComparator<FileEntry> obc) throws PortalException;
531    
532            /**
533            * Returns a name-ordered range of all the file entries in the folder.
534            *
535            * <p>
536            * Useful when paginating results. Returns a maximum of <code>end -
537            * start</code> instances. <code>start</code> and <code>end</code> are not
538            * primary keys, they are indexes in the result set. Thus, <code>0</code>
539            * refers to the first result in the set. Setting both <code>start</code>
540            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
541            * result set.
542            * </p>
543            *
544            * @param repositoryId the primary key of the file entry's repository
545            * @param folderId the primary key of the file entry's folder
546            * @param start the lower bound of the range of results
547            * @param end the upper bound of the range of results (not inclusive)
548            * @return the name-ordered range of file entries in the folder
549            */
550            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
551            public List<FileEntry> getFileEntries(long repositoryId, long folderId,
552                    int start, int end) throws PortalException;
553    
554            /**
555            * Returns an ordered range of all the file entries in the folder.
556            *
557            * <p>
558            * Useful when paginating results. Returns a maximum of <code>end -
559            * start</code> instances. <code>start</code> and <code>end</code> are not
560            * primary keys, they are indexes in the result set. Thus, <code>0</code>
561            * refers to the first result in the set. Setting both <code>start</code>
562            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
563            * result set.
564            * </p>
565            *
566            * @param repositoryId the primary key of the file entry's repository
567            * @param folderId the primary key of the file entry's folder
568            * @param start the lower bound of the range of results
569            * @param end the upper bound of the range of results (not inclusive)
570            * @param obc the comparator to order the file entries (optionally
571            <code>null</code>)
572            * @return the range of file entries in the folder ordered by comparator
573            <code>obc</code>
574            */
575            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
576            public List<FileEntry> getFileEntries(long repositoryId, long folderId,
577                    int start, int end, OrderByComparator<FileEntry> obc)
578                    throws PortalException;
579    
580            /**
581            * Returns a range of all the file entries and shortcuts in the folder.
582            *
583            * <p>
584            * Useful when paginating results. Returns a maximum of <code>end -
585            * start</code> instances. <code>start</code> and <code>end</code> are not
586            * primary keys, they are indexes in the result set. Thus, <code>0</code>
587            * refers to the first result in the set. Setting both <code>start</code>
588            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
589            * result set.
590            * </p>
591            *
592            * @param repositoryId the primary key of the repository
593            * @param folderId the primary key of the folder
594            * @param status the workflow status
595            * @param start the lower bound of the range of results
596            * @param end the upper bound of the range of results (not inclusive)
597            * @return the range of file entries and shortcuts in the folder
598            */
599            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
600            public List<java.lang.Object> getFileEntriesAndFileShortcuts(
601                    long repositoryId, long folderId, int status, int start, int end)
602                    throws PortalException;
603    
604            /**
605            * Returns the number of file entries and shortcuts in the folder.
606            *
607            * @param repositoryId the primary key of the repository
608            * @param folderId the primary key of the folder
609            * @param status the workflow status
610            * @return the number of file entries and shortcuts in the folder
611            */
612            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
613            public int getFileEntriesAndFileShortcutsCount(long repositoryId,
614                    long folderId, int status) throws PortalException;
615    
616            /**
617            * Returns the number of file entries and shortcuts in the folder.
618            *
619            * @param repositoryId the primary key of the repository
620            * @param folderId the primary key of the folder
621            * @param status the workflow status
622            * @param mimeTypes allowed media types
623            * @return the number of file entries and shortcuts in the folder
624            */
625            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
626            public int getFileEntriesAndFileShortcutsCount(long repositoryId,
627                    long folderId, int status, java.lang.String[] mimeTypes)
628                    throws PortalException;
629    
630            /**
631            * Returns the number of file entries in the folder.
632            *
633            * @param repositoryId the primary key of the file entry's repository
634            * @param folderId the primary key of the file entry's folder
635            * @return the number of file entries in the folder
636            */
637            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
638            public int getFileEntriesCount(long repositoryId, long folderId)
639                    throws PortalException;
640    
641            /**
642            * Returns the number of file entries with the file entry type in the
643            * folder.
644            *
645            * @param repositoryId the primary key of the file entry's repository
646            * @param folderId the primary key of the file entry's folder
647            * @param fileEntryTypeId the primary key of the file entry type
648            * @return the number of file entries with the file entry type in the folder
649            */
650            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
651            public int getFileEntriesCount(long repositoryId, long folderId,
652                    long fileEntryTypeId) throws PortalException;
653    
654            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
655            public int getFileEntriesCount(long repositoryId, long folderId,
656                    java.lang.String[] mimeTypes) throws PortalException;
657    
658            /**
659            * Returns the file entry with the primary key.
660            *
661            * @param fileEntryId the primary key of the file entry
662            * @return the file entry with the primary key
663            */
664            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
665            public FileEntry getFileEntry(long fileEntryId) throws PortalException;
666    
667            /**
668            * Returns the file entry with the title in the folder.
669            *
670            * @param groupId the primary key of the file entry's group
671            * @param folderId the primary key of the file entry's folder
672            * @param title the file entry's title
673            * @return the file entry with the title in the folder
674            */
675            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
676            public FileEntry getFileEntry(long groupId, long folderId,
677                    java.lang.String title) throws PortalException;
678    
679            /**
680            * Returns the file entry with the UUID and group.
681            *
682            * @param uuid the file entry's UUID
683            * @param groupId the primary key of the file entry's group
684            * @return the file entry with the UUID and group
685            */
686            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
687            public FileEntry getFileEntryByUuidAndGroupId(java.lang.String uuid,
688                    long groupId) throws PortalException;
689    
690            /**
691            * Returns the file shortcut with the primary key. This method is only
692            * supported by the Liferay repository.
693            *
694            * @param fileShortcutId the primary key of the file shortcut
695            * @return the file shortcut with the primary key
696            */
697            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
698            public FileShortcut getFileShortcut(long fileShortcutId)
699                    throws PortalException;
700    
701            /**
702            * Returns the file version with the primary key.
703            *
704            * @param fileVersionId the primary key of the file version
705            * @return the file version with the primary key
706            */
707            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
708            public FileVersion getFileVersion(long fileVersionId)
709                    throws PortalException;
710    
711            /**
712            * Returns the folder with the primary key.
713            *
714            * @param folderId the primary key of the folder
715            * @return the folder with the primary key
716            */
717            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
718            public Folder getFolder(long folderId) throws PortalException;
719    
720            /**
721            * Returns the folder with the name in the parent folder.
722            *
723            * @param repositoryId the primary key of the folder's repository
724            * @param parentFolderId the primary key of the folder's parent folder
725            * @param name the folder's name
726            * @return the folder with the name in the parent folder
727            */
728            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
729            public Folder getFolder(long repositoryId, long parentFolderId,
730                    java.lang.String name) throws PortalException;
731    
732            /**
733            * Returns all immediate subfolders of the parent folder.
734            *
735            * @param repositoryId the primary key of the folder's repository
736            * @param parentFolderId the primary key of the folder's parent folder
737            * @return the immediate subfolders of the parent folder
738            */
739            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
740            public List<Folder> getFolders(long repositoryId, long parentFolderId)
741                    throws PortalException;
742    
743            /**
744            * Returns all immediate subfolders of the parent folder, optionally
745            * including mount folders for third-party repositories.
746            *
747            * @param repositoryId the primary key of the folder's repository
748            * @param parentFolderId the primary key of the folder's parent folder
749            * @param includeMountFolders whether to include mount folders for
750            third-party repositories
751            * @return the immediate subfolders of the parent folder
752            */
753            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
754            public List<Folder> getFolders(long repositoryId, long parentFolderId,
755                    boolean includeMountFolders) throws PortalException;
756    
757            /**
758            * Returns a name-ordered range of all the immediate subfolders of the
759            * parent folder, optionally including mount folders for third-party
760            * repositories.
761            *
762            * <p>
763            * Useful when paginating results. Returns a maximum of <code>end -
764            * start</code> instances. <code>start</code> and <code>end</code> are not
765            * primary keys, they are indexes in the result set. Thus, <code>0</code>
766            * refers to the first result in the set. Setting both <code>start</code>
767            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
768            * result set.
769            * </p>
770            *
771            * @param repositoryId the primary key of the folder's repository
772            * @param parentFolderId the primary key of the folder's parent folder
773            * @param includeMountFolders whether to include mount folders for
774            third-party repositories
775            * @param start the lower bound of the range of results
776            * @param end the upper bound of the range of results (not inclusive)
777            * @return the name-ordered range of immediate subfolders of the parent
778            folder
779            */
780            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
781            public List<Folder> getFolders(long repositoryId, long parentFolderId,
782                    boolean includeMountFolders, int start, int end)
783                    throws PortalException;
784    
785            /**
786            * Returns an ordered range of all the immediate subfolders of the parent
787            * folder.
788            *
789            * <p>
790            * Useful when paginating results. Returns a maximum of <code>end -
791            * start</code> instances. <code>start</code> and <code>end</code> are not
792            * primary keys, they are indexes in the result set. Thus, <code>0</code>
793            * refers to the first result in the set. Setting both <code>start</code>
794            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
795            * result set.
796            * </p>
797            *
798            * @param repositoryId the primary key of the folder's repository
799            * @param parentFolderId the primary key of the folder's parent folder
800            * @param includeMountFolders whether to include mount folders for
801            third-party repositories
802            * @param start the lower bound of the range of results
803            * @param end the upper bound of the range of results (not inclusive)
804            * @param obc the comparator to order the folders (optionally
805            <code>null</code>)
806            * @return the range of immediate subfolders of the parent folder ordered by
807            comparator <code>obc</code>
808            */
809            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
810            public List<Folder> getFolders(long repositoryId, long parentFolderId,
811                    boolean includeMountFolders, int start, int end,
812                    OrderByComparator<Folder> obc) throws PortalException;
813    
814            /**
815            * Returns a name-ordered range of all the immediate subfolders of the
816            * parent folder.
817            *
818            * <p>
819            * Useful when paginating results. Returns a maximum of <code>end -
820            * start</code> instances. <code>start</code> and <code>end</code> are not
821            * primary keys, they are indexes in the result set. Thus, <code>0</code>
822            * refers to the first result in the set. Setting both <code>start</code>
823            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
824            * result set.
825            * </p>
826            *
827            * @param repositoryId the primary key of the folder's repository
828            * @param parentFolderId the primary key of the folder's parent folder
829            * @param start the lower bound of the range of results
830            * @param end the upper bound of the range of results (not inclusive)
831            * @return the name-ordered range of immediate subfolders of the parent
832            folder
833            */
834            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
835            public List<Folder> getFolders(long repositoryId, long parentFolderId,
836                    int start, int end) throws PortalException;
837    
838            /**
839            * Returns an ordered range of all the immediate subfolders of the parent
840            * folder.
841            *
842            * <p>
843            * Useful when paginating results. Returns a maximum of <code>end -
844            * start</code> instances. <code>start</code> and <code>end</code> are not
845            * primary keys, they are indexes in the result set. Thus, <code>0</code>
846            * refers to the first result in the set. Setting both <code>start</code>
847            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
848            * result set.
849            * </p>
850            *
851            * @param repositoryId the primary key of the folder's repository
852            * @param parentFolderId the primary key of the folder's parent folder
853            * @param start the lower bound of the range of results
854            * @param end the upper bound of the range of results (not inclusive)
855            * @param obc the comparator to order the folders (optionally
856            <code>null</code>)
857            * @return the range of immediate subfolders of the parent folder ordered by
858            comparator <code>obc</code>
859            */
860            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
861            public List<Folder> getFolders(long repositoryId, long parentFolderId,
862                    int start, int end, OrderByComparator<Folder> obc)
863                    throws PortalException;
864    
865            /**
866            * Returns an ordered range of all the immediate subfolders of the parent
867            * folder.
868            *
869            * <p>
870            * Useful when paginating results. Returns a maximum of <code>end -
871            * start</code> instances. <code>start</code> and <code>end</code> are not
872            * primary keys, they are indexes in the result set. Thus, <code>0</code>
873            * refers to the first result in the set. Setting both <code>start</code>
874            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
875            * result set.
876            * </p>
877            *
878            * @param repositoryId the primary key of the folder's repository
879            * @param parentFolderId the primary key of the folder's parent folder
880            * @param status the workflow status
881            * @param includeMountFolders whether to include mount folders for
882            third-party repositories
883            * @param start the lower bound of the range of results
884            * @param end the upper bound of the range of results (not inclusive)
885            * @param obc the comparator to order the folders (optionally
886            <code>null</code>)
887            * @return the range of immediate subfolders of the parent folder ordered by
888            comparator <code>obc</code>
889            */
890            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
891            public List<Folder> getFolders(long repositoryId, long parentFolderId,
892                    int status, boolean includeMountFolders, int start, int end,
893                    OrderByComparator<Folder> obc) throws PortalException;
894    
895            /**
896            * Returns a name-ordered range of all the immediate subfolders, file
897            * entries, and file shortcuts in the parent folder.
898            *
899            * <p>
900            * Useful when paginating results. Returns a maximum of <code>end -
901            * start</code> instances. <code>start</code> and <code>end</code> are not
902            * primary keys, they are indexes in the result set. Thus, <code>0</code>
903            * refers to the first result in the set. Setting both <code>start</code>
904            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
905            * result set.
906            * </p>
907            *
908            * @param repositoryId the primary key of the repository
909            * @param folderId the primary key of the parent folder
910            * @param status the workflow status
911            * @param includeMountFolders whether to include mount folders for
912            third-party repositories
913            * @param start the lower bound of the range of results
914            * @param end the upper bound of the range of results (not inclusive)
915            * @return the name-ordered range of immediate subfolders, file entries, and
916            file shortcuts in the parent folder
917            */
918            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
919            public List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
920                    long repositoryId, long folderId, int status,
921                    boolean includeMountFolders, int start, int end)
922                    throws PortalException;
923    
924            /**
925            * Returns an ordered range of all the immediate subfolders, file entries,
926            * and file shortcuts in the parent folder.
927            *
928            * <p>
929            * Useful when paginating results. Returns a maximum of <code>end -
930            * start</code> instances. <code>start</code> and <code>end</code> are not
931            * primary keys, they are indexes in the result set. Thus, <code>0</code>
932            * refers to the first result in the set. Setting both <code>start</code>
933            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
934            * result set.
935            * </p>
936            *
937            * @param repositoryId the primary key of the repository
938            * @param folderId the primary key of the parent folder
939            * @param status the workflow status
940            * @param includeMountFolders whether to include mount folders for
941            third-party repositories
942            * @param start the lower bound of the range of results
943            * @param end the upper bound of the range of results (not inclusive)
944            * @param obc the comparator to order the results (optionally
945            <code>null</code>)
946            * @return the range of immediate subfolders, file entries, and file
947            shortcuts in the parent folder ordered by comparator
948            <code>obc</code>
949            */
950            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
951            public List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
952                    long repositoryId, long folderId, int status,
953                    boolean includeMountFolders, int start, int end,
954                    OrderByComparator<?> obc) throws PortalException;
955    
956            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
957            public List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
958                    long repositoryId, long folderId, int status,
959                    java.lang.String[] mimeTypes, boolean includeMountFolders, int start,
960                    int end, OrderByComparator<?> obc) throws PortalException;
961    
962            /**
963            * Returns the number of immediate subfolders, file entries, and file
964            * shortcuts in the parent folder.
965            *
966            * @param repositoryId the primary key of the repository
967            * @param folderId the primary key of the parent folder
968            * @param status the workflow status
969            * @param includeMountFolders whether to include mount folders for
970            third-party repositories
971            * @return the number of immediate subfolders, file entries, and file
972            shortcuts in the parent folder
973            */
974            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
975            public int getFoldersAndFileEntriesAndFileShortcutsCount(
976                    long repositoryId, long folderId, int status,
977                    boolean includeMountFolders) throws PortalException;
978    
979            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
980            public int getFoldersAndFileEntriesAndFileShortcutsCount(
981                    long repositoryId, long folderId, int status,
982                    java.lang.String[] mimeTypes, boolean includeMountFolders)
983                    throws PortalException;
984    
985            /**
986            * Returns the number of immediate subfolders of the parent folder.
987            *
988            * @param repositoryId the primary key of the folder's repository
989            * @param parentFolderId the primary key of the folder's parent folder
990            * @return the number of immediate subfolders of the parent folder
991            */
992            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
993            public int getFoldersCount(long repositoryId, long parentFolderId)
994                    throws PortalException;
995    
996            /**
997            * Returns the number of immediate subfolders of the parent folder,
998            * optionally including mount folders for third-party repositories.
999            *
1000            * @param repositoryId the primary key of the folder's repository
1001            * @param parentFolderId the primary key of the folder's parent folder
1002            * @param includeMountFolders whether to include mount folders for
1003            third-party repositories
1004            * @return the number of immediate subfolders of the parent folder
1005            */
1006            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1007            public int getFoldersCount(long repositoryId, long parentFolderId,
1008                    boolean includeMountFolders) throws PortalException;
1009    
1010            /**
1011            * Returns the number of immediate subfolders of the parent folder,
1012            * optionally including mount folders for third-party repositories.
1013            *
1014            * @param repositoryId the primary key of the folder's repository
1015            * @param parentFolderId the primary key of the folder's parent folder
1016            * @param status the workflow status
1017            * @param includeMountFolders whether to include mount folders for
1018            third-party repositories
1019            * @return the number of immediate subfolders of the parent folder
1020            */
1021            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1022            public int getFoldersCount(long repositoryId, long parentFolderId,
1023                    int status, boolean includeMountFolders) throws PortalException;
1024    
1025            /**
1026            * Returns the number of immediate subfolders and file entries across the
1027            * folders.
1028            *
1029            * @param repositoryId the primary key of the repository
1030            * @param folderIds the primary keys of folders from which to count
1031            immediate subfolders and file entries
1032            * @param status the workflow status
1033            * @return the number of immediate subfolders and file entries across the
1034            folders
1035            */
1036            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1037            public int getFoldersFileEntriesCount(long repositoryId,
1038                    List<java.lang.Long> folderIds, int status) throws PortalException;
1039    
1040            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1041            public List<FileEntry> getGroupFileEntries(long groupId, long userId,
1042                    long rootFolderId, java.lang.String[] mimeTypes, int status, int start,
1043                    int end, OrderByComparator<FileEntry> obc) throws PortalException;
1044    
1045            /**
1046            * Returns an ordered range of all the file entries in the group starting at
1047            * the root folder that are stored within the Liferay repository. This
1048            * method is primarily used to search for recently modified file entries. It
1049            * can be limited to the file entries modified by a given user.
1050            *
1051            * <p>
1052            * Useful when paginating results. Returns a maximum of <code>end -
1053            * start</code> instances. <code>start</code> and <code>end</code> are not
1054            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1055            * refers to the first result in the set. Setting both <code>start</code>
1056            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1057            * result set.
1058            * </p>
1059            *
1060            * @param groupId the primary key of the group
1061            * @param userId the primary key of the user who created the file
1062            (optionally <code>0</code>)
1063            * @param rootFolderId the primary key of the root folder to begin the
1064            search
1065            * @param start the lower bound of the range of results
1066            * @param end the upper bound of the range of results (not inclusive)
1067            * @return the range of matching file entries ordered by date modified
1068            */
1069            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1070            public List<FileEntry> getGroupFileEntries(long groupId, long userId,
1071                    long rootFolderId, int start, int end) throws PortalException;
1072    
1073            /**
1074            * Returns an ordered range of all the file entries in the group starting at
1075            * the root folder that are stored within the Liferay repository. This
1076            * method is primarily used to search for recently modified file entries. It
1077            * can be limited to the file entries modified by a given user.
1078            *
1079            * <p>
1080            * Useful when paginating results. Returns a maximum of <code>end -
1081            * start</code> instances. <code>start</code> and <code>end</code> are not
1082            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1083            * refers to the first result in the set. Setting both <code>start</code>
1084            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1085            * result set.
1086            * </p>
1087            *
1088            * @param groupId the primary key of the group
1089            * @param userId the primary key of the user who created the file
1090            (optionally <code>0</code>)
1091            * @param rootFolderId the primary key of the root folder to begin the
1092            search
1093            * @param start the lower bound of the range of results
1094            * @param end the upper bound of the range of results (not inclusive)
1095            * @param obc the comparator to order the file entries (optionally
1096            <code>null</code>)
1097            * @return the range of matching file entries ordered by comparator
1098            <code>obc</code>
1099            */
1100            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1101            public List<FileEntry> getGroupFileEntries(long groupId, long userId,
1102                    long rootFolderId, int start, int end, OrderByComparator<FileEntry> obc)
1103                    throws PortalException;
1104    
1105            /**
1106            * Returns an ordered range of all the file entries in the group starting at
1107            * the repository default parent folder that are stored within the Liferay
1108            * repository. This method is primarily used to search for recently modified
1109            * file entries. It can be limited to the file entries modified by a given
1110            * user.
1111            *
1112            * <p>
1113            * Useful when paginating results. Returns a maximum of <code>end -
1114            * start</code> instances. <code>start</code> and <code>end</code> are not
1115            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1116            * refers to the first result in the set. Setting both <code>start</code>
1117            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1118            * result set.
1119            * </p>
1120            *
1121            * @param groupId the primary key of the group
1122            * @param userId the primary key of the user who created the file
1123            (optionally <code>0</code>)
1124            * @param start the lower bound of the range of results
1125            * @param end the upper bound of the range of results (not inclusive)
1126            * @return the range of matching file entries ordered by date modified
1127            */
1128            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1129            public List<FileEntry> getGroupFileEntries(long groupId, long userId,
1130                    int start, int end) throws PortalException;
1131    
1132            /**
1133            * Returns an ordered range of all the file entries in the group that are
1134            * stored within the Liferay repository. This method is primarily used to
1135            * search for recently modified file entries. It can be limited to the file
1136            * entries modified by a given user.
1137            *
1138            * <p>
1139            * Useful when paginating results. Returns a maximum of <code>end -
1140            * start</code> instances. <code>start</code> and <code>end</code> are not
1141            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1142            * refers to the first result in the set. Setting both <code>start</code>
1143            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1144            * result set.
1145            * </p>
1146            *
1147            * @param groupId the primary key of the group
1148            * @param userId the primary key of the user who created the file
1149            (optionally <code>0</code>)
1150            * @param start the lower bound of the range of results
1151            * @param end the upper bound of the range of results (not inclusive)
1152            * @param obc the comparator to order the file entries (optionally
1153            <code>null</code>)
1154            * @return the range of matching file entries ordered by comparator
1155            <code>obc</code>
1156            */
1157            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1158            public List<FileEntry> getGroupFileEntries(long groupId, long userId,
1159                    int start, int end, OrderByComparator<FileEntry> obc)
1160                    throws PortalException;
1161    
1162            /**
1163            * Returns the number of file entries in a group starting at the repository
1164            * default parent folder that are stored within the Liferay repository. This
1165            * method is primarily used to search for recently modified file entries. It
1166            * can be limited to the file entries modified by a given user.
1167            *
1168            * @param groupId the primary key of the group
1169            * @param userId the primary key of the user who created the file
1170            (optionally <code>0</code>)
1171            * @return the number of matching file entries
1172            */
1173            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1174            public int getGroupFileEntriesCount(long groupId, long userId)
1175                    throws PortalException;
1176    
1177            /**
1178            * Returns the number of file entries in a group starting at the root folder
1179            * that are stored within the Liferay repository. This method is primarily
1180            * used to search for recently modified file entries. It can be limited to
1181            * the file entries modified by a given user.
1182            *
1183            * @param groupId the primary key of the group
1184            * @param userId the primary key of the user who created the file
1185            (optionally <code>0</code>)
1186            * @param rootFolderId the primary key of the root folder to begin the
1187            search
1188            * @return the number of matching file entries
1189            */
1190            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1191            public int getGroupFileEntriesCount(long groupId, long userId,
1192                    long rootFolderId) throws PortalException;
1193    
1194            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1195            public int getGroupFileEntriesCount(long groupId, long userId,
1196                    long rootFolderId, java.lang.String[] mimeTypes, int status)
1197                    throws PortalException;
1198    
1199            /**
1200            * Returns all immediate subfolders of the parent folder that are used for
1201            * mounting third-party repositories. This method is only supported by the
1202            * Liferay repository.
1203            *
1204            * @param repositoryId the primary key of the folder's repository
1205            * @param parentFolderId the primary key of the folder's parent folder
1206            * @return the immediate subfolders of the parent folder that are used for
1207            mounting third-party repositories
1208            */
1209            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1210            public List<Folder> getMountFolders(long repositoryId, long parentFolderId)
1211                    throws PortalException;
1212    
1213            /**
1214            * Returns a name-ordered range of all the immediate subfolders of the
1215            * parent folder that are used for mounting third-party repositories. This
1216            * method is only supported by the Liferay repository.
1217            *
1218            * <p>
1219            * Useful when paginating results. Returns a maximum of <code>end -
1220            * start</code> instances. <code>start</code> and <code>end</code> are not
1221            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1222            * refers to the first result in the set. Setting both <code>start</code>
1223            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1224            * result set.
1225            * </p>
1226            *
1227            * @param repositoryId the primary key of the repository
1228            * @param parentFolderId the primary key of the parent folder
1229            * @param start the lower bound of the range of results
1230            * @param end the upper bound of the range of results (not inclusive)
1231            * @return the name-ordered range of immediate subfolders of the parent
1232            folder that are used for mounting third-party repositories
1233            */
1234            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1235            public List<Folder> getMountFolders(long repositoryId, long parentFolderId,
1236                    int start, int end) throws PortalException;
1237    
1238            /**
1239            * Returns an ordered range of all the immediate subfolders of the parent
1240            * folder that are used for mounting third-party repositories. This method
1241            * is only supported by the Liferay repository.
1242            *
1243            * <p>
1244            * Useful when paginating results. Returns a maximum of <code>end -
1245            * start</code> instances. <code>start</code> and <code>end</code> are not
1246            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1247            * refers to the first result in the set. Setting both <code>start</code>
1248            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1249            * result set.
1250            * </p>
1251            *
1252            * @param repositoryId the primary key of the folder's repository
1253            * @param parentFolderId the primary key of the folder's parent folder
1254            * @param start the lower bound of the range of results
1255            * @param end the upper bound of the range of results (not inclusive)
1256            * @param obc the comparator to order the folders (optionally
1257            <code>null</code>)
1258            * @return the range of immediate subfolders of the parent folder that are
1259            used for mounting third-party repositories ordered by comparator
1260            <code>obc</code>
1261            */
1262            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1263            public List<Folder> getMountFolders(long repositoryId, long parentFolderId,
1264                    int start, int end, OrderByComparator<Folder> obc)
1265                    throws PortalException;
1266    
1267            /**
1268            * Returns the number of immediate subfolders of the parent folder that are
1269            * used for mounting third-party repositories. This method is only supported
1270            * by the Liferay repository.
1271            *
1272            * @param repositoryId the primary key of the repository
1273            * @param parentFolderId the primary key of the parent folder
1274            * @return the number of folders of the parent folder that are used for
1275            mounting third-party repositories
1276            */
1277            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1278            public int getMountFoldersCount(long repositoryId, long parentFolderId)
1279                    throws PortalException;
1280    
1281            /**
1282            * Returns the OSGi service identifier.
1283            *
1284            * @return the OSGi service identifier
1285            */
1286            public java.lang.String getOSGiServiceIdentifier();
1287    
1288            /**
1289            * Returns all the descendant folders of the folder with the primary key.
1290            *
1291            * @param repositoryId the primary key of the repository
1292            * @param folderId the primary key of the folder
1293            * @return the descendant folders of the folder with the primary key
1294            */
1295            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1296            public List<java.lang.Long> getSubfolderIds(long repositoryId, long folderId)
1297                    throws PortalException;
1298    
1299            /**
1300            * Returns descendant folders of the folder with the primary key, optionally
1301            * limiting to one level deep.
1302            *
1303            * @param repositoryId the primary key of the repository
1304            * @param folderId the primary key of the folder
1305            * @param recurse whether to recurse through each subfolder
1306            * @return the descendant folders of the folder with the primary key
1307            */
1308            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1309            public List<java.lang.Long> getSubfolderIds(long repositoryId,
1310                    long folderId, boolean recurse) throws PortalException;
1311    
1312            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1313            public void getSubfolderIds(long repositoryId,
1314                    List<java.lang.Long> folderIds, long folderId)
1315                    throws PortalException;
1316    
1317            /**
1318            * Returns all the temporary file entry names.
1319            *
1320            * @param groupId the primary key of the group
1321            * @param folderId the primary key of the folder where the file entry will
1322            eventually reside
1323            * @param folderName the temporary folder's name
1324            * @return the temporary file entry names
1325            * @see #addTempFileEntry(long, long, String, String, File, String)
1326            * @see TempFileEntryUtil
1327            */
1328            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1329            public java.lang.String[] getTempFileNames(long groupId, long folderId,
1330                    java.lang.String folderName) throws PortalException;
1331    
1332            /**
1333            * Locks the folder. This method is primarily used by WebDAV.
1334            *
1335            * @param repositoryId the primary key of the repository
1336            * @param folderId the primary key of the folder
1337            * @return the lock object
1338            */
1339            public Lock lockFolder(long repositoryId, long folderId)
1340                    throws PortalException;
1341    
1342            /**
1343            * Locks the folder. This method is primarily used by WebDAV.
1344            *
1345            * @param repositoryId the primary key of the repository
1346            * @param folderId the primary key of the folder
1347            * @param owner the owner string for the checkout (optionally
1348            <code>null</code>)
1349            * @param inheritable whether the lock must propagate to descendants
1350            * @param expirationTime the time in milliseconds before the lock expires.
1351            If the value is <code>0</code>, the default expiration time will
1352            be used from <code>portal.properties>.
1353            * @return the lock object
1354            */
1355            public Lock lockFolder(long repositoryId, long folderId,
1356                    java.lang.String owner, boolean inheritable, long expirationTime)
1357                    throws PortalException;
1358    
1359            /**
1360            * Moves the file entry to the new folder.
1361            *
1362            * @param fileEntryId the primary key of the file entry
1363            * @param newFolderId the primary key of the new folder
1364            * @param serviceContext the service context to be applied
1365            * @return the file entry
1366            */
1367            public FileEntry moveFileEntry(long fileEntryId, long newFolderId,
1368                    ServiceContext serviceContext) throws PortalException;
1369    
1370            /**
1371            * Moves the folder to the new parent folder with the primary key.
1372            *
1373            * @param folderId the primary key of the folder
1374            * @param parentFolderId the primary key of the new parent folder
1375            * @param serviceContext the service context to be applied
1376            * @return the file entry
1377            */
1378            public Folder moveFolder(long folderId, long parentFolderId,
1379                    ServiceContext serviceContext) throws PortalException;
1380    
1381            /**
1382            * Refreshes the lock for the file entry. This method is primarily used by
1383            * WebDAV.
1384            *
1385            * @param lockUuid the lock's UUID
1386            * @param companyId the primary key of the file entry's company
1387            * @param expirationTime the time in milliseconds before the lock expires.
1388            If the value is <code>0</code>, the default expiration time will
1389            be used from <code>portal.properties>.
1390            * @return the lock object
1391            */
1392            public Lock refreshFileEntryLock(java.lang.String lockUuid, long companyId,
1393                    long expirationTime) throws PortalException;
1394    
1395            /**
1396            * Refreshes the lock for the folder. This method is primarily used by
1397            * WebDAV.
1398            *
1399            * @param lockUuid the lock's UUID
1400            * @param companyId the primary key of the file entry's company
1401            * @param expirationTime the time in milliseconds before the lock expires.
1402            If the value is <code>0</code>, the default expiration time will
1403            be used from <code>portal.properties>.
1404            * @return the lock object
1405            */
1406            public Lock refreshFolderLock(java.lang.String lockUuid, long companyId,
1407                    long expirationTime) throws PortalException;
1408    
1409            /**
1410            * Reverts the file entry to a previous version. A new version will be
1411            * created based on the previous version and metadata.
1412            *
1413            * @param fileEntryId the primary key of the file entry
1414            * @param version the version to revert back to
1415            * @param serviceContext the service context to be applied
1416            */
1417            public void revertFileEntry(long fileEntryId, java.lang.String version,
1418                    ServiceContext serviceContext) throws PortalException;
1419    
1420            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1421            public Hits search(long repositoryId, long creatorUserId, long folderId,
1422                    java.lang.String[] mimeTypes, int status, int start, int end)
1423                    throws PortalException;
1424    
1425            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1426            public Hits search(long repositoryId, long creatorUserId, int status,
1427                    int start, int end) throws PortalException;
1428    
1429            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1430            public Hits search(long repositoryId, SearchContext searchContext)
1431                    throws SearchException;
1432    
1433            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1434            public Hits search(long repositoryId, SearchContext searchContext,
1435                    Query query) throws SearchException;
1436    
1437            /**
1438            * Subscribe the user to changes in documents of the file entry type. This
1439            * method is only supported by the Liferay repository.
1440            *
1441            * @param groupId the primary key of the file entry type's group
1442            * @param fileEntryTypeId the primary key of the file entry type
1443            */
1444            public void subscribeFileEntryType(long groupId, long fileEntryTypeId)
1445                    throws PortalException;
1446    
1447            /**
1448            * Subscribe the user to document changes in the folder. This method is only
1449            * supported by the Liferay repository.
1450            *
1451            * @param groupId the primary key of the folder's group
1452            * @param folderId the primary key of the folder
1453            */
1454            public void subscribeFolder(long groupId, long folderId)
1455                    throws PortalException;
1456    
1457            /**
1458            * Unlocks the folder. This method is primarily used by WebDAV.
1459            *
1460            * @param repositoryId the primary key of the repository
1461            * @param folderId the primary key of the folder
1462            * @param lockUuid the lock's UUID
1463            */
1464            public void unlockFolder(long repositoryId, long folderId,
1465                    java.lang.String lockUuid) throws PortalException;
1466    
1467            /**
1468            * Unlocks the folder. This method is primarily used by WebDAV.
1469            *
1470            * @param repositoryId the primary key of the repository
1471            * @param parentFolderId the primary key of the parent folder
1472            * @param name the folder's name
1473            * @param lockUuid the lock's UUID
1474            */
1475            public void unlockFolder(long repositoryId, long parentFolderId,
1476                    java.lang.String name, java.lang.String lockUuid)
1477                    throws PortalException;
1478    
1479            /**
1480            * Unsubscribe the user from changes in documents of the file entry type.
1481            * This method is only supported by the Liferay repository.
1482            *
1483            * @param groupId the primary key of the file entry type's group
1484            * @param fileEntryTypeId the primary key of the file entry type
1485            */
1486            public void unsubscribeFileEntryType(long groupId, long fileEntryTypeId)
1487                    throws PortalException;
1488    
1489            /**
1490            * Unsubscribe the user from document changes in the folder. This method is
1491            * only supported by the Liferay repository.
1492            *
1493            * @param groupId the primary key of the folder's group
1494            * @param folderId the primary key of the folder
1495            */
1496            public void unsubscribeFolder(long groupId, long folderId)
1497                    throws PortalException;
1498    
1499            /**
1500            * Updates a file entry and associated metadata based on a byte array
1501            * object. If the file data is <code>null</code>, then only the associated
1502            * metadata (i.e., <code>title</code>, <code>description</code>, and
1503            * parameters in the <code>serviceContext</code>) will be updated.
1504            *
1505            * <p>
1506            * This method takes two file names, the <code>sourceFileName</code> and the
1507            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
1508            * name of the actual file being uploaded. The <code>title</code>
1509            * corresponds to a name the client wishes to assign this file after it has
1510            * been uploaded to the portal.
1511            * </p>
1512            *
1513            * @param fileEntryId the primary key of the file entry
1514            * @param sourceFileName the original file's name (optionally
1515            <code>null</code>)
1516            * @param mimeType the file's MIME type (optionally <code>null</code>)
1517            * @param title the new name to be assigned to the file (optionally <code>
1518            <code>null</code></code>)
1519            * @param description the file's new description
1520            * @param changeLog the file's version change log (optionally
1521            <code>null</code>)
1522            * @param majorVersion whether the new file version is a major version
1523            * @param bytes the file's data (optionally <code>null</code>)
1524            * @param serviceContext the service context to be applied. Can set the
1525            asset category IDs, asset tag names, and expando bridge
1526            attributes for the file entry. In a Liferay repository, it may
1527            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
1528            type </li> <li> fieldsMap - mapping for fields associated with a
1529            custom file entry type </li> </ul>
1530            * @return the file entry
1531            */
1532            public FileEntry updateFileEntry(long fileEntryId,
1533                    java.lang.String sourceFileName, java.lang.String mimeType,
1534                    java.lang.String title, java.lang.String description,
1535                    java.lang.String changeLog, boolean majorVersion, byte[] bytes,
1536                    ServiceContext serviceContext) throws PortalException;
1537    
1538            /**
1539            * Updates a file entry and associated metadata based on a {@link File}
1540            * object. If the file data is <code>null</code>, then only the associated
1541            * metadata (i.e., <code>title</code>, <code>description</code>, and
1542            * parameters in the <code>serviceContext</code>) will be updated.
1543            *
1544            * <p>
1545            * This method takes two file names, the <code>sourceFileName</code> and the
1546            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
1547            * name of the actual file being uploaded. The <code>title</code>
1548            * corresponds to a name the client wishes to assign this file after it has
1549            * been uploaded to the portal.
1550            * </p>
1551            *
1552            * @param fileEntryId the primary key of the file entry
1553            * @param sourceFileName the original file's name (optionally
1554            <code>null</code>)
1555            * @param mimeType the file's MIME type (optionally <code>null</code>)
1556            * @param title the new name to be assigned to the file (optionally <code>
1557            <code>null</code></code>)
1558            * @param description the file's new description
1559            * @param changeLog the file's version change log (optionally
1560            <code>null</code>)
1561            * @param majorVersion whether the new file version is a major version
1562            * @param file the file's data (optionally <code>null</code>)
1563            * @param serviceContext the service context to be applied. Can set the
1564            asset category IDs, asset tag names, and expando bridge
1565            attributes for the file entry. In a Liferay repository, it may
1566            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
1567            type </li> <li> fieldsMap - mapping for fields associated with a
1568            custom file entry type </li> </ul>
1569            * @return the file entry
1570            */
1571            public FileEntry updateFileEntry(long fileEntryId,
1572                    java.lang.String sourceFileName, java.lang.String mimeType,
1573                    java.lang.String title, java.lang.String description,
1574                    java.lang.String changeLog, boolean majorVersion, File file,
1575                    ServiceContext serviceContext) throws PortalException;
1576    
1577            /**
1578            * Updates a file entry and associated metadata based on an {@link
1579            * InputStream} object. If the file data is <code>null</code>, then only the
1580            * associated metadata (i.e., <code>title</code>, <code>description</code>,
1581            * and parameters in the <code>serviceContext</code>) will be updated.
1582            *
1583            * <p>
1584            * This method takes two file names, the <code>sourceFileName</code> and the
1585            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
1586            * name of the actual file being uploaded. The <code>title</code>
1587            * corresponds to a name the client wishes to assign this file after it has
1588            * been uploaded to the portal.
1589            * </p>
1590            *
1591            * @param fileEntryId the primary key of the file entry
1592            * @param sourceFileName the original file's name (optionally
1593            <code>null</code>)
1594            * @param mimeType the file's MIME type (optionally <code>null</code>)
1595            * @param title the new name to be assigned to the file (optionally <code>
1596            <code>null</code></code>)
1597            * @param description the file's new description
1598            * @param changeLog the file's version change log (optionally
1599            <code>null</code>)
1600            * @param majorVersion whether the new file version is a major version
1601            * @param is the file's data (optionally <code>null</code>)
1602            * @param size the file's size (optionally <code>0</code>)
1603            * @param serviceContext the service context to be applied. Can set the
1604            asset category IDs, asset tag names, and expando bridge
1605            attributes for the file entry. In a Liferay repository, it may
1606            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
1607            type </li> <li> fieldsMap - mapping for fields associated with a
1608            custom file entry type </li> </ul>
1609            * @return the file entry
1610            */
1611            public FileEntry updateFileEntry(long fileEntryId,
1612                    java.lang.String sourceFileName, java.lang.String mimeType,
1613                    java.lang.String title, java.lang.String description,
1614                    java.lang.String changeLog, boolean majorVersion, InputStream is,
1615                    long size, ServiceContext serviceContext) throws PortalException;
1616    
1617            public FileEntry updateFileEntryAndCheckIn(long fileEntryId,
1618                    java.lang.String sourceFileName, java.lang.String mimeType,
1619                    java.lang.String title, java.lang.String description,
1620                    java.lang.String changeLog, boolean majorVersion, File file,
1621                    ServiceContext serviceContext) throws PortalException;
1622    
1623            public FileEntry updateFileEntryAndCheckIn(long fileEntryId,
1624                    java.lang.String sourceFileName, java.lang.String mimeType,
1625                    java.lang.String title, java.lang.String description,
1626                    java.lang.String changeLog, boolean majorVersion, InputStream is,
1627                    long size, ServiceContext serviceContext) throws PortalException;
1628    
1629            /**
1630            * Updates a file shortcut to the existing file entry. This method is only
1631            * supported by the Liferay repository.
1632            *
1633            * @param fileShortcutId the primary key of the file shortcut
1634            * @param folderId the primary key of the file shortcut's parent folder
1635            * @param toFileEntryId the primary key of the file shortcut's file entry
1636            * @param serviceContext the service context to be applied. Can set the
1637            asset category IDs, asset tag names, and expando bridge
1638            attributes for the file entry.
1639            * @return the file shortcut
1640            */
1641            public FileShortcut updateFileShortcut(long fileShortcutId, long folderId,
1642                    long toFileEntryId, ServiceContext serviceContext)
1643                    throws PortalException;
1644    
1645            /**
1646            * Updates the folder.
1647            *
1648            * @param folderId the primary key of the folder
1649            * @param name the folder's new name
1650            * @param description the folder's new description
1651            * @param serviceContext the service context to be applied. In a Liferay
1652            repository, it may include:  <ul> <li> defaultFileEntryTypeId -
1653            the file entry type to default all Liferay file entries to </li>
1654            <li> dlFileEntryTypesSearchContainerPrimaryKeys - a
1655            comma-delimited list of file entry type primary keys allowed in
1656            the given folder and all descendants </li> <li> restrictionType -
1657            specifying restriction type of file entry types allowed </li>
1658            <li> workflowDefinitionXYZ - the workflow definition name
1659            specified per file entry type. The parameter name must be the
1660            string <code>workflowDefinition</code> appended by the
1661            <code>fileEntryTypeId</code> (optionally <code>0</code>).</li>
1662            </ul>
1663            * @return the folder
1664            */
1665            public Folder updateFolder(long folderId, java.lang.String name,
1666                    java.lang.String description, ServiceContext serviceContext)
1667                    throws PortalException;
1668    
1669            /**
1670            * Returns <code>true</code> if the file entry is checked out. This method
1671            * is primarily used by WebDAV.
1672            *
1673            * @param repositoryId the primary key for the repository
1674            * @param fileEntryId the primary key for the file entry
1675            * @param lockUuid the lock's UUID
1676            * @return <code>true</code> if the file entry is checked out;
1677            <code>false</code> otherwise
1678            */
1679            public boolean verifyFileEntryCheckOut(long repositoryId, long fileEntryId,
1680                    java.lang.String lockUuid) throws PortalException;
1681    
1682            public boolean verifyFileEntryLock(long repositoryId, long fileEntryId,
1683                    java.lang.String lockUuid) throws PortalException;
1684    
1685            /**
1686            * Returns <code>true</code> if the inheritable lock exists. This method is
1687            * primarily used by WebDAV.
1688            *
1689            * @param repositoryId the primary key for the repository
1690            * @param folderId the primary key for the folder
1691            * @param lockUuid the lock's UUID
1692            * @return <code>true</code> if the inheritable lock exists;
1693            <code>false</code> otherwise
1694            */
1695            public boolean verifyInheritableLock(long repositoryId, long folderId,
1696                    java.lang.String lockUuid) throws PortalException;
1697    }