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