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