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  
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   * {@link DLFileEntryLocalService} bean. The static methods of
37   * this class calls the same methods of the bean instance. It's convenient to be
38   * able to just write one line to call a method on a bean instead of writing a
39   * lookup call and a method call.
40   * </p>
41   *
42   * @author    Brian Wing Shun Chan
43   * @see       DLFileEntryLocalService
44   * @generated
45   */
46  public class DLFileEntryLocalServiceUtil {
47      public static com.liferay.portlet.documentlibrary.model.DLFileEntry addDLFileEntry(
48          com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
49          throws com.liferay.portal.SystemException {
50          return getService().addDLFileEntry(dlFileEntry);
51      }
52  
53      public static com.liferay.portlet.documentlibrary.model.DLFileEntry createDLFileEntry(
54          long fileEntryId) {
55          return getService().createDLFileEntry(fileEntryId);
56      }
57  
58      public static void deleteDLFileEntry(long fileEntryId)
59          throws com.liferay.portal.PortalException,
60              com.liferay.portal.SystemException {
61          getService().deleteDLFileEntry(fileEntryId);
62      }
63  
64      public static void deleteDLFileEntry(
65          com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
66          throws com.liferay.portal.SystemException {
67          getService().deleteDLFileEntry(dlFileEntry);
68      }
69  
70      public static java.util.List<Object> dynamicQuery(
71          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
72          throws com.liferay.portal.SystemException {
73          return getService().dynamicQuery(dynamicQuery);
74      }
75  
76      public static java.util.List<Object> dynamicQuery(
77          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
78          int end) throws com.liferay.portal.SystemException {
79          return getService().dynamicQuery(dynamicQuery, start, end);
80      }
81  
82      public static com.liferay.portlet.documentlibrary.model.DLFileEntry getDLFileEntry(
83          long fileEntryId)
84          throws com.liferay.portal.PortalException,
85              com.liferay.portal.SystemException {
86          return getService().getDLFileEntry(fileEntryId);
87      }
88  
89      public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getDLFileEntries(
90          int start, int end) throws com.liferay.portal.SystemException {
91          return getService().getDLFileEntries(start, end);
92      }
93  
94      public static int getDLFileEntriesCount()
95          throws com.liferay.portal.SystemException {
96          return getService().getDLFileEntriesCount();
97      }
98  
99      public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateDLFileEntry(
100         com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
101         throws com.liferay.portal.SystemException {
102         return getService().updateDLFileEntry(dlFileEntry);
103     }
104 
105     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateDLFileEntry(
106         com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry,
107         boolean merge) throws com.liferay.portal.SystemException {
108         return getService().updateDLFileEntry(dlFileEntry, merge);
109     }
110 
111     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
112         long userId, long folderId, java.lang.String name,
113         java.lang.String title, java.lang.String description,
114         java.lang.String extraSettings, byte[] bytes,
115         com.liferay.portal.service.ServiceContext serviceContext)
116         throws com.liferay.portal.PortalException,
117             com.liferay.portal.SystemException {
118         return getService()
119                    .addFileEntry(userId, folderId, name, title, description,
120             extraSettings, bytes, serviceContext);
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 extraSettings, java.io.File file,
127         com.liferay.portal.service.ServiceContext serviceContext)
128         throws com.liferay.portal.PortalException,
129             com.liferay.portal.SystemException {
130         return getService()
131                    .addFileEntry(userId, folderId, name, title, description,
132             extraSettings, file, serviceContext);
133     }
134 
135     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
136         java.lang.String uuid, long userId, long folderId,
137         java.lang.String name, java.lang.String title,
138         java.lang.String description, java.lang.String extraSettings,
139         byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
140         throws com.liferay.portal.PortalException,
141             com.liferay.portal.SystemException {
142         return getService()
143                    .addFileEntry(uuid, userId, folderId, name, title,
144             description, extraSettings, bytes, serviceContext);
145     }
146 
147     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
148         java.lang.String uuid, long userId, long folderId,
149         java.lang.String name, java.lang.String title,
150         java.lang.String description, java.lang.String extraSettings,
151         java.io.InputStream is, long size,
152         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, is, size, serviceContext);
158     }
159 
160     public static void addFileEntryResources(long fileEntryId,
161         boolean addCommunityPermissions, boolean addGuestPermissions)
162         throws com.liferay.portal.PortalException,
163             com.liferay.portal.SystemException {
164         getService()
165             .addFileEntryResources(fileEntryId, addCommunityPermissions,
166             addGuestPermissions);
167     }
168 
169     public static void addFileEntryResources(
170         com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
171         boolean addCommunityPermissions, boolean addGuestPermissions)
172         throws com.liferay.portal.PortalException,
173             com.liferay.portal.SystemException {
174         getService()
175             .addFileEntryResources(fileEntry, addCommunityPermissions,
176             addGuestPermissions);
177     }
178 
179     public static void addFileEntryResources(long fileEntryId,
180         java.lang.String[] communityPermissions,
181         java.lang.String[] guestPermissions)
182         throws com.liferay.portal.PortalException,
183             com.liferay.portal.SystemException {
184         getService()
185             .addFileEntryResources(fileEntryId, communityPermissions,
186             guestPermissions);
187     }
188 
189     public static void addFileEntryResources(
190         com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
191         java.lang.String[] communityPermissions,
192         java.lang.String[] guestPermissions)
193         throws com.liferay.portal.PortalException,
194             com.liferay.portal.SystemException {
195         getService()
196             .addFileEntryResources(fileEntry, communityPermissions,
197             guestPermissions);
198     }
199 
200     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addOrOverwriteFileEntry(
201         long userId, long folderId, java.lang.String name,
202         java.lang.String sourceName, java.lang.String title,
203         java.lang.String description, java.lang.String extraSettings,
204         java.io.File file,
205         com.liferay.portal.service.ServiceContext serviceContext)
206         throws com.liferay.portal.PortalException,
207             com.liferay.portal.SystemException {
208         return getService()
209                    .addOrOverwriteFileEntry(userId, folderId, name, sourceName,
210             title, description, extraSettings, file, serviceContext);
211     }
212 
213     public static void deleteFileEntries(long folderId)
214         throws com.liferay.portal.PortalException,
215             com.liferay.portal.SystemException {
216         getService().deleteFileEntries(folderId);
217     }
218 
219     public static void deleteFileEntry(long folderId, java.lang.String name)
220         throws com.liferay.portal.PortalException,
221             com.liferay.portal.SystemException {
222         getService().deleteFileEntry(folderId, name);
223     }
224 
225     public static void deleteFileEntry(long folderId, java.lang.String name,
226         double version)
227         throws com.liferay.portal.PortalException,
228             com.liferay.portal.SystemException {
229         getService().deleteFileEntry(folderId, name, version);
230     }
231 
232     public static void deleteFileEntry(
233         com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry)
234         throws com.liferay.portal.PortalException,
235             com.liferay.portal.SystemException {
236         getService().deleteFileEntry(fileEntry);
237     }
238 
239     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getCompanyFileEntries(
240         long companyId, int start, int end)
241         throws com.liferay.portal.SystemException {
242         return getService().getCompanyFileEntries(companyId, start, end);
243     }
244 
245     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getCompanyFileEntries(
246         long companyId, int start, int end,
247         com.liferay.portal.kernel.util.OrderByComparator obc)
248         throws com.liferay.portal.SystemException {
249         return getService().getCompanyFileEntries(companyId, start, end, obc);
250     }
251 
252     public static int getCompanyFileEntriesCount(long companyId)
253         throws com.liferay.portal.SystemException {
254         return getService().getCompanyFileEntriesCount(companyId);
255     }
256 
257     public static java.io.InputStream getFileAsStream(long companyId,
258         long userId, long folderId, java.lang.String name)
259         throws com.liferay.portal.PortalException,
260             com.liferay.portal.SystemException {
261         return getService().getFileAsStream(companyId, userId, folderId, name);
262     }
263 
264     public static java.io.InputStream getFileAsStream(long companyId,
265         long userId, long folderId, java.lang.String name, double version)
266         throws com.liferay.portal.PortalException,
267             com.liferay.portal.SystemException {
268         return getService()
269                    .getFileAsStream(companyId, userId, folderId, name, version);
270     }
271 
272     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
273         long folderId) throws com.liferay.portal.SystemException {
274         return getService().getFileEntries(folderId);
275     }
276 
277     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
278         long folderId, int start, int end)
279         throws com.liferay.portal.SystemException {
280         return getService().getFileEntries(folderId, start, end);
281     }
282 
283     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
284         long folderId, int start, int end,
285         com.liferay.portal.kernel.util.OrderByComparator obc)
286         throws com.liferay.portal.SystemException {
287         return getService().getFileEntries(folderId, start, end, obc);
288     }
289 
290     public static int getFileEntriesCount(long folderId)
291         throws com.liferay.portal.SystemException {
292         return getService().getFileEntriesCount(folderId);
293     }
294 
295     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
296         long fileEntryId)
297         throws com.liferay.portal.PortalException,
298             com.liferay.portal.SystemException {
299         return getService().getFileEntry(fileEntryId);
300     }
301 
302     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
303         long folderId, java.lang.String name)
304         throws com.liferay.portal.PortalException,
305             com.liferay.portal.SystemException {
306         return getService().getFileEntry(folderId, name);
307     }
308 
309     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
310         java.lang.String uuid, long groupId)
311         throws com.liferay.portal.PortalException,
312             com.liferay.portal.SystemException {
313         return getService().getFileEntryByUuidAndGroupId(uuid, groupId);
314     }
315 
316     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByTitle(
317         long folderId, java.lang.String titleWithExtension)
318         throws com.liferay.portal.PortalException,
319             com.liferay.portal.SystemException {
320         return getService().getFileEntryByTitle(folderId, titleWithExtension);
321     }
322 
323     public static int getFoldersFileEntriesCount(java.util.List<Long> folderIds)
324         throws com.liferay.portal.SystemException {
325         return getService().getFoldersFileEntriesCount(folderIds);
326     }
327 
328     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
329         long groupId, int start, int end)
330         throws com.liferay.portal.SystemException {
331         return getService().getGroupFileEntries(groupId, start, end);
332     }
333 
334     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
335         long groupId, int start, int end,
336         com.liferay.portal.kernel.util.OrderByComparator obc)
337         throws com.liferay.portal.SystemException {
338         return getService().getGroupFileEntries(groupId, start, end, obc);
339     }
340 
341     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
342         long groupId, long userId, int start, int end)
343         throws com.liferay.portal.SystemException {
344         return getService().getGroupFileEntries(groupId, userId, start, end);
345     }
346 
347     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
348         long groupId, long userId, int start, int end,
349         com.liferay.portal.kernel.util.OrderByComparator obc)
350         throws com.liferay.portal.SystemException {
351         return getService().getGroupFileEntries(groupId, userId, start, end, obc);
352     }
353 
354     public static int getGroupFileEntriesCount(long groupId)
355         throws com.liferay.portal.SystemException {
356         return getService().getGroupFileEntriesCount(groupId);
357     }
358 
359     public static int getGroupFileEntriesCount(long groupId, long userId)
360         throws com.liferay.portal.SystemException {
361         return getService().getGroupFileEntriesCount(groupId, userId);
362     }
363 
364     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getNoAssetFileEntries()
365         throws com.liferay.portal.SystemException {
366         return getService().getNoAssetFileEntries();
367     }
368 
369     public static void reIndex(long fileEntryId)
370         throws com.liferay.portal.SystemException {
371         getService().reIndex(fileEntryId);
372     }
373 
374     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
375         long userId, long folderId, long newFolderId, java.lang.String name,
376         java.lang.String sourceFileName, java.lang.String title,
377         java.lang.String description, java.lang.String extraSettings,
378         java.io.File file,
379         com.liferay.portal.service.ServiceContext serviceContext)
380         throws com.liferay.portal.PortalException,
381             com.liferay.portal.SystemException {
382         return getService()
383                    .updateFileEntry(userId, folderId, newFolderId, name,
384             sourceFileName, title, description, extraSettings, file,
385             serviceContext);
386     }
387 
388     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
389         long userId, long folderId, long newFolderId, java.lang.String name,
390         java.lang.String sourceFileName, java.lang.String title,
391         java.lang.String description, java.lang.String extraSettings,
392         byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
393         throws com.liferay.portal.PortalException,
394             com.liferay.portal.SystemException {
395         return getService()
396                    .updateFileEntry(userId, folderId, newFolderId, name,
397             sourceFileName, title, description, extraSettings, bytes,
398             serviceContext);
399     }
400 
401     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
402         long userId, long folderId, long newFolderId, java.lang.String name,
403         java.lang.String sourceFileName, java.lang.String title,
404         java.lang.String description, java.lang.String extraSettings,
405         java.io.InputStream is, long size,
406         com.liferay.portal.service.ServiceContext serviceContext)
407         throws com.liferay.portal.PortalException,
408             com.liferay.portal.SystemException {
409         return getService()
410                    .updateFileEntry(userId, folderId, newFolderId, name,
411             sourceFileName, title, description, extraSettings, is, size,
412             serviceContext);
413     }
414 
415     public static void updateTagsAsset(long userId,
416         com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
417         java.lang.String[] tagsCategories, java.lang.String[] tagsEntries)
418         throws com.liferay.portal.PortalException,
419             com.liferay.portal.SystemException {
420         getService()
421             .updateTagsAsset(userId, fileEntry, tagsCategories, tagsEntries);
422     }
423 
424     public static DLFileEntryLocalService getService() {
425         if (_service == null) {
426             throw new RuntimeException("DLFileEntryLocalService is not set");
427         }
428 
429         return _service;
430     }
431 
432     public void setService(DLFileEntryLocalService service) {
433         _service = service;
434     }
435 
436     private static DLFileEntryLocalService _service;
437 }