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