1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.documentlibrary.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="DLFileEntryServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link DLFileEntryService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       DLFileEntryService
37   * @generated
38   */
39  public class DLFileEntryServiceUtil {
40      public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
41          long groupId, long folderId, java.lang.String name,
42          java.lang.String title, java.lang.String description,
43          java.lang.String versionDescription, java.lang.String extraSettings,
44          byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
45          throws com.liferay.portal.kernel.exception.PortalException,
46              com.liferay.portal.kernel.exception.SystemException {
47          return getService()
48                     .addFileEntry(groupId, folderId, name, title, description,
49              versionDescription, extraSettings, bytes, serviceContext);
50      }
51  
52      public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
53          long groupId, long folderId, java.lang.String name,
54          java.lang.String title, java.lang.String description,
55          java.lang.String versionDescription, java.lang.String extraSettings,
56          java.io.File file,
57          com.liferay.portal.service.ServiceContext serviceContext)
58          throws com.liferay.portal.kernel.exception.PortalException,
59              com.liferay.portal.kernel.exception.SystemException {
60          return getService()
61                     .addFileEntry(groupId, folderId, name, title, description,
62              versionDescription, extraSettings, file, serviceContext);
63      }
64  
65      public static void deleteFileEntry(long groupId, long folderId,
66          java.lang.String name)
67          throws com.liferay.portal.kernel.exception.PortalException,
68              com.liferay.portal.kernel.exception.SystemException {
69          getService().deleteFileEntry(groupId, folderId, name);
70      }
71  
72      public static void deleteFileEntry(long groupId, long folderId,
73          java.lang.String name, java.lang.String version)
74          throws com.liferay.portal.kernel.exception.PortalException,
75              com.liferay.portal.kernel.exception.SystemException {
76          getService().deleteFileEntry(groupId, folderId, name, version);
77      }
78  
79      public static void deleteFileEntryByTitle(long groupId, long folderId,
80          java.lang.String titleWithExtension)
81          throws com.liferay.portal.kernel.exception.PortalException,
82              com.liferay.portal.kernel.exception.SystemException {
83          getService()
84              .deleteFileEntryByTitle(groupId, folderId, titleWithExtension);
85      }
86  
87      public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
88          long groupId, long folderId)
89          throws com.liferay.portal.kernel.exception.PortalException,
90              com.liferay.portal.kernel.exception.SystemException {
91          return getService().getFileEntries(groupId, folderId);
92      }
93  
94      public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
95          long groupId, long folderId, int start, int end)
96          throws com.liferay.portal.kernel.exception.PortalException,
97              com.liferay.portal.kernel.exception.SystemException {
98          return getService().getFileEntries(groupId, folderId, start, end);
99      }
100 
101     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
102         long groupId, long folderId, int start, int end,
103         com.liferay.portal.kernel.util.OrderByComparator obc)
104         throws com.liferay.portal.kernel.exception.PortalException,
105             com.liferay.portal.kernel.exception.SystemException {
106         return getService().getFileEntries(groupId, folderId, start, end, obc);
107     }
108 
109     public static int getFileEntriesCount(long groupId, long folderId)
110         throws com.liferay.portal.kernel.exception.PortalException,
111             com.liferay.portal.kernel.exception.SystemException {
112         return getService().getFileEntriesCount(groupId, folderId);
113     }
114 
115     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
116         long groupId, long folderId, java.lang.String name)
117         throws com.liferay.portal.kernel.exception.PortalException,
118             com.liferay.portal.kernel.exception.SystemException {
119         return getService().getFileEntry(groupId, folderId, name);
120     }
121 
122     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByTitle(
123         long groupId, long folderId, java.lang.String titleWithExtension)
124         throws com.liferay.portal.kernel.exception.PortalException,
125             com.liferay.portal.kernel.exception.SystemException {
126         return getService()
127                    .getFileEntryByTitle(groupId, folderId, titleWithExtension);
128     }
129 
130     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
131         java.lang.String uuid, long groupId)
132         throws com.liferay.portal.kernel.exception.PortalException,
133             com.liferay.portal.kernel.exception.SystemException {
134         return getService().getFileEntryByUuidAndGroupId(uuid, groupId);
135     }
136 
137     public static int getFoldersFileEntriesCount(long groupId,
138         java.util.List<java.lang.Long> folderIds, int status)
139         throws com.liferay.portal.kernel.exception.SystemException {
140         return getService()
141                    .getFoldersFileEntriesCount(groupId, folderIds, status);
142     }
143 
144     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
145         long groupId, long userId, int start, int end)
146         throws com.liferay.portal.kernel.exception.SystemException {
147         return getService().getGroupFileEntries(groupId, userId, start, end);
148     }
149 
150     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
151         long groupId, long userId, int start, int end,
152         com.liferay.portal.kernel.util.OrderByComparator obc)
153         throws com.liferay.portal.kernel.exception.SystemException {
154         return getService().getGroupFileEntries(groupId, userId, start, end, obc);
155     }
156 
157     public static int getGroupFileEntriesCount(long groupId, long userId)
158         throws com.liferay.portal.kernel.exception.SystemException {
159         return getService().getGroupFileEntriesCount(groupId, userId);
160     }
161 
162     public static boolean hasFileEntryLock(long groupId, long folderId,
163         java.lang.String name)
164         throws com.liferay.portal.kernel.exception.PortalException,
165             com.liferay.portal.kernel.exception.SystemException {
166         return getService().hasFileEntryLock(groupId, folderId, name);
167     }
168 
169     public static com.liferay.portal.model.Lock lockFileEntry(long groupId,
170         long folderId, java.lang.String name)
171         throws com.liferay.portal.kernel.exception.PortalException,
172             com.liferay.portal.kernel.exception.SystemException {
173         return getService().lockFileEntry(groupId, folderId, name);
174     }
175 
176     public static com.liferay.portal.model.Lock lockFileEntry(long groupId,
177         long folderId, java.lang.String name, java.lang.String owner,
178         long expirationTime)
179         throws com.liferay.portal.kernel.exception.PortalException,
180             com.liferay.portal.kernel.exception.SystemException {
181         return getService()
182                    .lockFileEntry(groupId, folderId, name, owner, expirationTime);
183     }
184 
185     public static com.liferay.portal.model.Lock refreshFileEntryLock(
186         java.lang.String lockUuid, long expirationTime)
187         throws com.liferay.portal.kernel.exception.PortalException,
188             com.liferay.portal.kernel.exception.SystemException {
189         return getService().refreshFileEntryLock(lockUuid, expirationTime);
190     }
191 
192     public static void unlockFileEntry(long groupId, long folderId,
193         java.lang.String name)
194         throws com.liferay.portal.kernel.exception.SystemException {
195         getService().unlockFileEntry(groupId, folderId, name);
196     }
197 
198     public static void unlockFileEntry(long groupId, long folderId,
199         java.lang.String name, java.lang.String lockUuid)
200         throws com.liferay.portal.kernel.exception.PortalException,
201             com.liferay.portal.kernel.exception.SystemException {
202         getService().unlockFileEntry(groupId, folderId, name, lockUuid);
203     }
204 
205     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
206         long groupId, long folderId, long newFolderId, java.lang.String name,
207         java.lang.String sourceFileName, java.lang.String title,
208         java.lang.String description, java.lang.String versionDescription,
209         boolean majorVersion, java.lang.String extraSettings, byte[] bytes,
210         com.liferay.portal.service.ServiceContext serviceContext)
211         throws com.liferay.portal.kernel.exception.PortalException,
212             com.liferay.portal.kernel.exception.SystemException {
213         return getService()
214                    .updateFileEntry(groupId, folderId, newFolderId, name,
215             sourceFileName, title, description, versionDescription,
216             majorVersion, extraSettings, bytes, serviceContext);
217     }
218 
219     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
220         long groupId, long folderId, long newFolderId, java.lang.String name,
221         java.lang.String sourceFileName, java.lang.String title,
222         java.lang.String description, java.lang.String versionDescription,
223         boolean majorVersion, java.lang.String extraSettings,
224         java.io.File file,
225         com.liferay.portal.service.ServiceContext serviceContext)
226         throws com.liferay.portal.kernel.exception.PortalException,
227             com.liferay.portal.kernel.exception.SystemException {
228         return getService()
229                    .updateFileEntry(groupId, folderId, newFolderId, name,
230             sourceFileName, title, description, versionDescription,
231             majorVersion, extraSettings, file, serviceContext);
232     }
233 
234     public static boolean verifyFileEntryLock(long groupId, long folderId,
235         java.lang.String name, java.lang.String lockUuid)
236         throws com.liferay.portal.kernel.exception.PortalException,
237             com.liferay.portal.kernel.exception.SystemException {
238         return getService()
239                    .verifyFileEntryLock(groupId, folderId, name, lockUuid);
240     }
241 
242     public static DLFileEntryService getService() {
243         if (_service == null) {
244             _service = (DLFileEntryService)PortalBeanLocatorUtil.locate(DLFileEntryService.class.getName());
245         }
246 
247         return _service;
248     }
249 
250     public void setService(DLFileEntryService service) {
251         _service = service;
252     }
253 
254     private static DLFileEntryService _service;
255 }