001
014
015 package com.liferay.portlet.documentlibrary.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.ReferenceRegistry;
019
020
033 public class DLFileEntryServiceUtil {
034
039
040
045 public static java.lang.String getBeanIdentifier() {
046 return getService().getBeanIdentifier();
047 }
048
049
054 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
055 getService().setBeanIdentifier(beanIdentifier);
056 }
057
058 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
059 long groupId, long repositoryId, long folderId,
060 java.lang.String sourceFileName, java.lang.String mimeType,
061 java.lang.String title, java.lang.String description,
062 java.lang.String changeLog, long fileEntryTypeId,
063 java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> fieldsMap,
064 java.io.File file, java.io.InputStream is, long size,
065 com.liferay.portal.service.ServiceContext serviceContext)
066 throws com.liferay.portal.kernel.exception.PortalException,
067 com.liferay.portal.kernel.exception.SystemException {
068 return getService()
069 .addFileEntry(groupId, repositoryId, folderId,
070 sourceFileName, mimeType, title, description, changeLog,
071 fileEntryTypeId, fieldsMap, file, is, size, serviceContext);
072 }
073
074 public static com.liferay.portlet.documentlibrary.model.DLFileVersion cancelCheckOut(
075 long fileEntryId)
076 throws com.liferay.portal.kernel.exception.PortalException,
077 com.liferay.portal.kernel.exception.SystemException {
078 return getService().cancelCheckOut(fileEntryId);
079 }
080
081 public static void checkInFileEntry(long fileEntryId, boolean major,
082 java.lang.String changeLog,
083 com.liferay.portal.service.ServiceContext serviceContext)
084 throws com.liferay.portal.kernel.exception.PortalException,
085 com.liferay.portal.kernel.exception.SystemException {
086 getService()
087 .checkInFileEntry(fileEntryId, major, changeLog, serviceContext);
088 }
089
090
093 public static void checkInFileEntry(long fileEntryId,
094 java.lang.String lockUuid)
095 throws com.liferay.portal.kernel.exception.PortalException,
096 com.liferay.portal.kernel.exception.SystemException {
097 getService().checkInFileEntry(fileEntryId, lockUuid);
098 }
099
100 public static void checkInFileEntry(long fileEntryId,
101 java.lang.String lockUuid,
102 com.liferay.portal.service.ServiceContext serviceContext)
103 throws com.liferay.portal.kernel.exception.PortalException,
104 com.liferay.portal.kernel.exception.SystemException {
105 getService().checkInFileEntry(fileEntryId, lockUuid, serviceContext);
106 }
107
108
111 public static com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
112 long fileEntryId)
113 throws com.liferay.portal.kernel.exception.PortalException,
114 com.liferay.portal.kernel.exception.SystemException {
115 return getService().checkOutFileEntry(fileEntryId);
116 }
117
118 public static com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
119 long fileEntryId,
120 com.liferay.portal.service.ServiceContext serviceContext)
121 throws com.liferay.portal.kernel.exception.PortalException,
122 com.liferay.portal.kernel.exception.SystemException {
123 return getService().checkOutFileEntry(fileEntryId, serviceContext);
124 }
125
126
130 public static com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
131 long fileEntryId, java.lang.String owner, long expirationTime)
132 throws com.liferay.portal.kernel.exception.PortalException,
133 com.liferay.portal.kernel.exception.SystemException {
134 return getService().checkOutFileEntry(fileEntryId, owner, expirationTime);
135 }
136
137 public static com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
138 long fileEntryId, java.lang.String owner, long expirationTime,
139 com.liferay.portal.service.ServiceContext serviceContext)
140 throws com.liferay.portal.kernel.exception.PortalException,
141 com.liferay.portal.kernel.exception.SystemException {
142 return getService()
143 .checkOutFileEntry(fileEntryId, owner, expirationTime,
144 serviceContext);
145 }
146
147 public static com.liferay.portlet.documentlibrary.model.DLFileEntry copyFileEntry(
148 long groupId, long repositoryId, long fileEntryId, long destFolderId,
149 com.liferay.portal.service.ServiceContext serviceContext)
150 throws com.liferay.portal.kernel.exception.PortalException,
151 com.liferay.portal.kernel.exception.SystemException {
152 return getService()
153 .copyFileEntry(groupId, repositoryId, fileEntryId,
154 destFolderId, serviceContext);
155 }
156
157 public static void deleteFileEntry(long fileEntryId)
158 throws com.liferay.portal.kernel.exception.PortalException,
159 com.liferay.portal.kernel.exception.SystemException {
160 getService().deleteFileEntry(fileEntryId);
161 }
162
163 public static void deleteFileEntry(long groupId, long folderId,
164 java.lang.String title)
165 throws com.liferay.portal.kernel.exception.PortalException,
166 com.liferay.portal.kernel.exception.SystemException {
167 getService().deleteFileEntry(groupId, folderId, title);
168 }
169
170 public static void deleteFileVersion(long fileEntryId,
171 java.lang.String version)
172 throws com.liferay.portal.kernel.exception.PortalException,
173 com.liferay.portal.kernel.exception.SystemException {
174 getService().deleteFileVersion(fileEntryId, version);
175 }
176
177 public static com.liferay.portlet.documentlibrary.model.DLFileEntry fetchFileEntryByImageId(
178 long imageId)
179 throws com.liferay.portal.kernel.exception.PortalException,
180 com.liferay.portal.kernel.exception.SystemException {
181 return getService().fetchFileEntryByImageId(imageId);
182 }
183
184 public static java.io.InputStream getFileAsStream(long fileEntryId,
185 java.lang.String version)
186 throws com.liferay.portal.kernel.exception.PortalException,
187 com.liferay.portal.kernel.exception.SystemException {
188 return getService().getFileAsStream(fileEntryId, version);
189 }
190
191 public static java.io.InputStream getFileAsStream(long fileEntryId,
192 java.lang.String version, boolean incrementCounter)
193 throws com.liferay.portal.kernel.exception.PortalException,
194 com.liferay.portal.kernel.exception.SystemException {
195 return getService()
196 .getFileAsStream(fileEntryId, version, incrementCounter);
197 }
198
199 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
200 long groupId, long folderId, int status, int start, int end,
201 com.liferay.portal.kernel.util.OrderByComparator obc)
202 throws com.liferay.portal.kernel.exception.PortalException,
203 com.liferay.portal.kernel.exception.SystemException {
204 return getService()
205 .getFileEntries(groupId, folderId, status, start, end, obc);
206 }
207
208 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
209 long groupId, long folderId, int start, int end,
210 com.liferay.portal.kernel.util.OrderByComparator obc)
211 throws com.liferay.portal.kernel.exception.PortalException,
212 com.liferay.portal.kernel.exception.SystemException {
213 return getService().getFileEntries(groupId, folderId, start, end, obc);
214 }
215
216 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
217 long groupId, long folderId, long fileEntryTypeId, int start, int end,
218 com.liferay.portal.kernel.util.OrderByComparator obc)
219 throws com.liferay.portal.kernel.exception.PortalException,
220 com.liferay.portal.kernel.exception.SystemException {
221 return getService()
222 .getFileEntries(groupId, folderId, fileEntryTypeId, start,
223 end, obc);
224 }
225
226 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
227 long groupId, long folderId, java.lang.String[] mimeTypes, int start,
228 int end, com.liferay.portal.kernel.util.OrderByComparator obc)
229 throws com.liferay.portal.kernel.exception.PortalException,
230 com.liferay.portal.kernel.exception.SystemException {
231 return getService()
232 .getFileEntries(groupId, folderId, mimeTypes, start, end, obc);
233 }
234
235 public static int getFileEntriesCount(long groupId, long folderId)
236 throws com.liferay.portal.kernel.exception.SystemException {
237 return getService().getFileEntriesCount(groupId, folderId);
238 }
239
240 public static int getFileEntriesCount(long groupId, long folderId,
241 int status) throws com.liferay.portal.kernel.exception.SystemException {
242 return getService().getFileEntriesCount(groupId, folderId, status);
243 }
244
245 public static int getFileEntriesCount(long groupId, long folderId,
246 long fileEntryTypeId)
247 throws com.liferay.portal.kernel.exception.SystemException {
248 return getService()
249 .getFileEntriesCount(groupId, folderId, fileEntryTypeId);
250 }
251
252 public static int getFileEntriesCount(long groupId, long folderId,
253 java.lang.String[] mimeTypes)
254 throws com.liferay.portal.kernel.exception.SystemException {
255 return getService().getFileEntriesCount(groupId, folderId, mimeTypes);
256 }
257
258 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
259 long fileEntryId)
260 throws com.liferay.portal.kernel.exception.PortalException,
261 com.liferay.portal.kernel.exception.SystemException {
262 return getService().getFileEntry(fileEntryId);
263 }
264
265 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
266 long groupId, long folderId, java.lang.String title)
267 throws com.liferay.portal.kernel.exception.PortalException,
268 com.liferay.portal.kernel.exception.SystemException {
269 return getService().getFileEntry(groupId, folderId, title);
270 }
271
272 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
273 java.lang.String uuid, long groupId)
274 throws com.liferay.portal.kernel.exception.PortalException,
275 com.liferay.portal.kernel.exception.SystemException {
276 return getService().getFileEntryByUuidAndGroupId(uuid, groupId);
277 }
278
279 public static com.liferay.portal.model.Lock getFileEntryLock(
280 long fileEntryId) {
281 return getService().getFileEntryLock(fileEntryId);
282 }
283
284 public static int getFoldersFileEntriesCount(long groupId,
285 java.util.List<java.lang.Long> folderIds, int status)
286 throws com.liferay.portal.kernel.exception.SystemException {
287 return getService()
288 .getFoldersFileEntriesCount(groupId, folderIds, status);
289 }
290
291 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
292 long groupId, long userId, long rootFolderId, int start, int end,
293 com.liferay.portal.kernel.util.OrderByComparator obc)
294 throws com.liferay.portal.kernel.exception.PortalException,
295 com.liferay.portal.kernel.exception.SystemException {
296 return getService()
297 .getGroupFileEntries(groupId, userId, rootFolderId, start,
298 end, obc);
299 }
300
301 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
302 long groupId, long userId, long rootFolderId,
303 java.lang.String[] mimeTypes, int status, int start, int end,
304 com.liferay.portal.kernel.util.OrderByComparator obc)
305 throws com.liferay.portal.kernel.exception.PortalException,
306 com.liferay.portal.kernel.exception.SystemException {
307 return getService()
308 .getGroupFileEntries(groupId, userId, rootFolderId,
309 mimeTypes, status, start, end, obc);
310 }
311
312 public static int getGroupFileEntriesCount(long groupId, long userId,
313 long rootFolderId)
314 throws com.liferay.portal.kernel.exception.PortalException,
315 com.liferay.portal.kernel.exception.SystemException {
316 return getService()
317 .getGroupFileEntriesCount(groupId, userId, rootFolderId);
318 }
319
320 public static int getGroupFileEntriesCount(long groupId, long userId,
321 long rootFolderId, java.lang.String[] mimeTypes, int status)
322 throws com.liferay.portal.kernel.exception.PortalException,
323 com.liferay.portal.kernel.exception.SystemException {
324 return getService()
325 .getGroupFileEntriesCount(groupId, userId, rootFolderId,
326 mimeTypes, status);
327 }
328
329 public static boolean hasFileEntryLock(long fileEntryId)
330 throws com.liferay.portal.kernel.exception.PortalException,
331 com.liferay.portal.kernel.exception.SystemException {
332 return getService().hasFileEntryLock(fileEntryId);
333 }
334
335 public static boolean isFileEntryCheckedOut(long fileEntryId)
336 throws com.liferay.portal.kernel.exception.PortalException,
337 com.liferay.portal.kernel.exception.SystemException {
338 return getService().isFileEntryCheckedOut(fileEntryId);
339 }
340
341 public static com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
342 long fileEntryId, long newFolderId,
343 com.liferay.portal.service.ServiceContext serviceContext)
344 throws com.liferay.portal.kernel.exception.PortalException,
345 com.liferay.portal.kernel.exception.SystemException {
346 return getService()
347 .moveFileEntry(fileEntryId, newFolderId, serviceContext);
348 }
349
350 public static com.liferay.portal.model.Lock refreshFileEntryLock(
351 java.lang.String lockUuid, long companyId, long expirationTime)
352 throws com.liferay.portal.kernel.exception.PortalException,
353 com.liferay.portal.kernel.exception.SystemException {
354 return getService()
355 .refreshFileEntryLock(lockUuid, companyId, expirationTime);
356 }
357
358 public static void revertFileEntry(long fileEntryId,
359 java.lang.String version,
360 com.liferay.portal.service.ServiceContext serviceContext)
361 throws com.liferay.portal.kernel.exception.PortalException,
362 com.liferay.portal.kernel.exception.SystemException {
363 getService().revertFileEntry(fileEntryId, version, serviceContext);
364 }
365
366 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
367 long fileEntryId, java.lang.String sourceFileName,
368 java.lang.String mimeType, java.lang.String title,
369 java.lang.String description, java.lang.String changeLog,
370 boolean majorVersion, long fileEntryTypeId,
371 java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> fieldsMap,
372 java.io.File file, java.io.InputStream is, long size,
373 com.liferay.portal.service.ServiceContext serviceContext)
374 throws com.liferay.portal.kernel.exception.PortalException,
375 com.liferay.portal.kernel.exception.SystemException {
376 return getService()
377 .updateFileEntry(fileEntryId, sourceFileName, mimeType,
378 title, description, changeLog, majorVersion, fileEntryTypeId,
379 fieldsMap, file, is, size, serviceContext);
380 }
381
382 public static boolean verifyFileEntryCheckOut(long fileEntryId,
383 java.lang.String lockUuid)
384 throws com.liferay.portal.kernel.exception.PortalException,
385 com.liferay.portal.kernel.exception.SystemException {
386 return getService().verifyFileEntryCheckOut(fileEntryId, lockUuid);
387 }
388
389 public static boolean verifyFileEntryLock(long fileEntryId,
390 java.lang.String lockUuid)
391 throws com.liferay.portal.kernel.exception.PortalException,
392 com.liferay.portal.kernel.exception.SystemException {
393 return getService().verifyFileEntryLock(fileEntryId, lockUuid);
394 }
395
396 public static DLFileEntryService getService() {
397 if (_service == null) {
398 _service = (DLFileEntryService)PortalBeanLocatorUtil.locate(DLFileEntryService.class.getName());
399
400 ReferenceRegistry.registerReference(DLFileEntryServiceUtil.class,
401 "_service");
402 }
403
404 return _service;
405 }
406
407
410 public void setService(DLFileEntryService service) {
411 }
412
413 private static DLFileEntryService _service;
414 }