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