001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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 com.liferay.portal.model.Lock getFileEntryLock(long groupId,
160                    long folderId, java.lang.String name)
161                    throws com.liferay.portal.kernel.exception.PortalException,
162                            com.liferay.portal.kernel.exception.SystemException {
163                    return getService().getFileEntryLock(groupId, folderId, name);
164            }
165    
166            public static boolean hasFileEntryLock(long groupId, long folderId,
167                    java.lang.String name)
168                    throws com.liferay.portal.kernel.exception.PortalException,
169                            com.liferay.portal.kernel.exception.SystemException {
170                    return getService().hasFileEntryLock(groupId, folderId, name);
171            }
172    
173            public static com.liferay.portal.model.Lock lockFileEntry(long groupId,
174                    long folderId, java.lang.String name)
175                    throws com.liferay.portal.kernel.exception.PortalException,
176                            com.liferay.portal.kernel.exception.SystemException {
177                    return getService().lockFileEntry(groupId, folderId, name);
178            }
179    
180            public static com.liferay.portal.model.Lock lockFileEntry(long groupId,
181                    long folderId, java.lang.String name, java.lang.String owner,
182                    long expirationTime)
183                    throws com.liferay.portal.kernel.exception.PortalException,
184                            com.liferay.portal.kernel.exception.SystemException {
185                    return getService()
186                                       .lockFileEntry(groupId, folderId, name, owner, expirationTime);
187            }
188    
189            public static com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
190                    long groupId, long folderId, long newFolderId, java.lang.String name,
191                    com.liferay.portal.service.ServiceContext serviceContext)
192                    throws com.liferay.portal.kernel.exception.PortalException,
193                            com.liferay.portal.kernel.exception.SystemException {
194                    return getService()
195                                       .moveFileEntry(groupId, folderId, newFolderId, name,
196                            serviceContext);
197            }
198    
199            public static com.liferay.portal.model.Lock refreshFileEntryLock(
200                    java.lang.String lockUuid, long expirationTime)
201                    throws com.liferay.portal.kernel.exception.PortalException,
202                            com.liferay.portal.kernel.exception.SystemException {
203                    return getService().refreshFileEntryLock(lockUuid, expirationTime);
204            }
205    
206            public static void unlockFileEntry(long groupId, long folderId,
207                    java.lang.String name)
208                    throws com.liferay.portal.kernel.exception.SystemException {
209                    getService().unlockFileEntry(groupId, folderId, name);
210            }
211    
212            public static void unlockFileEntry(long groupId, long folderId,
213                    java.lang.String name, java.lang.String lockUuid)
214                    throws com.liferay.portal.kernel.exception.PortalException,
215                            com.liferay.portal.kernel.exception.SystemException {
216                    getService().unlockFileEntry(groupId, folderId, name, lockUuid);
217            }
218    
219            public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
220                    long groupId, long folderId, java.lang.String name,
221                    java.lang.String sourceFileName, java.lang.String title,
222                    java.lang.String description, java.lang.String changeLog,
223                    boolean majorVersion, java.lang.String extraSettings, byte[] bytes,
224                    com.liferay.portal.service.ServiceContext serviceContext)
225                    throws com.liferay.portal.kernel.exception.PortalException,
226                            com.liferay.portal.kernel.exception.SystemException {
227                    return getService()
228                                       .updateFileEntry(groupId, folderId, name, sourceFileName,
229                            title, description, changeLog, majorVersion, extraSettings, bytes,
230                            serviceContext);
231            }
232    
233            public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
234                    long groupId, long folderId, java.lang.String name,
235                    java.lang.String sourceFileName, java.lang.String title,
236                    java.lang.String description, java.lang.String changeLog,
237                    boolean majorVersion, java.lang.String extraSettings,
238                    java.io.File file,
239                    com.liferay.portal.service.ServiceContext serviceContext)
240                    throws com.liferay.portal.kernel.exception.PortalException,
241                            com.liferay.portal.kernel.exception.SystemException {
242                    return getService()
243                                       .updateFileEntry(groupId, folderId, name, sourceFileName,
244                            title, description, changeLog, majorVersion, extraSettings, file,
245                            serviceContext);
246            }
247    
248            public static boolean verifyFileEntryLock(long groupId, long folderId,
249                    java.lang.String name, java.lang.String lockUuid)
250                    throws com.liferay.portal.kernel.exception.PortalException,
251                            com.liferay.portal.kernel.exception.SystemException {
252                    return getService()
253                                       .verifyFileEntryLock(groupId, folderId, name, lockUuid);
254            }
255    
256            public static DLFileEntryService getService() {
257                    if (_service == null) {
258                            _service = (DLFileEntryService)PortalBeanLocatorUtil.locate(DLFileEntryService.class.getName());
259                    }
260    
261                    return _service;
262            }
263    
264            public void setService(DLFileEntryService service) {
265                    _service = service;
266            }
267    
268            private static DLFileEntryService _service;
269    }