001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.documentlibrary.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.exception.PortalException;
020    import com.liferay.portal.kernel.exception.SystemException;
021    import com.liferay.portal.kernel.transaction.Isolation;
022    import com.liferay.portal.kernel.transaction.Propagation;
023    import com.liferay.portal.kernel.transaction.Transactional;
024    import com.liferay.portal.service.BaseLocalService;
025    
026    /**
027     * Provides the local service interface for DLApp. Methods of this
028     * service will not have security checks based on the propagated JAAS
029     * credentials because this service can only be accessed from within the same
030     * VM.
031     *
032     * @author Brian Wing Shun Chan
033     * @see DLAppLocalServiceUtil
034     * @see com.liferay.portlet.documentlibrary.service.base.DLAppLocalServiceBaseImpl
035     * @see com.liferay.portlet.documentlibrary.service.impl.DLAppLocalServiceImpl
036     * @generated
037     */
038    @ProviderType
039    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
040            PortalException.class, SystemException.class})
041    public interface DLAppLocalService extends BaseLocalService {
042            /*
043             * NOTE FOR DEVELOPERS:
044             *
045             * 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.
046             */
047            public com.liferay.portal.kernel.repository.model.FileEntry addFileEntry(
048                    long userId, long repositoryId, long folderId,
049                    java.lang.String sourceFileName, java.lang.String mimeType,
050                    byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
051                    throws PortalException;
052    
053            /**
054            * Adds a file entry and associated metadata based on a byte array.
055            *
056            * <p>
057            * This method takes two file names, the <code>sourceFileName</code> and the
058            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
059            * name of the actual file being uploaded. The <code>title</code>
060            * corresponds to a name the client wishes to assign this file after it has
061            * been uploaded to the portal. If it is <code>null</code>, the <code>
062            * sourceFileName</code> will be used.
063            * </p>
064            *
065            * @param userId the primary key of the file entry's creator/owner
066            * @param repositoryId the primary key of the file entry's repository
067            * @param folderId the primary key of the file entry's parent folder
068            * @param sourceFileName the original file's name
069            * @param mimeType the file's MIME type
070            * @param title the name to be assigned to the file (optionally <code>null
071            </code>)
072            * @param description the file's description
073            * @param changeLog the file's version change log
074            * @param bytes the file's data (optionally <code>null</code>)
075            * @param serviceContext the service context to be applied. Can set the
076            asset category IDs, asset tag names, and expando bridge
077            attributes for the file entry. In a Liferay repository, it may
078            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
079            type </li> <li> fieldsMap - mapping for fields associated with a
080            custom file entry type </li> </ul>
081            * @return the file entry
082            * @throws PortalException if the parent folder could not be found or if the
083            file entry's information was invalid
084            */
085            public com.liferay.portal.kernel.repository.model.FileEntry addFileEntry(
086                    long userId, long repositoryId, long folderId,
087                    java.lang.String sourceFileName, java.lang.String mimeType,
088                    java.lang.String title, java.lang.String description,
089                    java.lang.String changeLog, byte[] bytes,
090                    com.liferay.portal.service.ServiceContext serviceContext)
091                    throws PortalException;
092    
093            /**
094            * Adds a file entry and associated metadata based on a {@link java.io.File}
095            * object.
096            *
097            * <p>
098            * This method takes two file names, the <code>sourceFileName</code> and the
099            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
100            * name of the actual file being uploaded. The <code>title</code>
101            * corresponds to a name the client wishes to assign this file after it has
102            * been uploaded to the portal. If it is <code>null</code>, the <code>
103            * sourceFileName</code> will be used.
104            * </p>
105            *
106            * @param userId the primary key of the file entry's creator/owner
107            * @param repositoryId the primary key of the repository
108            * @param folderId the primary key of the file entry's parent folder
109            * @param sourceFileName the original file's name
110            * @param mimeType the file's MIME type
111            * @param title the name to be assigned to the file (optionally <code>null
112            </code>)
113            * @param description the file's description
114            * @param changeLog the file's version change log
115            * @param file the file's data (optionally <code>null</code>)
116            * @param serviceContext the service context to be applied. Can set the
117            asset category IDs, asset tag names, and expando bridge
118            attributes for the file entry. In a Liferay repository, it may
119            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
120            type </li> <li> fieldsMap - mapping for fields associated with a
121            custom file entry type </li> </ul>
122            * @return the file entry
123            * @throws PortalException if the parent folder could not be found or if the
124            file entry's information was invalid
125            */
126            public com.liferay.portal.kernel.repository.model.FileEntry addFileEntry(
127                    long userId, long repositoryId, long folderId,
128                    java.lang.String sourceFileName, java.lang.String mimeType,
129                    java.lang.String title, java.lang.String description,
130                    java.lang.String changeLog, java.io.File file,
131                    com.liferay.portal.service.ServiceContext serviceContext)
132                    throws PortalException;
133    
134            /**
135            * Adds a file entry and associated metadata based on an {@link InputStream}
136            * object.
137            *
138            * <p>
139            * This method takes two file names, the <code>sourceFileName</code> and the
140            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
141            * name of the actual file being uploaded. The <code>title</code>
142            * corresponds to a name the client wishes to assign this file after it has
143            * been uploaded to the portal. If it is <code>null</code>, the <code>
144            * sourceFileName</code> will be used.
145            * </p>
146            *
147            * @param userId the primary key of the file entry's creator/owner
148            * @param repositoryId the primary key of the repository
149            * @param folderId the primary key of the file entry's parent folder
150            * @param sourceFileName the original file's name
151            * @param mimeType the file's MIME type
152            * @param title the name to be assigned to the file (optionally <code>null
153            </code>)
154            * @param description the file's description
155            * @param changeLog the file's version change log
156            * @param is the file's data (optionally <code>null</code>)
157            * @param size the file's size (optionally <code>0</code>)
158            * @param serviceContext the service context to be applied. Can set the
159            asset category IDs, asset tag names, and expando bridge
160            attributes for the file entry. In a Liferay repository, it may
161            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
162            type </li> <li> fieldsMap - mapping for fields associated with a
163            custom file entry type </li> </ul>
164            * @return the file entry
165            * @throws PortalException if the parent folder could not be found or if the
166            file entry's information was invalid
167            */
168            public com.liferay.portal.kernel.repository.model.FileEntry addFileEntry(
169                    long userId, long repositoryId, long folderId,
170                    java.lang.String sourceFileName, java.lang.String mimeType,
171                    java.lang.String title, java.lang.String description,
172                    java.lang.String changeLog, java.io.InputStream is, long size,
173                    com.liferay.portal.service.ServiceContext serviceContext)
174                    throws PortalException;
175    
176            /**
177            * Adds the file rank to the existing file entry. This method is only
178            * supported by the Liferay repository.
179            *
180            * @param repositoryId the primary key of the repository
181            * @param companyId the primary key of the company
182            * @param userId the primary key of the file rank's creator/owner
183            * @param fileEntryId the primary key of the file entry
184            * @param serviceContext the service context to be applied
185            * @return the file rank
186            */
187            public com.liferay.portlet.documentlibrary.model.DLFileRank addFileRank(
188                    long repositoryId, long companyId, long userId, long fileEntryId,
189                    com.liferay.portal.service.ServiceContext serviceContext);
190    
191            /**
192            * Adds the file shortcut to the existing file entry. This method is only
193            * supported by the Liferay repository.
194            *
195            * @param userId the primary key of the file shortcut's creator/owner
196            * @param repositoryId the primary key of the repository
197            * @param folderId the primary key of the file shortcut's parent folder
198            * @param toFileEntryId the primary key of the file entry to point to
199            * @param serviceContext the service context to be applied. Can set the
200            asset category IDs, asset tag names, and expando bridge
201            attributes for the file entry.
202            * @return the file shortcut
203            * @throws PortalException if the parent folder or file entry could not be
204            found, or if the file shortcut's information was invalid
205            */
206            public com.liferay.portal.kernel.repository.model.FileShortcut addFileShortcut(
207                    long userId, long repositoryId, long folderId, long toFileEntryId,
208                    com.liferay.portal.service.ServiceContext serviceContext)
209                    throws PortalException;
210    
211            /**
212            * Adds a folder.
213            *
214            * @param userId the primary key of the folder's creator/owner
215            * @param repositoryId the primary key of the repository
216            * @param parentFolderId the primary key of the folder's parent folder
217            * @param name the folder's name
218            * @param description the folder's description
219            * @param serviceContext the service context to be applied. In a Liferay
220            repository, it may include mountPoint which is a boolean
221            specifying whether the folder is a facade for mounting a
222            third-party repository
223            * @return the folder
224            * @throws PortalException if the parent folder could not be found or if the
225            new folder's information was invalid
226            */
227            public com.liferay.portal.kernel.repository.model.Folder addFolder(
228                    long userId, long repositoryId, long parentFolderId,
229                    java.lang.String name, java.lang.String description,
230                    com.liferay.portal.service.ServiceContext serviceContext)
231                    throws PortalException;
232    
233            /**
234            * Delete all data associated to the given repository. This method is only
235            * supported by the Liferay repository.
236            *
237            * @param repositoryId the primary key of the data's repository
238            * @throws PortalException if the repository could not be found
239            */
240            public void deleteAll(long repositoryId) throws PortalException;
241    
242            public void deleteAllRepositories(long groupId) throws PortalException;
243    
244            /**
245            * Deletes the file entry.
246            *
247            * @param fileEntryId the primary key of the file entry
248            * @throws PortalException if the file entry could not be found
249            */
250            public void deleteFileEntry(long fileEntryId) throws PortalException;
251    
252            /**
253            * Deletes the file ranks associated to a given file entry. This method is
254            * only supported by the Liferay repository.
255            *
256            * @param fileEntryId the primary key of the file entry
257            */
258            public void deleteFileRanksByFileEntryId(long fileEntryId);
259    
260            /**
261            * Deletes the file ranks associated to a given user. This method is only
262            * supported by the Liferay repository.
263            *
264            * @param userId the primary key of the user
265            */
266            public void deleteFileRanksByUserId(long userId);
267    
268            /**
269            * Deletes the file shortcut. This method is only supported by the Liferay
270            * repository.
271            *
272            * @param fileShortcut the file shortcut
273            * @throws PortalException if the file shortcut could not be found
274            */
275            public void deleteFileShortcut(
276                    com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut)
277                    throws PortalException;
278    
279            /**
280            * Deletes the file shortcut. This method is only supported by the Liferay
281            * repository.
282            *
283            * @param fileShortcutId the primary key of the file shortcut
284            * @throws PortalException if the file shortcut could not be found
285            */
286            public void deleteFileShortcut(long fileShortcutId)
287                    throws PortalException;
288    
289            /**
290            * Deletes all file shortcuts associated to the file entry. This method is
291            * only supported by the Liferay repository.
292            *
293            * @param toFileEntryId the primary key of the associated file entry
294            * @throws PortalException if the file shortcut for the file entry could not
295            be found
296            */
297            public void deleteFileShortcuts(long toFileEntryId)
298                    throws PortalException;
299    
300            /**
301            * Deletes the folder and all of its subfolders and file entries.
302            *
303            * @param folderId the primary key of the folder
304            * @throws PortalException if the folder could not be found
305            */
306            public void deleteFolder(long folderId) throws PortalException;
307    
308            /**
309            * Returns the Spring bean ID for this bean.
310            *
311            * @return the Spring bean ID for this bean
312            */
313            public java.lang.String getBeanIdentifier();
314    
315            /**
316            * Returns the file entry with the primary key.
317            *
318            * @param fileEntryId the primary key of the file entry
319            * @return the file entry with the primary key
320            * @throws PortalException if the file entry could not be found
321            */
322            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
323            public com.liferay.portal.kernel.repository.model.FileEntry getFileEntry(
324                    long fileEntryId) throws PortalException;
325    
326            /**
327            * Returns the file entry with the title in the folder.
328            *
329            * @param groupId the primary key of the file entry's group
330            * @param folderId the primary key of the file entry's folder
331            * @param title the file entry's title
332            * @return the file entry with the title in the folder
333            * @throws PortalException if the file entry could not be found
334            */
335            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
336            public com.liferay.portal.kernel.repository.model.FileEntry getFileEntry(
337                    long groupId, long folderId, java.lang.String title)
338                    throws PortalException;
339    
340            /**
341            * Returns the file entry with the UUID and group.
342            *
343            * @param uuid the file entry's UUID
344            * @param groupId the primary key of the file entry's group
345            * @return the file entry with the UUID and group
346            * @throws PortalException if the file entry could not be found
347            */
348            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
349            public com.liferay.portal.kernel.repository.model.FileEntry getFileEntryByUuidAndGroupId(
350                    java.lang.String uuid, long groupId) throws PortalException;
351    
352            /**
353            * Returns the file ranks from the user. This method is only supported by
354            * the Liferay repository.
355            *
356            * @param repositoryId the primary key of the repository
357            * @param userId the primary key of the user
358            * @return the file ranks from the user
359            */
360            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
361            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> getFileRanks(
362                    long repositoryId, long userId);
363    
364            /**
365            * Returns the file shortcut with the primary key. This method is only
366            * supported by the Liferay repository.
367            *
368            * @param fileShortcutId the primary key of the file shortcut
369            * @return the file shortcut with the primary key
370            * @throws PortalException if the file shortcut could not be found
371            */
372            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
373            public com.liferay.portal.kernel.repository.model.FileShortcut getFileShortcut(
374                    long fileShortcutId) throws PortalException;
375    
376            /**
377            * Returns the file version with the primary key.
378            *
379            * @param fileVersionId the primary key of the file version
380            * @return the file version with the primary key
381            * @throws PortalException if the file version could not be found
382            */
383            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
384            public com.liferay.portal.kernel.repository.model.FileVersion getFileVersion(
385                    long fileVersionId) throws PortalException;
386    
387            /**
388            * Returns the folder with the primary key.
389            *
390            * @param folderId the primary key of the folder
391            * @return the folder with the primary key
392            * @throws PortalException if the folder could not be found
393            */
394            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
395            public com.liferay.portal.kernel.repository.model.Folder getFolder(
396                    long folderId) throws PortalException;
397    
398            /**
399            * Returns the folder with the name in the parent folder.
400            *
401            * @param repositoryId the primary key of the folder's repository
402            * @param parentFolderId the primary key of the folder's parent folder
403            * @param name the folder's name
404            * @return the folder with the name in the parent folder
405            * @throws PortalException if the folder could not be found
406            */
407            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
408            public com.liferay.portal.kernel.repository.model.Folder getFolder(
409                    long repositoryId, long parentFolderId, java.lang.String name)
410                    throws PortalException;
411    
412            /**
413            * Returns the mount folder of the repository with the primary key. This
414            * method is only supported by the Liferay repository.
415            *
416            * @param repositoryId the primary key of the repository
417            * @return the folder used for mounting third-party repositories
418            * @throws PortalException if the repository or mount folder could not be
419            found
420            */
421            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
422            public com.liferay.portal.kernel.repository.model.Folder getMountFolder(
423                    long repositoryId) throws PortalException;
424    
425            /**
426            * Moves the file entry to the new folder.
427            *
428            * @param userId the primary key of the user
429            * @param fileEntryId the primary key of the file entry
430            * @param newFolderId the primary key of the new folder
431            * @param serviceContext the service context to be applied
432            * @return the file entry
433            * @throws PortalException if the file entry or the new folder could not be
434            found
435            */
436            public com.liferay.portal.kernel.repository.model.FileEntry moveFileEntry(
437                    long userId, long fileEntryId, long newFolderId,
438                    com.liferay.portal.service.ServiceContext serviceContext)
439                    throws PortalException;
440    
441            /**
442            * @deprecated As of 7.0.0, replaced by {@link
443            RepositoryTrashUtil#moveFileEntryFromTrash(long, long, long,
444            long, ServiceContext)}
445            */
446            @java.lang.Deprecated
447            public com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryFromTrash(
448                    long userId, long fileEntryId, long newFolderId,
449                    com.liferay.portal.service.ServiceContext serviceContext)
450                    throws PortalException;
451    
452            /**
453            * @deprecated As of 7.0.0, replaced by {@link
454            RepositoryTrashUtil#moveFileEntryToTrash(long, long, long)}
455            */
456            @java.lang.Deprecated
457            public com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryToTrash(
458                    long userId, long fileEntryId) throws PortalException;
459    
460            public com.liferay.portal.kernel.repository.model.Folder moveFolder(
461                    long userId, long folderId, long parentFolderId,
462                    com.liferay.portal.service.ServiceContext serviceContext)
463                    throws PortalException;
464    
465            /**
466            * @deprecated As of 7.0.0, replaced by {@link
467            RepositoryTrashUtil#restoreFileEntryFromTrash(long, long,
468            long)}
469            */
470            @java.lang.Deprecated
471            public void restoreFileEntryFromTrash(long userId, long fileEntryId)
472                    throws PortalException;
473    
474            /**
475            * Sets the Spring bean ID for this bean.
476            *
477            * @param beanIdentifier the Spring bean ID for this bean
478            */
479            public void setBeanIdentifier(java.lang.String beanIdentifier);
480    
481            /**
482            * Subscribe the user to changes in documents of the file entry type. This
483            * method is only supported by the Liferay repository.
484            *
485            * @param userId the primary key of the user
486            * @param groupId the primary key of the file entry type's group
487            * @param fileEntryTypeId the primary key of the file entry type
488            * @throws PortalException if the user or group could not be found
489            */
490            public void subscribeFileEntryType(long userId, long groupId,
491                    long fileEntryTypeId) throws PortalException;
492    
493            /**
494            * Subscribe the user to document changes in the folder. This method is only
495            * supported by the Liferay repository.
496            *
497            * @param userId the primary key of the user
498            * @param groupId the primary key of the folder's group
499            * @param folderId the primary key of the folder
500            * @throws PortalException if the user or group could not be found
501            */
502            public void subscribeFolder(long userId, long groupId, long folderId)
503                    throws PortalException;
504    
505            /**
506            * Unsubscribe the user from changes in documents of the file entry type.
507            * This method is only supported by the Liferay repository.
508            *
509            * @param userId the primary key of the user
510            * @param groupId the primary key of the file entry type's group
511            * @param fileEntryTypeId the primary key of the file entry type
512            * @throws PortalException if the user or group could not be found
513            */
514            public void unsubscribeFileEntryType(long userId, long groupId,
515                    long fileEntryTypeId) throws PortalException;
516    
517            /**
518            * Unsubscribe the user from document changes in the folder. This method is
519            * only supported by the Liferay repository.
520            *
521            * @param userId the primary key of the user
522            * @param groupId the primary key of the folder's group
523            * @param folderId the primary key of the folder
524            * @throws PortalException if the user or group could not be found
525            */
526            public void unsubscribeFolder(long userId, long groupId, long folderId)
527                    throws PortalException;
528    
529            /**
530            * Updates the file entry's asset replacing its asset categories, tags, and
531            * links.
532            *
533            * @param userId the primary key of the user
534            * @param fileEntry the file entry to update
535            * @param fileVersion the file version to update
536            * @param assetCategoryIds the primary keys of the new asset categories
537            * @param assetTagNames the new asset tag names
538            * @param assetLinkEntryIds the primary keys of the new asset link entries
539            * @throws PortalException if the file entry or version could not be found
540            */
541            public void updateAsset(long userId,
542                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
543                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
544                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
545                    long[] assetLinkEntryIds) throws PortalException;
546    
547            /**
548            * Updates a file entry and associated metadata based on a byte array
549            * object. If the file data is <code>null</code>, then only the associated
550            * metadata (i.e., <code>title</code>, <code>description</code>, and
551            * parameters in the <code>serviceContext</code>) will be updated.
552            *
553            * <p>
554            * This method takes two file names, the <code>sourceFileName</code> and the
555            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
556            * name of the actual file being uploaded. The <code>title</code>
557            * corresponds to a name the client wishes to assign this file after it has
558            * been uploaded to the portal.
559            * </p>
560            *
561            * @param userId the primary key of the user
562            * @param fileEntryId the primary key of the file entry
563            * @param sourceFileName the original file's name (optionally
564            <code>null</code>)
565            * @param mimeType the file's MIME type (optionally <code>null</code>)
566            * @param title the new name to be assigned to the file (optionally <code>
567            <code>null</code></code>)
568            * @param description the file's new description
569            * @param changeLog the file's version change log (optionally
570            <code>null</code>)
571            * @param majorVersion whether the new file version is a major version
572            * @param bytes the file's data (optionally <code>null</code>)
573            * @param serviceContext the service context to be applied. Can set the
574            asset category IDs, asset tag names, and expando bridge
575            attributes for the file entry. In a Liferay repository, it may
576            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
577            type </li> <li> fieldsMap - mapping for fields associated with a
578            custom file entry type </li> </ul>
579            * @return the file entry
580            * @throws PortalException if the file entry could not be found
581            */
582            public com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry(
583                    long userId, long fileEntryId, java.lang.String sourceFileName,
584                    java.lang.String mimeType, java.lang.String title,
585                    java.lang.String description, java.lang.String changeLog,
586                    boolean majorVersion, byte[] bytes,
587                    com.liferay.portal.service.ServiceContext serviceContext)
588                    throws PortalException;
589    
590            /**
591            * Updates a file entry and associated metadata based on a {@link
592            * java.io.File} object. If the file data is <code>null</code>, then only
593            * the associated metadata (i.e., <code>title</code>,
594            * <code>description</code>, and parameters in the
595            * <code>serviceContext</code>) will be updated.
596            *
597            * <p>
598            * This method takes two file names, the <code>sourceFileName</code> and the
599            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
600            * name of the actual file being uploaded. The <code>title</code>
601            * corresponds to a name the client wishes to assign this file after it has
602            * been uploaded to the portal.
603            * </p>
604            *
605            * @param userId the primary key of the user
606            * @param fileEntryId the primary key of the file entry
607            * @param sourceFileName the original file's name (optionally
608            <code>null</code>)
609            * @param mimeType the file's MIME type (optionally <code>null</code>)
610            * @param title the new name to be assigned to the file (optionally <code>
611            <code>null</code></code>)
612            * @param description the file's new description
613            * @param changeLog the file's version change log (optionally
614            <code>null</code>)
615            * @param majorVersion whether the new file version is a major version
616            * @param file the file's data (optionally <code>null</code>)
617            * @param serviceContext the service context to be applied. Can set the
618            asset category IDs, asset tag names, and expando bridge
619            attributes for the file entry. In a Liferay repository, it may
620            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
621            type </li> <li> fieldsMap - mapping for fields associated with a
622            custom file entry type </li> </ul>
623            * @return the file entry
624            * @throws PortalException if the file entry could not be found
625            */
626            public com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry(
627                    long userId, long fileEntryId, java.lang.String sourceFileName,
628                    java.lang.String mimeType, java.lang.String title,
629                    java.lang.String description, java.lang.String changeLog,
630                    boolean majorVersion, java.io.File file,
631                    com.liferay.portal.service.ServiceContext serviceContext)
632                    throws PortalException;
633    
634            /**
635            * Updates a file entry and associated metadata based on an {@link
636            * InputStream} object. If the file data is <code>null</code>, then only the
637            * associated metadata (i.e., <code>title</code>, <code>description</code>,
638            * and parameters in the <code>serviceContext</code>) will be updated.
639            *
640            * <p>
641            * This method takes two file names, the <code>sourceFileName</code> and the
642            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
643            * name of the actual file being uploaded. The <code>title</code>
644            * corresponds to a name the client wishes to assign this file after it has
645            * been uploaded to the portal.
646            * </p>
647            *
648            * @param userId the primary key of the user
649            * @param fileEntryId the primary key of the file entry
650            * @param sourceFileName the original file's name (optionally
651            <code>null</code>)
652            * @param mimeType the file's MIME type (optionally <code>null</code>)
653            * @param title the new name to be assigned to the file (optionally <code>
654            <code>null</code></code>)
655            * @param description the file's new description
656            * @param changeLog the file's version change log (optionally
657            <code>null</code>)
658            * @param majorVersion whether the new file version is a major version
659            * @param is the file's data (optionally <code>null</code>)
660            * @param size the file's size (optionally <code>0</code>)
661            * @param serviceContext the service context to be applied. Can set the
662            asset category IDs, asset tag names, and expando bridge
663            attributes for the file entry. In a Liferay repository, it may
664            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
665            type </li> <li> fieldsMap - mapping for fields associated with a
666            custom file entry type </li> </ul>
667            * @return the file entry
668            * @throws PortalException if the file entry could not be found
669            */
670            public com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry(
671                    long userId, long fileEntryId, java.lang.String sourceFileName,
672                    java.lang.String mimeType, java.lang.String title,
673                    java.lang.String description, java.lang.String changeLog,
674                    boolean majorVersion, java.io.InputStream is, long size,
675                    com.liferay.portal.service.ServiceContext serviceContext)
676                    throws PortalException;
677    
678            /**
679            * Updates a file rank to the existing file entry. This method is only
680            * supported by the Liferay repository.
681            *
682            * @param repositoryId the primary key of the file rank's repository
683            * @param companyId the primary key of the file rank's company
684            * @param userId the primary key of the file rank's creator/owner
685            * @param fileEntryId the primary key of the file rank's file entry
686            * @param serviceContext the service context to be applied
687            * @return the file rank
688            */
689            public com.liferay.portlet.documentlibrary.model.DLFileRank updateFileRank(
690                    long repositoryId, long companyId, long userId, long fileEntryId,
691                    com.liferay.portal.service.ServiceContext serviceContext);
692    
693            /**
694            * Updates a file shortcut to the existing file entry. This method is only
695            * supported by the Liferay repository.
696            *
697            * @param userId the primary key of the file shortcut's creator/owner
698            * @param fileShortcutId the primary key of the file shortcut
699            * @param folderId the primary key of the file shortcut's parent folder
700            * @param toFileEntryId the primary key of the file shortcut's file entry
701            * @param serviceContext the service context to be applied. Can set the
702            asset category IDs, asset tag names, and expando bridge
703            attributes for the file entry.
704            * @return the file shortcut
705            * @throws PortalException if the file shortcut, folder, or file entry could
706            not be found
707            */
708            public com.liferay.portal.kernel.repository.model.FileShortcut updateFileShortcut(
709                    long userId, long fileShortcutId, long folderId, long toFileEntryId,
710                    com.liferay.portal.service.ServiceContext serviceContext)
711                    throws PortalException;
712    
713            /**
714            * Updates all file shortcuts to the existing file entry to the new file
715            * entry. This method is only supported by the Liferay repository.
716            *
717            * @param oldToFileEntryId the primary key of the old file entry pointed to
718            * @param newToFileEntryId the primary key of the new file entry to point to
719            */
720            public void updateFileShortcuts(long oldToFileEntryId, long newToFileEntryId)
721                    throws PortalException;
722    
723            /**
724            * Deprecated as of 7.0.0, replaced by {@link #updateFileShortcuts(long,
725            *            long)}
726            */
727            @java.lang.Deprecated
728            public void updateFileShortcuts(long toRepositoryId, long oldToFileEntryId,
729                    long newToFileEntryId) throws PortalException;
730    
731            /**
732            * Updates the folder.
733            *
734            * @param folderId the primary key of the folder
735            * @param parentFolderId the primary key of the folder's new parent folder
736            * @param name the folder's new name
737            * @param description the folder's new description
738            * @param serviceContext the service context to be applied. In a Liferay
739            repository, it may include:  <ul> <li> defaultFileEntryTypeId -
740            the file entry type to default all Liferay file entries to </li>
741            <li> dlFileEntryTypesSearchContainerPrimaryKeys - a
742            comma-delimited list of file entry type primary keys allowed in
743            the given folder and all descendants </li> <li> restrictionType -
744            specifying restriction type of file entry types allowed </li>
745            <li> workflowDefinitionXYZ - the workflow definition name
746            specified per file entry type. The parameter name must be the
747            string <code>workflowDefinition</code> appended by the
748            <code>fileEntryTypeId</code> (optionally <code>0</code>).</li>
749            </ul>
750            * @return the folder
751            * @throws PortalException if the current or new parent folder could not be
752            found, or if the new parent folder's information was invalid
753            */
754            public com.liferay.portal.kernel.repository.model.Folder updateFolder(
755                    long folderId, long parentFolderId, java.lang.String name,
756                    java.lang.String description,
757                    com.liferay.portal.service.ServiceContext serviceContext)
758                    throws PortalException;
759    }