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