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