001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.documentlibrary.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * <p>
021     * This class provides static methods for the
022     * {@link DLFileEntryLocalService} bean. The static methods of
023     * this class calls the same methods of the bean instance. It's convenient to be
024     * able to just write one line to call a method on a bean instead of writing a
025     * lookup call and a method call.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       DLFileEntryLocalService
030     * @generated
031     */
032    public class DLFileEntryLocalServiceUtil {
033            public static com.liferay.portlet.documentlibrary.model.DLFileEntry addDLFileEntry(
034                    com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
035                    throws com.liferay.portal.kernel.exception.SystemException {
036                    return getService().addDLFileEntry(dlFileEntry);
037            }
038    
039            public static com.liferay.portlet.documentlibrary.model.DLFileEntry createDLFileEntry(
040                    long fileEntryId) {
041                    return getService().createDLFileEntry(fileEntryId);
042            }
043    
044            public static void deleteDLFileEntry(long fileEntryId)
045                    throws com.liferay.portal.kernel.exception.PortalException,
046                            com.liferay.portal.kernel.exception.SystemException {
047                    getService().deleteDLFileEntry(fileEntryId);
048            }
049    
050            public static void deleteDLFileEntry(
051                    com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
052                    throws com.liferay.portal.kernel.exception.SystemException {
053                    getService().deleteDLFileEntry(dlFileEntry);
054            }
055    
056            @SuppressWarnings("unchecked")
057            public static java.util.List dynamicQuery(
058                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
059                    throws com.liferay.portal.kernel.exception.SystemException {
060                    return getService().dynamicQuery(dynamicQuery);
061            }
062    
063            @SuppressWarnings("unchecked")
064            public static java.util.List dynamicQuery(
065                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
066                    int end) throws com.liferay.portal.kernel.exception.SystemException {
067                    return getService().dynamicQuery(dynamicQuery, start, end);
068            }
069    
070            @SuppressWarnings("unchecked")
071            public static java.util.List dynamicQuery(
072                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
073                    int end,
074                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
075                    throws com.liferay.portal.kernel.exception.SystemException {
076                    return getService()
077                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
078            }
079    
080            public static long dynamicQueryCount(
081                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
082                    throws com.liferay.portal.kernel.exception.SystemException {
083                    return getService().dynamicQueryCount(dynamicQuery);
084            }
085    
086            public static com.liferay.portlet.documentlibrary.model.DLFileEntry getDLFileEntry(
087                    long fileEntryId)
088                    throws com.liferay.portal.kernel.exception.PortalException,
089                            com.liferay.portal.kernel.exception.SystemException {
090                    return getService().getDLFileEntry(fileEntryId);
091            }
092    
093            public static com.liferay.portlet.documentlibrary.model.DLFileEntry getDLFileEntryByUuidAndGroupId(
094                    java.lang.String uuid, long groupId)
095                    throws com.liferay.portal.kernel.exception.PortalException,
096                            com.liferay.portal.kernel.exception.SystemException {
097                    return getService().getDLFileEntryByUuidAndGroupId(uuid, groupId);
098            }
099    
100            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getDLFileEntries(
101                    int start, int end)
102                    throws com.liferay.portal.kernel.exception.SystemException {
103                    return getService().getDLFileEntries(start, end);
104            }
105    
106            public static int getDLFileEntriesCount()
107                    throws com.liferay.portal.kernel.exception.SystemException {
108                    return getService().getDLFileEntriesCount();
109            }
110    
111            public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateDLFileEntry(
112                    com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
113                    throws com.liferay.portal.kernel.exception.SystemException {
114                    return getService().updateDLFileEntry(dlFileEntry);
115            }
116    
117            public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateDLFileEntry(
118                    com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry,
119                    boolean merge)
120                    throws com.liferay.portal.kernel.exception.SystemException {
121                    return getService().updateDLFileEntry(dlFileEntry, merge);
122            }
123    
124            public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
125                    long userId, long groupId, long folderId, java.lang.String name,
126                    java.lang.String title, java.lang.String description,
127                    java.lang.String changeLog, java.lang.String extraSettings,
128                    byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
129                    throws com.liferay.portal.kernel.exception.PortalException,
130                            com.liferay.portal.kernel.exception.SystemException {
131                    return getService()
132                                       .addFileEntry(userId, groupId, folderId, name, title,
133                            description, changeLog, extraSettings, bytes, serviceContext);
134            }
135    
136            public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
137                    long userId, long groupId, long folderId, java.lang.String name,
138                    java.lang.String title, java.lang.String description,
139                    java.lang.String changeLog, java.lang.String extraSettings,
140                    java.io.File file,
141                    com.liferay.portal.service.ServiceContext serviceContext)
142                    throws com.liferay.portal.kernel.exception.PortalException,
143                            com.liferay.portal.kernel.exception.SystemException {
144                    return getService()
145                                       .addFileEntry(userId, groupId, folderId, name, title,
146                            description, changeLog, extraSettings, file, serviceContext);
147            }
148    
149            public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
150                    long userId, long groupId, long folderId, java.lang.String name,
151                    java.lang.String title, java.lang.String description,
152                    java.lang.String changeLog, java.lang.String extraSettings,
153                    java.io.InputStream is, long size,
154                    com.liferay.portal.service.ServiceContext serviceContext)
155                    throws com.liferay.portal.kernel.exception.PortalException,
156                            com.liferay.portal.kernel.exception.SystemException {
157                    return getService()
158                                       .addFileEntry(userId, groupId, folderId, name, title,
159                            description, changeLog, extraSettings, is, size, serviceContext);
160            }
161    
162            public static void addFileEntryResources(
163                    com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
164                    boolean addCommunityPermissions, boolean addGuestPermissions)
165                    throws com.liferay.portal.kernel.exception.PortalException,
166                            com.liferay.portal.kernel.exception.SystemException {
167                    getService()
168                            .addFileEntryResources(fileEntry, addCommunityPermissions,
169                            addGuestPermissions);
170            }
171    
172            public static void addFileEntryResources(
173                    com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
174                    java.lang.String[] communityPermissions,
175                    java.lang.String[] guestPermissions)
176                    throws com.liferay.portal.kernel.exception.PortalException,
177                            com.liferay.portal.kernel.exception.SystemException {
178                    getService()
179                            .addFileEntryResources(fileEntry, communityPermissions,
180                            guestPermissions);
181            }
182    
183            public static void addFileEntryResources(long fileEntryId,
184                    boolean addCommunityPermissions, boolean addGuestPermissions)
185                    throws com.liferay.portal.kernel.exception.PortalException,
186                            com.liferay.portal.kernel.exception.SystemException {
187                    getService()
188                            .addFileEntryResources(fileEntryId, addCommunityPermissions,
189                            addGuestPermissions);
190            }
191    
192            public static void addFileEntryResources(long fileEntryId,
193                    java.lang.String[] communityPermissions,
194                    java.lang.String[] guestPermissions)
195                    throws com.liferay.portal.kernel.exception.PortalException,
196                            com.liferay.portal.kernel.exception.SystemException {
197                    getService()
198                            .addFileEntryResources(fileEntryId, communityPermissions,
199                            guestPermissions);
200            }
201    
202            public static com.liferay.portlet.documentlibrary.model.DLFileEntry addOrOverwriteFileEntry(
203                    long userId, long groupId, long folderId, java.lang.String name,
204                    java.lang.String sourceName, java.lang.String title,
205                    java.lang.String description, java.lang.String changeLog,
206                    java.lang.String extraSettings, java.io.File file,
207                    com.liferay.portal.service.ServiceContext serviceContext)
208                    throws com.liferay.portal.kernel.exception.PortalException,
209                            com.liferay.portal.kernel.exception.SystemException {
210                    return getService()
211                                       .addOrOverwriteFileEntry(userId, groupId, folderId, name,
212                            sourceName, title, description, changeLog, extraSettings, file,
213                            serviceContext);
214            }
215    
216            public static void deleteFileEntries(long groupId, long folderId)
217                    throws com.liferay.portal.kernel.exception.PortalException,
218                            com.liferay.portal.kernel.exception.SystemException {
219                    getService().deleteFileEntries(groupId, folderId);
220            }
221    
222            public static void deleteFileEntry(
223                    com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry)
224                    throws com.liferay.portal.kernel.exception.PortalException,
225                            com.liferay.portal.kernel.exception.SystemException {
226                    getService().deleteFileEntry(fileEntry);
227            }
228    
229            public static void deleteFileEntry(long groupId, long folderId,
230                    java.lang.String name)
231                    throws com.liferay.portal.kernel.exception.PortalException,
232                            com.liferay.portal.kernel.exception.SystemException {
233                    getService().deleteFileEntry(groupId, folderId, name);
234            }
235    
236            public static void deleteFileEntry(long groupId, long folderId,
237                    java.lang.String name, java.lang.String version)
238                    throws com.liferay.portal.kernel.exception.PortalException,
239                            com.liferay.portal.kernel.exception.SystemException {
240                    getService().deleteFileEntry(groupId, folderId, name, version);
241            }
242    
243            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getCompanyFileEntries(
244                    long companyId, int start, int end)
245                    throws com.liferay.portal.kernel.exception.SystemException {
246                    return getService().getCompanyFileEntries(companyId, start, end);
247            }
248    
249            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getCompanyFileEntries(
250                    long companyId, int start, int end,
251                    com.liferay.portal.kernel.util.OrderByComparator obc)
252                    throws com.liferay.portal.kernel.exception.SystemException {
253                    return getService().getCompanyFileEntries(companyId, start, end, obc);
254            }
255    
256            public static int getCompanyFileEntriesCount(long companyId)
257                    throws com.liferay.portal.kernel.exception.SystemException {
258                    return getService().getCompanyFileEntriesCount(companyId);
259            }
260    
261            public static java.io.InputStream getFileAsStream(long companyId,
262                    long userId, long groupId, long folderId, java.lang.String name)
263                    throws com.liferay.portal.kernel.exception.PortalException,
264                            com.liferay.portal.kernel.exception.SystemException {
265                    return getService()
266                                       .getFileAsStream(companyId, userId, groupId, folderId, name);
267            }
268    
269            public static java.io.InputStream getFileAsStream(long companyId,
270                    long userId, long groupId, long folderId, java.lang.String name,
271                    java.lang.String version)
272                    throws com.liferay.portal.kernel.exception.PortalException,
273                            com.liferay.portal.kernel.exception.SystemException {
274                    return getService()
275                                       .getFileAsStream(companyId, userId, groupId, folderId, name,
276                            version);
277            }
278    
279            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
280                    long groupId, long folderId)
281                    throws com.liferay.portal.kernel.exception.SystemException {
282                    return getService().getFileEntries(groupId, folderId);
283            }
284    
285            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
286                    long groupId, long folderId, int start, int end)
287                    throws com.liferay.portal.kernel.exception.SystemException {
288                    return getService().getFileEntries(groupId, folderId, start, end);
289            }
290    
291            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
292                    long groupId, long folderId, int start, int end,
293                    com.liferay.portal.kernel.util.OrderByComparator obc)
294                    throws com.liferay.portal.kernel.exception.SystemException {
295                    return getService().getFileEntries(groupId, folderId, start, end, obc);
296            }
297    
298            public static int getFileEntriesCount(long groupId, long folderId)
299                    throws com.liferay.portal.kernel.exception.SystemException {
300                    return getService().getFileEntriesCount(groupId, folderId);
301            }
302    
303            public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
304                    long fileEntryId)
305                    throws com.liferay.portal.kernel.exception.PortalException,
306                            com.liferay.portal.kernel.exception.SystemException {
307                    return getService().getFileEntry(fileEntryId);
308            }
309    
310            public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
311                    long groupId, long folderId, java.lang.String name)
312                    throws com.liferay.portal.kernel.exception.PortalException,
313                            com.liferay.portal.kernel.exception.SystemException {
314                    return getService().getFileEntry(groupId, folderId, name);
315            }
316    
317            public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByTitle(
318                    long groupId, long folderId, java.lang.String title)
319                    throws com.liferay.portal.kernel.exception.PortalException,
320                            com.liferay.portal.kernel.exception.SystemException {
321                    return getService().getFileEntryByTitle(groupId, folderId, title);
322            }
323    
324            public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
325                    java.lang.String uuid, long groupId)
326                    throws com.liferay.portal.kernel.exception.PortalException,
327                            com.liferay.portal.kernel.exception.SystemException {
328                    return getService().getFileEntryByUuidAndGroupId(uuid, groupId);
329            }
330    
331            public static int getFoldersFileEntriesCount(long groupId,
332                    java.util.List<java.lang.Long> folderIds, int status)
333                    throws com.liferay.portal.kernel.exception.SystemException {
334                    return getService()
335                                       .getFoldersFileEntriesCount(groupId, folderIds, status);
336            }
337    
338            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
339                    long groupId, int start, int end)
340                    throws com.liferay.portal.kernel.exception.SystemException {
341                    return getService().getGroupFileEntries(groupId, start, end);
342            }
343    
344            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
345                    long groupId, int start, int end,
346                    com.liferay.portal.kernel.util.OrderByComparator obc)
347                    throws com.liferay.portal.kernel.exception.SystemException {
348                    return getService().getGroupFileEntries(groupId, start, end, obc);
349            }
350    
351            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
352                    long groupId, long userId, int start, int end)
353                    throws com.liferay.portal.kernel.exception.SystemException {
354                    return getService().getGroupFileEntries(groupId, userId, start, end);
355            }
356    
357            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
358                    long groupId, long userId, int start, int end,
359                    com.liferay.portal.kernel.util.OrderByComparator obc)
360                    throws com.liferay.portal.kernel.exception.SystemException {
361                    return getService().getGroupFileEntries(groupId, userId, start, end, obc);
362            }
363    
364            public static int getGroupFileEntriesCount(long groupId)
365                    throws com.liferay.portal.kernel.exception.SystemException {
366                    return getService().getGroupFileEntriesCount(groupId);
367            }
368    
369            public static int getGroupFileEntriesCount(long groupId, long userId)
370                    throws com.liferay.portal.kernel.exception.SystemException {
371                    return getService().getGroupFileEntriesCount(groupId, userId);
372            }
373    
374            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getNoAssetFileEntries()
375                    throws com.liferay.portal.kernel.exception.SystemException {
376                    return getService().getNoAssetFileEntries();
377            }
378    
379            public static com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
380                    long userId, long groupId, long folderId, long newFolderId,
381                    java.lang.String name,
382                    com.liferay.portal.service.ServiceContext serviceContext)
383                    throws com.liferay.portal.kernel.exception.PortalException,
384                            com.liferay.portal.kernel.exception.SystemException {
385                    return getService()
386                                       .moveFileEntry(userId, groupId, folderId, newFolderId, name,
387                            serviceContext);
388            }
389    
390            public static void updateAsset(long userId,
391                    com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
392                    com.liferay.portlet.documentlibrary.model.DLFileVersion fileVersion,
393                    long[] assetCategoryIds, java.lang.String[] assetTagNames)
394                    throws com.liferay.portal.kernel.exception.PortalException,
395                            com.liferay.portal.kernel.exception.SystemException {
396                    getService()
397                            .updateAsset(userId, fileEntry, fileVersion, assetCategoryIds,
398                            assetTagNames);
399            }
400    
401            public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
402                    long userId, long groupId, long folderId, java.lang.String name,
403                    java.lang.String sourceFileName, java.lang.String title,
404                    java.lang.String description, java.lang.String changeLog,
405                    boolean majorVersion, java.lang.String extraSettings, byte[] bytes,
406                    com.liferay.portal.service.ServiceContext serviceContext)
407                    throws com.liferay.portal.kernel.exception.PortalException,
408                            com.liferay.portal.kernel.exception.SystemException {
409                    return getService()
410                                       .updateFileEntry(userId, groupId, folderId, name,
411                            sourceFileName, title, description, changeLog, majorVersion,
412                            extraSettings, bytes, serviceContext);
413            }
414    
415            public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
416                    long userId, long groupId, long folderId, java.lang.String name,
417                    java.lang.String sourceFileName, java.lang.String title,
418                    java.lang.String description, java.lang.String changeLog,
419                    boolean majorVersion, java.lang.String extraSettings,
420                    java.io.File file,
421                    com.liferay.portal.service.ServiceContext serviceContext)
422                    throws com.liferay.portal.kernel.exception.PortalException,
423                            com.liferay.portal.kernel.exception.SystemException {
424                    return getService()
425                                       .updateFileEntry(userId, groupId, folderId, name,
426                            sourceFileName, title, description, changeLog, majorVersion,
427                            extraSettings, file, serviceContext);
428            }
429    
430            public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
431                    long userId, long groupId, long folderId, java.lang.String name,
432                    java.lang.String sourceFileName, java.lang.String title,
433                    java.lang.String description, java.lang.String changeLog,
434                    boolean majorVersion, java.lang.String extraSettings,
435                    java.io.InputStream is, long size,
436                    com.liferay.portal.service.ServiceContext serviceContext)
437                    throws com.liferay.portal.kernel.exception.PortalException,
438                            com.liferay.portal.kernel.exception.SystemException {
439                    return getService()
440                                       .updateFileEntry(userId, groupId, folderId, name,
441                            sourceFileName, title, description, changeLog, majorVersion,
442                            extraSettings, is, size, serviceContext);
443            }
444    
445            public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateStatus(
446                    long userId, long fileEntryId, int status,
447                    com.liferay.portal.service.ServiceContext serviceContext)
448                    throws com.liferay.portal.kernel.exception.PortalException,
449                            com.liferay.portal.kernel.exception.SystemException {
450                    return getService()
451                                       .updateStatus(userId, fileEntryId, status, serviceContext);
452            }
453    
454            public static DLFileEntryLocalService getService() {
455                    if (_service == null) {
456                            _service = (DLFileEntryLocalService)PortalBeanLocatorUtil.locate(DLFileEntryLocalService.class.getName());
457                    }
458    
459                    return _service;
460            }
461    
462            public void setService(DLFileEntryLocalService service) {
463                    _service = service;
464            }
465    
466            private static DLFileEntryLocalService _service;
467    }