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