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