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