001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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.MethodCache;
019    import com.liferay.portal.kernel.util.ReferenceRegistry;
020    
021    /**
022     * The utility for the d l file entry remote service. This utility wraps {@link com.liferay.portlet.documentlibrary.service.impl.DLFileEntryServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
023     *
024     * <p>
025     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
026     * </p>
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            public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
041                    long groupId, long folderId, java.lang.String name,
042                    java.lang.String title, java.lang.String description,
043                    java.lang.String changeLog, java.lang.String extraSettings,
044                    byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
045                    throws com.liferay.portal.kernel.exception.PortalException,
046                            com.liferay.portal.kernel.exception.SystemException {
047                    return getService()
048                                       .addFileEntry(groupId, folderId, name, title, description,
049                            changeLog, extraSettings, bytes, serviceContext);
050            }
051    
052            public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
053                    long groupId, long folderId, java.lang.String name,
054                    java.lang.String title, java.lang.String description,
055                    java.lang.String changeLog, java.lang.String extraSettings,
056                    java.io.File file,
057                    com.liferay.portal.service.ServiceContext serviceContext)
058                    throws com.liferay.portal.kernel.exception.PortalException,
059                            com.liferay.portal.kernel.exception.SystemException {
060                    return getService()
061                                       .addFileEntry(groupId, folderId, name, title, description,
062                            changeLog, extraSettings, file, serviceContext);
063            }
064    
065            public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
066                    long groupId, long folderId, java.lang.String name,
067                    java.lang.String title, java.lang.String description,
068                    java.lang.String changeLog, java.lang.String extraSettings,
069                    java.io.InputStream is, long size,
070                    com.liferay.portal.service.ServiceContext serviceContext)
071                    throws com.liferay.portal.kernel.exception.PortalException,
072                            com.liferay.portal.kernel.exception.SystemException {
073                    return getService()
074                                       .addFileEntry(groupId, folderId, name, title, description,
075                            changeLog, extraSettings, is, size, serviceContext);
076            }
077    
078            public static void deleteFileEntry(long fileEntryId)
079                    throws com.liferay.portal.kernel.exception.PortalException,
080                            com.liferay.portal.kernel.exception.SystemException {
081                    getService().deleteFileEntry(fileEntryId);
082            }
083    
084            public static void deleteFileEntry(long groupId, long folderId,
085                    java.lang.String name)
086                    throws com.liferay.portal.kernel.exception.PortalException,
087                            com.liferay.portal.kernel.exception.SystemException {
088                    getService().deleteFileEntry(groupId, folderId, name);
089            }
090    
091            public static void deleteFileEntry(long groupId, long folderId,
092                    java.lang.String name, java.lang.String version)
093                    throws com.liferay.portal.kernel.exception.PortalException,
094                            com.liferay.portal.kernel.exception.SystemException {
095                    getService().deleteFileEntry(groupId, folderId, name, version);
096            }
097    
098            public static void deleteFileEntryByTitle(long groupId, long folderId,
099                    java.lang.String titleWithExtension)
100                    throws com.liferay.portal.kernel.exception.PortalException,
101                            com.liferay.portal.kernel.exception.SystemException {
102                    getService()
103                            .deleteFileEntryByTitle(groupId, folderId, titleWithExtension);
104            }
105    
106            public static java.io.InputStream getFileAsStream(long fileEntryId,
107                    java.lang.String version)
108                    throws com.liferay.portal.kernel.exception.PortalException,
109                            com.liferay.portal.kernel.exception.SystemException {
110                    return getService().getFileAsStream(fileEntryId, version);
111            }
112    
113            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
114                    long groupId, long folderId)
115                    throws com.liferay.portal.kernel.exception.PortalException,
116                            com.liferay.portal.kernel.exception.SystemException {
117                    return getService().getFileEntries(groupId, folderId);
118            }
119    
120            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
121                    long groupId, long folderId, int start, int end)
122                    throws com.liferay.portal.kernel.exception.PortalException,
123                            com.liferay.portal.kernel.exception.SystemException {
124                    return getService().getFileEntries(groupId, folderId, start, end);
125            }
126    
127            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
128                    long groupId, long folderId, int start, int end,
129                    com.liferay.portal.kernel.util.OrderByComparator obc)
130                    throws com.liferay.portal.kernel.exception.PortalException,
131                            com.liferay.portal.kernel.exception.SystemException {
132                    return getService().getFileEntries(groupId, folderId, start, end, obc);
133            }
134    
135            public static int getFileEntriesCount(long groupId, long folderId)
136                    throws com.liferay.portal.kernel.exception.PortalException,
137                            com.liferay.portal.kernel.exception.SystemException {
138                    return getService().getFileEntriesCount(groupId, folderId);
139            }
140    
141            public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
142                    long fileEntryId)
143                    throws com.liferay.portal.kernel.exception.PortalException,
144                            com.liferay.portal.kernel.exception.SystemException {
145                    return getService().getFileEntry(fileEntryId);
146            }
147    
148            public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
149                    long groupId, long folderId, java.lang.String name)
150                    throws com.liferay.portal.kernel.exception.PortalException,
151                            com.liferay.portal.kernel.exception.SystemException {
152                    return getService().getFileEntry(groupId, folderId, name);
153            }
154    
155            public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByTitle(
156                    long groupId, long folderId, java.lang.String titleWithExtension)
157                    throws com.liferay.portal.kernel.exception.PortalException,
158                            com.liferay.portal.kernel.exception.SystemException {
159                    return getService()
160                                       .getFileEntryByTitle(groupId, folderId, titleWithExtension);
161            }
162    
163            public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
164                    java.lang.String uuid, long groupId)
165                    throws com.liferay.portal.kernel.exception.PortalException,
166                            com.liferay.portal.kernel.exception.SystemException {
167                    return getService().getFileEntryByUuidAndGroupId(uuid, groupId);
168            }
169    
170            public static com.liferay.portal.model.Lock getFileEntryLock(long groupId,
171                    long folderId, java.lang.String name)
172                    throws com.liferay.portal.kernel.exception.PortalException,
173                            com.liferay.portal.kernel.exception.SystemException {
174                    return getService().getFileEntryLock(groupId, folderId, name);
175            }
176    
177            public static int getFoldersFileEntriesCount(long groupId,
178                    java.util.List<java.lang.Long> folderIds, int status)
179                    throws com.liferay.portal.kernel.exception.SystemException {
180                    return getService()
181                                       .getFoldersFileEntriesCount(groupId, folderIds, status);
182            }
183    
184            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
185                    long groupId, long userId, int start, int end)
186                    throws com.liferay.portal.kernel.exception.SystemException {
187                    return getService().getGroupFileEntries(groupId, userId, start, end);
188            }
189    
190            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
191                    long groupId, long userId, int start, int end,
192                    com.liferay.portal.kernel.util.OrderByComparator obc)
193                    throws com.liferay.portal.kernel.exception.SystemException {
194                    return getService().getGroupFileEntries(groupId, userId, start, end, obc);
195            }
196    
197            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
198                    long groupId, long userId, long rootFolderId, int start, int end)
199                    throws com.liferay.portal.kernel.exception.SystemException {
200                    return getService()
201                                       .getGroupFileEntries(groupId, userId, rootFolderId, start,
202                            end);
203            }
204    
205            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
206                    long groupId, long userId, long rootFolderId, int start, int end,
207                    com.liferay.portal.kernel.util.OrderByComparator obc)
208                    throws com.liferay.portal.kernel.exception.SystemException {
209                    return getService()
210                                       .getGroupFileEntries(groupId, userId, rootFolderId, start,
211                            end, obc);
212            }
213    
214            public static int getGroupFileEntriesCount(long groupId, long userId)
215                    throws com.liferay.portal.kernel.exception.SystemException {
216                    return getService().getGroupFileEntriesCount(groupId, userId);
217            }
218    
219            public static int getGroupFileEntriesCount(long groupId, long userId,
220                    long rootFolderId)
221                    throws com.liferay.portal.kernel.exception.SystemException {
222                    return getService()
223                                       .getGroupFileEntriesCount(groupId, userId, rootFolderId);
224            }
225    
226            public static boolean hasFileEntryLock(long groupId, long folderId,
227                    java.lang.String name)
228                    throws com.liferay.portal.kernel.exception.PortalException,
229                            com.liferay.portal.kernel.exception.SystemException {
230                    return getService().hasFileEntryLock(groupId, folderId, name);
231            }
232    
233            public static com.liferay.portal.model.Lock lockFileEntry(long groupId,
234                    long folderId, java.lang.String name)
235                    throws com.liferay.portal.kernel.exception.PortalException,
236                            com.liferay.portal.kernel.exception.SystemException {
237                    return getService().lockFileEntry(groupId, folderId, name);
238            }
239    
240            public static com.liferay.portal.model.Lock lockFileEntry(long groupId,
241                    long folderId, java.lang.String name, java.lang.String owner,
242                    long expirationTime)
243                    throws com.liferay.portal.kernel.exception.PortalException,
244                            com.liferay.portal.kernel.exception.SystemException {
245                    return getService()
246                                       .lockFileEntry(groupId, folderId, name, owner, expirationTime);
247            }
248    
249            public static com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
250                    long groupId, long folderId, long newFolderId, java.lang.String name,
251                    com.liferay.portal.service.ServiceContext serviceContext)
252                    throws com.liferay.portal.kernel.exception.PortalException,
253                            com.liferay.portal.kernel.exception.SystemException {
254                    return getService()
255                                       .moveFileEntry(groupId, folderId, newFolderId, name,
256                            serviceContext);
257            }
258    
259            public static com.liferay.portal.model.Lock refreshFileEntryLock(
260                    java.lang.String lockUuid, long expirationTime)
261                    throws com.liferay.portal.kernel.exception.PortalException,
262                            com.liferay.portal.kernel.exception.SystemException {
263                    return getService().refreshFileEntryLock(lockUuid, expirationTime);
264            }
265    
266            public static void revertFileEntry(long fileEntryId)
267                    throws com.liferay.portal.kernel.exception.PortalException,
268                            com.liferay.portal.kernel.exception.SystemException {
269                    getService().revertFileEntry(fileEntryId);
270            }
271    
272            public static void unlockFileEntry(long groupId, long folderId,
273                    java.lang.String name)
274                    throws com.liferay.portal.kernel.exception.PortalException,
275                            com.liferay.portal.kernel.exception.SystemException {
276                    getService().unlockFileEntry(groupId, folderId, name);
277            }
278    
279            public static void unlockFileEntry(long groupId, long folderId,
280                    java.lang.String name, java.lang.String lockUuid)
281                    throws com.liferay.portal.kernel.exception.PortalException,
282                            com.liferay.portal.kernel.exception.SystemException {
283                    getService().unlockFileEntry(groupId, folderId, name, lockUuid);
284            }
285    
286            public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
287                    long groupId, long folderId, java.lang.String name,
288                    java.lang.String sourceFileName, java.lang.String title,
289                    java.lang.String description, java.lang.String changeLog,
290                    boolean majorVersion, java.lang.String extraSettings, byte[] bytes,
291                    com.liferay.portal.service.ServiceContext serviceContext)
292                    throws com.liferay.portal.kernel.exception.PortalException,
293                            com.liferay.portal.kernel.exception.SystemException {
294                    return getService()
295                                       .updateFileEntry(groupId, folderId, name, sourceFileName,
296                            title, description, changeLog, majorVersion, extraSettings, bytes,
297                            serviceContext);
298            }
299    
300            public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
301                    long groupId, long folderId, java.lang.String name,
302                    java.lang.String sourceFileName, java.lang.String title,
303                    java.lang.String description, java.lang.String changeLog,
304                    boolean majorVersion, java.lang.String extraSettings,
305                    java.io.File file,
306                    com.liferay.portal.service.ServiceContext serviceContext)
307                    throws com.liferay.portal.kernel.exception.PortalException,
308                            com.liferay.portal.kernel.exception.SystemException {
309                    return getService()
310                                       .updateFileEntry(groupId, folderId, name, sourceFileName,
311                            title, description, changeLog, majorVersion, extraSettings, file,
312                            serviceContext);
313            }
314    
315            public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
316                    long groupId, long folderId, java.lang.String name,
317                    java.lang.String sourceFileName, java.lang.String title,
318                    java.lang.String description, java.lang.String changeLog,
319                    boolean majorVersion, java.lang.String extraSettings,
320                    java.io.InputStream is, long size,
321                    com.liferay.portal.service.ServiceContext serviceContext)
322                    throws com.liferay.portal.kernel.exception.PortalException,
323                            com.liferay.portal.kernel.exception.SystemException {
324                    return getService()
325                                       .updateFileEntry(groupId, folderId, name, sourceFileName,
326                            title, description, changeLog, majorVersion, extraSettings, is,
327                            size, serviceContext);
328            }
329    
330            public static boolean verifyFileEntryLock(long groupId, long folderId,
331                    java.lang.String name, java.lang.String lockUuid)
332                    throws com.liferay.portal.kernel.exception.PortalException,
333                            com.liferay.portal.kernel.exception.SystemException {
334                    return getService()
335                                       .verifyFileEntryLock(groupId, folderId, name, lockUuid);
336            }
337    
338            public static DLFileEntryService getService() {
339                    if (_service == null) {
340                            _service = (DLFileEntryService)PortalBeanLocatorUtil.locate(DLFileEntryService.class.getName());
341    
342                            ReferenceRegistry.registerReference(DLFileEntryServiceUtil.class,
343                                    "_service");
344                            MethodCache.remove(DLFileEntryService.class);
345                    }
346    
347                    return _service;
348            }
349    
350            public void setService(DLFileEntryService service) {
351                    MethodCache.remove(DLFileEntryService.class);
352    
353                    _service = service;
354    
355                    ReferenceRegistry.registerReference(DLFileEntryServiceUtil.class,
356                            "_service");
357                    MethodCache.remove(DLFileEntryService.class);
358            }
359    
360            private static DLFileEntryService _service;
361    }