1   /**
2    * Copyright (c) 2000-2009 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   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.documentlibrary.service;
21  
22  
23  /**
24   * <a href="DLFileEntryLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
25   *
26   * <p>
27   * ServiceBuilder generated this class. Modifications in this class will be
28   * overwritten the next time is generated.
29   * </p>
30   *
31   * <p>
32   * This class provides static methods for the
33   * <code>com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService</code>
34   * bean. The static methods of this class calls the same methods of the bean
35   * instance. It's convenient to be able to just write one line to call a method
36   * on a bean instead of writing a lookup call and a method call.
37   * </p>
38   *
39   * @author Brian Wing Shun Chan
40   *
41   * @see com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService
42   *
43   */
44  public class DLFileEntryLocalServiceUtil {
45      public static com.liferay.portlet.documentlibrary.model.DLFileEntry addDLFileEntry(
46          com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
47          throws com.liferay.portal.SystemException {
48          return getService().addDLFileEntry(dlFileEntry);
49      }
50  
51      public static com.liferay.portlet.documentlibrary.model.DLFileEntry createDLFileEntry(
52          long fileEntryId) {
53          return getService().createDLFileEntry(fileEntryId);
54      }
55  
56      public static void deleteDLFileEntry(long fileEntryId)
57          throws com.liferay.portal.PortalException,
58              com.liferay.portal.SystemException {
59          getService().deleteDLFileEntry(fileEntryId);
60      }
61  
62      public static void deleteDLFileEntry(
63          com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
64          throws com.liferay.portal.SystemException {
65          getService().deleteDLFileEntry(dlFileEntry);
66      }
67  
68      public static java.util.List<Object> dynamicQuery(
69          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
70          throws com.liferay.portal.SystemException {
71          return getService().dynamicQuery(dynamicQuery);
72      }
73  
74      public static java.util.List<Object> dynamicQuery(
75          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
76          int end) throws com.liferay.portal.SystemException {
77          return getService().dynamicQuery(dynamicQuery, start, end);
78      }
79  
80      public static com.liferay.portlet.documentlibrary.model.DLFileEntry getDLFileEntry(
81          long fileEntryId)
82          throws com.liferay.portal.PortalException,
83              com.liferay.portal.SystemException {
84          return getService().getDLFileEntry(fileEntryId);
85      }
86  
87      public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getDLFileEntries(
88          int start, int end) throws com.liferay.portal.SystemException {
89          return getService().getDLFileEntries(start, end);
90      }
91  
92      public static int getDLFileEntriesCount()
93          throws com.liferay.portal.SystemException {
94          return getService().getDLFileEntriesCount();
95      }
96  
97      public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateDLFileEntry(
98          com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
99          throws com.liferay.portal.SystemException {
100         return getService().updateDLFileEntry(dlFileEntry);
101     }
102 
103     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateDLFileEntry(
104         com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry,
105         boolean merge) throws com.liferay.portal.SystemException {
106         return getService().updateDLFileEntry(dlFileEntry, merge);
107     }
108 
109     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
110         long userId, long folderId, java.lang.String name,
111         java.lang.String title, java.lang.String description,
112         java.lang.String[] tagsEntries, java.lang.String extraSettings,
113         java.io.File file, boolean addCommunityPermissions,
114         boolean addGuestPermissions)
115         throws com.liferay.portal.PortalException,
116             com.liferay.portal.SystemException {
117         return getService()
118                    .addFileEntry(userId, folderId, name, title, description,
119             tagsEntries, extraSettings, file, addCommunityPermissions,
120             addGuestPermissions);
121     }
122 
123     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
124         long userId, long folderId, java.lang.String name,
125         java.lang.String title, java.lang.String description,
126         java.lang.String[] tagsEntries, java.lang.String extraSettings,
127         byte[] bytes, boolean addCommunityPermissions,
128         boolean addGuestPermissions)
129         throws com.liferay.portal.PortalException,
130             com.liferay.portal.SystemException {
131         return getService()
132                    .addFileEntry(userId, folderId, name, title, description,
133             tagsEntries, extraSettings, bytes, addCommunityPermissions,
134             addGuestPermissions);
135     }
136 
137     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
138         java.lang.String uuid, long userId, long folderId,
139         java.lang.String name, java.lang.String title,
140         java.lang.String description, java.lang.String[] tagsEntries,
141         java.lang.String extraSettings, byte[] bytes,
142         boolean addCommunityPermissions, boolean addGuestPermissions)
143         throws com.liferay.portal.PortalException,
144             com.liferay.portal.SystemException {
145         return getService()
146                    .addFileEntry(uuid, userId, folderId, name, title,
147             description, tagsEntries, extraSettings, bytes,
148             addCommunityPermissions, addGuestPermissions);
149     }
150 
151     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
152         long userId, long folderId, java.lang.String name,
153         java.lang.String title, java.lang.String description,
154         java.lang.String[] tagsEntries, java.lang.String extraSettings,
155         java.io.File file, java.lang.String[] communityPermissions,
156         java.lang.String[] guestPermissions)
157         throws com.liferay.portal.PortalException,
158             com.liferay.portal.SystemException {
159         return getService()
160                    .addFileEntry(userId, folderId, name, title, description,
161             tagsEntries, extraSettings, file, communityPermissions,
162             guestPermissions);
163     }
164 
165     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
166         long userId, long folderId, java.lang.String name,
167         java.lang.String title, java.lang.String description,
168         java.lang.String[] tagsEntries, java.lang.String extraSettings,
169         byte[] bytes, java.lang.String[] communityPermissions,
170         java.lang.String[] guestPermissions)
171         throws com.liferay.portal.PortalException,
172             com.liferay.portal.SystemException {
173         return getService()
174                    .addFileEntry(userId, folderId, name, title, description,
175             tagsEntries, extraSettings, bytes, communityPermissions,
176             guestPermissions);
177     }
178 
179     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
180         long userId, long folderId, java.lang.String name,
181         java.lang.String title, java.lang.String description,
182         java.lang.String[] tagsEntries, java.lang.String extraSettings,
183         java.io.File file, java.lang.Boolean addCommunityPermissions,
184         java.lang.Boolean addGuestPermissions,
185         java.lang.String[] communityPermissions,
186         java.lang.String[] guestPermissions)
187         throws com.liferay.portal.PortalException,
188             com.liferay.portal.SystemException {
189         return getService()
190                    .addFileEntry(userId, folderId, name, title, description,
191             tagsEntries, extraSettings, file, addCommunityPermissions,
192             addGuestPermissions, communityPermissions, guestPermissions);
193     }
194 
195     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
196         java.lang.String uuid, long userId, long folderId,
197         java.lang.String name, java.lang.String title,
198         java.lang.String description, java.lang.String[] tagsEntries,
199         java.lang.String extraSettings, byte[] bytes,
200         java.lang.Boolean addCommunityPermissions,
201         java.lang.Boolean addGuestPermissions,
202         java.lang.String[] communityPermissions,
203         java.lang.String[] guestPermissions)
204         throws com.liferay.portal.PortalException,
205             com.liferay.portal.SystemException {
206         return getService()
207                    .addFileEntry(uuid, userId, folderId, name, title,
208             description, tagsEntries, extraSettings, bytes,
209             addCommunityPermissions, addGuestPermissions, communityPermissions,
210             guestPermissions);
211     }
212 
213     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
214         java.lang.String uuid, long userId, long folderId,
215         java.lang.String name, java.lang.String title,
216         java.lang.String description, java.lang.String[] tagsEntries,
217         java.lang.String extraSettings, java.io.InputStream is, long size,
218         java.lang.Boolean addCommunityPermissions,
219         java.lang.Boolean addGuestPermissions,
220         java.lang.String[] communityPermissions,
221         java.lang.String[] guestPermissions)
222         throws com.liferay.portal.PortalException,
223             com.liferay.portal.SystemException {
224         return getService()
225                    .addFileEntry(uuid, userId, folderId, name, title,
226             description, tagsEntries, extraSettings, is, size,
227             addCommunityPermissions, addGuestPermissions, communityPermissions,
228             guestPermissions);
229     }
230 
231     public static void addFileEntryResources(long fileEntryId,
232         boolean addCommunityPermissions, boolean addGuestPermissions)
233         throws com.liferay.portal.PortalException,
234             com.liferay.portal.SystemException {
235         getService()
236             .addFileEntryResources(fileEntryId, addCommunityPermissions,
237             addGuestPermissions);
238     }
239 
240     public static void addFileEntryResources(
241         com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
242         boolean addCommunityPermissions, boolean addGuestPermissions)
243         throws com.liferay.portal.PortalException,
244             com.liferay.portal.SystemException {
245         getService()
246             .addFileEntryResources(fileEntry, addCommunityPermissions,
247             addGuestPermissions);
248     }
249 
250     public static void addFileEntryResources(long fileEntryId,
251         java.lang.String[] communityPermissions,
252         java.lang.String[] guestPermissions)
253         throws com.liferay.portal.PortalException,
254             com.liferay.portal.SystemException {
255         getService()
256             .addFileEntryResources(fileEntryId, communityPermissions,
257             guestPermissions);
258     }
259 
260     public static void addFileEntryResources(
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(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 java.util.List<Object> getFileEntriesAndShortcuts(
363         long folderId, int start, int end)
364         throws com.liferay.portal.SystemException {
365         return getService().getFileEntriesAndShortcuts(folderId, start, end);
366     }
367 
368     public static java.util.List<Object> getFileEntriesAndShortcuts(
369         java.util.List<Long> folderIds, int start, int end)
370         throws com.liferay.portal.SystemException {
371         return getService().getFileEntriesAndShortcuts(folderIds, start, end);
372     }
373 
374     public static int getFileEntriesAndShortcutsCount(long folderId)
375         throws com.liferay.portal.SystemException {
376         return getService().getFileEntriesAndShortcutsCount(folderId);
377     }
378 
379     public static int getFileEntriesAndShortcutsCount(
380         java.util.List<Long> folderIds)
381         throws com.liferay.portal.SystemException {
382         return getService().getFileEntriesAndShortcutsCount(folderIds);
383     }
384 
385     public static int getFileEntriesCount(long folderId)
386         throws com.liferay.portal.SystemException {
387         return getService().getFileEntriesCount(folderId);
388     }
389 
390     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
391         long fileEntryId)
392         throws com.liferay.portal.PortalException,
393             com.liferay.portal.SystemException {
394         return getService().getFileEntry(fileEntryId);
395     }
396 
397     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
398         long folderId, java.lang.String name)
399         throws com.liferay.portal.PortalException,
400             com.liferay.portal.SystemException {
401         return getService().getFileEntry(folderId, name);
402     }
403 
404     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
405         java.lang.String uuid, long groupId)
406         throws com.liferay.portal.PortalException,
407             com.liferay.portal.SystemException {
408         return getService().getFileEntryByUuidAndGroupId(uuid, groupId);
409     }
410 
411     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByTitle(
412         long folderId, java.lang.String titleWithExtension)
413         throws com.liferay.portal.PortalException,
414             com.liferay.portal.SystemException {
415         return getService().getFileEntryByTitle(folderId, titleWithExtension);
416     }
417 
418     public static int getFoldersFileEntriesCount(java.util.List<Long> folderIds)
419         throws com.liferay.portal.SystemException {
420         return getService().getFoldersFileEntriesCount(folderIds);
421     }
422 
423     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
424         long groupId, int start, int end)
425         throws com.liferay.portal.SystemException {
426         return getService().getGroupFileEntries(groupId, start, end);
427     }
428 
429     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
430         long groupId, int start, int end,
431         com.liferay.portal.kernel.util.OrderByComparator obc)
432         throws com.liferay.portal.SystemException {
433         return getService().getGroupFileEntries(groupId, start, end, obc);
434     }
435 
436     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
437         long groupId, long userId, int start, int end)
438         throws com.liferay.portal.SystemException {
439         return getService().getGroupFileEntries(groupId, userId, start, end);
440     }
441 
442     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
443         long groupId, long userId, int start, int end,
444         com.liferay.portal.kernel.util.OrderByComparator obc)
445         throws com.liferay.portal.SystemException {
446         return getService().getGroupFileEntries(groupId, userId, start, end, obc);
447     }
448 
449     public static int getGroupFileEntriesCount(long groupId)
450         throws com.liferay.portal.SystemException {
451         return getService().getGroupFileEntriesCount(groupId);
452     }
453 
454     public static int getGroupFileEntriesCount(long groupId, long userId)
455         throws com.liferay.portal.SystemException {
456         return getService().getGroupFileEntriesCount(groupId, userId);
457     }
458 
459     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getNoAssetFileEntries()
460         throws com.liferay.portal.SystemException {
461         return getService().getNoAssetFileEntries();
462     }
463 
464     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
465         long userId, long folderId, long newFolderId, java.lang.String name,
466         java.lang.String sourceFileName, java.lang.String title,
467         java.lang.String description, java.lang.String[] tagsEntries,
468         java.lang.String extraSettings, java.io.File file)
469         throws com.liferay.portal.PortalException,
470             com.liferay.portal.SystemException {
471         return getService()
472                    .updateFileEntry(userId, folderId, newFolderId, name,
473             sourceFileName, title, description, tagsEntries, extraSettings, file);
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[] tagsEntries,
480         java.lang.String extraSettings, byte[] bytes)
481         throws com.liferay.portal.PortalException,
482             com.liferay.portal.SystemException {
483         return getService()
484                    .updateFileEntry(userId, folderId, newFolderId, name,
485             sourceFileName, title, description, tagsEntries, extraSettings,
486             bytes);
487     }
488 
489     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
490         long userId, long folderId, long newFolderId, java.lang.String name,
491         java.lang.String sourceFileName, java.lang.String title,
492         java.lang.String description, java.lang.String[] tagsEntries,
493         java.lang.String extraSettings, java.io.InputStream is, long size)
494         throws com.liferay.portal.PortalException,
495             com.liferay.portal.SystemException {
496         return getService()
497                    .updateFileEntry(userId, folderId, newFolderId, name,
498             sourceFileName, title, description, tagsEntries, extraSettings, is,
499             size);
500     }
501 
502     public static void updateTagsAsset(long userId,
503         com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
504         java.lang.String[] tagsEntries)
505         throws com.liferay.portal.PortalException,
506             com.liferay.portal.SystemException {
507         getService().updateTagsAsset(userId, fileEntry, tagsEntries);
508     }
509 
510     public static DLFileEntryLocalService getService() {
511         if (_service == null) {
512             throw new RuntimeException("DLFileEntryLocalService is not set");
513         }
514 
515         return _service;
516     }
517 
518     public void setService(DLFileEntryLocalService service) {
519         _service = service;
520     }
521 
522     private static DLFileEntryLocalService _service;
523 }