1
14
15 package com.liferay.portlet.documentlibrary.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18 import com.liferay.portal.kernel.util.MethodCache;
19 import com.liferay.portal.kernel.util.ReferenceRegistry;
20
21
41 public class DLFileEntryLocalServiceUtil {
42 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addDLFileEntry(
43 com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
44 throws com.liferay.portal.SystemException {
45 return getService().addDLFileEntry(dlFileEntry);
46 }
47
48 public static com.liferay.portlet.documentlibrary.model.DLFileEntry createDLFileEntry(
49 long fileEntryId) {
50 return getService().createDLFileEntry(fileEntryId);
51 }
52
53 public static void deleteDLFileEntry(long fileEntryId)
54 throws com.liferay.portal.PortalException,
55 com.liferay.portal.SystemException {
56 getService().deleteDLFileEntry(fileEntryId);
57 }
58
59 public static void deleteDLFileEntry(
60 com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
61 throws com.liferay.portal.SystemException {
62 getService().deleteDLFileEntry(dlFileEntry);
63 }
64
65 @SuppressWarnings("rawtypes")
66 public static java.util.List dynamicQuery(
67 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
68 throws com.liferay.portal.SystemException {
69 return getService().dynamicQuery(dynamicQuery);
70 }
71
72 @SuppressWarnings("rawtypes")
73 public static java.util.List dynamicQuery(
74 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
75 int end) throws com.liferay.portal.SystemException {
76 return getService().dynamicQuery(dynamicQuery, start, end);
77 }
78
79 @SuppressWarnings("rawtypes")
80 public static java.util.List dynamicQuery(
81 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
82 int end,
83 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
84 throws com.liferay.portal.SystemException {
85 return getService()
86 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
87 }
88
89 public static int dynamicQueryCount(
90 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
91 throws com.liferay.portal.SystemException {
92 return getService().dynamicQueryCount(dynamicQuery);
93 }
94
95 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getDLFileEntry(
96 long fileEntryId)
97 throws com.liferay.portal.PortalException,
98 com.liferay.portal.SystemException {
99 return getService().getDLFileEntry(fileEntryId);
100 }
101
102 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getDLFileEntryByUuidAndGroupId(
103 java.lang.String uuid, long groupId)
104 throws com.liferay.portal.PortalException,
105 com.liferay.portal.SystemException {
106 return getService().getDLFileEntryByUuidAndGroupId(uuid, groupId);
107 }
108
109 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getDLFileEntries(
110 int start, int end) throws com.liferay.portal.SystemException {
111 return getService().getDLFileEntries(start, end);
112 }
113
114 public static int getDLFileEntriesCount()
115 throws com.liferay.portal.SystemException {
116 return getService().getDLFileEntriesCount();
117 }
118
119 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateDLFileEntry(
120 com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
121 throws com.liferay.portal.SystemException {
122 return getService().updateDLFileEntry(dlFileEntry);
123 }
124
125 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateDLFileEntry(
126 com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry,
127 boolean merge) throws com.liferay.portal.SystemException {
128 return getService().updateDLFileEntry(dlFileEntry, merge);
129 }
130
131
134 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
135 long userId, long folderId, java.lang.String name,
136 java.lang.String title, java.lang.String description,
137 java.lang.String extraSettings, byte[] bytes,
138 com.liferay.portal.service.ServiceContext serviceContext)
139 throws com.liferay.portal.PortalException,
140 com.liferay.portal.SystemException {
141 return getService()
142 .addFileEntry(userId, folderId, name, title, description,
143 extraSettings, bytes, serviceContext);
144 }
145
146
149 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
150 long userId, long folderId, java.lang.String name,
151 java.lang.String title, java.lang.String description,
152 java.lang.String extraSettings, java.io.File file,
153 com.liferay.portal.service.ServiceContext serviceContext)
154 throws com.liferay.portal.PortalException,
155 com.liferay.portal.SystemException {
156 return getService()
157 .addFileEntry(userId, folderId, name, title, description,
158 extraSettings, file, serviceContext);
159 }
160
161
164 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
165 long userId, long folderId, java.lang.String name,
166 java.lang.String title, java.lang.String description,
167 java.lang.String extraSettings, java.io.InputStream is, int size,
168 com.liferay.portal.service.ServiceContext serviceContext)
169 throws com.liferay.portal.PortalException,
170 com.liferay.portal.SystemException {
171 return getService()
172 .addFileEntry(userId, folderId, name, title, description,
173 extraSettings, is, size, serviceContext);
174 }
175
176
179 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
180 java.lang.String uuid, long userId, long folderId,
181 java.lang.String name, java.lang.String title,
182 java.lang.String description, java.lang.String extraSettings,
183 byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
184 throws com.liferay.portal.PortalException,
185 com.liferay.portal.SystemException {
186 return getService()
187 .addFileEntry(uuid, userId, folderId, name, title,
188 description, extraSettings, bytes, serviceContext);
189 }
190
191
194 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
195 java.lang.String uuid, long userId, long folderId,
196 java.lang.String name, java.lang.String title,
197 java.lang.String description, java.lang.String extraSettings,
198 java.io.File file,
199 com.liferay.portal.service.ServiceContext serviceContext)
200 throws com.liferay.portal.PortalException,
201 com.liferay.portal.SystemException {
202 return getService()
203 .addFileEntry(uuid, userId, folderId, name, title,
204 description, extraSettings, file, serviceContext);
205 }
206
207 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
208 java.lang.String uuid, long userId, long folderId,
209 java.lang.String name, java.lang.String title,
210 java.lang.String description, java.lang.String versionDescription,
211 java.lang.String extraSettings, byte[] bytes,
212 com.liferay.portal.service.ServiceContext serviceContext)
213 throws com.liferay.portal.PortalException,
214 com.liferay.portal.SystemException {
215 return getService()
216 .addFileEntry(uuid, userId, folderId, name, title,
217 description, versionDescription, extraSettings, bytes,
218 serviceContext);
219 }
220
221 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
222 java.lang.String uuid, long userId, long folderId,
223 java.lang.String name, java.lang.String title,
224 java.lang.String description, java.lang.String versionDescription,
225 java.lang.String extraSettings, java.io.File file,
226 com.liferay.portal.service.ServiceContext serviceContext)
227 throws com.liferay.portal.PortalException,
228 com.liferay.portal.SystemException {
229 return getService()
230 .addFileEntry(uuid, userId, folderId, name, title,
231 description, versionDescription, extraSettings, file, serviceContext);
232 }
233
234 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
235 java.lang.String uuid, long userId, long folderId,
236 java.lang.String name, java.lang.String title,
237 java.lang.String description, java.lang.String versionDescription,
238 java.lang.String extraSettings, java.io.InputStream is, long size,
239 com.liferay.portal.service.ServiceContext serviceContext)
240 throws com.liferay.portal.PortalException,
241 com.liferay.portal.SystemException {
242 return getService()
243 .addFileEntry(uuid, userId, folderId, name, title,
244 description, versionDescription, extraSettings, is, size,
245 serviceContext);
246 }
247
248 public static void addFileEntryResources(
249 com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
250 boolean addCommunityPermissions, boolean addGuestPermissions)
251 throws com.liferay.portal.PortalException,
252 com.liferay.portal.SystemException {
253 getService()
254 .addFileEntryResources(fileEntry, addCommunityPermissions,
255 addGuestPermissions);
256 }
257
258 public static void addFileEntryResources(
259 com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
260 java.lang.String[] communityPermissions,
261 java.lang.String[] guestPermissions)
262 throws com.liferay.portal.PortalException,
263 com.liferay.portal.SystemException {
264 getService()
265 .addFileEntryResources(fileEntry, communityPermissions,
266 guestPermissions);
267 }
268
269 public static void addFileEntryResources(long fileEntryId,
270 boolean addCommunityPermissions, boolean addGuestPermissions)
271 throws com.liferay.portal.PortalException,
272 com.liferay.portal.SystemException {
273 getService()
274 .addFileEntryResources(fileEntryId, addCommunityPermissions,
275 addGuestPermissions);
276 }
277
278 public static void addFileEntryResources(long fileEntryId,
279 java.lang.String[] communityPermissions,
280 java.lang.String[] guestPermissions)
281 throws com.liferay.portal.PortalException,
282 com.liferay.portal.SystemException {
283 getService()
284 .addFileEntryResources(fileEntryId, communityPermissions,
285 guestPermissions);
286 }
287
288 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addOrOverwriteFileEntry(
289 long userId, long folderId, java.lang.String name,
290 java.lang.String sourceName, java.lang.String title,
291 java.lang.String description, java.lang.String extraSettings,
292 java.io.File file,
293 com.liferay.portal.service.ServiceContext serviceContext)
294 throws com.liferay.portal.PortalException,
295 com.liferay.portal.SystemException {
296 return getService()
297 .addOrOverwriteFileEntry(userId, folderId, name, sourceName,
298 title, description, extraSettings, file, serviceContext);
299 }
300
301 public static void deleteFileEntries(long folderId)
302 throws com.liferay.portal.PortalException,
303 com.liferay.portal.SystemException {
304 getService().deleteFileEntries(folderId);
305 }
306
307 public static void deleteFileEntry(
308 com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry)
309 throws com.liferay.portal.PortalException,
310 com.liferay.portal.SystemException {
311 getService().deleteFileEntry(fileEntry);
312 }
313
314 public static void deleteFileEntry(long folderId, java.lang.String name)
315 throws com.liferay.portal.PortalException,
316 com.liferay.portal.SystemException {
317 getService().deleteFileEntry(folderId, name);
318 }
319
320 public static void deleteFileEntry(long folderId, java.lang.String name,
321 double version)
322 throws com.liferay.portal.PortalException,
323 com.liferay.portal.SystemException {
324 getService().deleteFileEntry(folderId, name, version);
325 }
326
327 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getCompanyFileEntries(
328 long companyId, int start, int end)
329 throws com.liferay.portal.SystemException {
330 return getService().getCompanyFileEntries(companyId, start, end);
331 }
332
333 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getCompanyFileEntries(
334 long companyId, int start, int end,
335 com.liferay.portal.kernel.util.OrderByComparator obc)
336 throws com.liferay.portal.SystemException {
337 return getService().getCompanyFileEntries(companyId, start, end, obc);
338 }
339
340 public static int getCompanyFileEntriesCount(long companyId)
341 throws com.liferay.portal.SystemException {
342 return getService().getCompanyFileEntriesCount(companyId);
343 }
344
345 public static java.io.InputStream getFileAsStream(long companyId,
346 long userId, long folderId, java.lang.String name)
347 throws com.liferay.portal.PortalException,
348 com.liferay.portal.SystemException {
349 return getService().getFileAsStream(companyId, userId, folderId, name);
350 }
351
352 public static java.io.InputStream getFileAsStream(long companyId,
353 long userId, long folderId, java.lang.String name, double version)
354 throws com.liferay.portal.PortalException,
355 com.liferay.portal.SystemException {
356 return getService()
357 .getFileAsStream(companyId, userId, folderId, name, version);
358 }
359
360 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
361 long folderId) throws com.liferay.portal.SystemException {
362 return getService().getFileEntries(folderId);
363 }
364
365 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
366 long folderId, int start, int end)
367 throws com.liferay.portal.SystemException {
368 return getService().getFileEntries(folderId, start, end);
369 }
370
371 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
372 long folderId, int start, int end,
373 com.liferay.portal.kernel.util.OrderByComparator obc)
374 throws com.liferay.portal.SystemException {
375 return getService().getFileEntries(folderId, start, end, obc);
376 }
377
378 public static int getFileEntriesCount(long folderId)
379 throws com.liferay.portal.SystemException {
380 return getService().getFileEntriesCount(folderId);
381 }
382
383 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
384 long fileEntryId)
385 throws com.liferay.portal.PortalException,
386 com.liferay.portal.SystemException {
387 return getService().getFileEntry(fileEntryId);
388 }
389
390 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
391 long folderId, java.lang.String name)
392 throws com.liferay.portal.PortalException,
393 com.liferay.portal.SystemException {
394 return getService().getFileEntry(folderId, name);
395 }
396
397 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByTitle(
398 long folderId, java.lang.String titleWithExtension)
399 throws com.liferay.portal.PortalException,
400 com.liferay.portal.SystemException {
401 return getService().getFileEntryByTitle(folderId, titleWithExtension);
402 }
403
404 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
405 java.lang.String uuid, long groupId)
406 throws com.liferay.portal.PortalException,
407 com.liferay.portal.SystemException {
408 return getService().getFileEntryByUuidAndGroupId(uuid, groupId);
409 }
410
411 public static int getFoldersFileEntriesCount(
412 java.util.List<java.lang.Long> folderIds)
413 throws com.liferay.portal.SystemException {
414 return getService().getFoldersFileEntriesCount(folderIds);
415 }
416
417 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
418 long groupId, int start, int end)
419 throws com.liferay.portal.SystemException {
420 return getService().getGroupFileEntries(groupId, start, end);
421 }
422
423 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
424 long groupId, int start, int end,
425 com.liferay.portal.kernel.util.OrderByComparator obc)
426 throws com.liferay.portal.SystemException {
427 return getService().getGroupFileEntries(groupId, start, end, obc);
428 }
429
430 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
431 long groupId, long userId, int start, int end)
432 throws com.liferay.portal.SystemException {
433 return getService().getGroupFileEntries(groupId, userId, start, end);
434 }
435
436 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
437 long groupId, long userId, int start, int end,
438 com.liferay.portal.kernel.util.OrderByComparator obc)
439 throws com.liferay.portal.SystemException {
440 return getService().getGroupFileEntries(groupId, userId, start, end, obc);
441 }
442
443 public static int getGroupFileEntriesCount(long groupId)
444 throws com.liferay.portal.SystemException {
445 return getService().getGroupFileEntriesCount(groupId);
446 }
447
448 public static int getGroupFileEntriesCount(long groupId, long userId)
449 throws com.liferay.portal.SystemException {
450 return getService().getGroupFileEntriesCount(groupId, userId);
451 }
452
453 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getNoAssetFileEntries()
454 throws com.liferay.portal.SystemException {
455 return getService().getNoAssetFileEntries();
456 }
457
458 public static void reIndex(long fileEntryId)
459 throws com.liferay.portal.SystemException {
460 getService().reIndex(fileEntryId);
461 }
462
463
466 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
467 long userId, long folderId, long newFolderId, java.lang.String name,
468 java.lang.String sourceFileName, java.lang.String title,
469 java.lang.String description, java.lang.String extraSettings,
470 byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
471 throws com.liferay.portal.PortalException,
472 com.liferay.portal.SystemException {
473 return getService()
474 .updateFileEntry(userId, folderId, newFolderId, name,
475 sourceFileName, title, description, extraSettings, bytes,
476 serviceContext);
477 }
478
479
482 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
483 long userId, long folderId, long newFolderId, java.lang.String name,
484 java.lang.String sourceFileName, java.lang.String title,
485 java.lang.String description, java.lang.String extraSettings,
486 java.io.File file,
487 com.liferay.portal.service.ServiceContext serviceContext)
488 throws com.liferay.portal.PortalException,
489 com.liferay.portal.SystemException {
490 return getService()
491 .updateFileEntry(userId, folderId, newFolderId, name,
492 sourceFileName, title, description, extraSettings, file,
493 serviceContext);
494 }
495
496 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
497 long userId, long folderId, long newFolderId, java.lang.String name,
498 java.lang.String sourceFileName, java.lang.String title,
499 java.lang.String description, java.lang.String versionDescription,
500 java.lang.String extraSettings, byte[] bytes,
501 com.liferay.portal.service.ServiceContext serviceContext)
502 throws com.liferay.portal.PortalException,
503 com.liferay.portal.SystemException {
504 return getService()
505 .updateFileEntry(userId, folderId, newFolderId, name,
506 sourceFileName, title, description, versionDescription,
507 extraSettings, bytes, serviceContext);
508 }
509
510 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
511 long userId, long folderId, long newFolderId, java.lang.String name,
512 java.lang.String sourceFileName, java.lang.String title,
513 java.lang.String description, java.lang.String versionDescription,
514 java.lang.String extraSettings, java.io.File file,
515 com.liferay.portal.service.ServiceContext serviceContext)
516 throws com.liferay.portal.PortalException,
517 com.liferay.portal.SystemException {
518 return getService()
519 .updateFileEntry(userId, folderId, newFolderId, name,
520 sourceFileName, title, description, versionDescription,
521 extraSettings, file, serviceContext);
522 }
523
524 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
525 long userId, long folderId, long newFolderId, java.lang.String name,
526 java.lang.String sourceFileName, java.lang.String title,
527 java.lang.String description, java.lang.String versionDescription,
528 java.lang.String extraSettings, java.io.InputStream is, long size,
529 com.liferay.portal.service.ServiceContext serviceContext)
530 throws com.liferay.portal.PortalException,
531 com.liferay.portal.SystemException {
532 return getService()
533 .updateFileEntry(userId, folderId, newFolderId, name,
534 sourceFileName, title, description, versionDescription,
535 extraSettings, is, size, serviceContext);
536 }
537
538 public static void updateTagsAsset(long userId,
539 com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
540 java.lang.String[] tagsCategories, java.lang.String[] tagsEntries)
541 throws com.liferay.portal.PortalException,
542 com.liferay.portal.SystemException {
543 getService()
544 .updateTagsAsset(userId, fileEntry, tagsCategories, tagsEntries);
545 }
546
547 public static DLFileEntryLocalService getService() {
548 if (_service == null) {
549 _service = (DLFileEntryLocalService)PortalBeanLocatorUtil.locate(DLFileEntryLocalService.class.getName());
550
551 ReferenceRegistry.registerReference(DLFileEntryLocalServiceUtil.class,
552 "_service");
553 MethodCache.remove(DLFileEntryLocalService.class);
554 }
555
556 return _service;
557 }
558
559 public void setService(DLFileEntryLocalService service) {
560 MethodCache.remove(DLFileEntryLocalService.class);
561
562 _service = service;
563
564 ReferenceRegistry.registerReference(DLFileEntryLocalServiceUtil.class,
565 "_service");
566 MethodCache.remove(DLFileEntryLocalService.class);
567 }
568
569 private static DLFileEntryLocalService _service;
570 }