1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
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.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.PortalException,
53              com.liferay.portal.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.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.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.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.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.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.PortalException,
93              com.liferay.portal.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) throws com.liferay.portal.SystemException {
99          return getService().getDLFileEntries(start, end);
100     }
101 
102     public static int getDLFileEntriesCount()
103         throws com.liferay.portal.SystemException {
104         return getService().getDLFileEntriesCount();
105     }
106 
107     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateDLFileEntry(
108         com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
109         throws com.liferay.portal.SystemException {
110         return getService().updateDLFileEntry(dlFileEntry);
111     }
112 
113     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateDLFileEntry(
114         com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry,
115         boolean merge) throws com.liferay.portal.SystemException {
116         return getService().updateDLFileEntry(dlFileEntry, merge);
117     }
118 
119     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
120         long userId, long folderId, java.lang.String name,
121         java.lang.String title, java.lang.String description,
122         java.lang.String extraSettings, byte[] bytes,
123         com.liferay.portal.service.ServiceContext serviceContext)
124         throws com.liferay.portal.PortalException,
125             com.liferay.portal.SystemException {
126         return getService()
127                    .addFileEntry(userId, folderId, name, title, description,
128             extraSettings, bytes, serviceContext);
129     }
130 
131     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
132         long userId, long folderId, java.lang.String name,
133         java.lang.String title, java.lang.String description,
134         java.lang.String extraSettings, java.io.File file,
135         com.liferay.portal.service.ServiceContext serviceContext)
136         throws com.liferay.portal.PortalException,
137             com.liferay.portal.SystemException {
138         return getService()
139                    .addFileEntry(userId, folderId, name, title, description,
140             extraSettings, file, serviceContext);
141     }
142 
143     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
144         long userId, long folderId, java.lang.String name,
145         java.lang.String title, java.lang.String description,
146         java.lang.String extraSettings, java.io.InputStream is, int size,
147         com.liferay.portal.service.ServiceContext serviceContext)
148         throws com.liferay.portal.PortalException,
149             com.liferay.portal.SystemException {
150         return getService()
151                    .addFileEntry(userId, folderId, name, title, description,
152             extraSettings, is, size, serviceContext);
153     }
154 
155     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
156         java.lang.String uuid, long userId, long folderId,
157         java.lang.String name, java.lang.String title,
158         java.lang.String description, java.lang.String extraSettings,
159         byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
160         throws com.liferay.portal.PortalException,
161             com.liferay.portal.SystemException {
162         return getService()
163                    .addFileEntry(uuid, userId, folderId, name, title,
164             description, extraSettings, bytes, serviceContext);
165     }
166 
167     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
168         java.lang.String uuid, long userId, long folderId,
169         java.lang.String name, java.lang.String title,
170         java.lang.String description, java.lang.String extraSettings,
171         java.io.File file,
172         com.liferay.portal.service.ServiceContext serviceContext)
173         throws com.liferay.portal.PortalException,
174             com.liferay.portal.SystemException {
175         return getService()
176                    .addFileEntry(uuid, userId, folderId, name, title,
177             description, extraSettings, file, serviceContext);
178     }
179 
180     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
181         java.lang.String uuid, long userId, long folderId,
182         java.lang.String name, java.lang.String title,
183         java.lang.String description, java.lang.String versionDescription,
184         java.lang.String extraSettings, byte[] bytes,
185         com.liferay.portal.service.ServiceContext serviceContext)
186         throws com.liferay.portal.PortalException,
187             com.liferay.portal.SystemException {
188         return getService()
189                    .addFileEntry(uuid, userId, folderId, name, title,
190             description, versionDescription, extraSettings, bytes,
191             serviceContext);
192     }
193 
194     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
195         java.lang.String uuid, long userId, long folderId,
196         java.lang.String name, java.lang.String title,
197         java.lang.String description, java.lang.String versionDescription,
198         java.lang.String extraSettings, java.io.File file,
199         com.liferay.portal.service.ServiceContext serviceContext)
200         throws com.liferay.portal.PortalException,
201             com.liferay.portal.SystemException {
202         return getService()
203                    .addFileEntry(uuid, userId, folderId, name, title,
204             description, versionDescription, extraSettings, file, serviceContext);
205     }
206 
207     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
208         java.lang.String uuid, long userId, long folderId,
209         java.lang.String name, java.lang.String title,
210         java.lang.String description, java.lang.String versionDescription,
211         java.lang.String extraSettings, java.io.InputStream is, long size,
212         com.liferay.portal.service.ServiceContext serviceContext)
213         throws com.liferay.portal.PortalException,
214             com.liferay.portal.SystemException {
215         return getService()
216                    .addFileEntry(uuid, userId, folderId, name, title,
217             description, versionDescription, extraSettings, is, size,
218             serviceContext);
219     }
220 
221     public static void addFileEntryResources(
222         com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
223         boolean addCommunityPermissions, boolean addGuestPermissions)
224         throws com.liferay.portal.PortalException,
225             com.liferay.portal.SystemException {
226         getService()
227             .addFileEntryResources(fileEntry, addCommunityPermissions,
228             addGuestPermissions);
229     }
230 
231     public static void addFileEntryResources(
232         com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
233         java.lang.String[] communityPermissions,
234         java.lang.String[] guestPermissions)
235         throws com.liferay.portal.PortalException,
236             com.liferay.portal.SystemException {
237         getService()
238             .addFileEntryResources(fileEntry, communityPermissions,
239             guestPermissions);
240     }
241 
242     public static void addFileEntryResources(long fileEntryId,
243         boolean addCommunityPermissions, boolean addGuestPermissions)
244         throws com.liferay.portal.PortalException,
245             com.liferay.portal.SystemException {
246         getService()
247             .addFileEntryResources(fileEntryId, addCommunityPermissions,
248             addGuestPermissions);
249     }
250 
251     public static void addFileEntryResources(long fileEntryId,
252         java.lang.String[] communityPermissions,
253         java.lang.String[] guestPermissions)
254         throws com.liferay.portal.PortalException,
255             com.liferay.portal.SystemException {
256         getService()
257             .addFileEntryResources(fileEntryId, communityPermissions,
258             guestPermissions);
259     }
260 
261     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addOrOverwriteFileEntry(
262         long userId, long folderId, java.lang.String name,
263         java.lang.String sourceName, java.lang.String title,
264         java.lang.String description, java.lang.String extraSettings,
265         java.io.File file,
266         com.liferay.portal.service.ServiceContext serviceContext)
267         throws com.liferay.portal.PortalException,
268             com.liferay.portal.SystemException {
269         return getService()
270                    .addOrOverwriteFileEntry(userId, folderId, name, sourceName,
271             title, description, extraSettings, file, serviceContext);
272     }
273 
274     public static void deleteFileEntries(long folderId)
275         throws com.liferay.portal.PortalException,
276             com.liferay.portal.SystemException {
277         getService().deleteFileEntries(folderId);
278     }
279 
280     public static void deleteFileEntry(
281         com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry)
282         throws com.liferay.portal.PortalException,
283             com.liferay.portal.SystemException {
284         getService().deleteFileEntry(fileEntry);
285     }
286 
287     public static void deleteFileEntry(long folderId, java.lang.String name)
288         throws com.liferay.portal.PortalException,
289             com.liferay.portal.SystemException {
290         getService().deleteFileEntry(folderId, name);
291     }
292 
293     public static void deleteFileEntry(long folderId, java.lang.String name,
294         double version)
295         throws com.liferay.portal.PortalException,
296             com.liferay.portal.SystemException {
297         getService().deleteFileEntry(folderId, name, version);
298     }
299 
300     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getCompanyFileEntries(
301         long companyId, int start, int end)
302         throws com.liferay.portal.SystemException {
303         return getService().getCompanyFileEntries(companyId, start, end);
304     }
305 
306     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getCompanyFileEntries(
307         long companyId, int start, int end,
308         com.liferay.portal.kernel.util.OrderByComparator obc)
309         throws com.liferay.portal.SystemException {
310         return getService().getCompanyFileEntries(companyId, start, end, obc);
311     }
312 
313     public static int getCompanyFileEntriesCount(long companyId)
314         throws com.liferay.portal.SystemException {
315         return getService().getCompanyFileEntriesCount(companyId);
316     }
317 
318     public static java.io.InputStream getFileAsStream(long companyId,
319         long userId, long folderId, java.lang.String name)
320         throws com.liferay.portal.PortalException,
321             com.liferay.portal.SystemException {
322         return getService().getFileAsStream(companyId, userId, folderId, name);
323     }
324 
325     public static java.io.InputStream getFileAsStream(long companyId,
326         long userId, long folderId, java.lang.String name, double version)
327         throws com.liferay.portal.PortalException,
328             com.liferay.portal.SystemException {
329         return getService()
330                    .getFileAsStream(companyId, userId, folderId, name, version);
331     }
332 
333     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
334         long folderId) throws com.liferay.portal.SystemException {
335         return getService().getFileEntries(folderId);
336     }
337 
338     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
339         long folderId, int start, int end)
340         throws com.liferay.portal.SystemException {
341         return getService().getFileEntries(folderId, start, end);
342     }
343 
344     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
345         long folderId, int start, int end,
346         com.liferay.portal.kernel.util.OrderByComparator obc)
347         throws com.liferay.portal.SystemException {
348         return getService().getFileEntries(folderId, start, end, obc);
349     }
350 
351     public static int getFileEntriesCount(long folderId)
352         throws com.liferay.portal.SystemException {
353         return getService().getFileEntriesCount(folderId);
354     }
355 
356     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
357         long fileEntryId)
358         throws com.liferay.portal.PortalException,
359             com.liferay.portal.SystemException {
360         return getService().getFileEntry(fileEntryId);
361     }
362 
363     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
364         long folderId, java.lang.String name)
365         throws com.liferay.portal.PortalException,
366             com.liferay.portal.SystemException {
367         return getService().getFileEntry(folderId, name);
368     }
369 
370     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByTitle(
371         long folderId, java.lang.String titleWithExtension)
372         throws com.liferay.portal.PortalException,
373             com.liferay.portal.SystemException {
374         return getService().getFileEntryByTitle(folderId, titleWithExtension);
375     }
376 
377     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
378         java.lang.String uuid, long groupId)
379         throws com.liferay.portal.PortalException,
380             com.liferay.portal.SystemException {
381         return getService().getFileEntryByUuidAndGroupId(uuid, groupId);
382     }
383 
384     public static int getFoldersFileEntriesCount(java.util.List<Long> folderIds)
385         throws com.liferay.portal.SystemException {
386         return getService().getFoldersFileEntriesCount(folderIds);
387     }
388 
389     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
390         long groupId, int start, int end)
391         throws com.liferay.portal.SystemException {
392         return getService().getGroupFileEntries(groupId, start, end);
393     }
394 
395     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
396         long groupId, int start, int end,
397         com.liferay.portal.kernel.util.OrderByComparator obc)
398         throws com.liferay.portal.SystemException {
399         return getService().getGroupFileEntries(groupId, start, end, obc);
400     }
401 
402     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
403         long groupId, long userId, int start, int end)
404         throws com.liferay.portal.SystemException {
405         return getService().getGroupFileEntries(groupId, userId, start, end);
406     }
407 
408     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
409         long groupId, long userId, int start, int end,
410         com.liferay.portal.kernel.util.OrderByComparator obc)
411         throws com.liferay.portal.SystemException {
412         return getService().getGroupFileEntries(groupId, userId, start, end, obc);
413     }
414 
415     public static int getGroupFileEntriesCount(long groupId)
416         throws com.liferay.portal.SystemException {
417         return getService().getGroupFileEntriesCount(groupId);
418     }
419 
420     public static int getGroupFileEntriesCount(long groupId, long userId)
421         throws com.liferay.portal.SystemException {
422         return getService().getGroupFileEntriesCount(groupId, userId);
423     }
424 
425     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getNoAssetFileEntries()
426         throws com.liferay.portal.SystemException {
427         return getService().getNoAssetFileEntries();
428     }
429 
430     public static void reIndex(long fileEntryId)
431         throws com.liferay.portal.SystemException {
432         getService().reIndex(fileEntryId);
433     }
434 
435     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
436         long userId, long folderId, long newFolderId, java.lang.String name,
437         java.lang.String sourceFileName, java.lang.String title,
438         java.lang.String description, java.lang.String extraSettings,
439         byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
440         throws com.liferay.portal.PortalException,
441             com.liferay.portal.SystemException {
442         return getService()
443                    .updateFileEntry(userId, folderId, newFolderId, name,
444             sourceFileName, title, description, extraSettings, bytes,
445             serviceContext);
446     }
447 
448     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
449         long userId, long folderId, long newFolderId, java.lang.String name,
450         java.lang.String sourceFileName, java.lang.String title,
451         java.lang.String description, java.lang.String extraSettings,
452         java.io.File file,
453         com.liferay.portal.service.ServiceContext serviceContext)
454         throws com.liferay.portal.PortalException,
455             com.liferay.portal.SystemException {
456         return getService()
457                    .updateFileEntry(userId, folderId, newFolderId, name,
458             sourceFileName, title, description, extraSettings, file,
459             serviceContext);
460     }
461 
462     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
463         long userId, long folderId, long newFolderId, java.lang.String name,
464         java.lang.String sourceFileName, java.lang.String title,
465         java.lang.String description, java.lang.String versionDescription,
466         java.lang.String extraSettings, byte[] bytes,
467         com.liferay.portal.service.ServiceContext serviceContext)
468         throws com.liferay.portal.PortalException,
469             com.liferay.portal.SystemException {
470         return getService()
471                    .updateFileEntry(userId, folderId, newFolderId, name,
472             sourceFileName, title, description, versionDescription,
473             extraSettings, bytes, serviceContext);
474     }
475 
476     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
477         long userId, long folderId, long newFolderId, java.lang.String name,
478         java.lang.String sourceFileName, java.lang.String title,
479         java.lang.String description, java.lang.String versionDescription,
480         java.lang.String extraSettings, java.io.File file,
481         com.liferay.portal.service.ServiceContext serviceContext)
482         throws com.liferay.portal.PortalException,
483             com.liferay.portal.SystemException {
484         return getService()
485                    .updateFileEntry(userId, folderId, newFolderId, name,
486             sourceFileName, title, description, versionDescription,
487             extraSettings, file, serviceContext);
488     }
489 
490     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
491         long userId, long folderId, long newFolderId, java.lang.String name,
492         java.lang.String sourceFileName, java.lang.String title,
493         java.lang.String description, java.lang.String versionDescription,
494         java.lang.String extraSettings, java.io.InputStream is, long size,
495         com.liferay.portal.service.ServiceContext serviceContext)
496         throws com.liferay.portal.PortalException,
497             com.liferay.portal.SystemException {
498         return getService()
499                    .updateFileEntry(userId, folderId, newFolderId, name,
500             sourceFileName, title, description, versionDescription,
501             extraSettings, is, size, serviceContext);
502     }
503 
504     public static void updateTagsAsset(long userId,
505         com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
506         java.lang.String[] tagsCategories, java.lang.String[] tagsEntries)
507         throws com.liferay.portal.PortalException,
508             com.liferay.portal.SystemException {
509         getService()
510             .updateTagsAsset(userId, fileEntry, tagsCategories, tagsEntries);
511     }
512 
513     public static DLFileEntryLocalService getService() {
514         if (_service == null) {
515             _service = (DLFileEntryLocalService)PortalBeanLocatorUtil.locate(DLFileEntryLocalService.class.getName());
516         }
517 
518         return _service;
519     }
520 
521     public void setService(DLFileEntryLocalService service) {
522         _service = service;
523     }
524 
525     private static DLFileEntryLocalService _service;
526 }