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 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 com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
044                    long groupId, long repositoryId, long folderId,
045                    java.lang.String sourceFileName, java.lang.String mimeType,
046                    java.lang.String title, java.lang.String description,
047                    java.lang.String changeLog, long fileEntryTypeId,
048                    java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> fieldsMap,
049                    java.io.File file, java.io.InputStream is, long size,
050                    com.liferay.portal.service.ServiceContext serviceContext)
051                    throws com.liferay.portal.kernel.exception.PortalException {
052                    return getService()
053                                       .addFileEntry(groupId, repositoryId, folderId,
054                            sourceFileName, mimeType, title, description, changeLog,
055                            fileEntryTypeId, fieldsMap, file, is, size, serviceContext);
056            }
057    
058            public static com.liferay.portlet.documentlibrary.model.DLFileVersion cancelCheckOut(
059                    long fileEntryId)
060                    throws com.liferay.portal.kernel.exception.PortalException {
061                    return getService().cancelCheckOut(fileEntryId);
062            }
063    
064            /**
065            * @deprecated As of 6.2.0, replaced by {@link #checkInFileEntry(long,
066            String, ServiceContext)}
067            */
068            @Deprecated
069            public static void checkInFileEntry(long fileEntryId,
070                    java.lang.String lockUuid)
071                    throws com.liferay.portal.kernel.exception.PortalException {
072                    getService().checkInFileEntry(fileEntryId, lockUuid);
073            }
074    
075            public static void checkInFileEntry(long fileEntryId,
076                    java.lang.String lockUuid,
077                    com.liferay.portal.service.ServiceContext serviceContext)
078                    throws com.liferay.portal.kernel.exception.PortalException {
079                    getService().checkInFileEntry(fileEntryId, lockUuid, serviceContext);
080            }
081    
082            public static void checkInFileEntry(long fileEntryId, boolean major,
083                    java.lang.String changeLog,
084                    com.liferay.portal.service.ServiceContext serviceContext)
085                    throws com.liferay.portal.kernel.exception.PortalException {
086                    getService()
087                            .checkInFileEntry(fileEntryId, major, changeLog, serviceContext);
088            }
089    
090            /**
091            * @deprecated As of 6.2.0, replaced by {@link #checkOutFileEntry(long,
092            ServiceContext)}
093            */
094            @Deprecated
095            public static com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
096                    long fileEntryId)
097                    throws com.liferay.portal.kernel.exception.PortalException {
098                    return getService().checkOutFileEntry(fileEntryId);
099            }
100    
101            /**
102            * @deprecated As of 6.2.0, replaced by {@link #checkOutFileEntry(long,
103            String, long, ServiceContext)}
104            */
105            @Deprecated
106            public static com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
107                    long fileEntryId, java.lang.String owner, long expirationTime)
108                    throws com.liferay.portal.kernel.exception.PortalException {
109                    return getService().checkOutFileEntry(fileEntryId, owner, expirationTime);
110            }
111    
112            public static com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
113                    long fileEntryId, java.lang.String owner, long expirationTime,
114                    com.liferay.portal.service.ServiceContext serviceContext)
115                    throws com.liferay.portal.kernel.exception.PortalException {
116                    return getService()
117                                       .checkOutFileEntry(fileEntryId, owner, expirationTime,
118                            serviceContext);
119            }
120    
121            public static com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
122                    long fileEntryId,
123                    com.liferay.portal.service.ServiceContext serviceContext)
124                    throws com.liferay.portal.kernel.exception.PortalException {
125                    return getService().checkOutFileEntry(fileEntryId, serviceContext);
126            }
127    
128            public static com.liferay.portlet.documentlibrary.model.DLFileEntry copyFileEntry(
129                    long groupId, long repositoryId, long fileEntryId, long destFolderId,
130                    com.liferay.portal.service.ServiceContext serviceContext)
131                    throws com.liferay.portal.kernel.exception.PortalException {
132                    return getService()
133                                       .copyFileEntry(groupId, repositoryId, fileEntryId,
134                            destFolderId, serviceContext);
135            }
136    
137            public static void deleteFileEntry(long fileEntryId)
138                    throws com.liferay.portal.kernel.exception.PortalException {
139                    getService().deleteFileEntry(fileEntryId);
140            }
141    
142            public static void deleteFileEntry(long groupId, long folderId,
143                    java.lang.String title)
144                    throws com.liferay.portal.kernel.exception.PortalException {
145                    getService().deleteFileEntry(groupId, folderId, title);
146            }
147    
148            public static void deleteFileVersion(long fileEntryId,
149                    java.lang.String version)
150                    throws com.liferay.portal.kernel.exception.PortalException {
151                    getService().deleteFileVersion(fileEntryId, version);
152            }
153    
154            public static com.liferay.portlet.documentlibrary.model.DLFileEntry fetchFileEntryByImageId(
155                    long imageId)
156                    throws com.liferay.portal.kernel.exception.PortalException {
157                    return getService().fetchFileEntryByImageId(imageId);
158            }
159    
160            /**
161            * Returns the Spring bean ID for this bean.
162            *
163            * @return the Spring bean ID for this bean
164            */
165            public static java.lang.String getBeanIdentifier() {
166                    return getService().getBeanIdentifier();
167            }
168    
169            public static java.io.InputStream getFileAsStream(long fileEntryId,
170                    java.lang.String version)
171                    throws com.liferay.portal.kernel.exception.PortalException {
172                    return getService().getFileAsStream(fileEntryId, version);
173            }
174    
175            public static java.io.InputStream getFileAsStream(long fileEntryId,
176                    java.lang.String version, boolean incrementCounter)
177                    throws com.liferay.portal.kernel.exception.PortalException {
178                    return getService()
179                                       .getFileAsStream(fileEntryId, version, incrementCounter);
180            }
181    
182            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
183                    long groupId, long folderId, long fileEntryTypeId, int start, int end,
184                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
185                    throws com.liferay.portal.kernel.exception.PortalException {
186                    return getService()
187                                       .getFileEntries(groupId, folderId, fileEntryTypeId, start,
188                            end, obc);
189            }
190    
191            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
192                    long groupId, long folderId, java.lang.String[] mimeTypes, int start,
193                    int end,
194                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
195                    throws com.liferay.portal.kernel.exception.PortalException {
196                    return getService()
197                                       .getFileEntries(groupId, folderId, mimeTypes, start, end, obc);
198            }
199    
200            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
201                    long groupId, long folderId, int start, int end,
202                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
203                    throws com.liferay.portal.kernel.exception.PortalException {
204                    return getService().getFileEntries(groupId, folderId, start, end, obc);
205            }
206    
207            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
208                    long groupId, long folderId, int status, int start, int end,
209                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
210                    throws com.liferay.portal.kernel.exception.PortalException {
211                    return getService()
212                                       .getFileEntries(groupId, folderId, status, start, end, obc);
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                    long fileEntryTypeId) {
221                    return getService()
222                                       .getFileEntriesCount(groupId, folderId, fileEntryTypeId);
223            }
224    
225            public static int getFileEntriesCount(long groupId, long folderId,
226                    java.lang.String[] mimeTypes) {
227                    return getService().getFileEntriesCount(groupId, folderId, mimeTypes);
228            }
229    
230            public static int getFileEntriesCount(long groupId, long folderId,
231                    int status) {
232                    return getService().getFileEntriesCount(groupId, folderId, status);
233            }
234    
235            public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
236                    long fileEntryId)
237                    throws com.liferay.portal.kernel.exception.PortalException {
238                    return getService().getFileEntry(fileEntryId);
239            }
240    
241            public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
242                    long groupId, long folderId, java.lang.String title)
243                    throws com.liferay.portal.kernel.exception.PortalException {
244                    return getService().getFileEntry(groupId, folderId, title);
245            }
246    
247            public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
248                    java.lang.String uuid, long groupId)
249                    throws com.liferay.portal.kernel.exception.PortalException {
250                    return getService().getFileEntryByUuidAndGroupId(uuid, groupId);
251            }
252    
253            public static com.liferay.portal.model.Lock getFileEntryLock(
254                    long fileEntryId) {
255                    return getService().getFileEntryLock(fileEntryId);
256            }
257    
258            public static int getFoldersFileEntriesCount(long groupId,
259                    java.util.List<java.lang.Long> folderIds, int status) {
260                    return getService()
261                                       .getFoldersFileEntriesCount(groupId, folderIds, status);
262            }
263    
264            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
265                    long groupId, long userId, long repositoryId, long rootFolderId,
266                    java.lang.String[] mimeTypes, int status, int start, int end,
267                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
268                    throws com.liferay.portal.kernel.exception.PortalException {
269                    return getService()
270                                       .getGroupFileEntries(groupId, userId, repositoryId,
271                            rootFolderId, mimeTypes, status, start, end, obc);
272            }
273    
274            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
275                    long groupId, long userId, long rootFolderId,
276                    java.lang.String[] mimeTypes, int status, int start, int end,
277                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
278                    throws com.liferay.portal.kernel.exception.PortalException {
279                    return getService()
280                                       .getGroupFileEntries(groupId, userId, rootFolderId,
281                            mimeTypes, status, start, end, obc);
282            }
283    
284            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
285                    long groupId, long userId, long rootFolderId, int start, int end,
286                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
287                    throws com.liferay.portal.kernel.exception.PortalException {
288                    return getService()
289                                       .getGroupFileEntries(groupId, userId, rootFolderId, start,
290                            end, obc);
291            }
292    
293            public static int getGroupFileEntriesCount(long groupId, long userId,
294                    long repositoryId, long rootFolderId, java.lang.String[] mimeTypes,
295                    int status) throws com.liferay.portal.kernel.exception.PortalException {
296                    return getService()
297                                       .getGroupFileEntriesCount(groupId, userId, repositoryId,
298                            rootFolderId, mimeTypes, status);
299            }
300    
301            public static int getGroupFileEntriesCount(long groupId, long userId,
302                    long rootFolderId)
303                    throws com.liferay.portal.kernel.exception.PortalException {
304                    return getService()
305                                       .getGroupFileEntriesCount(groupId, userId, rootFolderId);
306            }
307    
308            public static int getGroupFileEntriesCount(long groupId, long userId,
309                    long rootFolderId, java.lang.String[] mimeTypes, int status)
310                    throws com.liferay.portal.kernel.exception.PortalException {
311                    return getService()
312                                       .getGroupFileEntriesCount(groupId, userId, rootFolderId,
313                            mimeTypes, status);
314            }
315    
316            public static boolean hasFileEntryLock(long fileEntryId)
317                    throws com.liferay.portal.kernel.exception.PortalException {
318                    return getService().hasFileEntryLock(fileEntryId);
319            }
320    
321            public static boolean isFileEntryCheckedOut(long fileEntryId)
322                    throws com.liferay.portal.kernel.exception.PortalException {
323                    return getService().isFileEntryCheckedOut(fileEntryId);
324            }
325    
326            public static com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
327                    long fileEntryId, long newFolderId,
328                    com.liferay.portal.service.ServiceContext serviceContext)
329                    throws com.liferay.portal.kernel.exception.PortalException {
330                    return getService()
331                                       .moveFileEntry(fileEntryId, newFolderId, serviceContext);
332            }
333    
334            public static com.liferay.portal.model.Lock refreshFileEntryLock(
335                    java.lang.String lockUuid, long companyId, long expirationTime)
336                    throws com.liferay.portal.kernel.exception.PortalException {
337                    return getService()
338                                       .refreshFileEntryLock(lockUuid, companyId, expirationTime);
339            }
340    
341            public static void revertFileEntry(long fileEntryId,
342                    java.lang.String version,
343                    com.liferay.portal.service.ServiceContext serviceContext)
344                    throws com.liferay.portal.kernel.exception.PortalException {
345                    getService().revertFileEntry(fileEntryId, version, serviceContext);
346            }
347    
348            public static com.liferay.portal.kernel.search.Hits search(long groupId,
349                    long creatorUserId, long folderId, java.lang.String[] mimeTypes,
350                    int status, int start, int end)
351                    throws com.liferay.portal.kernel.exception.PortalException {
352                    return getService()
353                                       .search(groupId, creatorUserId, folderId, mimeTypes, status,
354                            start, end);
355            }
356    
357            public static com.liferay.portal.kernel.search.Hits search(long groupId,
358                    long creatorUserId, int status, int start, int end)
359                    throws com.liferay.portal.kernel.exception.PortalException {
360                    return getService().search(groupId, creatorUserId, status, start, end);
361            }
362    
363            /**
364            * Sets the Spring bean ID for this bean.
365            *
366            * @param beanIdentifier the Spring bean ID for this bean
367            */
368            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
369                    getService().setBeanIdentifier(beanIdentifier);
370            }
371    
372            public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
373                    long fileEntryId, java.lang.String sourceFileName,
374                    java.lang.String mimeType, java.lang.String title,
375                    java.lang.String description, java.lang.String changeLog,
376                    boolean majorVersion, long fileEntryTypeId,
377                    java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> fieldsMap,
378                    java.io.File file, java.io.InputStream is, long size,
379                    com.liferay.portal.service.ServiceContext serviceContext)
380                    throws com.liferay.portal.kernel.exception.PortalException {
381                    return getService()
382                                       .updateFileEntry(fileEntryId, sourceFileName, mimeType,
383                            title, description, changeLog, majorVersion, fileEntryTypeId,
384                            fieldsMap, file, is, size, serviceContext);
385            }
386    
387            public static boolean verifyFileEntryCheckOut(long fileEntryId,
388                    java.lang.String lockUuid)
389                    throws com.liferay.portal.kernel.exception.PortalException {
390                    return getService().verifyFileEntryCheckOut(fileEntryId, lockUuid);
391            }
392    
393            public static boolean verifyFileEntryLock(long fileEntryId,
394                    java.lang.String lockUuid)
395                    throws com.liferay.portal.kernel.exception.PortalException {
396                    return getService().verifyFileEntryLock(fileEntryId, lockUuid);
397            }
398    
399            public static DLFileEntryService getService() {
400                    if (_service == null) {
401                            _service = (DLFileEntryService)PortalBeanLocatorUtil.locate(DLFileEntryService.class.getName());
402    
403                            ReferenceRegistry.registerReference(DLFileEntryServiceUtil.class,
404                                    "_service");
405                    }
406    
407                    return _service;
408            }
409    
410            /**
411             * @deprecated As of 6.2.0
412             */
413            @Deprecated
414            public void setService(DLFileEntryService service) {
415            }
416    
417            private static DLFileEntryService _service;
418    }