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     * The utility for the d l file entry remote service. This utility wraps {@link com.liferay.portlet.documentlibrary.service.impl.DLFileEntryServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
021     *
022     * <p>
023     * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLFileEntryServiceImpl} and rerun ServiceBuilder to regenerate this class.
024     * </p>
025     *
026     * <p>
027     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see DLFileEntryService
032     * @see com.liferay.portlet.documentlibrary.service.base.DLFileEntryServiceBaseImpl
033     * @see com.liferay.portlet.documentlibrary.service.impl.DLFileEntryServiceImpl
034     * @generated
035     */
036    public class DLFileEntryServiceUtil {
037            public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
038                    long groupId, long folderId, java.lang.String name,
039                    java.lang.String title, java.lang.String description,
040                    java.lang.String changeLog, java.lang.String extraSettings,
041                    byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
042                    throws com.liferay.portal.kernel.exception.PortalException,
043                            com.liferay.portal.kernel.exception.SystemException {
044                    return getService()
045                                       .addFileEntry(groupId, folderId, name, title, description,
046                            changeLog, extraSettings, bytes, serviceContext);
047            }
048    
049            public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
050                    long groupId, long folderId, java.lang.String name,
051                    java.lang.String title, java.lang.String description,
052                    java.lang.String changeLog, java.lang.String extraSettings,
053                    java.io.File file,
054                    com.liferay.portal.service.ServiceContext serviceContext)
055                    throws com.liferay.portal.kernel.exception.PortalException,
056                            com.liferay.portal.kernel.exception.SystemException {
057                    return getService()
058                                       .addFileEntry(groupId, folderId, name, title, description,
059                            changeLog, extraSettings, file, serviceContext);
060            }
061    
062            public static void deleteFileEntry(long groupId, long folderId,
063                    java.lang.String name)
064                    throws com.liferay.portal.kernel.exception.PortalException,
065                            com.liferay.portal.kernel.exception.SystemException {
066                    getService().deleteFileEntry(groupId, folderId, name);
067            }
068    
069            public static void deleteFileEntry(long groupId, long folderId,
070                    java.lang.String name, java.lang.String version)
071                    throws com.liferay.portal.kernel.exception.PortalException,
072                            com.liferay.portal.kernel.exception.SystemException {
073                    getService().deleteFileEntry(groupId, folderId, name, version);
074            }
075    
076            public static void deleteFileEntryByTitle(long groupId, long folderId,
077                    java.lang.String titleWithExtension)
078                    throws com.liferay.portal.kernel.exception.PortalException,
079                            com.liferay.portal.kernel.exception.SystemException {
080                    getService()
081                            .deleteFileEntryByTitle(groupId, folderId, titleWithExtension);
082            }
083    
084            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
085                    long groupId, long folderId)
086                    throws com.liferay.portal.kernel.exception.PortalException,
087                            com.liferay.portal.kernel.exception.SystemException {
088                    return getService().getFileEntries(groupId, folderId);
089            }
090    
091            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
092                    long groupId, long folderId, int start, int end)
093                    throws com.liferay.portal.kernel.exception.PortalException,
094                            com.liferay.portal.kernel.exception.SystemException {
095                    return getService().getFileEntries(groupId, folderId, start, end);
096            }
097    
098            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
099                    long groupId, long folderId, int start, int end,
100                    com.liferay.portal.kernel.util.OrderByComparator obc)
101                    throws com.liferay.portal.kernel.exception.PortalException,
102                            com.liferay.portal.kernel.exception.SystemException {
103                    return getService().getFileEntries(groupId, folderId, start, end, obc);
104            }
105    
106            public static int getFileEntriesCount(long groupId, long folderId)
107                    throws com.liferay.portal.kernel.exception.PortalException,
108                            com.liferay.portal.kernel.exception.SystemException {
109                    return getService().getFileEntriesCount(groupId, folderId);
110            }
111    
112            public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
113                    long groupId, long folderId, java.lang.String name)
114                    throws com.liferay.portal.kernel.exception.PortalException,
115                            com.liferay.portal.kernel.exception.SystemException {
116                    return getService().getFileEntry(groupId, folderId, name);
117            }
118    
119            public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByTitle(
120                    long groupId, long folderId, java.lang.String titleWithExtension)
121                    throws com.liferay.portal.kernel.exception.PortalException,
122                            com.liferay.portal.kernel.exception.SystemException {
123                    return getService()
124                                       .getFileEntryByTitle(groupId, folderId, titleWithExtension);
125            }
126    
127            public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
128                    java.lang.String uuid, long groupId)
129                    throws com.liferay.portal.kernel.exception.PortalException,
130                            com.liferay.portal.kernel.exception.SystemException {
131                    return getService().getFileEntryByUuidAndGroupId(uuid, groupId);
132            }
133    
134            public static int getFoldersFileEntriesCount(long groupId,
135                    java.util.List<java.lang.Long> folderIds, int status)
136                    throws com.liferay.portal.kernel.exception.SystemException {
137                    return getService()
138                                       .getFoldersFileEntriesCount(groupId, folderIds, status);
139            }
140    
141            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
142                    long groupId, long userId, int start, int end)
143                    throws com.liferay.portal.kernel.exception.SystemException {
144                    return getService().getGroupFileEntries(groupId, userId, start, end);
145            }
146    
147            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
148                    long groupId, long userId, int start, int end,
149                    com.liferay.portal.kernel.util.OrderByComparator obc)
150                    throws com.liferay.portal.kernel.exception.SystemException {
151                    return getService().getGroupFileEntries(groupId, userId, start, end, obc);
152            }
153    
154            public static int getGroupFileEntriesCount(long groupId, long userId)
155                    throws com.liferay.portal.kernel.exception.SystemException {
156                    return getService().getGroupFileEntriesCount(groupId, userId);
157            }
158    
159            public static boolean hasFileEntryLock(long groupId, long folderId,
160                    java.lang.String name)
161                    throws com.liferay.portal.kernel.exception.PortalException,
162                            com.liferay.portal.kernel.exception.SystemException {
163                    return getService().hasFileEntryLock(groupId, folderId, name);
164            }
165    
166            public static com.liferay.portal.model.Lock lockFileEntry(long groupId,
167                    long folderId, java.lang.String name)
168                    throws com.liferay.portal.kernel.exception.PortalException,
169                            com.liferay.portal.kernel.exception.SystemException {
170                    return getService().lockFileEntry(groupId, folderId, name);
171            }
172    
173            public static com.liferay.portal.model.Lock lockFileEntry(long groupId,
174                    long folderId, java.lang.String name, java.lang.String owner,
175                    long expirationTime)
176                    throws com.liferay.portal.kernel.exception.PortalException,
177                            com.liferay.portal.kernel.exception.SystemException {
178                    return getService()
179                                       .lockFileEntry(groupId, folderId, name, owner, expirationTime);
180            }
181    
182            public static com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
183                    long groupId, long folderId, long newFolderId, java.lang.String name,
184                    com.liferay.portal.service.ServiceContext serviceContext)
185                    throws com.liferay.portal.kernel.exception.PortalException,
186                            com.liferay.portal.kernel.exception.SystemException {
187                    return getService()
188                                       .moveFileEntry(groupId, folderId, newFolderId, name,
189                            serviceContext);
190            }
191    
192            public static com.liferay.portal.model.Lock refreshFileEntryLock(
193                    java.lang.String lockUuid, long expirationTime)
194                    throws com.liferay.portal.kernel.exception.PortalException,
195                            com.liferay.portal.kernel.exception.SystemException {
196                    return getService().refreshFileEntryLock(lockUuid, expirationTime);
197            }
198    
199            public static void unlockFileEntry(long groupId, long folderId,
200                    java.lang.String name)
201                    throws com.liferay.portal.kernel.exception.SystemException {
202                    getService().unlockFileEntry(groupId, folderId, name);
203            }
204    
205            public static void unlockFileEntry(long groupId, long folderId,
206                    java.lang.String name, java.lang.String lockUuid)
207                    throws com.liferay.portal.kernel.exception.PortalException,
208                            com.liferay.portal.kernel.exception.SystemException {
209                    getService().unlockFileEntry(groupId, folderId, name, lockUuid);
210            }
211    
212            public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
213                    long groupId, long folderId, java.lang.String name,
214                    java.lang.String sourceFileName, java.lang.String title,
215                    java.lang.String description, java.lang.String changeLog,
216                    boolean majorVersion, java.lang.String extraSettings, byte[] bytes,
217                    com.liferay.portal.service.ServiceContext serviceContext)
218                    throws com.liferay.portal.kernel.exception.PortalException,
219                            com.liferay.portal.kernel.exception.SystemException {
220                    return getService()
221                                       .updateFileEntry(groupId, folderId, name, sourceFileName,
222                            title, description, changeLog, majorVersion, extraSettings, bytes,
223                            serviceContext);
224            }
225    
226            public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
227                    long groupId, long folderId, java.lang.String name,
228                    java.lang.String sourceFileName, java.lang.String title,
229                    java.lang.String description, java.lang.String changeLog,
230                    boolean majorVersion, java.lang.String extraSettings,
231                    java.io.File file,
232                    com.liferay.portal.service.ServiceContext serviceContext)
233                    throws com.liferay.portal.kernel.exception.PortalException,
234                            com.liferay.portal.kernel.exception.SystemException {
235                    return getService()
236                                       .updateFileEntry(groupId, folderId, name, sourceFileName,
237                            title, description, changeLog, majorVersion, extraSettings, file,
238                            serviceContext);
239            }
240    
241            public static boolean verifyFileEntryLock(long groupId, long folderId,
242                    java.lang.String name, java.lang.String lockUuid)
243                    throws com.liferay.portal.kernel.exception.PortalException,
244                            com.liferay.portal.kernel.exception.SystemException {
245                    return getService()
246                                       .verifyFileEntryLock(groupId, folderId, name, lockUuid);
247            }
248    
249            public static DLFileEntryService getService() {
250                    if (_service == null) {
251                            _service = (DLFileEntryService)PortalBeanLocatorUtil.locate(DLFileEntryService.class.getName());
252                    }
253    
254                    return _service;
255            }
256    
257            public void setService(DLFileEntryService service) {
258                    _service = service;
259            }
260    
261            private static DLFileEntryService _service;
262    }