1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
26  
27  /**
28   * <a href="DLFileEntryLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
29   *
30   * <p>
31   * ServiceBuilder generated this class. Modifications in this class will be
32   * overwritten the next time is generated.
33   * </p>
34   *
35   * <p>
36   * This class provides static methods for the
37   * {@link DLFileEntryLocalService} bean. The static methods of
38   * this class calls the same methods of the bean instance. It's convenient to be
39   * able to just write one line to call a method on a bean instead of writing a
40   * lookup call and a method call.
41   * </p>
42   *
43   * @author    Brian Wing Shun Chan
44   * @see       DLFileEntryLocalService
45   * @generated
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 updateDLFileEntry(
107         com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry,
108         boolean merge) throws com.liferay.portal.SystemException {
109         return getService().updateDLFileEntry(dlFileEntry, merge);
110     }
111 
112     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
113         long userId, long folderId, java.lang.String name,
114         java.lang.String title, java.lang.String description,
115         java.lang.String extraSettings, byte[] bytes,
116         com.liferay.portal.service.ServiceContext serviceContext)
117         throws com.liferay.portal.PortalException,
118             com.liferay.portal.SystemException {
119         return getService()
120                    .addFileEntry(userId, folderId, name, title, description,
121             extraSettings, bytes, serviceContext);
122     }
123 
124     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
125         long userId, long folderId, java.lang.String name,
126         java.lang.String title, java.lang.String description,
127         java.lang.String extraSettings, java.io.File file,
128         com.liferay.portal.service.ServiceContext serviceContext)
129         throws com.liferay.portal.PortalException,
130             com.liferay.portal.SystemException {
131         return getService()
132                    .addFileEntry(userId, folderId, name, title, description,
133             extraSettings, file, serviceContext);
134     }
135 
136     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
137         long userId, long folderId, java.lang.String name,
138         java.lang.String title, java.lang.String description,
139         java.lang.String extraSettings, java.io.InputStream is, int size,
140         com.liferay.portal.service.ServiceContext serviceContext)
141         throws com.liferay.portal.PortalException,
142             com.liferay.portal.SystemException {
143         return getService()
144                    .addFileEntry(userId, folderId, name, title, description,
145             extraSettings, is, size, serviceContext);
146     }
147 
148     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
149         java.lang.String uuid, long userId, long folderId,
150         java.lang.String name, java.lang.String title,
151         java.lang.String description, java.lang.String extraSettings,
152         byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
153         throws com.liferay.portal.PortalException,
154             com.liferay.portal.SystemException {
155         return getService()
156                    .addFileEntry(uuid, userId, folderId, name, title,
157             description, extraSettings, bytes, serviceContext);
158     }
159 
160     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
161         java.lang.String uuid, long userId, long folderId,
162         java.lang.String name, java.lang.String title,
163         java.lang.String description, java.lang.String extraSettings,
164         java.io.File file,
165         com.liferay.portal.service.ServiceContext serviceContext)
166         throws com.liferay.portal.PortalException,
167             com.liferay.portal.SystemException {
168         return getService()
169                    .addFileEntry(uuid, userId, folderId, name, title,
170             description, extraSettings, file, serviceContext);
171     }
172 
173     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
174         java.lang.String uuid, long userId, long folderId,
175         java.lang.String name, java.lang.String title,
176         java.lang.String description, java.lang.String extraSettings,
177         java.io.InputStream is, long size,
178         com.liferay.portal.service.ServiceContext serviceContext)
179         throws com.liferay.portal.PortalException,
180             com.liferay.portal.SystemException {
181         return getService()
182                    .addFileEntry(uuid, userId, folderId, name, title,
183             description, extraSettings, is, size, serviceContext);
184     }
185 
186     public static void addFileEntryResources(
187         com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
188         boolean addCommunityPermissions, boolean addGuestPermissions)
189         throws com.liferay.portal.PortalException,
190             com.liferay.portal.SystemException {
191         getService()
192             .addFileEntryResources(fileEntry, addCommunityPermissions,
193             addGuestPermissions);
194     }
195 
196     public static void addFileEntryResources(
197         com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
198         java.lang.String[] communityPermissions,
199         java.lang.String[] guestPermissions)
200         throws com.liferay.portal.PortalException,
201             com.liferay.portal.SystemException {
202         getService()
203             .addFileEntryResources(fileEntry, communityPermissions,
204             guestPermissions);
205     }
206 
207     public static void addFileEntryResources(long fileEntryId,
208         boolean addCommunityPermissions, boolean addGuestPermissions)
209         throws com.liferay.portal.PortalException,
210             com.liferay.portal.SystemException {
211         getService()
212             .addFileEntryResources(fileEntryId, addCommunityPermissions,
213             addGuestPermissions);
214     }
215 
216     public static void addFileEntryResources(long fileEntryId,
217         java.lang.String[] communityPermissions,
218         java.lang.String[] guestPermissions)
219         throws com.liferay.portal.PortalException,
220             com.liferay.portal.SystemException {
221         getService()
222             .addFileEntryResources(fileEntryId, communityPermissions,
223             guestPermissions);
224     }
225 
226     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addOrOverwriteFileEntry(
227         long userId, long folderId, java.lang.String name,
228         java.lang.String sourceName, java.lang.String title,
229         java.lang.String description, java.lang.String extraSettings,
230         java.io.File file,
231         com.liferay.portal.service.ServiceContext serviceContext)
232         throws com.liferay.portal.PortalException,
233             com.liferay.portal.SystemException {
234         return getService()
235                    .addOrOverwriteFileEntry(userId, folderId, name, sourceName,
236             title, description, extraSettings, file, serviceContext);
237     }
238 
239     public static void deleteFileEntries(long folderId)
240         throws com.liferay.portal.PortalException,
241             com.liferay.portal.SystemException {
242         getService().deleteFileEntries(folderId);
243     }
244 
245     public static void deleteFileEntry(
246         com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry)
247         throws com.liferay.portal.PortalException,
248             com.liferay.portal.SystemException {
249         getService().deleteFileEntry(fileEntry);
250     }
251 
252     public static void deleteFileEntry(long folderId, java.lang.String name)
253         throws com.liferay.portal.PortalException,
254             com.liferay.portal.SystemException {
255         getService().deleteFileEntry(folderId, name);
256     }
257 
258     public static void deleteFileEntry(long folderId, java.lang.String name,
259         double version)
260         throws com.liferay.portal.PortalException,
261             com.liferay.portal.SystemException {
262         getService().deleteFileEntry(folderId, name, version);
263     }
264 
265     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getCompanyFileEntries(
266         long companyId, int start, int end)
267         throws com.liferay.portal.SystemException {
268         return getService().getCompanyFileEntries(companyId, start, end);
269     }
270 
271     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getCompanyFileEntries(
272         long companyId, int start, int end,
273         com.liferay.portal.kernel.util.OrderByComparator obc)
274         throws com.liferay.portal.SystemException {
275         return getService().getCompanyFileEntries(companyId, start, end, obc);
276     }
277 
278     public static int getCompanyFileEntriesCount(long companyId)
279         throws com.liferay.portal.SystemException {
280         return getService().getCompanyFileEntriesCount(companyId);
281     }
282 
283     public static java.io.InputStream getFileAsStream(long companyId,
284         long userId, long folderId, java.lang.String name)
285         throws com.liferay.portal.PortalException,
286             com.liferay.portal.SystemException {
287         return getService().getFileAsStream(companyId, userId, folderId, name);
288     }
289 
290     public static java.io.InputStream getFileAsStream(long companyId,
291         long userId, long folderId, java.lang.String name, double version)
292         throws com.liferay.portal.PortalException,
293             com.liferay.portal.SystemException {
294         return getService()
295                    .getFileAsStream(companyId, userId, folderId, name, version);
296     }
297 
298     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
299         long folderId) throws com.liferay.portal.SystemException {
300         return getService().getFileEntries(folderId);
301     }
302 
303     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
304         long folderId, int start, int end)
305         throws com.liferay.portal.SystemException {
306         return getService().getFileEntries(folderId, start, end);
307     }
308 
309     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
310         long folderId, int start, int end,
311         com.liferay.portal.kernel.util.OrderByComparator obc)
312         throws com.liferay.portal.SystemException {
313         return getService().getFileEntries(folderId, start, end, obc);
314     }
315 
316     public static int getFileEntriesCount(long folderId)
317         throws com.liferay.portal.SystemException {
318         return getService().getFileEntriesCount(folderId);
319     }
320 
321     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
322         long fileEntryId)
323         throws com.liferay.portal.PortalException,
324             com.liferay.portal.SystemException {
325         return getService().getFileEntry(fileEntryId);
326     }
327 
328     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
329         long folderId, java.lang.String name)
330         throws com.liferay.portal.PortalException,
331             com.liferay.portal.SystemException {
332         return getService().getFileEntry(folderId, name);
333     }
334 
335     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByTitle(
336         long folderId, java.lang.String titleWithExtension)
337         throws com.liferay.portal.PortalException,
338             com.liferay.portal.SystemException {
339         return getService().getFileEntryByTitle(folderId, titleWithExtension);
340     }
341 
342     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
343         java.lang.String uuid, long groupId)
344         throws com.liferay.portal.PortalException,
345             com.liferay.portal.SystemException {
346         return getService().getFileEntryByUuidAndGroupId(uuid, groupId);
347     }
348 
349     public static int getFoldersFileEntriesCount(java.util.List<Long> folderIds)
350         throws com.liferay.portal.SystemException {
351         return getService().getFoldersFileEntriesCount(folderIds);
352     }
353 
354     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
355         long groupId, int start, int end)
356         throws com.liferay.portal.SystemException {
357         return getService().getGroupFileEntries(groupId, start, end);
358     }
359 
360     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
361         long groupId, int start, int end,
362         com.liferay.portal.kernel.util.OrderByComparator obc)
363         throws com.liferay.portal.SystemException {
364         return getService().getGroupFileEntries(groupId, start, end, obc);
365     }
366 
367     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
368         long groupId, long userId, int start, int end)
369         throws com.liferay.portal.SystemException {
370         return getService().getGroupFileEntries(groupId, userId, start, end);
371     }
372 
373     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
374         long groupId, long userId, int start, int end,
375         com.liferay.portal.kernel.util.OrderByComparator obc)
376         throws com.liferay.portal.SystemException {
377         return getService().getGroupFileEntries(groupId, userId, start, end, obc);
378     }
379 
380     public static int getGroupFileEntriesCount(long groupId)
381         throws com.liferay.portal.SystemException {
382         return getService().getGroupFileEntriesCount(groupId);
383     }
384 
385     public static int getGroupFileEntriesCount(long groupId, long userId)
386         throws com.liferay.portal.SystemException {
387         return getService().getGroupFileEntriesCount(groupId, userId);
388     }
389 
390     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getNoAssetFileEntries()
391         throws com.liferay.portal.SystemException {
392         return getService().getNoAssetFileEntries();
393     }
394 
395     public static void reIndex(long fileEntryId)
396         throws com.liferay.portal.SystemException {
397         getService().reIndex(fileEntryId);
398     }
399 
400     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
401         long userId, long folderId, long newFolderId, java.lang.String name,
402         java.lang.String sourceFileName, java.lang.String title,
403         java.lang.String description, java.lang.String extraSettings,
404         byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
405         throws com.liferay.portal.PortalException,
406             com.liferay.portal.SystemException {
407         return getService()
408                    .updateFileEntry(userId, folderId, newFolderId, name,
409             sourceFileName, title, description, extraSettings, bytes,
410             serviceContext);
411     }
412 
413     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
414         long userId, long folderId, long newFolderId, java.lang.String name,
415         java.lang.String sourceFileName, java.lang.String title,
416         java.lang.String description, java.lang.String extraSettings,
417         java.io.File file,
418         com.liferay.portal.service.ServiceContext serviceContext)
419         throws com.liferay.portal.PortalException,
420             com.liferay.portal.SystemException {
421         return getService()
422                    .updateFileEntry(userId, folderId, newFolderId, name,
423             sourceFileName, title, description, extraSettings, file,
424             serviceContext);
425     }
426 
427     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
428         long userId, long folderId, long newFolderId, java.lang.String name,
429         java.lang.String sourceFileName, java.lang.String title,
430         java.lang.String description, java.lang.String extraSettings,
431         java.io.InputStream is, long size,
432         com.liferay.portal.service.ServiceContext serviceContext)
433         throws com.liferay.portal.PortalException,
434             com.liferay.portal.SystemException {
435         return getService()
436                    .updateFileEntry(userId, folderId, newFolderId, name,
437             sourceFileName, title, description, extraSettings, is, size,
438             serviceContext);
439     }
440 
441     public static void updateTagsAsset(long userId,
442         com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
443         java.lang.String[] tagsCategories, java.lang.String[] tagsEntries)
444         throws com.liferay.portal.PortalException,
445             com.liferay.portal.SystemException {
446         getService()
447             .updateTagsAsset(userId, fileEntry, tagsCategories, tagsEntries);
448     }
449 
450     public static DLFileEntryLocalService getService() {
451         if (_service == null) {
452             _service = (DLFileEntryLocalService)PortalBeanLocatorUtil.locate(DLFileEntryLocalService.class.getName());
453         }
454 
455         return _service;
456     }
457 
458     public void setService(DLFileEntryLocalService service) {
459         _service = service;
460     }
461 
462     private static DLFileEntryLocalService _service;
463 }