1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.documentlibrary.service;
24  
25  
26  /**
27   * <a href="DLFileEntryLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This class provides static methods for the
36   * <code>com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService</code>
37   * bean. The static methods of this class calls the same methods of the bean
38   * instance. It's convenient to be able to just write one line to call a method
39   * on a bean instead of writing a lookup call and a method call.
40   * </p>
41   *
42   * @author Brian Wing Shun Chan
43   *
44   * @see com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService
45   *
46   */
47  public class DLFileEntryLocalServiceUtil {
48      public static com.liferay.portlet.documentlibrary.model.DLFileEntry addDLFileEntry(
49          com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
50          throws com.liferay.portal.SystemException {
51          return getService().addDLFileEntry(dlFileEntry);
52      }
53  
54      public static com.liferay.portlet.documentlibrary.model.DLFileEntry createDLFileEntry(
55          long fileEntryId) {
56          return getService().createDLFileEntry(fileEntryId);
57      }
58  
59      public static void deleteDLFileEntry(long fileEntryId)
60          throws com.liferay.portal.PortalException,
61              com.liferay.portal.SystemException {
62          getService().deleteDLFileEntry(fileEntryId);
63      }
64  
65      public static void deleteDLFileEntry(
66          com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
67          throws com.liferay.portal.SystemException {
68          getService().deleteDLFileEntry(dlFileEntry);
69      }
70  
71      public static java.util.List<Object> dynamicQuery(
72          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
73          throws com.liferay.portal.SystemException {
74          return getService().dynamicQuery(dynamicQuery);
75      }
76  
77      public static java.util.List<Object> dynamicQuery(
78          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
79          int end) throws com.liferay.portal.SystemException {
80          return getService().dynamicQuery(dynamicQuery, start, end);
81      }
82  
83      public static com.liferay.portlet.documentlibrary.model.DLFileEntry getDLFileEntry(
84          long fileEntryId)
85          throws com.liferay.portal.PortalException,
86              com.liferay.portal.SystemException {
87          return getService().getDLFileEntry(fileEntryId);
88      }
89  
90      public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getDLFileEntries(
91          int start, int end) throws com.liferay.portal.SystemException {
92          return getService().getDLFileEntries(start, end);
93      }
94  
95      public static int getDLFileEntriesCount()
96          throws com.liferay.portal.SystemException {
97          return getService().getDLFileEntriesCount();
98      }
99  
100     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateDLFileEntry(
101         com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
102         throws com.liferay.portal.SystemException {
103         return getService().updateDLFileEntry(dlFileEntry);
104     }
105 
106     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
107         long userId, long folderId, java.lang.String name,
108         java.lang.String title, java.lang.String description,
109         java.lang.String[] tagsEntries, java.lang.String extraSettings,
110         java.io.File file, boolean addCommunityPermissions,
111         boolean addGuestPermissions)
112         throws com.liferay.portal.PortalException,
113             com.liferay.portal.SystemException {
114         return getService()
115                    .addFileEntry(userId, folderId, name, title, description,
116             tagsEntries, extraSettings, file, addCommunityPermissions,
117             addGuestPermissions);
118     }
119 
120     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
121         long userId, long folderId, java.lang.String name,
122         java.lang.String title, java.lang.String description,
123         java.lang.String[] tagsEntries, java.lang.String extraSettings,
124         byte[] bytes, boolean addCommunityPermissions,
125         boolean addGuestPermissions)
126         throws com.liferay.portal.PortalException,
127             com.liferay.portal.SystemException {
128         return getService()
129                    .addFileEntry(userId, folderId, name, title, description,
130             tagsEntries, extraSettings, bytes, addCommunityPermissions,
131             addGuestPermissions);
132     }
133 
134     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
135         java.lang.String uuid, long userId, long folderId,
136         java.lang.String name, java.lang.String title,
137         java.lang.String description, java.lang.String[] tagsEntries,
138         java.lang.String extraSettings, byte[] bytes,
139         boolean addCommunityPermissions, boolean addGuestPermissions)
140         throws com.liferay.portal.PortalException,
141             com.liferay.portal.SystemException {
142         return getService()
143                    .addFileEntry(uuid, userId, folderId, name, title,
144             description, tagsEntries, extraSettings, bytes,
145             addCommunityPermissions, addGuestPermissions);
146     }
147 
148     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
149         long userId, long folderId, java.lang.String name,
150         java.lang.String title, java.lang.String description,
151         java.lang.String[] tagsEntries, java.lang.String extraSettings,
152         java.io.File file, java.lang.String[] communityPermissions,
153         java.lang.String[] guestPermissions)
154         throws com.liferay.portal.PortalException,
155             com.liferay.portal.SystemException {
156         return getService()
157                    .addFileEntry(userId, folderId, name, title, description,
158             tagsEntries, extraSettings, file, communityPermissions,
159             guestPermissions);
160     }
161 
162     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
163         long userId, long folderId, java.lang.String name,
164         java.lang.String title, java.lang.String description,
165         java.lang.String[] tagsEntries, java.lang.String extraSettings,
166         byte[] bytes, java.lang.String[] communityPermissions,
167         java.lang.String[] guestPermissions)
168         throws com.liferay.portal.PortalException,
169             com.liferay.portal.SystemException {
170         return getService()
171                    .addFileEntry(userId, folderId, name, title, description,
172             tagsEntries, extraSettings, bytes, communityPermissions,
173             guestPermissions);
174     }
175 
176     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
177         long userId, long folderId, java.lang.String name,
178         java.lang.String title, java.lang.String description,
179         java.lang.String[] tagsEntries, java.lang.String extraSettings,
180         java.io.File file, java.lang.Boolean addCommunityPermissions,
181         java.lang.Boolean addGuestPermissions,
182         java.lang.String[] communityPermissions,
183         java.lang.String[] guestPermissions)
184         throws com.liferay.portal.PortalException,
185             com.liferay.portal.SystemException {
186         return getService()
187                    .addFileEntry(userId, folderId, name, title, description,
188             tagsEntries, extraSettings, file, addCommunityPermissions,
189             addGuestPermissions, communityPermissions, guestPermissions);
190     }
191 
192     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
193         java.lang.String uuid, long userId, long folderId,
194         java.lang.String name, java.lang.String title,
195         java.lang.String description, java.lang.String[] tagsEntries,
196         java.lang.String extraSettings, byte[] bytes,
197         java.lang.Boolean addCommunityPermissions,
198         java.lang.Boolean addGuestPermissions,
199         java.lang.String[] communityPermissions,
200         java.lang.String[] guestPermissions)
201         throws com.liferay.portal.PortalException,
202             com.liferay.portal.SystemException {
203         return getService()
204                    .addFileEntry(uuid, userId, folderId, name, title,
205             description, tagsEntries, extraSettings, bytes,
206             addCommunityPermissions, addGuestPermissions, communityPermissions,
207             guestPermissions);
208     }
209 
210     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
211         java.lang.String uuid, long userId, long folderId,
212         java.lang.String name, java.lang.String title,
213         java.lang.String description, java.lang.String[] tagsEntries,
214         java.lang.String extraSettings, java.io.InputStream is, long size,
215         java.lang.Boolean addCommunityPermissions,
216         java.lang.Boolean addGuestPermissions,
217         java.lang.String[] communityPermissions,
218         java.lang.String[] guestPermissions)
219         throws com.liferay.portal.PortalException,
220             com.liferay.portal.SystemException {
221         return getService()
222                    .addFileEntry(uuid, userId, folderId, name, title,
223             description, tagsEntries, extraSettings, is, size,
224             addCommunityPermissions, addGuestPermissions, communityPermissions,
225             guestPermissions);
226     }
227 
228     public static void addFileEntryResources(long folderId,
229         java.lang.String name, boolean addCommunityPermissions,
230         boolean addGuestPermissions)
231         throws com.liferay.portal.PortalException,
232             com.liferay.portal.SystemException {
233         getService()
234             .addFileEntryResources(folderId, name, addCommunityPermissions,
235             addGuestPermissions);
236     }
237 
238     public static void addFileEntryResources(
239         com.liferay.portlet.documentlibrary.model.DLFolder folder,
240         com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
241         boolean addCommunityPermissions, boolean addGuestPermissions)
242         throws com.liferay.portal.PortalException,
243             com.liferay.portal.SystemException {
244         getService()
245             .addFileEntryResources(folder, fileEntry, addCommunityPermissions,
246             addGuestPermissions);
247     }
248 
249     public static void addFileEntryResources(long folderId,
250         java.lang.String name, java.lang.String[] communityPermissions,
251         java.lang.String[] guestPermissions)
252         throws com.liferay.portal.PortalException,
253             com.liferay.portal.SystemException {
254         getService()
255             .addFileEntryResources(folderId, name, communityPermissions,
256             guestPermissions);
257     }
258 
259     public static void addFileEntryResources(
260         com.liferay.portlet.documentlibrary.model.DLFolder folder,
261         com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
262         java.lang.String[] communityPermissions,
263         java.lang.String[] guestPermissions)
264         throws com.liferay.portal.PortalException,
265             com.liferay.portal.SystemException {
266         getService()
267             .addFileEntryResources(folder, fileEntry, communityPermissions,
268             guestPermissions);
269     }
270 
271     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addOrOverwriteFileEntry(
272         long userId, long folderId, java.lang.String name,
273         java.lang.String sourceName, java.lang.String title,
274         java.lang.String description, java.lang.String[] tagsEntries,
275         java.lang.String extraSettings, java.io.File file,
276         boolean addCommunityPermissions, boolean addGuestPermissions)
277         throws com.liferay.portal.PortalException,
278             com.liferay.portal.SystemException {
279         return getService()
280                    .addOrOverwriteFileEntry(userId, folderId, name, sourceName,
281             title, description, tagsEntries, extraSettings, file,
282             addCommunityPermissions, addGuestPermissions);
283     }
284 
285     public static void deleteFileEntries(long folderId)
286         throws com.liferay.portal.PortalException,
287             com.liferay.portal.SystemException {
288         getService().deleteFileEntries(folderId);
289     }
290 
291     public static void deleteFileEntry(long folderId, java.lang.String name)
292         throws com.liferay.portal.PortalException,
293             com.liferay.portal.SystemException {
294         getService().deleteFileEntry(folderId, name);
295     }
296 
297     public static void deleteFileEntry(long folderId, java.lang.String name,
298         double version)
299         throws com.liferay.portal.PortalException,
300             com.liferay.portal.SystemException {
301         getService().deleteFileEntry(folderId, name, version);
302     }
303 
304     public static void deleteFileEntry(
305         com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry)
306         throws com.liferay.portal.PortalException,
307             com.liferay.portal.SystemException {
308         getService().deleteFileEntry(fileEntry);
309     }
310 
311     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getCompanyFileEntries(
312         long companyId, int start, int end)
313         throws com.liferay.portal.SystemException {
314         return getService().getCompanyFileEntries(companyId, start, end);
315     }
316 
317     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getCompanyFileEntries(
318         long companyId, int start, int end,
319         com.liferay.portal.kernel.util.OrderByComparator obc)
320         throws com.liferay.portal.SystemException {
321         return getService().getCompanyFileEntries(companyId, start, end, obc);
322     }
323 
324     public static int getCompanyFileEntriesCount(long companyId)
325         throws com.liferay.portal.SystemException {
326         return getService().getCompanyFileEntriesCount(companyId);
327     }
328 
329     public static java.io.InputStream getFileAsStream(long companyId,
330         long userId, long folderId, java.lang.String name)
331         throws com.liferay.portal.PortalException,
332             com.liferay.portal.SystemException {
333         return getService().getFileAsStream(companyId, userId, folderId, name);
334     }
335 
336     public static java.io.InputStream getFileAsStream(long companyId,
337         long userId, long folderId, java.lang.String name, double version)
338         throws com.liferay.portal.PortalException,
339             com.liferay.portal.SystemException {
340         return getService()
341                    .getFileAsStream(companyId, userId, folderId, name, version);
342     }
343 
344     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
345         long folderId) throws com.liferay.portal.SystemException {
346         return getService().getFileEntries(folderId);
347     }
348 
349     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
350         long folderId, int start, int end)
351         throws com.liferay.portal.SystemException {
352         return getService().getFileEntries(folderId, start, end);
353     }
354 
355     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
356         long folderId, int start, int end,
357         com.liferay.portal.kernel.util.OrderByComparator obc)
358         throws com.liferay.portal.SystemException {
359         return getService().getFileEntries(folderId, start, end, obc);
360     }
361 
362     public static int getFileEntriesCount(long folderId)
363         throws com.liferay.portal.SystemException {
364         return getService().getFileEntriesCount(folderId);
365     }
366 
367     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
368         long fileEntryId)
369         throws com.liferay.portal.PortalException,
370             com.liferay.portal.SystemException {
371         return getService().getFileEntry(fileEntryId);
372     }
373 
374     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
375         long folderId, java.lang.String name)
376         throws com.liferay.portal.PortalException,
377             com.liferay.portal.SystemException {
378         return getService().getFileEntry(folderId, name);
379     }
380 
381     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
382         java.lang.String uuid, long groupId)
383         throws com.liferay.portal.PortalException,
384             com.liferay.portal.SystemException {
385         return getService().getFileEntryByUuidAndGroupId(uuid, groupId);
386     }
387 
388     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByTitle(
389         long folderId, java.lang.String titleWithExtension)
390         throws com.liferay.portal.PortalException,
391             com.liferay.portal.SystemException {
392         return getService().getFileEntryByTitle(folderId, titleWithExtension);
393     }
394 
395     public static int getFoldersFileEntriesCount(java.util.List<Long> folderIds)
396         throws com.liferay.portal.SystemException {
397         return getService().getFoldersFileEntriesCount(folderIds);
398     }
399 
400     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
401         long groupId, int start, int end)
402         throws com.liferay.portal.SystemException {
403         return getService().getGroupFileEntries(groupId, start, end);
404     }
405 
406     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
407         long groupId, int start, int end,
408         com.liferay.portal.kernel.util.OrderByComparator obc)
409         throws com.liferay.portal.SystemException {
410         return getService().getGroupFileEntries(groupId, start, end, obc);
411     }
412 
413     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
414         long groupId, long userId, int start, int end)
415         throws com.liferay.portal.SystemException {
416         return getService().getGroupFileEntries(groupId, userId, start, end);
417     }
418 
419     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
420         long groupId, long userId, int start, int end,
421         com.liferay.portal.kernel.util.OrderByComparator obc)
422         throws com.liferay.portal.SystemException {
423         return getService().getGroupFileEntries(groupId, userId, start, end, obc);
424     }
425 
426     public static int getGroupFileEntriesCount(long groupId)
427         throws com.liferay.portal.SystemException {
428         return getService().getGroupFileEntriesCount(groupId);
429     }
430 
431     public static int getGroupFileEntriesCount(long groupId, long userId)
432         throws com.liferay.portal.SystemException {
433         return getService().getGroupFileEntriesCount(groupId, userId);
434     }
435 
436     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getNoAssetFileEntries()
437         throws com.liferay.portal.SystemException {
438         return getService().getNoAssetFileEntries();
439     }
440 
441     public static void reIndex(long fileEntryId)
442         throws com.liferay.portal.SystemException {
443         getService().reIndex(fileEntryId);
444     }
445 
446     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
447         long userId, long folderId, long newFolderId, java.lang.String name,
448         java.lang.String sourceFileName, java.lang.String title,
449         java.lang.String description, java.lang.String[] tagsEntries,
450         java.lang.String extraSettings, java.io.File file)
451         throws com.liferay.portal.PortalException,
452             com.liferay.portal.SystemException {
453         return getService()
454                    .updateFileEntry(userId, folderId, newFolderId, name,
455             sourceFileName, title, description, tagsEntries, extraSettings, file);
456     }
457 
458     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
459         long userId, long folderId, long newFolderId, java.lang.String name,
460         java.lang.String sourceFileName, java.lang.String title,
461         java.lang.String description, java.lang.String[] tagsEntries,
462         java.lang.String extraSettings, byte[] bytes)
463         throws com.liferay.portal.PortalException,
464             com.liferay.portal.SystemException {
465         return getService()
466                    .updateFileEntry(userId, folderId, newFolderId, name,
467             sourceFileName, title, description, tagsEntries, extraSettings,
468             bytes);
469     }
470 
471     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
472         long userId, long folderId, long newFolderId, java.lang.String name,
473         java.lang.String sourceFileName, java.lang.String title,
474         java.lang.String description, java.lang.String[] tagsEntries,
475         java.lang.String extraSettings, java.io.InputStream is, long size)
476         throws com.liferay.portal.PortalException,
477             com.liferay.portal.SystemException {
478         return getService()
479                    .updateFileEntry(userId, folderId, newFolderId, name,
480             sourceFileName, title, description, tagsEntries, extraSettings, is,
481             size);
482     }
483 
484     public static void updateTagsAsset(long userId,
485         com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
486         java.lang.String[] tagsEntries)
487         throws com.liferay.portal.PortalException,
488             com.liferay.portal.SystemException {
489         getService().updateTagsAsset(userId, fileEntry, tagsEntries);
490     }
491 
492     public static DLFileEntryLocalService getService() {
493         if (_service == null) {
494             throw new RuntimeException("DLFileEntryLocalService is not set");
495         }
496 
497         return _service;
498     }
499 
500     public void setService(DLFileEntryLocalService service) {
501         _service = service;
502     }
503 
504     private static DLFileEntryLocalService _service;
505 }