001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.documentlibrary.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the local service utility for DLFileEntry. This utility wraps
024     * {@link com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on the local server. Methods of this service will not have security checks
027     * based on the propagated JAAS credentials because this service can only be
028     * accessed from within the same VM.
029     *
030     * @author Brian Wing Shun Chan
031     * @see DLFileEntryLocalService
032     * @see com.liferay.portlet.documentlibrary.service.base.DLFileEntryLocalServiceBaseImpl
033     * @see com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class DLFileEntryLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the document library file entry to the database. Also notifies the appropriate model listeners.
046            *
047            * @param dlFileEntry the document library file entry
048            * @return the document library file entry that was added
049            */
050            public static com.liferay.portlet.documentlibrary.model.DLFileEntry addDLFileEntry(
051                    com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry) {
052                    return getService().addDLFileEntry(dlFileEntry);
053            }
054    
055            public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
056                    long userId, long groupId, long repositoryId, long folderId,
057                    java.lang.String sourceFileName, java.lang.String mimeType,
058                    java.lang.String title, java.lang.String description,
059                    java.lang.String changeLog, long fileEntryTypeId,
060                    java.util.Map<java.lang.String, com.liferay.dynamic.data.mapping.kernel.DDMFormValues> ddmFormValuesMap,
061                    java.io.File file, java.io.InputStream is, long size,
062                    com.liferay.portal.service.ServiceContext serviceContext)
063                    throws com.liferay.portal.kernel.exception.PortalException {
064                    return getService()
065                                       .addFileEntry(userId, groupId, repositoryId, folderId,
066                            sourceFileName, mimeType, title, description, changeLog,
067                            fileEntryTypeId, ddmFormValuesMap, file, is, size, serviceContext);
068            }
069    
070            public static com.liferay.portlet.documentlibrary.model.DLFileVersion cancelCheckOut(
071                    long userId, long fileEntryId)
072                    throws com.liferay.portal.kernel.exception.PortalException {
073                    return getService().cancelCheckOut(userId, fileEntryId);
074            }
075    
076            public static void checkInFileEntry(long userId, long fileEntryId,
077                    java.lang.String lockUuid,
078                    com.liferay.portal.service.ServiceContext serviceContext)
079                    throws com.liferay.portal.kernel.exception.PortalException {
080                    getService()
081                            .checkInFileEntry(userId, fileEntryId, lockUuid, serviceContext);
082            }
083    
084            public static void checkInFileEntry(long userId, long fileEntryId,
085                    boolean majorVersion, java.lang.String changeLog,
086                    com.liferay.portal.service.ServiceContext serviceContext)
087                    throws com.liferay.portal.kernel.exception.PortalException {
088                    getService()
089                            .checkInFileEntry(userId, fileEntryId, majorVersion, changeLog,
090                            serviceContext);
091            }
092    
093            public static com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
094                    long userId, long fileEntryId, java.lang.String owner,
095                    long expirationTime,
096                    com.liferay.portal.service.ServiceContext serviceContext)
097                    throws com.liferay.portal.kernel.exception.PortalException {
098                    return getService()
099                                       .checkOutFileEntry(userId, fileEntryId, owner,
100                            expirationTime, serviceContext);
101            }
102    
103            public static com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
104                    long userId, long fileEntryId,
105                    com.liferay.portal.service.ServiceContext serviceContext)
106                    throws com.liferay.portal.kernel.exception.PortalException {
107                    return getService()
108                                       .checkOutFileEntry(userId, fileEntryId, serviceContext);
109            }
110    
111            public static void convertExtraSettings(java.lang.String[] keys)
112                    throws com.liferay.portal.kernel.exception.PortalException {
113                    getService().convertExtraSettings(keys);
114            }
115    
116            public static com.liferay.portlet.documentlibrary.model.DLFileEntry copyFileEntry(
117                    long userId, long groupId, long repositoryId, long fileEntryId,
118                    long destFolderId,
119                    com.liferay.portal.service.ServiceContext serviceContext)
120                    throws com.liferay.portal.kernel.exception.PortalException {
121                    return getService()
122                                       .copyFileEntry(userId, groupId, repositoryId, fileEntryId,
123                            destFolderId, serviceContext);
124            }
125    
126            public static void copyFileEntryMetadata(long companyId,
127                    long fileEntryTypeId, long fileEntryId, long fromFileVersionId,
128                    long toFileVersionId,
129                    com.liferay.portal.service.ServiceContext serviceContext)
130                    throws com.liferay.portal.kernel.exception.PortalException {
131                    getService()
132                            .copyFileEntryMetadata(companyId, fileEntryTypeId, fileEntryId,
133                            fromFileVersionId, toFileVersionId, serviceContext);
134            }
135    
136            /**
137            * Creates a new document library file entry with the primary key. Does not add the document library file entry to the database.
138            *
139            * @param fileEntryId the primary key for the new document library file entry
140            * @return the new document library file entry
141            */
142            public static com.liferay.portlet.documentlibrary.model.DLFileEntry createDLFileEntry(
143                    long fileEntryId) {
144                    return getService().createDLFileEntry(fileEntryId);
145            }
146    
147            /**
148            * Deletes the document library file entry from the database. Also notifies the appropriate model listeners.
149            *
150            * @param dlFileEntry the document library file entry
151            * @return the document library file entry that was removed
152            */
153            public static com.liferay.portlet.documentlibrary.model.DLFileEntry deleteDLFileEntry(
154                    com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry) {
155                    return getService().deleteDLFileEntry(dlFileEntry);
156            }
157    
158            /**
159            * Deletes the document library file entry with the primary key from the database. Also notifies the appropriate model listeners.
160            *
161            * @param fileEntryId the primary key of the document library file entry
162            * @return the document library file entry that was removed
163            * @throws PortalException if a document library file entry with the primary key could not be found
164            */
165            public static com.liferay.portlet.documentlibrary.model.DLFileEntry deleteDLFileEntry(
166                    long fileEntryId)
167                    throws com.liferay.portal.kernel.exception.PortalException {
168                    return getService().deleteDLFileEntry(fileEntryId);
169            }
170    
171            public static void deleteFileEntries(long groupId, long folderId)
172                    throws com.liferay.portal.kernel.exception.PortalException {
173                    getService().deleteFileEntries(groupId, folderId);
174            }
175    
176            public static void deleteFileEntries(long groupId, long folderId,
177                    boolean includeTrashedEntries)
178                    throws com.liferay.portal.kernel.exception.PortalException {
179                    getService().deleteFileEntries(groupId, folderId, includeTrashedEntries);
180            }
181    
182            public static com.liferay.portlet.documentlibrary.model.DLFileEntry deleteFileEntry(
183                    com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
184                    throws com.liferay.portal.kernel.exception.PortalException {
185                    return getService().deleteFileEntry(dlFileEntry);
186            }
187    
188            public static com.liferay.portlet.documentlibrary.model.DLFileEntry deleteFileEntry(
189                    long fileEntryId)
190                    throws com.liferay.portal.kernel.exception.PortalException {
191                    return getService().deleteFileEntry(fileEntryId);
192            }
193    
194            public static com.liferay.portlet.documentlibrary.model.DLFileEntry deleteFileEntry(
195                    long userId, long fileEntryId)
196                    throws com.liferay.portal.kernel.exception.PortalException {
197                    return getService().deleteFileEntry(userId, fileEntryId);
198            }
199    
200            public static com.liferay.portlet.documentlibrary.model.DLFileEntry deleteFileVersion(
201                    long userId, long fileEntryId, java.lang.String version)
202                    throws com.liferay.portal.kernel.exception.PortalException {
203                    return getService().deleteFileVersion(userId, fileEntryId, version);
204            }
205    
206            /**
207            * @throws PortalException
208            */
209            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
210                    com.liferay.portal.model.PersistedModel persistedModel)
211                    throws com.liferay.portal.kernel.exception.PortalException {
212                    return getService().deletePersistedModel(persistedModel);
213            }
214    
215            public static void deleteRepositoryFileEntries(long repositoryId,
216                    long folderId)
217                    throws com.liferay.portal.kernel.exception.PortalException {
218                    getService().deleteRepositoryFileEntries(repositoryId, folderId);
219            }
220    
221            public static void deleteRepositoryFileEntries(long repositoryId,
222                    long folderId, boolean includeTrashedEntries)
223                    throws com.liferay.portal.kernel.exception.PortalException {
224                    getService()
225                            .deleteRepositoryFileEntries(repositoryId, folderId,
226                            includeTrashedEntries);
227            }
228    
229            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
230                    return getService().dynamicQuery();
231            }
232    
233            /**
234            * Performs a dynamic query on the database and returns the matching rows.
235            *
236            * @param dynamicQuery the dynamic query
237            * @return the matching rows
238            */
239            public static <T> java.util.List<T> dynamicQuery(
240                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
241                    return getService().dynamicQuery(dynamicQuery);
242            }
243    
244            /**
245            * Performs a dynamic query on the database and returns a range of the matching rows.
246            *
247            * <p>
248            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.documentlibrary.model.impl.DLFileEntryModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
249            * </p>
250            *
251            * @param dynamicQuery the dynamic query
252            * @param start the lower bound of the range of model instances
253            * @param end the upper bound of the range of model instances (not inclusive)
254            * @return the range of matching rows
255            */
256            public static <T> java.util.List<T> dynamicQuery(
257                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
258                    int end) {
259                    return getService().dynamicQuery(dynamicQuery, start, end);
260            }
261    
262            /**
263            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
264            *
265            * <p>
266            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.documentlibrary.model.impl.DLFileEntryModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
267            * </p>
268            *
269            * @param dynamicQuery the dynamic query
270            * @param start the lower bound of the range of model instances
271            * @param end the upper bound of the range of model instances (not inclusive)
272            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
273            * @return the ordered range of matching rows
274            */
275            public static <T> java.util.List<T> dynamicQuery(
276                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
277                    int end,
278                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
279                    return getService()
280                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
281            }
282    
283            /**
284            * Returns the number of rows matching the dynamic query.
285            *
286            * @param dynamicQuery the dynamic query
287            * @return the number of rows matching the dynamic query
288            */
289            public static long dynamicQueryCount(
290                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
291                    return getService().dynamicQueryCount(dynamicQuery);
292            }
293    
294            /**
295            * Returns the number of rows matching the dynamic query.
296            *
297            * @param dynamicQuery the dynamic query
298            * @param projection the projection to apply to the query
299            * @return the number of rows matching the dynamic query
300            */
301            public static long dynamicQueryCount(
302                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
303                    com.liferay.portal.kernel.dao.orm.Projection projection) {
304                    return getService().dynamicQueryCount(dynamicQuery, projection);
305            }
306    
307            public static com.liferay.portlet.documentlibrary.model.DLFileEntry fetchDLFileEntry(
308                    long fileEntryId) {
309                    return getService().fetchDLFileEntry(fileEntryId);
310            }
311    
312            /**
313            * Returns the document library file entry matching the UUID and group.
314            *
315            * @param uuid the document library file entry's UUID
316            * @param groupId the primary key of the group
317            * @return the matching document library file entry, or <code>null</code> if a matching document library file entry could not be found
318            */
319            public static com.liferay.portlet.documentlibrary.model.DLFileEntry fetchDLFileEntryByUuidAndGroupId(
320                    java.lang.String uuid, long groupId) {
321                    return getService().fetchDLFileEntryByUuidAndGroupId(uuid, groupId);
322            }
323    
324            public static com.liferay.portlet.documentlibrary.model.DLFileEntry fetchFileEntry(
325                    long groupId, long folderId, java.lang.String title) {
326                    return getService().fetchFileEntry(groupId, folderId, title);
327            }
328    
329            public static com.liferay.portlet.documentlibrary.model.DLFileEntry fetchFileEntryByAnyImageId(
330                    long imageId) {
331                    return getService().fetchFileEntryByAnyImageId(imageId);
332            }
333    
334            public static com.liferay.portlet.documentlibrary.model.DLFileEntry fetchFileEntryByFileName(
335                    long groupId, long folderId, java.lang.String fileName) {
336                    return getService().fetchFileEntryByFileName(groupId, folderId, fileName);
337            }
338    
339            public static com.liferay.portlet.documentlibrary.model.DLFileEntry fetchFileEntryByName(
340                    long groupId, long folderId, java.lang.String name) {
341                    return getService().fetchFileEntryByName(groupId, folderId, name);
342            }
343    
344            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
345                    return getService().getActionableDynamicQuery();
346            }
347    
348            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getDDMStructureFileEntries(
349                    long[] ddmStructureIds) {
350                    return getService().getDDMStructureFileEntries(ddmStructureIds);
351            }
352    
353            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getDDMStructureFileEntries(
354                    long groupId, long[] ddmStructureIds) {
355                    return getService().getDDMStructureFileEntries(groupId, ddmStructureIds);
356            }
357    
358            /**
359            * Returns a range of all the document library file entries.
360            *
361            * <p>
362            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.documentlibrary.model.impl.DLFileEntryModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
363            * </p>
364            *
365            * @param start the lower bound of the range of document library file entries
366            * @param end the upper bound of the range of document library file entries (not inclusive)
367            * @return the range of document library file entries
368            */
369            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getDLFileEntries(
370                    int start, int end) {
371                    return getService().getDLFileEntries(start, end);
372            }
373    
374            /**
375            * Returns all the document library file entries matching the UUID and company.
376            *
377            * @param uuid the UUID of the document library file entries
378            * @param companyId the primary key of the company
379            * @return the matching document library file entries, or an empty list if no matches were found
380            */
381            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getDLFileEntriesByUuidAndCompanyId(
382                    java.lang.String uuid, long companyId) {
383                    return getService().getDLFileEntriesByUuidAndCompanyId(uuid, companyId);
384            }
385    
386            /**
387            * Returns a range of document library file entries matching the UUID and company.
388            *
389            * @param uuid the UUID of the document library file entries
390            * @param companyId the primary key of the company
391            * @param start the lower bound of the range of document library file entries
392            * @param end the upper bound of the range of document library file entries (not inclusive)
393            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
394            * @return the range of matching document library file entries, or an empty list if no matches were found
395            */
396            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getDLFileEntriesByUuidAndCompanyId(
397                    java.lang.String uuid, long companyId, int start, int end,
398                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> orderByComparator) {
399                    return getService()
400                                       .getDLFileEntriesByUuidAndCompanyId(uuid, companyId, start,
401                            end, orderByComparator);
402            }
403    
404            /**
405            * Returns the number of document library file entries.
406            *
407            * @return the number of document library file entries
408            */
409            public static int getDLFileEntriesCount() {
410                    return getService().getDLFileEntriesCount();
411            }
412    
413            /**
414            * Returns the document library file entry with the primary key.
415            *
416            * @param fileEntryId the primary key of the document library file entry
417            * @return the document library file entry
418            * @throws PortalException if a document library file entry with the primary key could not be found
419            */
420            public static com.liferay.portlet.documentlibrary.model.DLFileEntry getDLFileEntry(
421                    long fileEntryId)
422                    throws com.liferay.portal.kernel.exception.PortalException {
423                    return getService().getDLFileEntry(fileEntryId);
424            }
425    
426            /**
427            * Returns the document library file entry matching the UUID and group.
428            *
429            * @param uuid the document library file entry's UUID
430            * @param groupId the primary key of the group
431            * @return the matching document library file entry
432            * @throws PortalException if a matching document library file entry could not be found
433            */
434            public static com.liferay.portlet.documentlibrary.model.DLFileEntry getDLFileEntryByUuidAndGroupId(
435                    java.lang.String uuid, long groupId)
436                    throws com.liferay.portal.kernel.exception.PortalException {
437                    return getService().getDLFileEntryByUuidAndGroupId(uuid, groupId);
438            }
439    
440            public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
441                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext) {
442                    return getService().getExportActionableDynamicQuery(portletDataContext);
443            }
444    
445            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getExtraSettingsFileEntries(
446                    int start, int end) {
447                    return getService().getExtraSettingsFileEntries(start, end);
448            }
449    
450            public static int getExtraSettingsFileEntriesCount() {
451                    return getService().getExtraSettingsFileEntriesCount();
452            }
453    
454            public static java.io.File getFile(long fileEntryId,
455                    java.lang.String version, boolean incrementCounter)
456                    throws com.liferay.portal.kernel.exception.PortalException {
457                    return getService().getFile(fileEntryId, version, incrementCounter);
458            }
459    
460            public static java.io.File getFile(long fileEntryId,
461                    java.lang.String version, boolean incrementCounter, int increment)
462                    throws com.liferay.portal.kernel.exception.PortalException {
463                    return getService()
464                                       .getFile(fileEntryId, version, incrementCounter, increment);
465            }
466    
467            /**
468            * @deprecated As of 7.0.0, replaced by {@link #getFile(long, String,
469            boolean)}
470            */
471            @Deprecated
472            public static java.io.File getFile(long userId, long fileEntryId,
473                    java.lang.String version, boolean incrementCounter)
474                    throws com.liferay.portal.kernel.exception.PortalException {
475                    return getService()
476                                       .getFile(userId, fileEntryId, version, incrementCounter);
477            }
478    
479            /**
480            * @deprecated As of 7.0.0, replaced by {@link #getFile(long, String,
481            boolean, int)}
482            */
483            @Deprecated
484            public static java.io.File getFile(long userId, long fileEntryId,
485                    java.lang.String version, boolean incrementCounter, int increment)
486                    throws com.liferay.portal.kernel.exception.PortalException {
487                    return getService()
488                                       .getFile(userId, fileEntryId, version, incrementCounter,
489                            increment);
490            }
491    
492            public static java.io.InputStream getFileAsStream(long fileEntryId,
493                    java.lang.String version)
494                    throws com.liferay.portal.kernel.exception.PortalException {
495                    return getService().getFileAsStream(fileEntryId, version);
496            }
497    
498            public static java.io.InputStream getFileAsStream(long fileEntryId,
499                    java.lang.String version, boolean incrementCounter)
500                    throws com.liferay.portal.kernel.exception.PortalException {
501                    return getService()
502                                       .getFileAsStream(fileEntryId, version, incrementCounter);
503            }
504    
505            public static java.io.InputStream getFileAsStream(long fileEntryId,
506                    java.lang.String version, boolean incrementCounter, int increment)
507                    throws com.liferay.portal.kernel.exception.PortalException {
508                    return getService()
509                                       .getFileAsStream(fileEntryId, version, incrementCounter,
510                            increment);
511            }
512    
513            /**
514            * @deprecated As of 7.0.0, replaced by {@link #getFileAsStream(long,
515            String)}
516            */
517            @Deprecated
518            public static java.io.InputStream getFileAsStream(long userId,
519                    long fileEntryId, java.lang.String version)
520                    throws com.liferay.portal.kernel.exception.PortalException {
521                    return getService().getFileAsStream(userId, fileEntryId, version);
522            }
523    
524            /**
525            * @deprecated As of 7.0.0, replaced by {@link #getFileAsStream(long,
526            String, boolean)}
527            */
528            @Deprecated
529            public static java.io.InputStream getFileAsStream(long userId,
530                    long fileEntryId, java.lang.String version, boolean incrementCounter)
531                    throws com.liferay.portal.kernel.exception.PortalException {
532                    return getService()
533                                       .getFileAsStream(userId, fileEntryId, version,
534                            incrementCounter);
535            }
536    
537            /**
538            * @deprecated As of 7.0.0, replaced by {@link #getFileAsStream(long,
539            String, boolean, int)}
540            */
541            @Deprecated
542            public static java.io.InputStream getFileAsStream(long userId,
543                    long fileEntryId, java.lang.String version, boolean incrementCounter,
544                    int increment)
545                    throws com.liferay.portal.kernel.exception.PortalException {
546                    return getService()
547                                       .getFileAsStream(userId, fileEntryId, version,
548                            incrementCounter, increment);
549            }
550    
551            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
552                    long folderId, java.lang.String name) {
553                    return getService().getFileEntries(folderId, name);
554            }
555    
556            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
557                    long groupId, long folderId) {
558                    return getService().getFileEntries(groupId, folderId);
559            }
560    
561            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
562                    long groupId, long folderId, int start, int end,
563                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc) {
564                    return getService().getFileEntries(groupId, folderId, start, end, obc);
565            }
566    
567            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
568                    long groupId, long folderId, int status, int start, int end,
569                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc) {
570                    return getService()
571                                       .getFileEntries(groupId, folderId, status, start, end, obc);
572            }
573    
574            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
575                    long groupId, long userId, java.util.List<java.lang.Long> folderIds,
576                    java.lang.String[] mimeTypes,
577                    com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.documentlibrary.model.DLFileEntry> queryDefinition)
578                    throws java.lang.Exception {
579                    return getService()
580                                       .getFileEntries(groupId, userId, folderIds, mimeTypes,
581                            queryDefinition);
582            }
583    
584            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
585                    long groupId, long userId,
586                    java.util.List<java.lang.Long> repositoryIds,
587                    java.util.List<java.lang.Long> folderIds, java.lang.String[] mimeTypes,
588                    com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.documentlibrary.model.DLFileEntry> queryDefinition)
589                    throws java.lang.Exception {
590                    return getService()
591                                       .getFileEntries(groupId, userId, repositoryIds, folderIds,
592                            mimeTypes, queryDefinition);
593            }
594    
595            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
596                    int start, int end) {
597                    return getService().getFileEntries(start, end);
598            }
599    
600            public static int getFileEntriesCount() {
601                    return getService().getFileEntriesCount();
602            }
603    
604            /**
605            * @deprecated As of 7.0.0, with no direct replacement
606            */
607            @Deprecated
608            public static int getFileEntriesCount(long groupId,
609                    com.liferay.portal.kernel.util.DateRange dateRange, long repositoryId,
610                    com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.documentlibrary.model.DLFileEntry> queryDefinition) {
611                    return getService()
612                                       .getFileEntriesCount(groupId, dateRange, repositoryId,
613                            queryDefinition);
614            }
615    
616            public static int getFileEntriesCount(long groupId, long folderId) {
617                    return getService().getFileEntriesCount(groupId, folderId);
618            }
619    
620            public static int getFileEntriesCount(long groupId, long folderId,
621                    int status) {
622                    return getService().getFileEntriesCount(groupId, folderId, status);
623            }
624    
625            public static int getFileEntriesCount(long groupId, long userId,
626                    java.util.List<java.lang.Long> folderIds, java.lang.String[] mimeTypes,
627                    com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.documentlibrary.model.DLFileEntry> queryDefinition)
628                    throws java.lang.Exception {
629                    return getService()
630                                       .getFileEntriesCount(groupId, userId, folderIds, mimeTypes,
631                            queryDefinition);
632            }
633    
634            public static int getFileEntriesCount(long groupId, long userId,
635                    java.util.List<java.lang.Long> repositoryIds,
636                    java.util.List<java.lang.Long> folderIds, java.lang.String[] mimeTypes,
637                    com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.documentlibrary.model.DLFileEntry> queryDefinition)
638                    throws java.lang.Exception {
639                    return getService()
640                                       .getFileEntriesCount(groupId, userId, repositoryIds,
641                            folderIds, mimeTypes, queryDefinition);
642            }
643    
644            public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
645                    long fileEntryId)
646                    throws com.liferay.portal.kernel.exception.PortalException {
647                    return getService().getFileEntry(fileEntryId);
648            }
649    
650            public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
651                    long groupId, long folderId, java.lang.String title)
652                    throws com.liferay.portal.kernel.exception.PortalException {
653                    return getService().getFileEntry(groupId, folderId, title);
654            }
655    
656            public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByName(
657                    long groupId, long folderId, java.lang.String name)
658                    throws com.liferay.portal.kernel.exception.PortalException {
659                    return getService().getFileEntryByName(groupId, folderId, name);
660            }
661    
662            public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
663                    java.lang.String uuid, long groupId)
664                    throws com.liferay.portal.kernel.exception.PortalException {
665                    return getService().getFileEntryByUuidAndGroupId(uuid, groupId);
666            }
667    
668            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
669                    long groupId, int start, int end) {
670                    return getService().getGroupFileEntries(groupId, start, end);
671            }
672    
673            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
674                    long groupId, int start, int end,
675                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc) {
676                    return getService().getGroupFileEntries(groupId, start, end, obc);
677            }
678    
679            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
680                    long groupId, long userId, long repositoryId, long rootFolderId,
681                    int start, int end,
682                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc) {
683                    return getService()
684                                       .getGroupFileEntries(groupId, userId, repositoryId,
685                            rootFolderId, start, end, obc);
686            }
687    
688            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
689                    long groupId, long userId, long rootFolderId, int start, int end,
690                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc) {
691                    return getService()
692                                       .getGroupFileEntries(groupId, userId, rootFolderId, start,
693                            end, obc);
694            }
695    
696            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
697                    long groupId, long userId, int start, int end) {
698                    return getService().getGroupFileEntries(groupId, userId, start, end);
699            }
700    
701            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
702                    long groupId, long userId, int start, int end,
703                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc) {
704                    return getService().getGroupFileEntries(groupId, userId, start, end, obc);
705            }
706    
707            public static int getGroupFileEntriesCount(long groupId) {
708                    return getService().getGroupFileEntriesCount(groupId);
709            }
710    
711            public static int getGroupFileEntriesCount(long groupId, long userId) {
712                    return getService().getGroupFileEntriesCount(groupId, userId);
713            }
714    
715            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
716                    return getService().getIndexableActionableDynamicQuery();
717            }
718    
719            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getMisversionedFileEntries() {
720                    return getService().getMisversionedFileEntries();
721            }
722    
723            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getNoAssetFileEntries() {
724                    return getService().getNoAssetFileEntries();
725            }
726    
727            /**
728            * Returns the OSGi service identifier.
729            *
730            * @return the OSGi service identifier
731            */
732            public static java.lang.String getOSGiServiceIdentifier() {
733                    return getService().getOSGiServiceIdentifier();
734            }
735    
736            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getOrphanedFileEntries() {
737                    return getService().getOrphanedFileEntries();
738            }
739    
740            public static com.liferay.portal.model.PersistedModel getPersistedModel(
741                    java.io.Serializable primaryKeyObj)
742                    throws com.liferay.portal.kernel.exception.PortalException {
743                    return getService().getPersistedModel(primaryKeyObj);
744            }
745    
746            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getRepositoryFileEntries(
747                    long repositoryId, int start, int end) {
748                    return getService().getRepositoryFileEntries(repositoryId, start, end);
749            }
750    
751            public static int getRepositoryFileEntriesCount(long repositoryId) {
752                    return getService().getRepositoryFileEntriesCount(repositoryId);
753            }
754    
755            public static java.lang.String getUniqueTitle(long groupId, long folderId,
756                    long fileEntryId, java.lang.String title, java.lang.String extension)
757                    throws com.liferay.portal.kernel.exception.PortalException {
758                    return getService()
759                                       .getUniqueTitle(groupId, folderId, fileEntryId, title,
760                            extension);
761            }
762    
763            public static boolean hasExtraSettings() {
764                    return getService().hasExtraSettings();
765            }
766    
767            public static boolean hasFileEntryLock(long userId, long fileEntryId)
768                    throws com.liferay.portal.kernel.exception.PortalException {
769                    return getService().hasFileEntryLock(userId, fileEntryId);
770            }
771    
772            public static void incrementViewCounter(
773                    com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry,
774                    int increment) {
775                    getService().incrementViewCounter(dlFileEntry, increment);
776            }
777    
778            public static boolean isFileEntryCheckedOut(long fileEntryId)
779                    throws com.liferay.portal.kernel.exception.PortalException {
780                    return getService().isFileEntryCheckedOut(fileEntryId);
781            }
782    
783            public static boolean isKeepFileVersionLabel(long fileEntryId,
784                    com.liferay.portal.service.ServiceContext serviceContext)
785                    throws com.liferay.portal.kernel.exception.PortalException {
786                    return getService().isKeepFileVersionLabel(fileEntryId, serviceContext);
787            }
788    
789            public static com.liferay.portal.kernel.lock.Lock lockFileEntry(
790                    long userId, long fileEntryId)
791                    throws com.liferay.portal.kernel.exception.PortalException {
792                    return getService().lockFileEntry(userId, fileEntryId);
793            }
794    
795            public static com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
796                    long userId, long fileEntryId, long newFolderId,
797                    com.liferay.portal.service.ServiceContext serviceContext)
798                    throws com.liferay.portal.kernel.exception.PortalException {
799                    return getService()
800                                       .moveFileEntry(userId, fileEntryId, newFolderId,
801                            serviceContext);
802            }
803    
804            public static void rebuildTree(long companyId)
805                    throws com.liferay.portal.kernel.exception.PortalException {
806                    getService().rebuildTree(companyId);
807            }
808    
809            public static void revertFileEntry(long userId, long fileEntryId,
810                    java.lang.String version,
811                    com.liferay.portal.service.ServiceContext serviceContext)
812                    throws com.liferay.portal.kernel.exception.PortalException {
813                    getService()
814                            .revertFileEntry(userId, fileEntryId, version, serviceContext);
815            }
816    
817            public static com.liferay.portal.kernel.search.Hits search(long groupId,
818                    long userId, long creatorUserId, long folderId,
819                    java.lang.String[] mimeTypes, int status, int start, int end)
820                    throws com.liferay.portal.kernel.exception.PortalException {
821                    return getService()
822                                       .search(groupId, userId, creatorUserId, folderId, mimeTypes,
823                            status, start, end);
824            }
825    
826            public static com.liferay.portal.kernel.search.Hits search(long groupId,
827                    long userId, long creatorUserId, int status, int start, int end)
828                    throws com.liferay.portal.kernel.exception.PortalException {
829                    return getService()
830                                       .search(groupId, userId, creatorUserId, status, start, end);
831            }
832    
833            public static void setTreePaths(long folderId, java.lang.String treePath,
834                    boolean reindex)
835                    throws com.liferay.portal.kernel.exception.PortalException {
836                    getService().setTreePaths(folderId, treePath, reindex);
837            }
838    
839            public static void unlockFileEntry(long fileEntryId) {
840                    getService().unlockFileEntry(fileEntryId);
841            }
842    
843            /**
844            * Updates the document library file entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
845            *
846            * @param dlFileEntry the document library file entry
847            * @return the document library file entry that was updated
848            */
849            public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateDLFileEntry(
850                    com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry) {
851                    return getService().updateDLFileEntry(dlFileEntry);
852            }
853    
854            public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
855                    long userId, long fileEntryId, java.lang.String sourceFileName,
856                    java.lang.String mimeType, java.lang.String title,
857                    java.lang.String description, java.lang.String changeLog,
858                    boolean majorVersion, long fileEntryTypeId,
859                    java.util.Map<java.lang.String, com.liferay.dynamic.data.mapping.kernel.DDMFormValues> ddmFormValuesMap,
860                    java.io.File file, java.io.InputStream is, long size,
861                    com.liferay.portal.service.ServiceContext serviceContext)
862                    throws com.liferay.portal.kernel.exception.PortalException {
863                    return getService()
864                                       .updateFileEntry(userId, fileEntryId, sourceFileName,
865                            mimeType, title, description, changeLog, majorVersion,
866                            fileEntryTypeId, ddmFormValuesMap, file, is, size, serviceContext);
867            }
868    
869            public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntryType(
870                    long userId, long fileEntryId, long fileEntryTypeId,
871                    com.liferay.portal.service.ServiceContext serviceContext)
872                    throws com.liferay.portal.kernel.exception.PortalException {
873                    return getService()
874                                       .updateFileEntryType(userId, fileEntryId, fileEntryTypeId,
875                            serviceContext);
876            }
877    
878            public static void updateSmallImage(long smallImageId, long largeImageId)
879                    throws com.liferay.portal.kernel.exception.PortalException {
880                    getService().updateSmallImage(smallImageId, largeImageId);
881            }
882    
883            public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateStatus(
884                    long userId, long fileVersionId, int status,
885                    com.liferay.portal.service.ServiceContext serviceContext,
886                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
887                    throws com.liferay.portal.kernel.exception.PortalException {
888                    return getService()
889                                       .updateStatus(userId, fileVersionId, status, serviceContext,
890                            workflowContext);
891            }
892    
893            public static void validateFile(long groupId, long folderId,
894                    long fileEntryId, java.lang.String fileName, java.lang.String title)
895                    throws com.liferay.portal.kernel.exception.PortalException {
896                    getService()
897                            .validateFile(groupId, folderId, fileEntryId, fileName, title);
898            }
899    
900            public static boolean verifyFileEntryCheckOut(long fileEntryId,
901                    java.lang.String lockUuid)
902                    throws com.liferay.portal.kernel.exception.PortalException {
903                    return getService().verifyFileEntryCheckOut(fileEntryId, lockUuid);
904            }
905    
906            public static boolean verifyFileEntryLock(long fileEntryId,
907                    java.lang.String lockUuid)
908                    throws com.liferay.portal.kernel.exception.PortalException {
909                    return getService().verifyFileEntryLock(fileEntryId, lockUuid);
910            }
911    
912            public static DLFileEntryLocalService getService() {
913                    if (_service == null) {
914                            _service = (DLFileEntryLocalService)PortalBeanLocatorUtil.locate(DLFileEntryLocalService.class.getName());
915    
916                            ReferenceRegistry.registerReference(DLFileEntryLocalServiceUtil.class,
917                                    "_service");
918                    }
919    
920                    return _service;
921            }
922    
923            private static DLFileEntryLocalService _service;
924    }