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