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 int getGroupFileEntriesCount(long groupId, long userId,
319                    long rootFolderId)
320                    throws com.liferay.portal.kernel.exception.PortalException,
321                            com.liferay.portal.kernel.exception.SystemException {
322                    return getService()
323                                       .getGroupFileEntriesCount(groupId, userId, rootFolderId);
324            }
325    
326            public static int getGroupFileEntriesCount(long groupId, long userId,
327                    long rootFolderId, java.lang.String[] mimeTypes, int status)
328                    throws com.liferay.portal.kernel.exception.PortalException,
329                            com.liferay.portal.kernel.exception.SystemException {
330                    return getService()
331                                       .getGroupFileEntriesCount(groupId, userId, rootFolderId,
332                            mimeTypes, status);
333            }
334    
335            public static boolean hasFileEntryLock(long fileEntryId)
336                    throws com.liferay.portal.kernel.exception.PortalException,
337                            com.liferay.portal.kernel.exception.SystemException {
338                    return getService().hasFileEntryLock(fileEntryId);
339            }
340    
341            public static boolean isFileEntryCheckedOut(long fileEntryId)
342                    throws com.liferay.portal.kernel.exception.PortalException,
343                            com.liferay.portal.kernel.exception.SystemException {
344                    return getService().isFileEntryCheckedOut(fileEntryId);
345            }
346    
347            public static com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
348                    long fileEntryId, long newFolderId,
349                    com.liferay.portal.service.ServiceContext serviceContext)
350                    throws com.liferay.portal.kernel.exception.PortalException,
351                            com.liferay.portal.kernel.exception.SystemException {
352                    return getService()
353                                       .moveFileEntry(fileEntryId, newFolderId, serviceContext);
354            }
355    
356            public static com.liferay.portal.model.Lock refreshFileEntryLock(
357                    java.lang.String lockUuid, long companyId, long expirationTime)
358                    throws com.liferay.portal.kernel.exception.PortalException,
359                            com.liferay.portal.kernel.exception.SystemException {
360                    return getService()
361                                       .refreshFileEntryLock(lockUuid, companyId, expirationTime);
362            }
363    
364            public static void revertFileEntry(long fileEntryId,
365                    java.lang.String version,
366                    com.liferay.portal.service.ServiceContext serviceContext)
367                    throws com.liferay.portal.kernel.exception.PortalException,
368                            com.liferay.portal.kernel.exception.SystemException {
369                    getService().revertFileEntry(fileEntryId, version, serviceContext);
370            }
371    
372            public static com.liferay.portal.kernel.search.Hits search(long groupId,
373                    long creatorUserId, int status, int start, int end)
374                    throws com.liferay.portal.kernel.exception.PortalException,
375                            com.liferay.portal.kernel.exception.SystemException {
376                    return getService().search(groupId, creatorUserId, status, start, end);
377            }
378    
379            public static com.liferay.portal.kernel.search.Hits search(long groupId,
380                    long creatorUserId, long folderId, java.lang.String[] mimeTypes,
381                    int status, int start, int end)
382                    throws com.liferay.portal.kernel.exception.PortalException,
383                            com.liferay.portal.kernel.exception.SystemException {
384                    return getService()
385                                       .search(groupId, creatorUserId, folderId, mimeTypes, status,
386                            start, end);
387            }
388    
389            public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
390                    long fileEntryId, java.lang.String sourceFileName,
391                    java.lang.String mimeType, java.lang.String title,
392                    java.lang.String description, java.lang.String changeLog,
393                    boolean majorVersion, long fileEntryTypeId,
394                    java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> fieldsMap,
395                    java.io.File file, java.io.InputStream is, long size,
396                    com.liferay.portal.service.ServiceContext serviceContext)
397                    throws com.liferay.portal.kernel.exception.PortalException,
398                            com.liferay.portal.kernel.exception.SystemException {
399                    return getService()
400                                       .updateFileEntry(fileEntryId, sourceFileName, mimeType,
401                            title, description, changeLog, majorVersion, fileEntryTypeId,
402                            fieldsMap, file, is, size, serviceContext);
403            }
404    
405            public static boolean verifyFileEntryCheckOut(long fileEntryId,
406                    java.lang.String lockUuid)
407                    throws com.liferay.portal.kernel.exception.PortalException,
408                            com.liferay.portal.kernel.exception.SystemException {
409                    return getService().verifyFileEntryCheckOut(fileEntryId, lockUuid);
410            }
411    
412            public static boolean verifyFileEntryLock(long fileEntryId,
413                    java.lang.String lockUuid)
414                    throws com.liferay.portal.kernel.exception.PortalException,
415                            com.liferay.portal.kernel.exception.SystemException {
416                    return getService().verifyFileEntryLock(fileEntryId, lockUuid);
417            }
418    
419            public static DLFileEntryService getService() {
420                    if (_service == null) {
421                            _service = (DLFileEntryService)PortalBeanLocatorUtil.locate(DLFileEntryService.class.getName());
422    
423                            ReferenceRegistry.registerReference(DLFileEntryServiceUtil.class,
424                                    "_service");
425                    }
426    
427                    return _service;
428            }
429    
430            /**
431             * @deprecated As of 6.2.0
432             */
433            public void setService(DLFileEntryService service) {
434            }
435    
436            private static DLFileEntryService _service;
437    }