1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.documentlibrary.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="DLFileEntryLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link DLFileEntryLocalService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       DLFileEntryLocalService
37   * @generated
38   */
39  public class DLFileEntryLocalServiceUtil {
40      public static com.liferay.portlet.documentlibrary.model.DLFileEntry addDLFileEntry(
41          com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
42          throws com.liferay.portal.kernel.exception.SystemException {
43          return getService().addDLFileEntry(dlFileEntry);
44      }
45  
46      public static com.liferay.portlet.documentlibrary.model.DLFileEntry createDLFileEntry(
47          long fileEntryId) {
48          return getService().createDLFileEntry(fileEntryId);
49      }
50  
51      public static void deleteDLFileEntry(long fileEntryId)
52          throws com.liferay.portal.kernel.exception.PortalException,
53              com.liferay.portal.kernel.exception.SystemException {
54          getService().deleteDLFileEntry(fileEntryId);
55      }
56  
57      public static void deleteDLFileEntry(
58          com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
59          throws com.liferay.portal.kernel.exception.SystemException {
60          getService().deleteDLFileEntry(dlFileEntry);
61      }
62  
63      public static java.util.List<Object> dynamicQuery(
64          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
65          throws com.liferay.portal.kernel.exception.SystemException {
66          return getService().dynamicQuery(dynamicQuery);
67      }
68  
69      public static java.util.List<Object> dynamicQuery(
70          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
71          int end) throws com.liferay.portal.kernel.exception.SystemException {
72          return getService().dynamicQuery(dynamicQuery, start, end);
73      }
74  
75      public static java.util.List<Object> dynamicQuery(
76          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
77          int end,
78          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
79          throws com.liferay.portal.kernel.exception.SystemException {
80          return getService()
81                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
82      }
83  
84      public static int dynamicQueryCount(
85          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
86          throws com.liferay.portal.kernel.exception.SystemException {
87          return getService().dynamicQueryCount(dynamicQuery);
88      }
89  
90      public static com.liferay.portlet.documentlibrary.model.DLFileEntry getDLFileEntry(
91          long fileEntryId)
92          throws com.liferay.portal.kernel.exception.PortalException,
93              com.liferay.portal.kernel.exception.SystemException {
94          return getService().getDLFileEntry(fileEntryId);
95      }
96  
97      public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getDLFileEntries(
98          int start, int end)
99          throws com.liferay.portal.kernel.exception.SystemException {
100         return getService().getDLFileEntries(start, end);
101     }
102 
103     public static int getDLFileEntriesCount()
104         throws com.liferay.portal.kernel.exception.SystemException {
105         return getService().getDLFileEntriesCount();
106     }
107 
108     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateDLFileEntry(
109         com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
110         throws com.liferay.portal.kernel.exception.SystemException {
111         return getService().updateDLFileEntry(dlFileEntry);
112     }
113 
114     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateDLFileEntry(
115         com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry,
116         boolean merge)
117         throws com.liferay.portal.kernel.exception.SystemException {
118         return getService().updateDLFileEntry(dlFileEntry, merge);
119     }
120 
121     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
122         java.lang.String uuid, long userId, long groupId, long folderId,
123         java.lang.String name, java.lang.String title,
124         java.lang.String description, java.lang.String versionDescription,
125         java.lang.String extraSettings, byte[] bytes,
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()
130                    .addFileEntry(uuid, userId, groupId, folderId, name, title,
131             description, versionDescription, extraSettings, bytes,
132             serviceContext);
133     }
134 
135     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
136         java.lang.String uuid, long userId, long groupId, long folderId,
137         java.lang.String name, java.lang.String title,
138         java.lang.String description, java.lang.String versionDescription,
139         java.lang.String extraSettings, java.io.File file,
140         com.liferay.portal.service.ServiceContext serviceContext)
141         throws com.liferay.portal.kernel.exception.PortalException,
142             com.liferay.portal.kernel.exception.SystemException {
143         return getService()
144                    .addFileEntry(uuid, userId, groupId, folderId, name, title,
145             description, versionDescription, extraSettings, file, serviceContext);
146     }
147 
148     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
149         java.lang.String uuid, long userId, long groupId, long folderId,
150         java.lang.String name, java.lang.String title,
151         java.lang.String description, java.lang.String versionDescription,
152         java.lang.String extraSettings, java.io.InputStream is, long size,
153         com.liferay.portal.service.ServiceContext serviceContext)
154         throws com.liferay.portal.kernel.exception.PortalException,
155             com.liferay.portal.kernel.exception.SystemException {
156         return getService()
157                    .addFileEntry(uuid, userId, groupId, folderId, name, title,
158             description, versionDescription, extraSettings, is, size,
159             serviceContext);
160     }
161 
162     public static void addFileEntryResources(
163         com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
164         boolean addCommunityPermissions, boolean addGuestPermissions)
165         throws com.liferay.portal.kernel.exception.PortalException,
166             com.liferay.portal.kernel.exception.SystemException {
167         getService()
168             .addFileEntryResources(fileEntry, addCommunityPermissions,
169             addGuestPermissions);
170     }
171 
172     public static void addFileEntryResources(
173         com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
174         java.lang.String[] communityPermissions,
175         java.lang.String[] guestPermissions)
176         throws com.liferay.portal.kernel.exception.PortalException,
177             com.liferay.portal.kernel.exception.SystemException {
178         getService()
179             .addFileEntryResources(fileEntry, communityPermissions,
180             guestPermissions);
181     }
182 
183     public static void addFileEntryResources(long fileEntryId,
184         boolean addCommunityPermissions, boolean addGuestPermissions)
185         throws com.liferay.portal.kernel.exception.PortalException,
186             com.liferay.portal.kernel.exception.SystemException {
187         getService()
188             .addFileEntryResources(fileEntryId, addCommunityPermissions,
189             addGuestPermissions);
190     }
191 
192     public static void addFileEntryResources(long fileEntryId,
193         java.lang.String[] communityPermissions,
194         java.lang.String[] guestPermissions)
195         throws com.liferay.portal.kernel.exception.PortalException,
196             com.liferay.portal.kernel.exception.SystemException {
197         getService()
198             .addFileEntryResources(fileEntryId, communityPermissions,
199             guestPermissions);
200     }
201 
202     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addOrOverwriteFileEntry(
203         long userId, long groupId, long folderId, java.lang.String name,
204         java.lang.String sourceName, java.lang.String title,
205         java.lang.String description, java.lang.String versionDescription,
206         java.lang.String extraSettings, java.io.File file,
207         com.liferay.portal.service.ServiceContext serviceContext)
208         throws com.liferay.portal.kernel.exception.PortalException,
209             com.liferay.portal.kernel.exception.SystemException {
210         return getService()
211                    .addOrOverwriteFileEntry(userId, groupId, folderId, name,
212             sourceName, title, description, versionDescription, extraSettings,
213             file, serviceContext);
214     }
215 
216     public static void deleteFileEntries(long groupId, long folderId)
217         throws com.liferay.portal.kernel.exception.PortalException,
218             com.liferay.portal.kernel.exception.SystemException {
219         getService().deleteFileEntries(groupId, folderId);
220     }
221 
222     public static void deleteFileEntry(
223         com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry)
224         throws com.liferay.portal.kernel.exception.PortalException,
225             com.liferay.portal.kernel.exception.SystemException {
226         getService().deleteFileEntry(fileEntry);
227     }
228 
229     public static void deleteFileEntry(long groupId, long folderId,
230         java.lang.String name)
231         throws com.liferay.portal.kernel.exception.PortalException,
232             com.liferay.portal.kernel.exception.SystemException {
233         getService().deleteFileEntry(groupId, folderId, name);
234     }
235 
236     public static void deleteFileEntry(long groupId, long folderId,
237         java.lang.String name, java.lang.String version)
238         throws com.liferay.portal.kernel.exception.PortalException,
239             com.liferay.portal.kernel.exception.SystemException {
240         getService().deleteFileEntry(groupId, folderId, name, version);
241     }
242 
243     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getCompanyFileEntries(
244         long companyId, int start, int end)
245         throws com.liferay.portal.kernel.exception.SystemException {
246         return getService().getCompanyFileEntries(companyId, start, end);
247     }
248 
249     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getCompanyFileEntries(
250         long companyId, int start, int end,
251         com.liferay.portal.kernel.util.OrderByComparator obc)
252         throws com.liferay.portal.kernel.exception.SystemException {
253         return getService().getCompanyFileEntries(companyId, start, end, obc);
254     }
255 
256     public static int getCompanyFileEntriesCount(long companyId)
257         throws com.liferay.portal.kernel.exception.SystemException {
258         return getService().getCompanyFileEntriesCount(companyId);
259     }
260 
261     public static java.io.InputStream getFileAsStream(long companyId,
262         long userId, long groupId, long folderId, java.lang.String name)
263         throws com.liferay.portal.kernel.exception.PortalException,
264             com.liferay.portal.kernel.exception.SystemException {
265         return getService()
266                    .getFileAsStream(companyId, userId, groupId, folderId, name);
267     }
268 
269     public static java.io.InputStream getFileAsStream(long companyId,
270         long userId, long groupId, long folderId, java.lang.String name,
271         java.lang.String version)
272         throws com.liferay.portal.kernel.exception.PortalException,
273             com.liferay.portal.kernel.exception.SystemException {
274         return getService()
275                    .getFileAsStream(companyId, userId, groupId, folderId, name,
276             version);
277     }
278 
279     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
280         long groupId, long folderId)
281         throws com.liferay.portal.kernel.exception.SystemException {
282         return getService().getFileEntries(groupId, folderId);
283     }
284 
285     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
286         long groupId, long folderId, int start, int end)
287         throws com.liferay.portal.kernel.exception.SystemException {
288         return getService().getFileEntries(groupId, folderId, start, end);
289     }
290 
291     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
292         long groupId, long folderId, int start, int end,
293         com.liferay.portal.kernel.util.OrderByComparator obc)
294         throws com.liferay.portal.kernel.exception.SystemException {
295         return getService().getFileEntries(groupId, folderId, start, end, obc);
296     }
297 
298     public static int getFileEntriesCount(long groupId, long folderId)
299         throws com.liferay.portal.kernel.exception.SystemException {
300         return getService().getFileEntriesCount(groupId, folderId);
301     }
302 
303     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
304         long fileEntryId)
305         throws com.liferay.portal.kernel.exception.PortalException,
306             com.liferay.portal.kernel.exception.SystemException {
307         return getService().getFileEntry(fileEntryId);
308     }
309 
310     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
311         long groupId, long folderId, java.lang.String name)
312         throws com.liferay.portal.kernel.exception.PortalException,
313             com.liferay.portal.kernel.exception.SystemException {
314         return getService().getFileEntry(groupId, folderId, name);
315     }
316 
317     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByTitle(
318         long groupId, long folderId, java.lang.String title)
319         throws com.liferay.portal.kernel.exception.PortalException,
320             com.liferay.portal.kernel.exception.SystemException {
321         return getService().getFileEntryByTitle(groupId, folderId, title);
322     }
323 
324     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
325         java.lang.String uuid, long groupId)
326         throws com.liferay.portal.kernel.exception.PortalException,
327             com.liferay.portal.kernel.exception.SystemException {
328         return getService().getFileEntryByUuidAndGroupId(uuid, groupId);
329     }
330 
331     public static int getFoldersFileEntriesCount(long groupId,
332         java.util.List<Long> folderIds, int status)
333         throws com.liferay.portal.kernel.exception.SystemException {
334         return getService()
335                    .getFoldersFileEntriesCount(groupId, folderIds, status);
336     }
337 
338     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
339         long groupId, int start, int end)
340         throws com.liferay.portal.kernel.exception.SystemException {
341         return getService().getGroupFileEntries(groupId, start, end);
342     }
343 
344     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
345         long groupId, int start, int end,
346         com.liferay.portal.kernel.util.OrderByComparator obc)
347         throws com.liferay.portal.kernel.exception.SystemException {
348         return getService().getGroupFileEntries(groupId, start, end, obc);
349     }
350 
351     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
352         long groupId, long userId, int start, int end)
353         throws com.liferay.portal.kernel.exception.SystemException {
354         return getService().getGroupFileEntries(groupId, userId, start, end);
355     }
356 
357     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
358         long groupId, long userId, int start, int end,
359         com.liferay.portal.kernel.util.OrderByComparator obc)
360         throws com.liferay.portal.kernel.exception.SystemException {
361         return getService().getGroupFileEntries(groupId, userId, start, end, obc);
362     }
363 
364     public static int getGroupFileEntriesCount(long groupId)
365         throws com.liferay.portal.kernel.exception.SystemException {
366         return getService().getGroupFileEntriesCount(groupId);
367     }
368 
369     public static int getGroupFileEntriesCount(long groupId, long userId)
370         throws com.liferay.portal.kernel.exception.SystemException {
371         return getService().getGroupFileEntriesCount(groupId, userId);
372     }
373 
374     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getNoAssetFileEntries()
375         throws com.liferay.portal.kernel.exception.SystemException {
376         return getService().getNoAssetFileEntries();
377     }
378 
379     public static void updateAsset(long userId,
380         com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
381         long[] assetCategoryIds, java.lang.String[] assetTagNames)
382         throws com.liferay.portal.kernel.exception.PortalException,
383             com.liferay.portal.kernel.exception.SystemException {
384         getService()
385             .updateAsset(userId, fileEntry, assetCategoryIds, assetTagNames);
386     }
387 
388     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
389         long userId, long groupId, long folderId, long newFolderId,
390         java.lang.String name, java.lang.String sourceFileName,
391         java.lang.String title, java.lang.String description,
392         java.lang.String versionDescription, boolean majorVersion,
393         java.lang.String extraSettings, byte[] bytes,
394         com.liferay.portal.service.ServiceContext serviceContext)
395         throws com.liferay.portal.kernel.exception.PortalException,
396             com.liferay.portal.kernel.exception.SystemException {
397         return getService()
398                    .updateFileEntry(userId, groupId, folderId, newFolderId,
399             name, sourceFileName, title, description, versionDescription,
400             majorVersion, extraSettings, bytes, serviceContext);
401     }
402 
403     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
404         long userId, long groupId, long folderId, long newFolderId,
405         java.lang.String name, java.lang.String sourceFileName,
406         java.lang.String title, java.lang.String description,
407         java.lang.String versionDescription, boolean majorVersion,
408         java.lang.String extraSettings, java.io.File file,
409         com.liferay.portal.service.ServiceContext serviceContext)
410         throws com.liferay.portal.kernel.exception.PortalException,
411             com.liferay.portal.kernel.exception.SystemException {
412         return getService()
413                    .updateFileEntry(userId, groupId, folderId, newFolderId,
414             name, sourceFileName, title, description, versionDescription,
415             majorVersion, extraSettings, file, serviceContext);
416     }
417 
418     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
419         long userId, long groupId, long folderId, long newFolderId,
420         java.lang.String name, java.lang.String sourceFileName,
421         java.lang.String title, java.lang.String description,
422         java.lang.String versionDescription, boolean majorVersion,
423         java.lang.String extraSettings, java.io.InputStream is, long size,
424         com.liferay.portal.service.ServiceContext serviceContext)
425         throws com.liferay.portal.kernel.exception.PortalException,
426             com.liferay.portal.kernel.exception.SystemException {
427         return getService()
428                    .updateFileEntry(userId, groupId, folderId, newFolderId,
429             name, sourceFileName, title, description, versionDescription,
430             majorVersion, extraSettings, is, size, serviceContext);
431     }
432 
433     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateStatus(
434         long userId, long fileEntryId,
435         com.liferay.portal.service.ServiceContext serviceContext)
436         throws com.liferay.portal.kernel.exception.PortalException,
437             com.liferay.portal.kernel.exception.SystemException {
438         return getService().updateStatus(userId, fileEntryId, serviceContext);
439     }
440 
441     public static DLFileEntryLocalService getService() {
442         if (_service == null) {
443             _service = (DLFileEntryLocalService)PortalBeanLocatorUtil.locate(DLFileEntryLocalService.class.getName());
444         }
445 
446         return _service;
447     }
448 
449     public void setService(DLFileEntryLocalService service) {
450         _service = service;
451     }
452 
453     private static DLFileEntryLocalService _service;
454 }