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