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