001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.documentlibrary.service;
016    
017    import com.liferay.portal.kernel.exception.PortalException;
018    import com.liferay.portal.kernel.exception.SystemException;
019    import com.liferay.portal.kernel.transaction.Isolation;
020    import com.liferay.portal.kernel.transaction.Propagation;
021    import com.liferay.portal.kernel.transaction.Transactional;
022    
023    /**
024     * The interface for the d l app local service.
025     *
026     * <p>
027     * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see DLAppLocalServiceUtil
032     * @see com.liferay.portlet.documentlibrary.service.base.DLAppLocalServiceBaseImpl
033     * @see com.liferay.portlet.documentlibrary.service.impl.DLAppLocalServiceImpl
034     * @generated
035     */
036    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
037            PortalException.class, SystemException.class})
038    public interface DLAppLocalService {
039            /*
040             * NOTE FOR DEVELOPERS:
041             *
042             * Never modify or reference this interface directly. Always use {@link DLAppLocalServiceUtil} to access the d l app local service. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLAppLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
043             */
044    
045            /**
046            * Returns the Spring bean ID for this bean.
047            *
048            * @return the Spring bean ID for this bean
049            */
050            public java.lang.String getBeanIdentifier();
051    
052            /**
053            * Sets the Spring bean ID for this bean.
054            *
055            * @param beanIdentifier the Spring bean ID for this bean
056            */
057            public void setBeanIdentifier(java.lang.String beanIdentifier);
058    
059            /**
060            * Adds a file entry and associated metadata based on a byte array.
061            *
062            * <p>
063            * This method takes two file names, the <code>sourceFileName</code> and the
064            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
065            * name of the actual file being uploaded. The <code>title</code>
066            * corresponds to a name the client wishes to assign this file after it has
067            * been uploaded to the portal. If it is <code>null</code>, the <code>
068            * sourceFileName</code> will be used.
069            * </p>
070            *
071            * @param userId the primary key of the file entry's creator/owner
072            * @param repositoryId the primary key of the file entry's repository
073            * @param folderId the primary key of the file entry's parent folder
074            * @param sourceFileName the original file's name
075            * @param mimeType the file's MIME type
076            * @param title the name to be assigned to the file (optionally <code>null
077            </code>)
078            * @param description the file's description
079            * @param changeLog the file's version change log
080            * @param bytes the file's data (optionally <code>null</code>)
081            * @param serviceContext the service context to be applied. Can set the
082            asset category IDs, asset tag names, and expando bridge
083            attributes for the file entry. In a Liferay repository, it may
084            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
085            type </li> <li> fieldsMap - mapping for fields associated with a
086            custom file entry type </li> </ul>
087            * @return the file entry
088            * @throws PortalException if the parent folder could not be found or if the
089            file entry's information was invalid
090            * @throws SystemException if a system exception occurred
091            */
092            public com.liferay.portal.kernel.repository.model.FileEntry addFileEntry(
093                    long userId, long repositoryId, long folderId,
094                    java.lang.String sourceFileName, java.lang.String mimeType,
095                    java.lang.String title, java.lang.String description,
096                    java.lang.String changeLog, byte[] bytes,
097                    com.liferay.portal.service.ServiceContext serviceContext)
098                    throws com.liferay.portal.kernel.exception.PortalException,
099                            com.liferay.portal.kernel.exception.SystemException;
100    
101            /**
102            * Adds a file entry and associated metadata based on a {@link File} object.
103            *
104            * <p>
105            * This method takes two file names, the <code>sourceFileName</code> and the
106            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
107            * name of the actual file being uploaded. The <code>title</code>
108            * corresponds to a name the client wishes to assign this file after it has
109            * been uploaded to the portal. If it is <code>null</code>, the <code>
110            * sourceFileName</code> will be used.
111            * </p>
112            *
113            * @param userId the primary key of the file entry's creator/owner
114            * @param repositoryId the primary key of the repository
115            * @param folderId the primary key of the file entry's parent folder
116            * @param sourceFileName the original file's name
117            * @param mimeType the file's MIME type
118            * @param title the name to be assigned to the file (optionally <code>null
119            </code>)
120            * @param description the file's description
121            * @param changeLog the file's version change log
122            * @param file the file's data (optionally <code>null</code>)
123            * @param serviceContext the service context to be applied. Can set the
124            asset category IDs, asset tag names, and expando bridge
125            attributes for the file entry. In a Liferay repository, it may
126            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
127            type </li> <li> fieldsMap - mapping for fields associated with a
128            custom file entry type </li> </ul>
129            * @return the file entry
130            * @throws PortalException if the parent folder could not be found or if the
131            file entry's information was invalid
132            * @throws SystemException if a system exception occurred
133            */
134            public com.liferay.portal.kernel.repository.model.FileEntry addFileEntry(
135                    long userId, long repositoryId, long folderId,
136                    java.lang.String sourceFileName, java.lang.String mimeType,
137                    java.lang.String title, java.lang.String description,
138                    java.lang.String changeLog, java.io.File file,
139                    com.liferay.portal.service.ServiceContext serviceContext)
140                    throws com.liferay.portal.kernel.exception.PortalException,
141                            com.liferay.portal.kernel.exception.SystemException;
142    
143            /**
144            * Adds a file entry and associated metadata based on an {@link InputStream}
145            * object.
146            *
147            * <p>
148            * This method takes two file names, the <code>sourceFileName</code> and the
149            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
150            * name of the actual file being uploaded. The <code>title</code>
151            * corresponds to a name the client wishes to assign this file after it has
152            * been uploaded to the portal. If it is <code>null</code>, the <code>
153            * sourceFileName</code> will be used.
154            * </p>
155            *
156            * @param userId the primary key of the file entry's creator/owner
157            * @param repositoryId the primary key of the repository
158            * @param folderId the primary key of the file entry's parent folder
159            * @param sourceFileName the original file's name
160            * @param mimeType the file's MIME type
161            * @param title the name to be assigned to the file (optionally <code>null
162            </code>)
163            * @param description the file's description
164            * @param changeLog the file's version change log
165            * @param is the file's data (optionally <code>null</code>)
166            * @param size the file's size (optionally <code>0</code>)
167            * @param serviceContext the service context to be applied. Can set the
168            asset category IDs, asset tag names, and expando bridge
169            attributes for the file entry. In a Liferay repository, it may
170            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
171            type </li> <li> fieldsMap - mapping for fields associated with a
172            custom file entry type </li> </ul>
173            * @return the file entry
174            * @throws PortalException if the parent folder could not be found or if the
175            file entry's information was invalid
176            * @throws SystemException if a system exception occurred
177            */
178            public com.liferay.portal.kernel.repository.model.FileEntry addFileEntry(
179                    long userId, long repositoryId, long folderId,
180                    java.lang.String sourceFileName, java.lang.String mimeType,
181                    java.lang.String title, java.lang.String description,
182                    java.lang.String changeLog, java.io.InputStream is, long size,
183                    com.liferay.portal.service.ServiceContext serviceContext)
184                    throws com.liferay.portal.kernel.exception.PortalException,
185                            com.liferay.portal.kernel.exception.SystemException;
186    
187            /**
188            * Adds the file rank to the existing file entry. This method is only
189            * supported by the Liferay repository.
190            *
191            * @param repositoryId the primary key of the repository
192            * @param companyId the primary key of the company
193            * @param userId the primary key of the file rank's creator/owner
194            * @param fileEntryId the primary key of the file entry
195            * @param serviceContext the service context to be applied
196            * @return the file rank
197            * @throws SystemException if a system exception occurred
198            */
199            public com.liferay.portlet.documentlibrary.model.DLFileRank addFileRank(
200                    long repositoryId, long companyId, long userId, long fileEntryId,
201                    com.liferay.portal.service.ServiceContext serviceContext)
202                    throws com.liferay.portal.kernel.exception.SystemException;
203    
204            /**
205            * Adds the file shortcut to the existing file entry. This method is only
206            * supported by the Liferay repository.
207            *
208            * @param userId the primary key of the file shortcut's creator/owner
209            * @param repositoryId the primary key of the repository
210            * @param folderId the primary key of the file shortcut's parent folder
211            * @param toFileEntryId the primary key of the file entry to point to
212            * @param serviceContext the service context to be applied. Can set the
213            asset category IDs, asset tag names, and expando bridge
214            attributes for the file entry.
215            * @return the file shortcut
216            * @throws PortalException if the parent folder or file entry could not be
217            found, or if the file shortcut's information was invalid
218            * @throws SystemException if a system exception occurred
219            */
220            public com.liferay.portlet.documentlibrary.model.DLFileShortcut addFileShortcut(
221                    long userId, long repositoryId, long folderId, long toFileEntryId,
222                    com.liferay.portal.service.ServiceContext serviceContext)
223                    throws com.liferay.portal.kernel.exception.PortalException,
224                            com.liferay.portal.kernel.exception.SystemException;
225    
226            /**
227            * Adds a folder.
228            *
229            * @param userId the primary key of the folder's creator/owner
230            * @param repositoryId the primary key of the repository
231            * @param parentFolderId the primary key of the folder's parent folder
232            * @param name the folder's name
233            * @param description the folder's description
234            * @param serviceContext the service context to be applied. In a Liferay
235            repository, it may include mountPoint which is a boolean
236            specifying whether the folder is a facade for mounting a
237            third-party repository
238            * @return the folder
239            * @throws PortalException if the parent folder could not be found or if the
240            new folder's information was invalid
241            * @throws SystemException if a system exception occurred
242            */
243            public com.liferay.portal.kernel.repository.model.Folder addFolder(
244                    long userId, long repositoryId, long parentFolderId,
245                    java.lang.String name, java.lang.String description,
246                    com.liferay.portal.service.ServiceContext serviceContext)
247                    throws com.liferay.portal.kernel.exception.PortalException,
248                            com.liferay.portal.kernel.exception.SystemException;
249    
250            /**
251            * Delete all data associated to the given repository. This method is only
252            * supported by the Liferay repository.
253            *
254            * @param repositoryId the primary key of the data's repository
255            * @throws PortalException if the repository could not be found
256            * @throws SystemException if a system exception occurred
257            */
258            public void deleteAll(long repositoryId)
259                    throws com.liferay.portal.kernel.exception.PortalException,
260                            com.liferay.portal.kernel.exception.SystemException;
261    
262            /**
263            * Deletes the file entry.
264            *
265            * @param fileEntryId the primary key of the file entry
266            * @throws PortalException if the file entry could not be found
267            * @throws SystemException if a system exception occurred
268            */
269            public void deleteFileEntry(long fileEntryId)
270                    throws com.liferay.portal.kernel.exception.PortalException,
271                            com.liferay.portal.kernel.exception.SystemException;
272    
273            /**
274            * Deletes the file ranks associated to a given file entry. This method is
275            * only supported by the Liferay repository.
276            *
277            * @param fileEntryId the primary key of the file entry
278            * @throws SystemException if a system exception occurred
279            */
280            public void deleteFileRanksByFileEntryId(long fileEntryId)
281                    throws com.liferay.portal.kernel.exception.SystemException;
282    
283            /**
284            * Deletes the file ranks associated to a given user. This method is only
285            * supported by the Liferay repository.
286            *
287            * @param userId the primary key of the user
288            * @throws SystemException if a system exception occurred
289            */
290            public void deleteFileRanksByUserId(long userId)
291                    throws com.liferay.portal.kernel.exception.SystemException;
292    
293            /**
294            * Deletes the file shortcut. This method is only supported by the Liferay
295            * repository.
296            *
297            * @param dlFileShortcut the file shortcut
298            * @throws PortalException if the file shortcut could not be found
299            * @throws SystemException if a system exception occurred
300            */
301            public void deleteFileShortcut(
302                    com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut)
303                    throws com.liferay.portal.kernel.exception.PortalException,
304                            com.liferay.portal.kernel.exception.SystemException;
305    
306            /**
307            * Deletes the file shortcut. This method is only supported by the Liferay
308            * repository.
309            *
310            * @param fileShortcutId the primary key of the file shortcut
311            * @throws PortalException if the file shortcut could not be found
312            * @throws SystemException if a system exception occurred
313            */
314            public void deleteFileShortcut(long fileShortcutId)
315                    throws com.liferay.portal.kernel.exception.PortalException,
316                            com.liferay.portal.kernel.exception.SystemException;
317    
318            /**
319            * Deletes all file shortcuts associated to the file entry. This method is
320            * only supported by the Liferay repository.
321            *
322            * @param toFileEntryId the primary key of the associated file entry
323            * @throws PortalException if the file shortcut for the file entry could not
324            be found
325            * @throws SystemException if a system exception occurred
326            */
327            public void deleteFileShortcuts(long toFileEntryId)
328                    throws com.liferay.portal.kernel.exception.PortalException,
329                            com.liferay.portal.kernel.exception.SystemException;
330    
331            /**
332            * Deletes the folder and all of its subfolders and file entries.
333            *
334            * @param folderId the primary key of the folder
335            * @throws PortalException if the folder could not be found
336            * @throws SystemException if a system exception occurred
337            */
338            public void deleteFolder(long folderId)
339                    throws com.liferay.portal.kernel.exception.PortalException,
340                            com.liferay.portal.kernel.exception.SystemException;
341    
342            /**
343            * Returns the file entries in the folder.
344            *
345            * @param repositoryId the primary key of the file entry's repository
346            * @param folderId the primary key of the file entry's folder
347            * @return the file entries in the folder
348            * @throws PortalException if the folder could not be found
349            * @throws SystemException if a system exception occurred
350            */
351            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
352            public java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getFileEntries(
353                    long repositoryId, long folderId)
354                    throws com.liferay.portal.kernel.exception.PortalException,
355                            com.liferay.portal.kernel.exception.SystemException;
356    
357            /**
358            * Returns a range of all the file entries in the folder.
359            *
360            * <p>
361            * Useful when paginating results. Returns a maximum of <code>end -
362            * start</code> instances. <code>start</code> and <code>end</code> are not
363            * primary keys, they are indexes in the result set. Thus, <code>0</code>
364            * refers to the first result in the set. Setting both <code>start</code>
365            * and <code>end</code> to {@link
366            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
367            * result set.
368            * </p>
369            *
370            * @param repositoryId the primary key of the file entry's repository
371            * @param folderId the primary key of the file entry's folder
372            * @param start the lower bound of the range of results
373            * @param end the upper bound of the range of results (not inclusive)
374            * @return the range of file entries in the folder
375            * @throws PortalException if the folder could not be found
376            * @throws SystemException if a system exception occurred
377            */
378            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
379            public java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getFileEntries(
380                    long repositoryId, long folderId, int start, int end)
381                    throws com.liferay.portal.kernel.exception.PortalException,
382                            com.liferay.portal.kernel.exception.SystemException;
383    
384            /**
385            * Returns an ordered range of all the file entries in the folder.
386            *
387            * <p>
388            * Useful when paginating results. Returns a maximum of <code>end -
389            * start</code> instances. <code>start</code> and <code>end</code> are not
390            * primary keys, they are indexes in the result set. Thus, <code>0</code>
391            * refers to the first result in the set. Setting both <code>start</code>
392            * and <code>end</code> to {@link
393            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
394            * result set.
395            * </p>
396            *
397            * @param repositoryId the primary key of the file entry's repository
398            * @param folderId the primary key of the file entry's folder
399            * @param start the lower bound of the range of results
400            * @param end the upper bound of the range of results (not inclusive)
401            * @param obc the comparator to order the file entries (optionally
402            <code>null</code>)
403            * @return the range of file entries in the folder ordered by comparator
404            <code>obc</code>
405            * @throws PortalException if the folder could not be found
406            * @throws SystemException if a system exception occurred
407            */
408            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
409            public java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getFileEntries(
410                    long repositoryId, long folderId, int start, int end,
411                    com.liferay.portal.kernel.util.OrderByComparator obc)
412                    throws com.liferay.portal.kernel.exception.PortalException,
413                            com.liferay.portal.kernel.exception.SystemException;
414    
415            /**
416            * Returns a range of all the file entries and shortcuts in the folder.
417            *
418            * <p>
419            * Useful when paginating results. Returns a maximum of <code>end -
420            * start</code> instances. <code>start</code> and <code>end</code> are not
421            * primary keys, they are indexes in the result set. Thus, <code>0</code>
422            * refers to the first result in the set. Setting both <code>start</code>
423            * and <code>end</code> to {@link
424            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
425            * result set.
426            * </p>
427            *
428            * @param repositoryId the primary key of the repository
429            * @param folderId the primary key of the folder
430            * @param status the workflow status
431            * @param start the lower bound of the range of results
432            * @param end the upper bound of the range of results (not inclusive)
433            * @return the range of file entries and shortcuts in the folder
434            * @throws PortalException if the folder could not be found
435            * @throws SystemException if a system exception occurred
436            */
437            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
438            public java.util.List<java.lang.Object> getFileEntriesAndFileShortcuts(
439                    long repositoryId, long folderId, int status, int start, int end)
440                    throws com.liferay.portal.kernel.exception.PortalException,
441                            com.liferay.portal.kernel.exception.SystemException;
442    
443            /**
444            * Returns the number of file entries and shortcuts in the folder.
445            *
446            * @param repositoryId the primary key of the repository
447            * @param folderId the primary key of the folder
448            * @param status the workflow status
449            * @return the number of file entries and shortcuts in the folder
450            * @throws PortalException if the folder could not be found
451            * @throws SystemException if a system exception occurred
452            */
453            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
454            public int getFileEntriesAndFileShortcutsCount(long repositoryId,
455                    long folderId, int status)
456                    throws com.liferay.portal.kernel.exception.PortalException,
457                            com.liferay.portal.kernel.exception.SystemException;
458    
459            /**
460            * Returns the number of file entries in the folder.
461            *
462            * @param repositoryId the primary key of the file entry's repository
463            * @param folderId the primary key of the file entry's folder
464            * @return the number of file entries in the folder
465            * @throws PortalException if the folder could not be found
466            * @throws SystemException if a system exception occurred
467            */
468            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
469            public int getFileEntriesCount(long repositoryId, long folderId)
470                    throws com.liferay.portal.kernel.exception.PortalException,
471                            com.liferay.portal.kernel.exception.SystemException;
472    
473            /**
474            * Returns the file entry with the primary key.
475            *
476            * @param fileEntryId the primary key of the file entry
477            * @return the file entry with the primary key
478            * @throws PortalException if the file entry could not be found
479            * @throws SystemException if a system exception occurred
480            */
481            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
482            public com.liferay.portal.kernel.repository.model.FileEntry getFileEntry(
483                    long fileEntryId)
484                    throws com.liferay.portal.kernel.exception.PortalException,
485                            com.liferay.portal.kernel.exception.SystemException;
486    
487            /**
488            * Returns the file entry with the title in the folder.
489            *
490            * @param groupId the primary key of the file entry's group
491            * @param folderId the primary key of the file entry's folder
492            * @param title the file entry's title
493            * @return the file entry with the title in the folder
494            * @throws PortalException if the file entry could not be found
495            * @throws SystemException if a system exception occurred
496            */
497            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
498            public com.liferay.portal.kernel.repository.model.FileEntry getFileEntry(
499                    long groupId, long folderId, java.lang.String title)
500                    throws com.liferay.portal.kernel.exception.PortalException,
501                            com.liferay.portal.kernel.exception.SystemException;
502    
503            /**
504            * Returns the file entry with the UUID and group.
505            *
506            * @param uuid the file entry's universally unique identifier
507            * @param groupId the primary key of the file entry's group
508            * @return the file entry with the UUID and group
509            * @throws PortalException if the file entry could not be found
510            * @throws SystemException if a system exception occurred
511            */
512            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
513            public com.liferay.portal.kernel.repository.model.FileEntry getFileEntryByUuidAndGroupId(
514                    java.lang.String uuid, long groupId)
515                    throws com.liferay.portal.kernel.exception.PortalException,
516                            com.liferay.portal.kernel.exception.SystemException;
517    
518            /**
519            * Returns the file ranks from the user. This method is only supported by
520            * the Liferay repository.
521            *
522            * @param repositoryId the primary key of the repository
523            * @param userId the primary key of the user
524            * @return the file ranks from the user
525            * @throws SystemException if a system exception occurred
526            */
527            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
528            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> getFileRanks(
529                    long repositoryId, long userId)
530                    throws com.liferay.portal.kernel.exception.SystemException;
531    
532            /**
533            * Returns the file shortcut with the primary key. This method is only
534            * supported by the Liferay repository.
535            *
536            * @param fileShortcutId the primary key of the file shortcut
537            * @return the file shortcut with the primary key
538            * @throws PortalException if the file shortcut could not be found
539            * @throws SystemException if a system exception occurred
540            */
541            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
542            public com.liferay.portlet.documentlibrary.model.DLFileShortcut getFileShortcut(
543                    long fileShortcutId)
544                    throws com.liferay.portal.kernel.exception.PortalException,
545                            com.liferay.portal.kernel.exception.SystemException;
546    
547            /**
548            * Returns the file version with the primary key.
549            *
550            * @param fileVersionId the primary key of the file version
551            * @return the file version with the primary key
552            * @throws PortalException if the file version could not be found
553            * @throws SystemException if a system exception occurred
554            */
555            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
556            public com.liferay.portal.kernel.repository.model.FileVersion getFileVersion(
557                    long fileVersionId)
558                    throws com.liferay.portal.kernel.exception.PortalException,
559                            com.liferay.portal.kernel.exception.SystemException;
560    
561            /**
562            * Returns the folder with the primary key.
563            *
564            * @param folderId the primary key of the folder
565            * @return the folder with the primary key
566            * @throws PortalException if the folder could not be found
567            * @throws SystemException if a system exception occurred
568            */
569            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
570            public com.liferay.portal.kernel.repository.model.Folder getFolder(
571                    long folderId)
572                    throws com.liferay.portal.kernel.exception.PortalException,
573                            com.liferay.portal.kernel.exception.SystemException;
574    
575            /**
576            * Returns the folder with the name in the parent folder.
577            *
578            * @param repositoryId the primary key of the folder's repository
579            * @param parentFolderId the primary key of the folder's parent folder
580            * @param name the folder's name
581            * @return the folder with the name in the parent folder
582            * @throws PortalException if the folder could not be found
583            * @throws SystemException if a system exception occurred
584            */
585            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
586            public com.liferay.portal.kernel.repository.model.Folder getFolder(
587                    long repositoryId, long parentFolderId, java.lang.String name)
588                    throws com.liferay.portal.kernel.exception.PortalException,
589                            com.liferay.portal.kernel.exception.SystemException;
590    
591            /**
592            * Returns all immediate subfolders of the parent folder.
593            *
594            * @param repositoryId the primary key of the folder's repository
595            * @param parentFolderId the primary key of the folder's parent folder
596            * @return the immediate subfolders of the parent folder
597            * @throws PortalException if the parent folder could not be found
598            * @throws SystemException if a system exception occurred
599            */
600            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
601            public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders(
602                    long repositoryId, long parentFolderId)
603                    throws com.liferay.portal.kernel.exception.PortalException,
604                            com.liferay.portal.kernel.exception.SystemException;
605    
606            /**
607            * Returns all immediate subfolders of the parent folder, optionally
608            * including mount folders for third-party repositories.
609            *
610            * @param repositoryId the primary key of the folder's repository
611            * @param parentFolderId the primary key of the folder's parent folder
612            * @param includeMountFolders whether to include mount folders for
613            third-party repositories
614            * @return the immediate subfolders of the parent folder
615            * @throws PortalException if the parent folder could not be found
616            * @throws SystemException if a system exception occurred
617            */
618            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
619            public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders(
620                    long repositoryId, long parentFolderId, boolean includeMountFolders)
621                    throws com.liferay.portal.kernel.exception.PortalException,
622                            com.liferay.portal.kernel.exception.SystemException;
623    
624            /**
625            * Returns a range of all the immediate subfolders of the parent folder,
626            * optionally including mount folders for third-party repositories.
627            *
628            * <p>
629            * Useful when paginating results. Returns a maximum of <code>end -
630            * start</code> instances. <code>start</code> and <code>end</code> are not
631            * primary keys, they are indexes in the result set. Thus, <code>0</code>
632            * refers to the first result in the set. Setting both <code>start</code>
633            * and <code>end</code> to {@link
634            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
635            * result set.
636            * </p>
637            *
638            * @param repositoryId the primary key of the folder's repository
639            * @param parentFolderId the primary key of the folder's parent folder
640            * @param includeMountFolders whether to include mount folders for
641            third-party repositories
642            * @param start the lower bound of the range of results
643            * @param end the upper bound of the range of results (not inclusive)
644            * @return the range of immediate subfolders of the parent folder
645            * @throws PortalException if the parent folder could not be found
646            * @throws SystemException if a system exception occurred
647            */
648            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
649            public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders(
650                    long repositoryId, long parentFolderId, boolean includeMountFolders,
651                    int start, int end)
652                    throws com.liferay.portal.kernel.exception.PortalException,
653                            com.liferay.portal.kernel.exception.SystemException;
654    
655            /**
656            * Returns an ordered range of all the immediate subfolders of the parent
657            * folder.
658            *
659            * <p>
660            * Useful when paginating results. Returns a maximum of <code>end -
661            * start</code> instances. <code>start</code> and <code>end</code> are not
662            * primary keys, they are indexes in the result set. Thus, <code>0</code>
663            * refers to the first result in the set. Setting both <code>start</code>
664            * and <code>end</code> to {@link
665            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
666            * result set.
667            * </p>
668            *
669            * @param repositoryId the primary key of the folder's repository
670            * @param parentFolderId the primary key of the folder's parent folder
671            * @param includeMountFolders whether to include mount folders for
672            third-party repositories
673            * @param start the lower bound of the range of results
674            * @param end the upper bound of the range of results (not inclusive)
675            * @param obc the comparator to order the folders (optionally
676            <code>null</code>)
677            * @return the range of immediate subfolders of the parent folder ordered by
678            comparator <code>obc</code>
679            * @throws PortalException if the parent folder could not be found
680            * @throws SystemException if a system exception occurred
681            */
682            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
683            public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders(
684                    long repositoryId, long parentFolderId, boolean includeMountFolders,
685                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
686                    throws com.liferay.portal.kernel.exception.PortalException,
687                            com.liferay.portal.kernel.exception.SystemException;
688    
689            /**
690            * Returns a range of all the immediate subfolders of the parent folder.
691            *
692            * <p>
693            * Useful when paginating results. Returns a maximum of <code>end -
694            * start</code> instances. <code>start</code> and <code>end</code> are not
695            * primary keys, they are indexes in the result set. Thus, <code>0</code>
696            * refers to the first result in the set. Setting both <code>start</code>
697            * and <code>end</code> to {@link
698            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
699            * result set.
700            * </p>
701            *
702            * @param repositoryId the primary key of the folder's repository
703            * @param parentFolderId the primary key of the folder's parent folder
704            * @param start the lower bound of the range of results
705            * @param end the upper bound of the range of results (not inclusive)
706            * @return the range of immediate subfolders of the parent folder
707            * @throws PortalException if the parent folder could not be found
708            * @throws SystemException if a system exception occurred
709            */
710            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
711            public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders(
712                    long repositoryId, long parentFolderId, int start, int end)
713                    throws com.liferay.portal.kernel.exception.PortalException,
714                            com.liferay.portal.kernel.exception.SystemException;
715    
716            /**
717            * Returns an ordered range of all the immediate subfolders of the parent
718            * folder.
719            *
720            * <p>
721            * Useful when paginating results. Returns a maximum of <code>end -
722            * start</code> instances. <code>start</code> and <code>end</code> are not
723            * primary keys, they are indexes in the result set. Thus, <code>0</code>
724            * refers to the first result in the set. Setting both <code>start</code>
725            * and <code>end</code> to {@link
726            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
727            * result set.
728            * </p>
729            *
730            * @param repositoryId the primary key of the folder's repository
731            * @param parentFolderId the primary key of the folder's parent folder
732            * @param start the lower bound of the range of results
733            * @param end the upper bound of the range of results (not inclusive)
734            * @param obc the comparator to order the folders (optionally
735            <code>null</code>)
736            * @return the range of immediate subfolders of the parent folder ordered by
737            comparator <code>obc</code>
738            * @throws PortalException if the parent folder could not be found
739            * @throws SystemException if a system exception occurred
740            */
741            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
742            public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders(
743                    long repositoryId, long parentFolderId, int start, int end,
744                    com.liferay.portal.kernel.util.OrderByComparator obc)
745                    throws com.liferay.portal.kernel.exception.PortalException,
746                            com.liferay.portal.kernel.exception.SystemException;
747    
748            /**
749            * Returns an ordered range of all the immediate subfolders, file entries,
750            * and file shortcuts in the parent folder.
751            *
752            * <p>
753            * Useful when paginating results. Returns a maximum of <code>end -
754            * start</code> instances. <code>start</code> and <code>end</code> are not
755            * primary keys, they are indexes in the result set. Thus, <code>0</code>
756            * refers to the first result in the set. Setting both <code>start</code>
757            * and <code>end</code> to {@link
758            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
759            * result set.
760            * </p>
761            *
762            * @param repositoryId the primary key of the repository
763            * @param folderId the primary key of the parent folder
764            * @param status the workflow status
765            * @param includeMountFolders whether to include mount folders for
766            third-party repositories
767            * @param start the lower bound of the range of results
768            * @param end the upper bound of the range of results (not inclusive)
769            * @param obc the comparator to order the results (optionally
770            <code>null</code>)
771            * @return the range of immediate subfolders, file entries, and file
772            shortcuts in the parent folder ordered by comparator
773            <code>obc</code>
774            * @throws PortalException if the folder could not be found
775            * @throws SystemException if a system exception occurred
776            */
777            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
778            public java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
779                    long repositoryId, long folderId, int status,
780                    boolean includeMountFolders, int start, int end,
781                    com.liferay.portal.kernel.util.OrderByComparator obc)
782                    throws com.liferay.portal.kernel.exception.PortalException,
783                            com.liferay.portal.kernel.exception.SystemException;
784    
785            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
786            public java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
787                    long repositoryId, long folderId, int status,
788                    java.lang.String[] mimeTypes, boolean includeMountFolders, int start,
789                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
790                    throws com.liferay.portal.kernel.exception.PortalException,
791                            com.liferay.portal.kernel.exception.SystemException;
792    
793            /**
794            * Returns the number of immediate subfolders, file entries, and file
795            * shortcuts in the parent folder.
796            *
797            * @param repositoryId the primary key of the repository
798            * @param folderId the primary key of the parent folder
799            * @param status the workflow status
800            * @param includeMountFolders whether to include mount folders for
801            third-party repositories
802            * @return the number of immediate subfolders, file entries, and file
803            shortcuts in the parent folder
804            * @throws PortalException if the folder could not be found
805            * @throws SystemException if a system exception occurred
806            */
807            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
808            public int getFoldersAndFileEntriesAndFileShortcutsCount(
809                    long repositoryId, long folderId, int status,
810                    boolean includeMountFolders)
811                    throws com.liferay.portal.kernel.exception.PortalException,
812                            com.liferay.portal.kernel.exception.SystemException;
813    
814            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
815            public int getFoldersAndFileEntriesAndFileShortcutsCount(
816                    long repositoryId, long folderId, int status,
817                    java.lang.String[] mimeTypes, boolean includeMountFolders)
818                    throws com.liferay.portal.kernel.exception.PortalException,
819                            com.liferay.portal.kernel.exception.SystemException;
820    
821            /**
822            * Returns the number of immediate subfolders of the parent folder.
823            *
824            * @param repositoryId the primary key of the folder's repository
825            * @param parentFolderId the primary key of the folder's parent folder
826            * @return the number of immediate subfolders of the parent folder
827            * @throws PortalException if the parent folder could not be found
828            * @throws SystemException if a system exception occurred
829            */
830            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
831            public int getFoldersCount(long repositoryId, long parentFolderId)
832                    throws com.liferay.portal.kernel.exception.PortalException,
833                            com.liferay.portal.kernel.exception.SystemException;
834    
835            /**
836            * Returns the number of immediate subfolders of the parent folder,
837            * optionally including mount folders for third-party repositories.
838            *
839            * @param repositoryId the primary key of the folder's repository
840            * @param parentFolderId the primary key of the folder's parent folder
841            * @param includeMountFolders whether to include mount folders for
842            third-party repositories
843            * @return the number of immediate subfolders of the parent folder
844            * @throws PortalException if the parent folder could not be found
845            * @throws SystemException if a system exception occurred
846            */
847            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
848            public int getFoldersCount(long repositoryId, long parentFolderId,
849                    boolean includeMountFolders)
850                    throws com.liferay.portal.kernel.exception.PortalException,
851                            com.liferay.portal.kernel.exception.SystemException;
852    
853            /**
854            * Returns the number of immediate subfolders and file entries across the
855            * folders.
856            *
857            * @param repositoryId the primary key of the repository
858            * @param folderIds the primary keys of folders from which to count
859            immediate subfolders and file entries
860            * @param status the workflow status
861            * @return the number of immediate subfolders and file entries across the
862            folders
863            * @throws PortalException if the repository could not be found
864            * @throws SystemException if a system exception occurred
865            */
866            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
867            public int getFoldersFileEntriesCount(long repositoryId,
868                    java.util.List<java.lang.Long> folderIds, int status)
869                    throws com.liferay.portal.kernel.exception.PortalException,
870                            com.liferay.portal.kernel.exception.SystemException;
871    
872            /**
873            * Returns the mount folder of the repository with the primary key. This
874            * method is only supported by the Liferay repository.
875            *
876            * @param repositoryId the primary key of the repository
877            * @return the folder used for mounting third-party repositories
878            * @throws PortalException if the repository or mount folder could not be
879            found
880            * @throws SystemException if a system exception occurred
881            */
882            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
883            public com.liferay.portal.kernel.repository.model.Folder getMountFolder(
884                    long repositoryId)
885                    throws com.liferay.portal.kernel.exception.PortalException,
886                            com.liferay.portal.kernel.exception.SystemException;
887    
888            /**
889            * Returns all immediate subfolders of the parent folder that are used for
890            * mounting third-party repositories. This method is only supported by the
891            * Liferay repository.
892            *
893            * @param repositoryId the primary key of the folder's repository
894            * @param parentFolderId the primary key of the folder's parent folder
895            * @return the immediate subfolders of the parent folder that are used for
896            mounting third-party repositories
897            * @throws PortalException if the repository or parent folder could not be
898            found
899            * @throws SystemException if a system exception occurred
900            */
901            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
902            public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getMountFolders(
903                    long repositoryId, long parentFolderId)
904                    throws com.liferay.portal.kernel.exception.PortalException,
905                            com.liferay.portal.kernel.exception.SystemException;
906    
907            /**
908            * Returns a range of all the immediate subfolders of the parent folder that
909            * are used for mounting third-party repositories. This method is only
910            * supported by the Liferay repository.
911            *
912            * <p>
913            * Useful when paginating results. Returns a maximum of <code>end -
914            * start</code> instances. <code>start</code> and <code>end</code> are not
915            * primary keys, they are indexes in the result set. Thus, <code>0</code>
916            * refers to the first result in the set. Setting both <code>start</code>
917            * and <code>end</code> to {@link
918            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
919            * result set.
920            * </p>
921            *
922            * @param repositoryId the primary key of the repository
923            * @param parentFolderId the primary key of the parent folder
924            * @param start the lower bound of the range of results
925            * @param end the upper bound of the range of results (not inclusive)
926            * @return the range of immediate subfolders of the parent folder that are
927            used for mounting third-party repositories
928            * @throws PortalException if the repository or parent folder could not be
929            found
930            * @throws SystemException if a system exception occurred
931            */
932            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
933            public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getMountFolders(
934                    long repositoryId, long parentFolderId, int start, int end)
935                    throws com.liferay.portal.kernel.exception.PortalException,
936                            com.liferay.portal.kernel.exception.SystemException;
937    
938            /**
939            * Returns an ordered range of all the immediate subfolders of the parent
940            * folder that are used for mounting third-party repositories. This method
941            * is only supported by the Liferay repository.
942            *
943            * <p>
944            * Useful when paginating results. Returns a maximum of <code>end -
945            * start</code> instances. <code>start</code> and <code>end</code> are not
946            * primary keys, they are indexes in the result set. Thus, <code>0</code>
947            * refers to the first result in the set. Setting both <code>start</code>
948            * and <code>end</code> to {@link
949            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
950            * result set.
951            * </p>
952            *
953            * @param repositoryId the primary key of the folder's repository
954            * @param parentFolderId the primary key of the folder's parent folder
955            * @param start the lower bound of the range of results
956            * @param end the upper bound of the range of results (not inclusive)
957            * @param obc the comparator to order the folders (optionally
958            <code>null</code>)
959            * @return the range of immediate subfolders of the parent folder that are
960            used for mounting third-party repositories ordered by comparator
961            <code>obc</code>
962            * @throws PortalException if the repository or parent folder could not be
963            found
964            * @throws SystemException if a system exception occurred
965            */
966            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
967            public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getMountFolders(
968                    long repositoryId, long parentFolderId, int start, int end,
969                    com.liferay.portal.kernel.util.OrderByComparator obc)
970                    throws com.liferay.portal.kernel.exception.PortalException,
971                            com.liferay.portal.kernel.exception.SystemException;
972    
973            /**
974            * Returns the number of immediate subfolders of the parent folder that are
975            * used for mounting third-party repositories. This method is only supported
976            * by the Liferay repository.
977            *
978            * @param repositoryId the primary key of the repository
979            * @param parentFolderId the primary key of the parent folder
980            * @return the number of folders of the parent folder that are used for
981            mounting third-party repositories
982            * @throws PortalException if the repository or parent folder could not be
983            found
984            * @throws SystemException if a system exception occurred
985            */
986            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
987            public int getMountFoldersCount(long repositoryId, long parentFolderId)
988                    throws com.liferay.portal.kernel.exception.PortalException,
989                            com.liferay.portal.kernel.exception.SystemException;
990    
991            /**
992            * Moves the file entry to the new folder.
993            *
994            * @param userId the primary key of the user
995            * @param fileEntryId the primary key of the file entry
996            * @param newFolderId the primary key of the new folder
997            * @param serviceContext the service context to be applied
998            * @return the file entry
999            * @throws PortalException if the file entry or the new folder could not be
1000            found
1001            * @throws SystemException if a system exception occurred
1002            */
1003            public com.liferay.portal.kernel.repository.model.FileEntry moveFileEntry(
1004                    long userId, long fileEntryId, long newFolderId,
1005                    com.liferay.portal.service.ServiceContext serviceContext)
1006                    throws com.liferay.portal.kernel.exception.PortalException,
1007                            com.liferay.portal.kernel.exception.SystemException;
1008    
1009            /**
1010            * Updates the file entry's asset replacing its asset categories, tags, and
1011            * links.
1012            *
1013            * @param userId the primary key of the user
1014            * @param fileEntry the file entry to update
1015            * @param fileVersion the file version to update
1016            * @param assetCategoryIds the primary keys of the new asset categories
1017            * @param assetTagNames the new asset tag names
1018            * @param assetLinkEntryIds the primary keys of the new asset link entries
1019            * @throws PortalException if the file entry or version could not be found
1020            * @throws SystemException if a system exception occurred
1021            */
1022            public void updateAsset(long userId,
1023                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
1024                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
1025                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
1026                    long[] assetLinkEntryIds)
1027                    throws com.liferay.portal.kernel.exception.PortalException,
1028                            com.liferay.portal.kernel.exception.SystemException;
1029    
1030            /**
1031            * Updates a file entry and associated metadata based on a byte array
1032            * object. If the file data is <code>null</code>, then only the associated
1033            * metadata (i.e., <code>title</code>, <code>description</code>, and
1034            * parameters in the <code>serviceContext</code>) will be updated.
1035            *
1036            * <p>
1037            * This method takes two file names, the <code>sourceFileName</code> and the
1038            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
1039            * name of the actual file being uploaded. The <code>title</code>
1040            * corresponds to a name the client wishes to assign this file after it has
1041            * been uploaded to the portal.
1042            * </p>
1043            *
1044            * @param userId the primary key of the user
1045            * @param fileEntryId the primary key of the file entry
1046            * @param sourceFileName the original file's name (optionally
1047            <code>null</code>)
1048            * @param mimeType the file's MIME type (optionally <code>null</code>)
1049            * @param title the new name to be assigned to the file (optionally <code>
1050            <code>null</code></code>)
1051            * @param description the file's new description
1052            * @param changeLog the file's version change log (optionally
1053            <code>null</code>)
1054            * @param majorVersion whether the new file version is a major version
1055            * @param bytes the file's data (optionally <code>null</code>)
1056            * @param serviceContext the service context to be applied. Can set the
1057            asset category IDs, asset tag names, and expando bridge
1058            attributes for the file entry. In a Liferay repository, it may
1059            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
1060            type </li> <li> fieldsMap - mapping for fields associated with a
1061            custom file entry type </li> </ul>
1062            * @return the file entry
1063            * @throws PortalException if the file entry could not be found
1064            * @throws SystemException if a system exception occurred
1065            */
1066            public com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry(
1067                    long userId, long fileEntryId, java.lang.String sourceFileName,
1068                    java.lang.String mimeType, java.lang.String title,
1069                    java.lang.String description, java.lang.String changeLog,
1070                    boolean majorVersion, byte[] bytes,
1071                    com.liferay.portal.service.ServiceContext serviceContext)
1072                    throws com.liferay.portal.kernel.exception.PortalException,
1073                            com.liferay.portal.kernel.exception.SystemException;
1074    
1075            /**
1076            * Updates a file entry and associated metadata based on a {@link File}
1077            * object. If the file data is <code>null</code>, then only the associated
1078            * metadata (i.e., <code>title</code>, <code>description</code>, and
1079            * parameters in the <code>serviceContext</code>) will be updated.
1080            *
1081            * <p>
1082            * This method takes two file names, the <code>sourceFileName</code> and the
1083            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
1084            * name of the actual file being uploaded. The <code>title</code>
1085            * corresponds to a name the client wishes to assign this file after it has
1086            * been uploaded to the portal.
1087            * </p>
1088            *
1089            * @param userId the primary key of the user
1090            * @param fileEntryId the primary key of the file entry
1091            * @param sourceFileName the original file's name (optionally
1092            <code>null</code>)
1093            * @param mimeType the file's MIME type (optionally <code>null</code>)
1094            * @param title the new name to be assigned to the file (optionally <code>
1095            <code>null</code></code>)
1096            * @param description the file's new description
1097            * @param changeLog the file's version change log (optionally
1098            <code>null</code>)
1099            * @param majorVersion whether the new file version is a major version
1100            * @param file EntryId the primary key of the file entry
1101            * @param serviceContext the service context to be applied. Can set the
1102            asset category IDs, asset tag names, and expando bridge
1103            attributes for the file entry. In a Liferay repository, it may
1104            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
1105            type </li> <li> fieldsMap - mapping for fields associated with a
1106            custom file entry type </li> </ul>
1107            * @return the file entry
1108            * @throws PortalException if the file entry could not be found
1109            * @throws SystemException if a system exception occurred
1110            */
1111            public com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry(
1112                    long userId, long fileEntryId, java.lang.String sourceFileName,
1113                    java.lang.String mimeType, java.lang.String title,
1114                    java.lang.String description, java.lang.String changeLog,
1115                    boolean majorVersion, java.io.File file,
1116                    com.liferay.portal.service.ServiceContext serviceContext)
1117                    throws com.liferay.portal.kernel.exception.PortalException,
1118                            com.liferay.portal.kernel.exception.SystemException;
1119    
1120            /**
1121            * Updates a file entry and associated metadata based on an {@link
1122            * InputStream} object. If the file data is <code>null</code>, then only the
1123            * associated metadata (i.e., <code>title</code>, <code>description</code>,
1124            * and parameters in the <code>serviceContext</code>) will be updated.
1125            *
1126            * <p>
1127            * This method takes two file names, the <code>sourceFileName</code> and the
1128            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
1129            * name of the actual file being uploaded. The <code>title</code>
1130            * corresponds to a name the client wishes to assign this file after it has
1131            * been uploaded to the portal.
1132            * </p>
1133            *
1134            * @param userId the primary key of the user
1135            * @param fileEntryId the primary key of the file entry
1136            * @param sourceFileName the original file's name (optionally
1137            <code>null</code>)
1138            * @param mimeType the file's MIME type (optionally <code>null</code>)
1139            * @param title the new name to be assigned to the file (optionally <code>
1140            <code>null</code></code>)
1141            * @param description the file's new description
1142            * @param changeLog the file's version change log (optionally
1143            <code>null</code>)
1144            * @param majorVersion whether the new file version is a major version
1145            * @param is the file's data (optionally <code>null</code>)
1146            * @param size the file's size (optionally <code>0</code>)
1147            * @param serviceContext the service context to be applied. Can set the
1148            asset category IDs, asset tag names, and expando bridge
1149            attributes for the file entry. In a Liferay repository, it may
1150            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
1151            type </li> <li> fieldsMap - mapping for fields associated with a
1152            custom file entry type </li> </ul>
1153            * @return the file entry
1154            * @throws PortalException if the file entry could not be found
1155            * @throws SystemException if a system exception occurred
1156            */
1157            public com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry(
1158                    long userId, long fileEntryId, java.lang.String sourceFileName,
1159                    java.lang.String mimeType, java.lang.String title,
1160                    java.lang.String description, java.lang.String changeLog,
1161                    boolean majorVersion, java.io.InputStream is, long size,
1162                    com.liferay.portal.service.ServiceContext serviceContext)
1163                    throws com.liferay.portal.kernel.exception.PortalException,
1164                            com.liferay.portal.kernel.exception.SystemException;
1165    
1166            /**
1167            * Updates a file rank to the existing file entry. This method is only
1168            * supported by the Liferay repository.
1169            *
1170            * @param repositoryId the primary key of the file rank's repository
1171            * @param companyId the primary key of the file rank's company
1172            * @param userId the primary key of the file rank's creator/owner
1173            * @param fileEntryId the primary key of the file rank's file entry
1174            * @param serviceContext the service context to be applied
1175            * @return the file rank
1176            * @throws SystemException if a system exception occurred
1177            */
1178            public com.liferay.portlet.documentlibrary.model.DLFileRank updateFileRank(
1179                    long repositoryId, long companyId, long userId, long fileEntryId,
1180                    com.liferay.portal.service.ServiceContext serviceContext)
1181                    throws com.liferay.portal.kernel.exception.SystemException;
1182    
1183            /**
1184            * Updates a file shortcut to the existing file entry. This method is only
1185            * supported by the Liferay repository.
1186            *
1187            * @param userId the primary key of the file shortcut's creator/owner
1188            * @param fileShortcutId the primary key of the file shortcut
1189            * @param folderId the primary key of the file shortcut's parent folder
1190            * @param toFileEntryId the primary key of the file shortcut's file entry
1191            * @param serviceContext the service context to be applied. Can set the
1192            asset category IDs, asset tag names, and expando bridge
1193            attributes for the file entry.
1194            * @return the file shortcut
1195            * @throws PortalException if the file shortcut, folder, or file entry could
1196            not be found
1197            * @throws SystemException if a system exception occurred
1198            */
1199            public com.liferay.portlet.documentlibrary.model.DLFileShortcut updateFileShortcut(
1200                    long userId, long fileShortcutId, long folderId, long toFileEntryId,
1201                    com.liferay.portal.service.ServiceContext serviceContext)
1202                    throws com.liferay.portal.kernel.exception.PortalException,
1203                            com.liferay.portal.kernel.exception.SystemException;
1204    
1205            /**
1206            * Updates all file shortcuts to the existing file entry to the new file
1207            * entry. This method is only supported by the Liferay repository.
1208            *
1209            * @param toRepositoryId the primary key of the repository
1210            * @param oldToFileEntryId the primary key of the old file entry pointed to
1211            * @param newToFileEntryId the primary key of the new file entry to point
1212            to
1213            * @throws SystemException if a system exception occurred
1214            */
1215            public void updateFileShortcuts(long toRepositoryId, long oldToFileEntryId,
1216                    long newToFileEntryId)
1217                    throws com.liferay.portal.kernel.exception.SystemException;
1218    
1219            /**
1220            * Updates the folder.
1221            *
1222            * @param folderId the primary key of the folder
1223            * @param parentFolderId the primary key of the folder's new parent folder
1224            * @param name the folder's new name
1225            * @param description the folder's new description
1226            * @param serviceContext the service context to be applied. In a Liferay
1227            repository, it may include:  <ul> <li> defaultFileEntryTypeId -
1228            the file entry type to default all Liferay file entries to </li>
1229            <li> fileEntryTypeSearchContainerPrimaryKeys - a comma-delimited
1230            list of file entry type primary keys allowed in the given folder
1231            and all descendants </li> <li> mountPoint - boolean specifying
1232            whether folder is a facade for mounting a third-party repository
1233            </li> <li> overrideFileEntryTypes - boolean specifying whether to
1234            override ancestral folder's restriction of file entry types
1235            allowed </li> <li> workflowDefinitionXYZ - the workflow
1236            definition name specified per file entry type. The parameter name
1237            must be the string <code>workflowDefinition</code> appended by
1238            the <code>fileEntryTypeId</code> (optionally <code>0</code>).
1239            </li> </ul>
1240            * @return the folder
1241            * @throws PortalException if the current or new parent folder could not be
1242            found, or if the new parent folder's information was invalid
1243            * @throws SystemException if a system exception occurred
1244            */
1245            public com.liferay.portal.kernel.repository.model.Folder updateFolder(
1246                    long folderId, long parentFolderId, java.lang.String name,
1247                    java.lang.String description,
1248                    com.liferay.portal.service.ServiceContext serviceContext)
1249                    throws com.liferay.portal.kernel.exception.PortalException,
1250                            com.liferay.portal.kernel.exception.SystemException;
1251    }