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.document.library.kernel.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 remote service utility for DLFileEntry. This utility wraps
024     * {@link com.liferay.portlet.documentlibrary.service.impl.DLFileEntryServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on a remote server. Methods of this service are expected to have security
027     * checks based on the propagated JAAS credentials because this service can be
028     * accessed remotely.
029     *
030     * @author Brian Wing Shun Chan
031     * @see DLFileEntryService
032     * @see com.liferay.portlet.documentlibrary.service.base.DLFileEntryServiceBaseImpl
033     * @see com.liferay.portlet.documentlibrary.service.impl.DLFileEntryServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class DLFileEntryServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLFileEntryServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043            public static boolean hasFileEntryLock(long fileEntryId)
044                    throws com.liferay.portal.kernel.exception.PortalException {
045                    return getService().hasFileEntryLock(fileEntryId);
046            }
047    
048            public static boolean isFileEntryCheckedOut(long fileEntryId)
049                    throws com.liferay.portal.kernel.exception.PortalException {
050                    return getService().isFileEntryCheckedOut(fileEntryId);
051            }
052    
053            public static boolean isKeepFileVersionLabel(long fileEntryId,
054                    boolean majorVersion,
055                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
056                    throws com.liferay.portal.kernel.exception.PortalException {
057                    return getService()
058                                       .isKeepFileVersionLabel(fileEntryId, majorVersion,
059                            serviceContext);
060            }
061    
062            /**
063            * As of 7.0.0, replaced by {@link #isKeepFileVersionLabel(long, boolean,
064            * ServiceContext)}
065            */
066            @Deprecated
067            public static boolean isKeepFileVersionLabel(long fileEntryId,
068                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
069                    throws com.liferay.portal.kernel.exception.PortalException {
070                    return getService().isKeepFileVersionLabel(fileEntryId, serviceContext);
071            }
072    
073            public static boolean verifyFileEntryCheckOut(long fileEntryId,
074                    java.lang.String lockUuid)
075                    throws com.liferay.portal.kernel.exception.PortalException {
076                    return getService().verifyFileEntryCheckOut(fileEntryId, lockUuid);
077            }
078    
079            public static boolean verifyFileEntryLock(long fileEntryId,
080                    java.lang.String lockUuid)
081                    throws com.liferay.portal.kernel.exception.PortalException {
082                    return getService().verifyFileEntryLock(fileEntryId, lockUuid);
083            }
084    
085            public static com.liferay.document.library.kernel.model.DLFileEntry addFileEntry(
086                    long groupId, long repositoryId, long folderId,
087                    java.lang.String sourceFileName, java.lang.String mimeType,
088                    java.lang.String title, java.lang.String description,
089                    java.lang.String changeLog, long fileEntryTypeId,
090                    java.util.Map<java.lang.String, com.liferay.dynamic.data.mapping.kernel.DDMFormValues> ddmFormValuesMap,
091                    java.io.File file, java.io.InputStream is, long size,
092                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
093                    throws com.liferay.portal.kernel.exception.PortalException {
094                    return getService()
095                                       .addFileEntry(groupId, repositoryId, folderId,
096                            sourceFileName, mimeType, title, description, changeLog,
097                            fileEntryTypeId, ddmFormValuesMap, file, is, size, serviceContext);
098            }
099    
100            public static com.liferay.document.library.kernel.model.DLFileEntry checkOutFileEntry(
101                    long fileEntryId,
102                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
103                    throws com.liferay.portal.kernel.exception.PortalException {
104                    return getService().checkOutFileEntry(fileEntryId, serviceContext);
105            }
106    
107            public static com.liferay.document.library.kernel.model.DLFileEntry checkOutFileEntry(
108                    long fileEntryId, java.lang.String owner, long expirationTime,
109                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
110                    throws com.liferay.portal.kernel.exception.PortalException {
111                    return getService()
112                                       .checkOutFileEntry(fileEntryId, owner, expirationTime,
113                            serviceContext);
114            }
115    
116            public static com.liferay.document.library.kernel.model.DLFileEntry copyFileEntry(
117                    long groupId, long repositoryId, long fileEntryId, long destFolderId,
118                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
119                    throws com.liferay.portal.kernel.exception.PortalException {
120                    return getService()
121                                       .copyFileEntry(groupId, repositoryId, fileEntryId,
122                            destFolderId, serviceContext);
123            }
124    
125            public static com.liferay.document.library.kernel.model.DLFileEntry fetchFileEntryByImageId(
126                    long imageId)
127                    throws com.liferay.portal.kernel.exception.PortalException {
128                    return getService().fetchFileEntryByImageId(imageId);
129            }
130    
131            public static com.liferay.document.library.kernel.model.DLFileEntry getFileEntry(
132                    long fileEntryId)
133                    throws com.liferay.portal.kernel.exception.PortalException {
134                    return getService().getFileEntry(fileEntryId);
135            }
136    
137            public static com.liferay.document.library.kernel.model.DLFileEntry getFileEntry(
138                    long groupId, long folderId, java.lang.String title)
139                    throws com.liferay.portal.kernel.exception.PortalException {
140                    return getService().getFileEntry(groupId, folderId, title);
141            }
142    
143            public static com.liferay.document.library.kernel.model.DLFileEntry getFileEntryByUuidAndGroupId(
144                    java.lang.String uuid, long groupId)
145                    throws com.liferay.portal.kernel.exception.PortalException {
146                    return getService().getFileEntryByUuidAndGroupId(uuid, groupId);
147            }
148    
149            public static com.liferay.document.library.kernel.model.DLFileEntry moveFileEntry(
150                    long fileEntryId, long newFolderId,
151                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
152                    throws com.liferay.portal.kernel.exception.PortalException {
153                    return getService()
154                                       .moveFileEntry(fileEntryId, newFolderId, serviceContext);
155            }
156    
157            public static com.liferay.document.library.kernel.model.DLFileEntry updateFileEntry(
158                    long fileEntryId, java.lang.String sourceFileName,
159                    java.lang.String mimeType, java.lang.String title,
160                    java.lang.String description, java.lang.String changeLog,
161                    boolean majorVersion, long fileEntryTypeId,
162                    java.util.Map<java.lang.String, com.liferay.dynamic.data.mapping.kernel.DDMFormValues> ddmFormValuesMap,
163                    java.io.File file, java.io.InputStream is, long size,
164                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
165                    throws com.liferay.portal.kernel.exception.PortalException {
166                    return getService()
167                                       .updateFileEntry(fileEntryId, sourceFileName, mimeType,
168                            title, description, changeLog, majorVersion, fileEntryTypeId,
169                            ddmFormValuesMap, file, is, size, serviceContext);
170            }
171    
172            public static com.liferay.document.library.kernel.model.DLFileEntry updateStatus(
173                    long userId, long fileVersionId, int status,
174                    com.liferay.portal.kernel.service.ServiceContext serviceContext,
175                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
176                    throws com.liferay.portal.kernel.exception.PortalException {
177                    return getService()
178                                       .updateStatus(userId, fileVersionId, status, serviceContext,
179                            workflowContext);
180            }
181    
182            public static com.liferay.document.library.kernel.model.DLFileVersion cancelCheckOut(
183                    long fileEntryId)
184                    throws com.liferay.portal.kernel.exception.PortalException {
185                    return getService().cancelCheckOut(fileEntryId);
186            }
187    
188            public static com.liferay.portal.kernel.lock.Lock getFileEntryLock(
189                    long fileEntryId) {
190                    return getService().getFileEntryLock(fileEntryId);
191            }
192    
193            public static com.liferay.portal.kernel.lock.Lock refreshFileEntryLock(
194                    java.lang.String lockUuid, long companyId, long expirationTime)
195                    throws com.liferay.portal.kernel.exception.PortalException {
196                    return getService()
197                                       .refreshFileEntryLock(lockUuid, companyId, expirationTime);
198            }
199    
200            public static com.liferay.portal.kernel.search.Hits search(long groupId,
201                    long creatorUserId, int status, int start, int end)
202                    throws com.liferay.portal.kernel.exception.PortalException {
203                    return getService().search(groupId, creatorUserId, status, start, end);
204            }
205    
206            public static com.liferay.portal.kernel.search.Hits search(long groupId,
207                    long creatorUserId, long folderId, java.lang.String[] mimeTypes,
208                    int status, int start, int end)
209                    throws com.liferay.portal.kernel.exception.PortalException {
210                    return getService()
211                                       .search(groupId, creatorUserId, folderId, mimeTypes, status,
212                            start, end);
213            }
214    
215            public static int getFileEntriesCount(long groupId, long folderId) {
216                    return getService().getFileEntriesCount(groupId, folderId);
217            }
218    
219            public static int getFileEntriesCount(long groupId, long folderId,
220                    int status) {
221                    return getService().getFileEntriesCount(groupId, folderId, status);
222            }
223    
224            public static int getFileEntriesCount(long groupId, long folderId,
225                    java.lang.String[] mimeTypes) {
226                    return getService().getFileEntriesCount(groupId, folderId, mimeTypes);
227            }
228    
229            public static int getFileEntriesCount(long groupId, long folderId,
230                    long fileEntryTypeId) {
231                    return getService()
232                                       .getFileEntriesCount(groupId, folderId, fileEntryTypeId);
233            }
234    
235            public static int getFoldersFileEntriesCount(long groupId,
236                    java.util.List<java.lang.Long> folderIds, int status) {
237                    return getService()
238                                       .getFoldersFileEntriesCount(groupId, folderIds, status);
239            }
240    
241            public static int getGroupFileEntriesCount(long groupId, long userId,
242                    long repositoryId, long rootFolderId, java.lang.String[] mimeTypes,
243                    int status) throws com.liferay.portal.kernel.exception.PortalException {
244                    return getService()
245                                       .getGroupFileEntriesCount(groupId, userId, repositoryId,
246                            rootFolderId, mimeTypes, status);
247            }
248    
249            public static int getGroupFileEntriesCount(long groupId, long userId,
250                    long rootFolderId)
251                    throws com.liferay.portal.kernel.exception.PortalException {
252                    return getService()
253                                       .getGroupFileEntriesCount(groupId, userId, rootFolderId);
254            }
255    
256            public static int getGroupFileEntriesCount(long groupId, long userId,
257                    long rootFolderId, java.lang.String[] mimeTypes, int status)
258                    throws com.liferay.portal.kernel.exception.PortalException {
259                    return getService()
260                                       .getGroupFileEntriesCount(groupId, userId, rootFolderId,
261                            mimeTypes, status);
262            }
263    
264            public static java.io.InputStream getFileAsStream(long fileEntryId,
265                    java.lang.String version)
266                    throws com.liferay.portal.kernel.exception.PortalException {
267                    return getService().getFileAsStream(fileEntryId, version);
268            }
269    
270            public static java.io.InputStream getFileAsStream(long fileEntryId,
271                    java.lang.String version, boolean incrementCounter)
272                    throws com.liferay.portal.kernel.exception.PortalException {
273                    return getService()
274                                       .getFileAsStream(fileEntryId, version, incrementCounter);
275            }
276    
277            /**
278            * Returns the OSGi service identifier.
279            *
280            * @return the OSGi service identifier
281            */
282            public static java.lang.String getOSGiServiceIdentifier() {
283                    return getService().getOSGiServiceIdentifier();
284            }
285    
286            public static java.util.List<com.liferay.document.library.kernel.model.DLFileEntry> getFileEntries(
287                    long groupId, long folderId, int start, int end,
288                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFileEntry> obc)
289                    throws com.liferay.portal.kernel.exception.PortalException {
290                    return getService().getFileEntries(groupId, folderId, start, end, obc);
291            }
292    
293            public static java.util.List<com.liferay.document.library.kernel.model.DLFileEntry> getFileEntries(
294                    long groupId, long folderId, int status, int start, int end,
295                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFileEntry> obc)
296                    throws com.liferay.portal.kernel.exception.PortalException {
297                    return getService()
298                                       .getFileEntries(groupId, folderId, status, start, end, obc);
299            }
300    
301            public static java.util.List<com.liferay.document.library.kernel.model.DLFileEntry> getFileEntries(
302                    long groupId, long folderId, java.lang.String[] mimeTypes, int start,
303                    int end,
304                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFileEntry> obc)
305                    throws com.liferay.portal.kernel.exception.PortalException {
306                    return getService()
307                                       .getFileEntries(groupId, folderId, mimeTypes, start, end, obc);
308            }
309    
310            public static java.util.List<com.liferay.document.library.kernel.model.DLFileEntry> getFileEntries(
311                    long groupId, long folderId, long fileEntryTypeId, int start, int end,
312                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFileEntry> obc)
313                    throws com.liferay.portal.kernel.exception.PortalException {
314                    return getService()
315                                       .getFileEntries(groupId, folderId, fileEntryTypeId, start,
316                            end, obc);
317            }
318    
319            public static java.util.List<com.liferay.document.library.kernel.model.DLFileEntry> getGroupFileEntries(
320                    long groupId, long userId, long repositoryId, long rootFolderId,
321                    java.lang.String[] mimeTypes, int status, int start, int end,
322                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFileEntry> obc)
323                    throws com.liferay.portal.kernel.exception.PortalException {
324                    return getService()
325                                       .getGroupFileEntries(groupId, userId, repositoryId,
326                            rootFolderId, mimeTypes, status, start, end, obc);
327            }
328    
329            public static java.util.List<com.liferay.document.library.kernel.model.DLFileEntry> getGroupFileEntries(
330                    long groupId, long userId, long rootFolderId, int start, int end,
331                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFileEntry> obc)
332                    throws com.liferay.portal.kernel.exception.PortalException {
333                    return getService()
334                                       .getGroupFileEntries(groupId, userId, rootFolderId, start,
335                            end, obc);
336            }
337    
338            public static java.util.List<com.liferay.document.library.kernel.model.DLFileEntry> getGroupFileEntries(
339                    long groupId, long userId, long rootFolderId,
340                    java.lang.String[] mimeTypes, int status, int start, int end,
341                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFileEntry> obc)
342                    throws com.liferay.portal.kernel.exception.PortalException {
343                    return getService()
344                                       .getGroupFileEntries(groupId, userId, rootFolderId,
345                            mimeTypes, status, start, end, obc);
346            }
347    
348            public static void checkInFileEntry(long fileEntryId, boolean major,
349                    java.lang.String changeLog,
350                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
351                    throws com.liferay.portal.kernel.exception.PortalException {
352                    getService()
353                            .checkInFileEntry(fileEntryId, major, changeLog, serviceContext);
354            }
355    
356            public static void checkInFileEntry(long fileEntryId,
357                    java.lang.String lockUuid,
358                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
359                    throws com.liferay.portal.kernel.exception.PortalException {
360                    getService().checkInFileEntry(fileEntryId, lockUuid, serviceContext);
361            }
362    
363            public static void deleteFileEntry(long fileEntryId)
364                    throws com.liferay.portal.kernel.exception.PortalException {
365                    getService().deleteFileEntry(fileEntryId);
366            }
367    
368            public static void deleteFileEntry(long groupId, long folderId,
369                    java.lang.String title)
370                    throws com.liferay.portal.kernel.exception.PortalException {
371                    getService().deleteFileEntry(groupId, folderId, title);
372            }
373    
374            public static void deleteFileVersion(long fileEntryId,
375                    java.lang.String version)
376                    throws com.liferay.portal.kernel.exception.PortalException {
377                    getService().deleteFileVersion(fileEntryId, version);
378            }
379    
380            public static void revertFileEntry(long fileEntryId,
381                    java.lang.String version,
382                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
383                    throws com.liferay.portal.kernel.exception.PortalException {
384                    getService().revertFileEntry(fileEntryId, version, serviceContext);
385            }
386    
387            public static DLFileEntryService getService() {
388                    if (_service == null) {
389                            _service = (DLFileEntryService)PortalBeanLocatorUtil.locate(DLFileEntryService.class.getName());
390    
391                            ReferenceRegistry.registerReference(DLFileEntryServiceUtil.class,
392                                    "_service");
393                    }
394    
395                    return _service;
396            }
397    
398            private static DLFileEntryService _service;
399    }