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