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 com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.ReferenceRegistry;
019    
020    /**
021     * The utility for the d l app local service. This utility wraps {@link com.liferay.portlet.documentlibrary.service.impl.DLAppLocalServiceImpl} and is the primary access point for service operations in application layer code running on the local server.
022     *
023     * <p>
024     * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
025     * </p>
026     *
027     * @author Brian Wing Shun Chan
028     * @see DLAppLocalService
029     * @see com.liferay.portlet.documentlibrary.service.base.DLAppLocalServiceBaseImpl
030     * @see com.liferay.portlet.documentlibrary.service.impl.DLAppLocalServiceImpl
031     * @generated
032     */
033    public class DLAppLocalServiceUtil {
034            /*
035             * NOTE FOR DEVELOPERS:
036             *
037             * 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.
038             */
039    
040            /**
041            * Returns the Spring bean ID for this bean.
042            *
043            * @return the Spring bean ID for this bean
044            */
045            public static java.lang.String getBeanIdentifier() {
046                    return getService().getBeanIdentifier();
047            }
048    
049            /**
050            * Sets the Spring bean ID for this bean.
051            *
052            * @param beanIdentifier the Spring bean ID for this bean
053            */
054            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
055                    getService().setBeanIdentifier(beanIdentifier);
056            }
057    
058            /**
059            * Adds a file entry and associated metadata based on a byte array.
060            *
061            * <p>
062            * This method takes two file names, the <code>sourceFileName</code> and the
063            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
064            * name of the actual file being uploaded. The <code>title</code>
065            * corresponds to a name the client wishes to assign this file after it has
066            * been uploaded to the portal. If it is <code>null</code>, the <code>
067            * sourceFileName</code> will be used.
068            * </p>
069            *
070            * @param userId the primary key of the file entry's creator/owner
071            * @param repositoryId the primary key of the file entry's repository
072            * @param folderId the primary key of the file entry's parent folder
073            * @param sourceFileName the original file's name
074            * @param mimeType the file's MIME type
075            * @param title the name to be assigned to the file (optionally <code>null
076            </code>)
077            * @param description the file's description
078            * @param changeLog the file's version change log
079            * @param bytes the file's data (optionally <code>null</code>)
080            * @param serviceContext the service context to be applied. Can set the
081            asset category IDs, asset tag names, and expando bridge
082            attributes for the file entry. In a Liferay repository, it may
083            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
084            type </li> <li> fieldsMap - mapping for fields associated with a
085            custom file entry type </li> </ul>
086            * @return the file entry
087            * @throws PortalException if the parent folder could not be found or if the
088            file entry's information was invalid
089            * @throws SystemException if a system exception occurred
090            */
091            public static com.liferay.portal.kernel.repository.model.FileEntry addFileEntry(
092                    long userId, long repositoryId, long folderId,
093                    java.lang.String sourceFileName, java.lang.String mimeType,
094                    java.lang.String title, java.lang.String description,
095                    java.lang.String changeLog, byte[] bytes,
096                    com.liferay.portal.service.ServiceContext serviceContext)
097                    throws com.liferay.portal.kernel.exception.PortalException,
098                            com.liferay.portal.kernel.exception.SystemException {
099                    return getService()
100                                       .addFileEntry(userId, repositoryId, folderId,
101                            sourceFileName, mimeType, title, description, changeLog, bytes,
102                            serviceContext);
103            }
104    
105            /**
106            * Adds a file entry and associated metadata based on a {@link File} object.
107            *
108            * <p>
109            * This method takes two file names, the <code>sourceFileName</code> and the
110            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
111            * name of the actual file being uploaded. The <code>title</code>
112            * corresponds to a name the client wishes to assign this file after it has
113            * been uploaded to the portal. If it is <code>null</code>, the <code>
114            * sourceFileName</code> will be used.
115            * </p>
116            *
117            * @param userId the primary key of the file entry's creator/owner
118            * @param repositoryId the primary key of the repository
119            * @param folderId the primary key of the file entry's parent folder
120            * @param sourceFileName the original file's name
121            * @param mimeType the file's MIME type
122            * @param title the name to be assigned to the file (optionally <code>null
123            </code>)
124            * @param description the file's description
125            * @param changeLog the file's version change log
126            * @param file the file's data (optionally <code>null</code>)
127            * @param serviceContext the service context to be applied. Can set the
128            asset category IDs, asset tag names, and expando bridge
129            attributes for the file entry. In a Liferay repository, it may
130            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
131            type </li> <li> fieldsMap - mapping for fields associated with a
132            custom file entry type </li> </ul>
133            * @return the file entry
134            * @throws PortalException if the parent folder could not be found or if the
135            file entry's information was invalid
136            * @throws SystemException if a system exception occurred
137            */
138            public static com.liferay.portal.kernel.repository.model.FileEntry addFileEntry(
139                    long userId, long repositoryId, long folderId,
140                    java.lang.String sourceFileName, java.lang.String mimeType,
141                    java.lang.String title, java.lang.String description,
142                    java.lang.String changeLog, java.io.File file,
143                    com.liferay.portal.service.ServiceContext serviceContext)
144                    throws com.liferay.portal.kernel.exception.PortalException,
145                            com.liferay.portal.kernel.exception.SystemException {
146                    return getService()
147                                       .addFileEntry(userId, repositoryId, folderId,
148                            sourceFileName, mimeType, title, description, changeLog, file,
149                            serviceContext);
150            }
151    
152            /**
153            * Adds a file entry and associated metadata based on an {@link InputStream}
154            * object.
155            *
156            * <p>
157            * This method takes two file names, the <code>sourceFileName</code> and the
158            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
159            * name of the actual file being uploaded. The <code>title</code>
160            * corresponds to a name the client wishes to assign this file after it has
161            * been uploaded to the portal. If it is <code>null</code>, the <code>
162            * sourceFileName</code> will be used.
163            * </p>
164            *
165            * @param userId the primary key of the file entry's creator/owner
166            * @param repositoryId the primary key of the repository
167            * @param folderId the primary key of the file entry's parent folder
168            * @param sourceFileName the original file's name
169            * @param mimeType the file's MIME type
170            * @param title the name to be assigned to the file (optionally <code>null
171            </code>)
172            * @param description the file's description
173            * @param changeLog the file's version change log
174            * @param is the file's data (optionally <code>null</code>)
175            * @param size the file's size (optionally <code>0</code>)
176            * @param serviceContext the service context to be applied. Can set the
177            asset category IDs, asset tag names, and expando bridge
178            attributes for the file entry. In a Liferay repository, it may
179            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
180            type </li> <li> fieldsMap - mapping for fields associated with a
181            custom file entry type </li> </ul>
182            * @return the file entry
183            * @throws PortalException if the parent folder could not be found or if the
184            file entry's information was invalid
185            * @throws SystemException if a system exception occurred
186            */
187            public static com.liferay.portal.kernel.repository.model.FileEntry addFileEntry(
188                    long userId, long repositoryId, long folderId,
189                    java.lang.String sourceFileName, java.lang.String mimeType,
190                    java.lang.String title, java.lang.String description,
191                    java.lang.String changeLog, java.io.InputStream is, long size,
192                    com.liferay.portal.service.ServiceContext serviceContext)
193                    throws com.liferay.portal.kernel.exception.PortalException,
194                            com.liferay.portal.kernel.exception.SystemException {
195                    return getService()
196                                       .addFileEntry(userId, repositoryId, folderId,
197                            sourceFileName, mimeType, title, description, changeLog, is, size,
198                            serviceContext);
199            }
200    
201            /**
202            * Adds the file rank to the existing file entry. This method is only
203            * supported by the Liferay repository.
204            *
205            * @param repositoryId the primary key of the repository
206            * @param companyId the primary key of the company
207            * @param userId the primary key of the file rank's creator/owner
208            * @param fileEntryId the primary key of the file entry
209            * @param serviceContext the service context to be applied
210            * @return the file rank
211            * @throws SystemException if a system exception occurred
212            */
213            public static com.liferay.portlet.documentlibrary.model.DLFileRank addFileRank(
214                    long repositoryId, long companyId, long userId, long fileEntryId,
215                    com.liferay.portal.service.ServiceContext serviceContext)
216                    throws com.liferay.portal.kernel.exception.SystemException {
217                    return getService()
218                                       .addFileRank(repositoryId, companyId, userId, fileEntryId,
219                            serviceContext);
220            }
221    
222            /**
223            * Adds the file shortcut to the existing file entry. This method is only
224            * supported by the Liferay repository.
225            *
226            * @param userId the primary key of the file shortcut's creator/owner
227            * @param repositoryId the primary key of the repository
228            * @param folderId the primary key of the file shortcut's parent folder
229            * @param toFileEntryId the primary key of the file entry to point to
230            * @param serviceContext the service context to be applied. Can set the
231            asset category IDs, asset tag names, and expando bridge
232            attributes for the file entry.
233            * @return the file shortcut
234            * @throws PortalException if the parent folder or file entry could not be
235            found, or if the file shortcut's information was invalid
236            * @throws SystemException if a system exception occurred
237            */
238            public static com.liferay.portlet.documentlibrary.model.DLFileShortcut addFileShortcut(
239                    long userId, long repositoryId, long folderId, long toFileEntryId,
240                    com.liferay.portal.service.ServiceContext serviceContext)
241                    throws com.liferay.portal.kernel.exception.PortalException,
242                            com.liferay.portal.kernel.exception.SystemException {
243                    return getService()
244                                       .addFileShortcut(userId, repositoryId, folderId,
245                            toFileEntryId, serviceContext);
246            }
247    
248            /**
249            * Adds a folder.
250            *
251            * @param userId the primary key of the folder's creator/owner
252            * @param repositoryId the primary key of the repository
253            * @param parentFolderId the primary key of the folder's parent folder
254            * @param name the folder's name
255            * @param description the folder's description
256            * @param serviceContext the service context to be applied. In a Liferay
257            repository, it may include mountPoint which is a boolean
258            specifying whether the folder is a facade for mounting a
259            third-party repository
260            * @return the folder
261            * @throws PortalException if the parent folder could not be found or if the
262            new folder's information was invalid
263            * @throws SystemException if a system exception occurred
264            */
265            public static com.liferay.portal.kernel.repository.model.Folder addFolder(
266                    long userId, long repositoryId, long parentFolderId,
267                    java.lang.String name, java.lang.String description,
268                    com.liferay.portal.service.ServiceContext serviceContext)
269                    throws com.liferay.portal.kernel.exception.PortalException,
270                            com.liferay.portal.kernel.exception.SystemException {
271                    return getService()
272                                       .addFolder(userId, repositoryId, parentFolderId, name,
273                            description, serviceContext);
274            }
275    
276            /**
277            * Delete all data associated to the given repository. This method is only
278            * supported by the Liferay repository.
279            *
280            * @param repositoryId the primary key of the data's repository
281            * @throws PortalException if the repository could not be found
282            * @throws SystemException if a system exception occurred
283            */
284            public static void deleteAll(long repositoryId)
285                    throws com.liferay.portal.kernel.exception.PortalException,
286                            com.liferay.portal.kernel.exception.SystemException {
287                    getService().deleteAll(repositoryId);
288            }
289    
290            /**
291            * Deletes the file entry.
292            *
293            * @param fileEntryId the primary key of the file entry
294            * @throws PortalException if the file entry could not be found
295            * @throws SystemException if a system exception occurred
296            */
297            public static void deleteFileEntry(long fileEntryId)
298                    throws com.liferay.portal.kernel.exception.PortalException,
299                            com.liferay.portal.kernel.exception.SystemException {
300                    getService().deleteFileEntry(fileEntryId);
301            }
302    
303            /**
304            * Deletes the file ranks associated to a given file entry. This method is
305            * only supported by the Liferay repository.
306            *
307            * @param fileEntryId the primary key of the file entry
308            * @throws SystemException if a system exception occurred
309            */
310            public static void deleteFileRanksByFileEntryId(long fileEntryId)
311                    throws com.liferay.portal.kernel.exception.SystemException {
312                    getService().deleteFileRanksByFileEntryId(fileEntryId);
313            }
314    
315            /**
316            * Deletes the file ranks associated to a given user. This method is only
317            * supported by the Liferay repository.
318            *
319            * @param userId the primary key of the user
320            * @throws SystemException if a system exception occurred
321            */
322            public static void deleteFileRanksByUserId(long userId)
323                    throws com.liferay.portal.kernel.exception.SystemException {
324                    getService().deleteFileRanksByUserId(userId);
325            }
326    
327            /**
328            * Deletes the file shortcut. This method is only supported by the Liferay
329            * repository.
330            *
331            * @param dlFileShortcut the file shortcut
332            * @throws PortalException if the file shortcut could not be found
333            * @throws SystemException if a system exception occurred
334            */
335            public static void deleteFileShortcut(
336                    com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut)
337                    throws com.liferay.portal.kernel.exception.PortalException,
338                            com.liferay.portal.kernel.exception.SystemException {
339                    getService().deleteFileShortcut(dlFileShortcut);
340            }
341    
342            /**
343            * Deletes the file shortcut. This method is only supported by the Liferay
344            * repository.
345            *
346            * @param fileShortcutId the primary key of the file shortcut
347            * @throws PortalException if the file shortcut could not be found
348            * @throws SystemException if a system exception occurred
349            */
350            public static void deleteFileShortcut(long fileShortcutId)
351                    throws com.liferay.portal.kernel.exception.PortalException,
352                            com.liferay.portal.kernel.exception.SystemException {
353                    getService().deleteFileShortcut(fileShortcutId);
354            }
355    
356            /**
357            * Deletes all file shortcuts associated to the file entry. This method is
358            * only supported by the Liferay repository.
359            *
360            * @param toFileEntryId the primary key of the associated file entry
361            * @throws PortalException if the file shortcut for the file entry could not
362            be found
363            * @throws SystemException if a system exception occurred
364            */
365            public static void deleteFileShortcuts(long toFileEntryId)
366                    throws com.liferay.portal.kernel.exception.PortalException,
367                            com.liferay.portal.kernel.exception.SystemException {
368                    getService().deleteFileShortcuts(toFileEntryId);
369            }
370    
371            /**
372            * Deletes the folder and all of its subfolders and file entries.
373            *
374            * @param folderId the primary key of the folder
375            * @throws PortalException if the folder could not be found
376            * @throws SystemException if a system exception occurred
377            */
378            public static void deleteFolder(long folderId)
379                    throws com.liferay.portal.kernel.exception.PortalException,
380                            com.liferay.portal.kernel.exception.SystemException {
381                    getService().deleteFolder(folderId);
382            }
383    
384            /**
385            * Returns the file entries in the folder.
386            *
387            * @param repositoryId the primary key of the file entry's repository
388            * @param folderId the primary key of the file entry's folder
389            * @return the file entries in the folder
390            * @throws PortalException if the folder could not be found
391            * @throws SystemException if a system exception occurred
392            */
393            public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getFileEntries(
394                    long repositoryId, long folderId)
395                    throws com.liferay.portal.kernel.exception.PortalException,
396                            com.liferay.portal.kernel.exception.SystemException {
397                    return getService().getFileEntries(repositoryId, folderId);
398            }
399    
400            /**
401            * Returns a range of all the file entries in the folder.
402            *
403            * <p>
404            * Useful when paginating results. Returns a maximum of <code>end -
405            * start</code> instances. <code>start</code> and <code>end</code> are not
406            * primary keys, they are indexes in the result set. Thus, <code>0</code>
407            * refers to the first result in the set. Setting both <code>start</code>
408            * and <code>end</code> to {@link
409            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
410            * result set.
411            * </p>
412            *
413            * @param repositoryId the primary key of the file entry's repository
414            * @param folderId the primary key of the file entry's folder
415            * @param start the lower bound of the range of results
416            * @param end the upper bound of the range of results (not inclusive)
417            * @return the range of file entries in the folder
418            * @throws PortalException if the folder could not be found
419            * @throws SystemException if a system exception occurred
420            */
421            public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getFileEntries(
422                    long repositoryId, long folderId, int start, int end)
423                    throws com.liferay.portal.kernel.exception.PortalException,
424                            com.liferay.portal.kernel.exception.SystemException {
425                    return getService().getFileEntries(repositoryId, folderId, start, end);
426            }
427    
428            /**
429            * Returns an ordered range of all the file entries in the folder.
430            *
431            * <p>
432            * Useful when paginating results. Returns a maximum of <code>end -
433            * start</code> instances. <code>start</code> and <code>end</code> are not
434            * primary keys, they are indexes in the result set. Thus, <code>0</code>
435            * refers to the first result in the set. Setting both <code>start</code>
436            * and <code>end</code> to {@link
437            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
438            * result set.
439            * </p>
440            *
441            * @param repositoryId the primary key of the file entry's repository
442            * @param folderId the primary key of the file entry's folder
443            * @param start the lower bound of the range of results
444            * @param end the upper bound of the range of results (not inclusive)
445            * @param obc the comparator to order the file entries (optionally
446            <code>null</code>)
447            * @return the range of file entries in the folder ordered by comparator
448            <code>obc</code>
449            * @throws PortalException if the folder could not be found
450            * @throws SystemException if a system exception occurred
451            */
452            public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getFileEntries(
453                    long repositoryId, long folderId, int start, int end,
454                    com.liferay.portal.kernel.util.OrderByComparator obc)
455                    throws com.liferay.portal.kernel.exception.PortalException,
456                            com.liferay.portal.kernel.exception.SystemException {
457                    return getService()
458                                       .getFileEntries(repositoryId, folderId, start, end, obc);
459            }
460    
461            /**
462            * Returns a range of all the file entries and shortcuts in the folder.
463            *
464            * <p>
465            * Useful when paginating results. Returns a maximum of <code>end -
466            * start</code> instances. <code>start</code> and <code>end</code> are not
467            * primary keys, they are indexes in the result set. Thus, <code>0</code>
468            * refers to the first result in the set. Setting both <code>start</code>
469            * and <code>end</code> to {@link
470            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
471            * result set.
472            * </p>
473            *
474            * @param repositoryId the primary key of the repository
475            * @param folderId the primary key of the folder
476            * @param status the workflow status
477            * @param start the lower bound of the range of results
478            * @param end the upper bound of the range of results (not inclusive)
479            * @return the range of file entries and shortcuts in the folder
480            * @throws PortalException if the folder could not be found
481            * @throws SystemException if a system exception occurred
482            */
483            public static java.util.List<java.lang.Object> getFileEntriesAndFileShortcuts(
484                    long repositoryId, long folderId, int status, int start, int end)
485                    throws com.liferay.portal.kernel.exception.PortalException,
486                            com.liferay.portal.kernel.exception.SystemException {
487                    return getService()
488                                       .getFileEntriesAndFileShortcuts(repositoryId, folderId,
489                            status, start, end);
490            }
491    
492            /**
493            * Returns the number of file entries and shortcuts in the folder.
494            *
495            * @param repositoryId the primary key of the repository
496            * @param folderId the primary key of the folder
497            * @param status the workflow status
498            * @return the number of file entries and shortcuts in the folder
499            * @throws PortalException if the folder could not be found
500            * @throws SystemException if a system exception occurred
501            */
502            public static int getFileEntriesAndFileShortcutsCount(long repositoryId,
503                    long folderId, int status)
504                    throws com.liferay.portal.kernel.exception.PortalException,
505                            com.liferay.portal.kernel.exception.SystemException {
506                    return getService()
507                                       .getFileEntriesAndFileShortcutsCount(repositoryId, folderId,
508                            status);
509            }
510    
511            /**
512            * Returns the number of file entries in the folder.
513            *
514            * @param repositoryId the primary key of the file entry's repository
515            * @param folderId the primary key of the file entry's folder
516            * @return the number of file entries in the folder
517            * @throws PortalException if the folder could not be found
518            * @throws SystemException if a system exception occurred
519            */
520            public static int getFileEntriesCount(long repositoryId, long folderId)
521                    throws com.liferay.portal.kernel.exception.PortalException,
522                            com.liferay.portal.kernel.exception.SystemException {
523                    return getService().getFileEntriesCount(repositoryId, folderId);
524            }
525    
526            /**
527            * Returns the file entry with the primary key.
528            *
529            * @param fileEntryId the primary key of the file entry
530            * @return the file entry with the primary key
531            * @throws PortalException if the file entry could not be found
532            * @throws SystemException if a system exception occurred
533            */
534            public static com.liferay.portal.kernel.repository.model.FileEntry getFileEntry(
535                    long fileEntryId)
536                    throws com.liferay.portal.kernel.exception.PortalException,
537                            com.liferay.portal.kernel.exception.SystemException {
538                    return getService().getFileEntry(fileEntryId);
539            }
540    
541            /**
542            * Returns the file entry with the title in the folder.
543            *
544            * @param groupId the primary key of the file entry's group
545            * @param folderId the primary key of the file entry's folder
546            * @param title the file entry's title
547            * @return the file entry with the title in the folder
548            * @throws PortalException if the file entry could not be found
549            * @throws SystemException if a system exception occurred
550            */
551            public static com.liferay.portal.kernel.repository.model.FileEntry getFileEntry(
552                    long groupId, long folderId, java.lang.String title)
553                    throws com.liferay.portal.kernel.exception.PortalException,
554                            com.liferay.portal.kernel.exception.SystemException {
555                    return getService().getFileEntry(groupId, folderId, title);
556            }
557    
558            /**
559            * Returns the file entry with the UUID and group.
560            *
561            * @param uuid the file entry's universally unique identifier
562            * @param groupId the primary key of the file entry's group
563            * @return the file entry with the UUID and group
564            * @throws PortalException if the file entry could not be found
565            * @throws SystemException if a system exception occurred
566            */
567            public static com.liferay.portal.kernel.repository.model.FileEntry getFileEntryByUuidAndGroupId(
568                    java.lang.String uuid, long groupId)
569                    throws com.liferay.portal.kernel.exception.PortalException,
570                            com.liferay.portal.kernel.exception.SystemException {
571                    return getService().getFileEntryByUuidAndGroupId(uuid, groupId);
572            }
573    
574            /**
575            * Returns the file ranks from the user. This method is only supported by
576            * the Liferay repository.
577            *
578            * @param repositoryId the primary key of the repository
579            * @param userId the primary key of the user
580            * @return the file ranks from the user
581            * @throws SystemException if a system exception occurred
582            */
583            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> getFileRanks(
584                    long repositoryId, long userId)
585                    throws com.liferay.portal.kernel.exception.SystemException {
586                    return getService().getFileRanks(repositoryId, userId);
587            }
588    
589            /**
590            * Returns the file shortcut with the primary key. This method is only
591            * supported by the Liferay repository.
592            *
593            * @param fileShortcutId the primary key of the file shortcut
594            * @return the file shortcut with the primary key
595            * @throws PortalException if the file shortcut could not be found
596            * @throws SystemException if a system exception occurred
597            */
598            public static com.liferay.portlet.documentlibrary.model.DLFileShortcut getFileShortcut(
599                    long fileShortcutId)
600                    throws com.liferay.portal.kernel.exception.PortalException,
601                            com.liferay.portal.kernel.exception.SystemException {
602                    return getService().getFileShortcut(fileShortcutId);
603            }
604    
605            /**
606            * Returns the file version with the primary key.
607            *
608            * @param fileVersionId the primary key of the file version
609            * @return the file version with the primary key
610            * @throws PortalException if the file version could not be found
611            * @throws SystemException if a system exception occurred
612            */
613            public static com.liferay.portal.kernel.repository.model.FileVersion getFileVersion(
614                    long fileVersionId)
615                    throws com.liferay.portal.kernel.exception.PortalException,
616                            com.liferay.portal.kernel.exception.SystemException {
617                    return getService().getFileVersion(fileVersionId);
618            }
619    
620            /**
621            * Returns the folder with the primary key.
622            *
623            * @param folderId the primary key of the folder
624            * @return the folder with the primary key
625            * @throws PortalException if the folder could not be found
626            * @throws SystemException if a system exception occurred
627            */
628            public static com.liferay.portal.kernel.repository.model.Folder getFolder(
629                    long folderId)
630                    throws com.liferay.portal.kernel.exception.PortalException,
631                            com.liferay.portal.kernel.exception.SystemException {
632                    return getService().getFolder(folderId);
633            }
634    
635            /**
636            * Returns the folder with the name in the parent folder.
637            *
638            * @param repositoryId the primary key of the folder's repository
639            * @param parentFolderId the primary key of the folder's parent folder
640            * @param name the folder's name
641            * @return the folder with the name in the parent folder
642            * @throws PortalException if the folder could not be found
643            * @throws SystemException if a system exception occurred
644            */
645            public static com.liferay.portal.kernel.repository.model.Folder getFolder(
646                    long repositoryId, long parentFolderId, java.lang.String name)
647                    throws com.liferay.portal.kernel.exception.PortalException,
648                            com.liferay.portal.kernel.exception.SystemException {
649                    return getService().getFolder(repositoryId, parentFolderId, name);
650            }
651    
652            /**
653            * Returns all immediate subfolders of the parent folder.
654            *
655            * @param repositoryId the primary key of the folder's repository
656            * @param parentFolderId the primary key of the folder's parent folder
657            * @return the immediate subfolders of the parent folder
658            * @throws PortalException if the parent folder could not be found
659            * @throws SystemException if a system exception occurred
660            */
661            public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders(
662                    long repositoryId, long parentFolderId)
663                    throws com.liferay.portal.kernel.exception.PortalException,
664                            com.liferay.portal.kernel.exception.SystemException {
665                    return getService().getFolders(repositoryId, parentFolderId);
666            }
667    
668            /**
669            * Returns all immediate subfolders of the parent folder, optionally
670            * including mount folders for third-party repositories.
671            *
672            * @param repositoryId the primary key of the folder's repository
673            * @param parentFolderId the primary key of the folder's parent folder
674            * @param includeMountFolders whether to include mount folders for
675            third-party repositories
676            * @return the immediate subfolders of the parent folder
677            * @throws PortalException if the parent folder could not be found
678            * @throws SystemException if a system exception occurred
679            */
680            public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders(
681                    long repositoryId, long parentFolderId, boolean includeMountFolders)
682                    throws com.liferay.portal.kernel.exception.PortalException,
683                            com.liferay.portal.kernel.exception.SystemException {
684                    return getService()
685                                       .getFolders(repositoryId, parentFolderId, includeMountFolders);
686            }
687    
688            /**
689            * Returns a range of all the immediate subfolders of the parent folder,
690            * optionally including mount folders for third-party repositories.
691            *
692            * <p>
693            * Useful when paginating results. Returns a maximum of <code>end -
694            * start</code> instances. <code>start</code> and <code>end</code> are not
695            * primary keys, they are indexes in the result set. Thus, <code>0</code>
696            * refers to the first result in the set. Setting both <code>start</code>
697            * and <code>end</code> to {@link
698            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
699            * result set.
700            * </p>
701            *
702            * @param repositoryId the primary key of the folder's repository
703            * @param parentFolderId the primary key of the folder's parent folder
704            * @param includeMountFolders whether to include mount folders for
705            third-party repositories
706            * @param start the lower bound of the range of results
707            * @param end the upper bound of the range of results (not inclusive)
708            * @return the range of immediate subfolders of the parent folder
709            * @throws PortalException if the parent folder could not be found
710            * @throws SystemException if a system exception occurred
711            */
712            public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders(
713                    long repositoryId, long parentFolderId, boolean includeMountFolders,
714                    int start, int end)
715                    throws com.liferay.portal.kernel.exception.PortalException,
716                            com.liferay.portal.kernel.exception.SystemException {
717                    return getService()
718                                       .getFolders(repositoryId, parentFolderId,
719                            includeMountFolders, start, end);
720            }
721    
722            /**
723            * Returns an ordered range of all the immediate subfolders of the parent
724            * folder.
725            *
726            * <p>
727            * Useful when paginating results. Returns a maximum of <code>end -
728            * start</code> instances. <code>start</code> and <code>end</code> are not
729            * primary keys, they are indexes in the result set. Thus, <code>0</code>
730            * refers to the first result in the set. Setting both <code>start</code>
731            * and <code>end</code> to {@link
732            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
733            * result set.
734            * </p>
735            *
736            * @param repositoryId the primary key of the folder's repository
737            * @param parentFolderId the primary key of the folder's parent folder
738            * @param includeMountFolders whether to include mount folders for
739            third-party repositories
740            * @param start the lower bound of the range of results
741            * @param end the upper bound of the range of results (not inclusive)
742            * @param obc the comparator to order the folders (optionally
743            <code>null</code>)
744            * @return the range of immediate subfolders of the parent folder ordered by
745            comparator <code>obc</code>
746            * @throws PortalException if the parent folder could not be found
747            * @throws SystemException if a system exception occurred
748            */
749            public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders(
750                    long repositoryId, long parentFolderId, boolean includeMountFolders,
751                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
752                    throws com.liferay.portal.kernel.exception.PortalException,
753                            com.liferay.portal.kernel.exception.SystemException {
754                    return getService()
755                                       .getFolders(repositoryId, parentFolderId,
756                            includeMountFolders, start, end, obc);
757            }
758    
759            /**
760            * Returns a range of all the immediate subfolders of the parent folder.
761            *
762            * <p>
763            * Useful when paginating results. Returns a maximum of <code>end -
764            * start</code> instances. <code>start</code> and <code>end</code> are not
765            * primary keys, they are indexes in the result set. Thus, <code>0</code>
766            * refers to the first result in the set. Setting both <code>start</code>
767            * and <code>end</code> to {@link
768            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
769            * result set.
770            * </p>
771            *
772            * @param repositoryId the primary key of the folder's repository
773            * @param parentFolderId the primary key of the folder's parent folder
774            * @param start the lower bound of the range of results
775            * @param end the upper bound of the range of results (not inclusive)
776            * @return the range of immediate subfolders of the parent folder
777            * @throws PortalException if the parent folder could not be found
778            * @throws SystemException if a system exception occurred
779            */
780            public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders(
781                    long repositoryId, long parentFolderId, int start, int end)
782                    throws com.liferay.portal.kernel.exception.PortalException,
783                            com.liferay.portal.kernel.exception.SystemException {
784                    return getService().getFolders(repositoryId, parentFolderId, start, end);
785            }
786    
787            /**
788            * Returns an ordered range of all the immediate subfolders of the parent
789            * folder.
790            *
791            * <p>
792            * Useful when paginating results. Returns a maximum of <code>end -
793            * start</code> instances. <code>start</code> and <code>end</code> are not
794            * primary keys, they are indexes in the result set. Thus, <code>0</code>
795            * refers to the first result in the set. Setting both <code>start</code>
796            * and <code>end</code> to {@link
797            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
798            * result set.
799            * </p>
800            *
801            * @param repositoryId the primary key of the folder's repository
802            * @param parentFolderId the primary key of the folder's parent folder
803            * @param start the lower bound of the range of results
804            * @param end the upper bound of the range of results (not inclusive)
805            * @param obc the comparator to order the folders (optionally
806            <code>null</code>)
807            * @return the range of immediate subfolders of the parent folder ordered by
808            comparator <code>obc</code>
809            * @throws PortalException if the parent folder could not be found
810            * @throws SystemException if a system exception occurred
811            */
812            public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders(
813                    long repositoryId, long parentFolderId, int start, int end,
814                    com.liferay.portal.kernel.util.OrderByComparator obc)
815                    throws com.liferay.portal.kernel.exception.PortalException,
816                            com.liferay.portal.kernel.exception.SystemException {
817                    return getService()
818                                       .getFolders(repositoryId, parentFolderId, start, end, obc);
819            }
820    
821            /**
822            * Returns an ordered range of all the immediate subfolders, file entries,
823            * and file shortcuts in the parent folder.
824            *
825            * <p>
826            * Useful when paginating results. Returns a maximum of <code>end -
827            * start</code> instances. <code>start</code> and <code>end</code> are not
828            * primary keys, they are indexes in the result set. Thus, <code>0</code>
829            * refers to the first result in the set. Setting both <code>start</code>
830            * and <code>end</code> to {@link
831            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
832            * result set.
833            * </p>
834            *
835            * @param repositoryId the primary key of the repository
836            * @param folderId the primary key of the parent folder
837            * @param status the workflow status
838            * @param includeMountFolders whether to include mount folders for
839            third-party repositories
840            * @param start the lower bound of the range of results
841            * @param end the upper bound of the range of results (not inclusive)
842            * @param obc the comparator to order the results (optionally
843            <code>null</code>)
844            * @return the range of immediate subfolders, file entries, and file
845            shortcuts in the parent folder ordered by comparator
846            <code>obc</code>
847            * @throws PortalException if the folder could not be found
848            * @throws SystemException if a system exception occurred
849            */
850            public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
851                    long repositoryId, long folderId, int status,
852                    boolean includeMountFolders, int start, int end,
853                    com.liferay.portal.kernel.util.OrderByComparator obc)
854                    throws com.liferay.portal.kernel.exception.PortalException,
855                            com.liferay.portal.kernel.exception.SystemException {
856                    return getService()
857                                       .getFoldersAndFileEntriesAndFileShortcuts(repositoryId,
858                            folderId, status, includeMountFolders, start, end, obc);
859            }
860    
861            public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
862                    long repositoryId, long folderId, int status,
863                    java.lang.String[] mimeTypes, boolean includeMountFolders, int start,
864                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
865                    throws com.liferay.portal.kernel.exception.PortalException,
866                            com.liferay.portal.kernel.exception.SystemException {
867                    return getService()
868                                       .getFoldersAndFileEntriesAndFileShortcuts(repositoryId,
869                            folderId, status, mimeTypes, includeMountFolders, start, end, obc);
870            }
871    
872            /**
873            * Returns the number of immediate subfolders, file entries, and file
874            * shortcuts in the parent folder.
875            *
876            * @param repositoryId the primary key of the repository
877            * @param folderId the primary key of the parent folder
878            * @param status the workflow status
879            * @param includeMountFolders whether to include mount folders for
880            third-party repositories
881            * @return the number of immediate subfolders, file entries, and file
882            shortcuts in the parent folder
883            * @throws PortalException if the folder could not be found
884            * @throws SystemException if a system exception occurred
885            */
886            public static int getFoldersAndFileEntriesAndFileShortcutsCount(
887                    long repositoryId, long folderId, int status,
888                    boolean includeMountFolders)
889                    throws com.liferay.portal.kernel.exception.PortalException,
890                            com.liferay.portal.kernel.exception.SystemException {
891                    return getService()
892                                       .getFoldersAndFileEntriesAndFileShortcutsCount(repositoryId,
893                            folderId, status, includeMountFolders);
894            }
895    
896            public static int getFoldersAndFileEntriesAndFileShortcutsCount(
897                    long repositoryId, long folderId, int status,
898                    java.lang.String[] mimeTypes, boolean includeMountFolders)
899                    throws com.liferay.portal.kernel.exception.PortalException,
900                            com.liferay.portal.kernel.exception.SystemException {
901                    return getService()
902                                       .getFoldersAndFileEntriesAndFileShortcutsCount(repositoryId,
903                            folderId, status, mimeTypes, includeMountFolders);
904            }
905    
906            /**
907            * Returns the number of immediate subfolders of the parent folder.
908            *
909            * @param repositoryId the primary key of the folder's repository
910            * @param parentFolderId the primary key of the folder's parent folder
911            * @return the number of immediate subfolders of the parent folder
912            * @throws PortalException if the parent folder could not be found
913            * @throws SystemException if a system exception occurred
914            */
915            public static int getFoldersCount(long repositoryId, long parentFolderId)
916                    throws com.liferay.portal.kernel.exception.PortalException,
917                            com.liferay.portal.kernel.exception.SystemException {
918                    return getService().getFoldersCount(repositoryId, parentFolderId);
919            }
920    
921            /**
922            * Returns the number of immediate subfolders of the parent folder,
923            * optionally including mount folders for third-party repositories.
924            *
925            * @param repositoryId the primary key of the folder's repository
926            * @param parentFolderId the primary key of the folder's parent folder
927            * @param includeMountFolders whether to include mount folders for
928            third-party repositories
929            * @return the number of immediate subfolders of the parent folder
930            * @throws PortalException if the parent folder could not be found
931            * @throws SystemException if a system exception occurred
932            */
933            public static int getFoldersCount(long repositoryId, long parentFolderId,
934                    boolean includeMountFolders)
935                    throws com.liferay.portal.kernel.exception.PortalException,
936                            com.liferay.portal.kernel.exception.SystemException {
937                    return getService()
938                                       .getFoldersCount(repositoryId, parentFolderId,
939                            includeMountFolders);
940            }
941    
942            /**
943            * Returns the number of immediate subfolders and file entries across the
944            * folders.
945            *
946            * @param repositoryId the primary key of the repository
947            * @param folderIds the primary keys of folders from which to count
948            immediate subfolders and file entries
949            * @param status the workflow status
950            * @return the number of immediate subfolders and file entries across the
951            folders
952            * @throws PortalException if the repository could not be found
953            * @throws SystemException if a system exception occurred
954            */
955            public static int getFoldersFileEntriesCount(long repositoryId,
956                    java.util.List<java.lang.Long> folderIds, int status)
957                    throws com.liferay.portal.kernel.exception.PortalException,
958                            com.liferay.portal.kernel.exception.SystemException {
959                    return getService()
960                                       .getFoldersFileEntriesCount(repositoryId, folderIds, status);
961            }
962    
963            /**
964            * Returns the mount folder of the repository with the primary key. This
965            * method is only supported by the Liferay repository.
966            *
967            * @param repositoryId the primary key of the repository
968            * @return the folder used for mounting third-party repositories
969            * @throws PortalException if the repository or mount folder could not be
970            found
971            * @throws SystemException if a system exception occurred
972            */
973            public static com.liferay.portal.kernel.repository.model.Folder getMountFolder(
974                    long repositoryId)
975                    throws com.liferay.portal.kernel.exception.PortalException,
976                            com.liferay.portal.kernel.exception.SystemException {
977                    return getService().getMountFolder(repositoryId);
978            }
979    
980            /**
981            * Returns all immediate subfolders of the parent folder that are used for
982            * mounting third-party repositories. This method is only supported by the
983            * Liferay repository.
984            *
985            * @param repositoryId the primary key of the folder's repository
986            * @param parentFolderId the primary key of the folder's parent folder
987            * @return the immediate subfolders of the parent folder that are used for
988            mounting third-party repositories
989            * @throws PortalException if the repository or parent folder could not be
990            found
991            * @throws SystemException if a system exception occurred
992            */
993            public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getMountFolders(
994                    long repositoryId, long parentFolderId)
995                    throws com.liferay.portal.kernel.exception.PortalException,
996                            com.liferay.portal.kernel.exception.SystemException {
997                    return getService().getMountFolders(repositoryId, parentFolderId);
998            }
999    
1000            /**
1001            * Returns a range of all the immediate subfolders of the parent folder that
1002            * are used for mounting third-party repositories. This method is only
1003            * supported by the Liferay repository.
1004            *
1005            * <p>
1006            * Useful when paginating results. Returns a maximum of <code>end -
1007            * start</code> instances. <code>start</code> and <code>end</code> are not
1008            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1009            * refers to the first result in the set. Setting both <code>start</code>
1010            * and <code>end</code> to {@link
1011            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1012            * result set.
1013            * </p>
1014            *
1015            * @param repositoryId the primary key of the repository
1016            * @param parentFolderId the primary key of the parent folder
1017            * @param start the lower bound of the range of results
1018            * @param end the upper bound of the range of results (not inclusive)
1019            * @return the range of immediate subfolders of the parent folder that are
1020            used for mounting third-party repositories
1021            * @throws PortalException if the repository or parent folder could not be
1022            found
1023            * @throws SystemException if a system exception occurred
1024            */
1025            public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getMountFolders(
1026                    long repositoryId, long parentFolderId, int start, int end)
1027                    throws com.liferay.portal.kernel.exception.PortalException,
1028                            com.liferay.portal.kernel.exception.SystemException {
1029                    return getService()
1030                                       .getMountFolders(repositoryId, parentFolderId, start, end);
1031            }
1032    
1033            /**
1034            * Returns an ordered range of all the immediate subfolders of the parent
1035            * folder that are used for mounting third-party repositories. This method
1036            * is only supported by the Liferay repository.
1037            *
1038            * <p>
1039            * Useful when paginating results. Returns a maximum of <code>end -
1040            * start</code> instances. <code>start</code> and <code>end</code> are not
1041            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1042            * refers to the first result in the set. Setting both <code>start</code>
1043            * and <code>end</code> to {@link
1044            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1045            * result set.
1046            * </p>
1047            *
1048            * @param repositoryId the primary key of the folder's repository
1049            * @param parentFolderId the primary key of the folder's parent folder
1050            * @param start the lower bound of the range of results
1051            * @param end the upper bound of the range of results (not inclusive)
1052            * @param obc the comparator to order the folders (optionally
1053            <code>null</code>)
1054            * @return the range of immediate subfolders of the parent folder that are
1055            used for mounting third-party repositories ordered by comparator
1056            <code>obc</code>
1057            * @throws PortalException if the repository or parent folder could not be
1058            found
1059            * @throws SystemException if a system exception occurred
1060            */
1061            public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getMountFolders(
1062                    long repositoryId, long parentFolderId, int start, int end,
1063                    com.liferay.portal.kernel.util.OrderByComparator obc)
1064                    throws com.liferay.portal.kernel.exception.PortalException,
1065                            com.liferay.portal.kernel.exception.SystemException {
1066                    return getService()
1067                                       .getMountFolders(repositoryId, parentFolderId, start, end,
1068                            obc);
1069            }
1070    
1071            /**
1072            * Returns the number of immediate subfolders of the parent folder that are
1073            * used for mounting third-party repositories. This method is only supported
1074            * by the Liferay repository.
1075            *
1076            * @param repositoryId the primary key of the repository
1077            * @param parentFolderId the primary key of the parent folder
1078            * @return the number of folders of the parent folder that are used for
1079            mounting third-party repositories
1080            * @throws PortalException if the repository or parent folder could not be
1081            found
1082            * @throws SystemException if a system exception occurred
1083            */
1084            public static int getMountFoldersCount(long repositoryId,
1085                    long parentFolderId)
1086                    throws com.liferay.portal.kernel.exception.PortalException,
1087                            com.liferay.portal.kernel.exception.SystemException {
1088                    return getService().getMountFoldersCount(repositoryId, parentFolderId);
1089            }
1090    
1091            /**
1092            * Moves the file entry to the new folder.
1093            *
1094            * @param userId the primary key of the user
1095            * @param fileEntryId the primary key of the file entry
1096            * @param newFolderId the primary key of the new folder
1097            * @param serviceContext the service context to be applied
1098            * @return the file entry
1099            * @throws PortalException if the file entry or the new folder could not be
1100            found
1101            * @throws SystemException if a system exception occurred
1102            */
1103            public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntry(
1104                    long userId, long fileEntryId, long newFolderId,
1105                    com.liferay.portal.service.ServiceContext serviceContext)
1106                    throws com.liferay.portal.kernel.exception.PortalException,
1107                            com.liferay.portal.kernel.exception.SystemException {
1108                    return getService()
1109                                       .moveFileEntry(userId, fileEntryId, newFolderId,
1110                            serviceContext);
1111            }
1112    
1113            /**
1114            * Updates the file entry's asset replacing its asset categories, tags, and
1115            * links.
1116            *
1117            * @param userId the primary key of the user
1118            * @param fileEntry the file entry to update
1119            * @param fileVersion the file version to update
1120            * @param assetCategoryIds the primary keys of the new asset categories
1121            * @param assetTagNames the new asset tag names
1122            * @param assetLinkEntryIds the primary keys of the new asset link entries
1123            * @throws PortalException if the file entry or version could not be found
1124            * @throws SystemException if a system exception occurred
1125            */
1126            public static void updateAsset(long userId,
1127                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
1128                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
1129                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
1130                    long[] assetLinkEntryIds)
1131                    throws com.liferay.portal.kernel.exception.PortalException,
1132                            com.liferay.portal.kernel.exception.SystemException {
1133                    getService()
1134                            .updateAsset(userId, fileEntry, fileVersion, assetCategoryIds,
1135                            assetTagNames, assetLinkEntryIds);
1136            }
1137    
1138            /**
1139            * Updates a file entry and associated metadata based on a byte array
1140            * object. If the file data is <code>null</code>, then only the associated
1141            * metadata (i.e., <code>title</code>, <code>description</code>, and
1142            * parameters in the <code>serviceContext</code>) will be updated.
1143            *
1144            * <p>
1145            * This method takes two file names, the <code>sourceFileName</code> and the
1146            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
1147            * name of the actual file being uploaded. The <code>title</code>
1148            * corresponds to a name the client wishes to assign this file after it has
1149            * been uploaded to the portal.
1150            * </p>
1151            *
1152            * @param userId the primary key of the user
1153            * @param fileEntryId the primary key of the file entry
1154            * @param sourceFileName the original file's name (optionally
1155            <code>null</code>)
1156            * @param mimeType the file's MIME type (optionally <code>null</code>)
1157            * @param title the new name to be assigned to the file (optionally <code>
1158            <code>null</code></code>)
1159            * @param description the file's new description
1160            * @param changeLog the file's version change log (optionally
1161            <code>null</code>)
1162            * @param majorVersion whether the new file version is a major version
1163            * @param bytes the file's data (optionally <code>null</code>)
1164            * @param serviceContext the service context to be applied. Can set the
1165            asset category IDs, asset tag names, and expando bridge
1166            attributes for the file entry. In a Liferay repository, it may
1167            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
1168            type </li> <li> fieldsMap - mapping for fields associated with a
1169            custom file entry type </li> </ul>
1170            * @return the file entry
1171            * @throws PortalException if the file entry could not be found
1172            * @throws SystemException if a system exception occurred
1173            */
1174            public static com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry(
1175                    long userId, long fileEntryId, java.lang.String sourceFileName,
1176                    java.lang.String mimeType, java.lang.String title,
1177                    java.lang.String description, java.lang.String changeLog,
1178                    boolean majorVersion, byte[] bytes,
1179                    com.liferay.portal.service.ServiceContext serviceContext)
1180                    throws com.liferay.portal.kernel.exception.PortalException,
1181                            com.liferay.portal.kernel.exception.SystemException {
1182                    return getService()
1183                                       .updateFileEntry(userId, fileEntryId, sourceFileName,
1184                            mimeType, title, description, changeLog, majorVersion, bytes,
1185                            serviceContext);
1186            }
1187    
1188            /**
1189            * Updates a file entry and associated metadata based on a {@link File}
1190            * object. If the file data is <code>null</code>, then only the associated
1191            * metadata (i.e., <code>title</code>, <code>description</code>, and
1192            * parameters in the <code>serviceContext</code>) will be updated.
1193            *
1194            * <p>
1195            * This method takes two file names, the <code>sourceFileName</code> and the
1196            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
1197            * name of the actual file being uploaded. The <code>title</code>
1198            * corresponds to a name the client wishes to assign this file after it has
1199            * been uploaded to the portal.
1200            * </p>
1201            *
1202            * @param userId the primary key of the user
1203            * @param fileEntryId the primary key of the file entry
1204            * @param sourceFileName the original file's name (optionally
1205            <code>null</code>)
1206            * @param mimeType the file's MIME type (optionally <code>null</code>)
1207            * @param title the new name to be assigned to the file (optionally <code>
1208            <code>null</code></code>)
1209            * @param description the file's new description
1210            * @param changeLog the file's version change log (optionally
1211            <code>null</code>)
1212            * @param majorVersion whether the new file version is a major version
1213            * @param file EntryId the primary key of the file entry
1214            * @param serviceContext the service context to be applied. Can set the
1215            asset category IDs, asset tag names, and expando bridge
1216            attributes for the file entry. In a Liferay repository, it may
1217            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
1218            type </li> <li> fieldsMap - mapping for fields associated with a
1219            custom file entry type </li> </ul>
1220            * @return the file entry
1221            * @throws PortalException if the file entry could not be found
1222            * @throws SystemException if a system exception occurred
1223            */
1224            public static com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry(
1225                    long userId, long fileEntryId, java.lang.String sourceFileName,
1226                    java.lang.String mimeType, java.lang.String title,
1227                    java.lang.String description, java.lang.String changeLog,
1228                    boolean majorVersion, java.io.File file,
1229                    com.liferay.portal.service.ServiceContext serviceContext)
1230                    throws com.liferay.portal.kernel.exception.PortalException,
1231                            com.liferay.portal.kernel.exception.SystemException {
1232                    return getService()
1233                                       .updateFileEntry(userId, fileEntryId, sourceFileName,
1234                            mimeType, title, description, changeLog, majorVersion, file,
1235                            serviceContext);
1236            }
1237    
1238            /**
1239            * Updates a file entry and associated metadata based on an {@link
1240            * InputStream} object. If the file data is <code>null</code>, then only the
1241            * associated metadata (i.e., <code>title</code>, <code>description</code>,
1242            * and parameters in the <code>serviceContext</code>) will be updated.
1243            *
1244            * <p>
1245            * This method takes two file names, the <code>sourceFileName</code> and the
1246            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
1247            * name of the actual file being uploaded. The <code>title</code>
1248            * corresponds to a name the client wishes to assign this file after it has
1249            * been uploaded to the portal.
1250            * </p>
1251            *
1252            * @param userId the primary key of the user
1253            * @param fileEntryId the primary key of the file entry
1254            * @param sourceFileName the original file's name (optionally
1255            <code>null</code>)
1256            * @param mimeType the file's MIME type (optionally <code>null</code>)
1257            * @param title the new name to be assigned to the file (optionally <code>
1258            <code>null</code></code>)
1259            * @param description the file's new description
1260            * @param changeLog the file's version change log (optionally
1261            <code>null</code>)
1262            * @param majorVersion whether the new file version is a major version
1263            * @param is the file's data (optionally <code>null</code>)
1264            * @param size the file's size (optionally <code>0</code>)
1265            * @param serviceContext the service context to be applied. Can set the
1266            asset category IDs, asset tag names, and expando bridge
1267            attributes for the file entry. In a Liferay repository, it may
1268            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
1269            type </li> <li> fieldsMap - mapping for fields associated with a
1270            custom file entry type </li> </ul>
1271            * @return the file entry
1272            * @throws PortalException if the file entry could not be found
1273            * @throws SystemException if a system exception occurred
1274            */
1275            public static com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry(
1276                    long userId, long fileEntryId, java.lang.String sourceFileName,
1277                    java.lang.String mimeType, java.lang.String title,
1278                    java.lang.String description, java.lang.String changeLog,
1279                    boolean majorVersion, java.io.InputStream is, long size,
1280                    com.liferay.portal.service.ServiceContext serviceContext)
1281                    throws com.liferay.portal.kernel.exception.PortalException,
1282                            com.liferay.portal.kernel.exception.SystemException {
1283                    return getService()
1284                                       .updateFileEntry(userId, fileEntryId, sourceFileName,
1285                            mimeType, title, description, changeLog, majorVersion, is, size,
1286                            serviceContext);
1287            }
1288    
1289            /**
1290            * Updates a file rank to the existing file entry. This method is only
1291            * supported by the Liferay repository.
1292            *
1293            * @param repositoryId the primary key of the file rank's repository
1294            * @param companyId the primary key of the file rank's company
1295            * @param userId the primary key of the file rank's creator/owner
1296            * @param fileEntryId the primary key of the file rank's file entry
1297            * @param serviceContext the service context to be applied
1298            * @return the file rank
1299            * @throws SystemException if a system exception occurred
1300            */
1301            public static com.liferay.portlet.documentlibrary.model.DLFileRank updateFileRank(
1302                    long repositoryId, long companyId, long userId, long fileEntryId,
1303                    com.liferay.portal.service.ServiceContext serviceContext)
1304                    throws com.liferay.portal.kernel.exception.SystemException {
1305                    return getService()
1306                                       .updateFileRank(repositoryId, companyId, userId,
1307                            fileEntryId, serviceContext);
1308            }
1309    
1310            /**
1311            * Updates a file shortcut to the existing file entry. This method is only
1312            * supported by the Liferay repository.
1313            *
1314            * @param userId the primary key of the file shortcut's creator/owner
1315            * @param fileShortcutId the primary key of the file shortcut
1316            * @param folderId the primary key of the file shortcut's parent folder
1317            * @param toFileEntryId the primary key of the file shortcut's file entry
1318            * @param serviceContext the service context to be applied. Can set the
1319            asset category IDs, asset tag names, and expando bridge
1320            attributes for the file entry.
1321            * @return the file shortcut
1322            * @throws PortalException if the file shortcut, folder, or file entry could
1323            not be found
1324            * @throws SystemException if a system exception occurred
1325            */
1326            public static com.liferay.portlet.documentlibrary.model.DLFileShortcut updateFileShortcut(
1327                    long userId, long fileShortcutId, long folderId, long toFileEntryId,
1328                    com.liferay.portal.service.ServiceContext serviceContext)
1329                    throws com.liferay.portal.kernel.exception.PortalException,
1330                            com.liferay.portal.kernel.exception.SystemException {
1331                    return getService()
1332                                       .updateFileShortcut(userId, fileShortcutId, folderId,
1333                            toFileEntryId, serviceContext);
1334            }
1335    
1336            /**
1337            * Updates all file shortcuts to the existing file entry to the new file
1338            * entry. This method is only supported by the Liferay repository.
1339            *
1340            * @param toRepositoryId the primary key of the repository
1341            * @param oldToFileEntryId the primary key of the old file entry pointed to
1342            * @param newToFileEntryId the primary key of the new file entry to point
1343            to
1344            * @throws SystemException if a system exception occurred
1345            */
1346            public static void updateFileShortcuts(long toRepositoryId,
1347                    long oldToFileEntryId, long newToFileEntryId)
1348                    throws com.liferay.portal.kernel.exception.SystemException {
1349                    getService()
1350                            .updateFileShortcuts(toRepositoryId, oldToFileEntryId,
1351                            newToFileEntryId);
1352            }
1353    
1354            /**
1355            * Updates the folder.
1356            *
1357            * @param folderId the primary key of the folder
1358            * @param parentFolderId the primary key of the folder's new parent folder
1359            * @param name the folder's new name
1360            * @param description the folder's new description
1361            * @param serviceContext the service context to be applied. In a Liferay
1362            repository, it may include:  <ul> <li> defaultFileEntryTypeId -
1363            the file entry type to default all Liferay file entries to </li>
1364            <li> dlFileEntryTypesSearchContainerPrimaryKeys - a
1365            comma-delimited list of file entry type primary keys allowed in
1366            the given folder and all descendants </li> <li>
1367            overrideFileEntryTypes - boolean specifying whether to override
1368            ancestral folder's restriction of file entry types allowed </li>
1369            <li> workflowDefinitionXYZ - the workflow definition name
1370            specified per file entry type. The parameter name must be the
1371            string <code>workflowDefinition</code> appended by the <code>
1372            fileEntryTypeId</code> (optionally <code>0</code>). </li> </ul>
1373            * @return the folder
1374            * @throws PortalException if the current or new parent folder could not be
1375            found, or if the new parent folder's information was invalid
1376            * @throws SystemException if a system exception occurred
1377            */
1378            public static com.liferay.portal.kernel.repository.model.Folder updateFolder(
1379                    long folderId, long parentFolderId, java.lang.String name,
1380                    java.lang.String description,
1381                    com.liferay.portal.service.ServiceContext serviceContext)
1382                    throws com.liferay.portal.kernel.exception.PortalException,
1383                            com.liferay.portal.kernel.exception.SystemException {
1384                    return getService()
1385                                       .updateFolder(folderId, parentFolderId, name, description,
1386                            serviceContext);
1387            }
1388    
1389            public static DLAppLocalService getService() {
1390                    if (_service == null) {
1391                            _service = (DLAppLocalService)PortalBeanLocatorUtil.locate(DLAppLocalService.class.getName());
1392    
1393                            ReferenceRegistry.registerReference(DLAppLocalServiceUtil.class,
1394                                    "_service");
1395                    }
1396    
1397                    return _service;
1398            }
1399    
1400            /**
1401             * @deprecated
1402             */
1403            public void setService(DLAppLocalService service) {
1404            }
1405    
1406            private static DLAppLocalService _service;
1407    }