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