1
22
23 package com.liferay.portlet.documentlibrary.service;
24
25
51 public class DLFileEntryLocalServiceUtil {
52 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addDLFileEntry(
53 com.liferay.portlet.documentlibrary.model.DLFileEntry model)
54 throws com.liferay.portal.SystemException {
55 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
56
57 return dlFileEntryLocalService.addDLFileEntry(model);
58 }
59
60 public static java.util.List dynamicQuery(
61 com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
62 throws com.liferay.portal.SystemException {
63 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
64
65 return dlFileEntryLocalService.dynamicQuery(queryInitializer);
66 }
67
68 public static java.util.List dynamicQuery(
69 com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
70 int begin, int end) throws com.liferay.portal.SystemException {
71 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
72
73 return dlFileEntryLocalService.dynamicQuery(queryInitializer, begin, end);
74 }
75
76 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateDLFileEntry(
77 com.liferay.portlet.documentlibrary.model.DLFileEntry model)
78 throws com.liferay.portal.SystemException {
79 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
80
81 return dlFileEntryLocalService.updateDLFileEntry(model);
82 }
83
84 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
85 long userId, long folderId, java.lang.String name,
86 java.lang.String title, java.lang.String description,
87 java.lang.String[] tagsEntries, java.lang.String extraSettings,
88 java.io.File file, boolean addCommunityPermissions,
89 boolean addGuestPermissions)
90 throws com.liferay.portal.PortalException,
91 com.liferay.portal.SystemException {
92 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
93
94 return dlFileEntryLocalService.addFileEntry(userId, folderId, name,
95 title, description, tagsEntries, extraSettings, file,
96 addCommunityPermissions, addGuestPermissions);
97 }
98
99 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
100 long userId, long folderId, java.lang.String name,
101 java.lang.String title, java.lang.String description,
102 java.lang.String[] tagsEntries, java.lang.String extraSettings,
103 byte[] byteArray, boolean addCommunityPermissions,
104 boolean addGuestPermissions)
105 throws com.liferay.portal.PortalException,
106 com.liferay.portal.SystemException {
107 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
108
109 return dlFileEntryLocalService.addFileEntry(userId, folderId, name,
110 title, description, tagsEntries, extraSettings, byteArray,
111 addCommunityPermissions, addGuestPermissions);
112 }
113
114 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
115 long userId, long folderId, java.lang.String name,
116 java.lang.String title, java.lang.String description,
117 java.lang.String[] tagsEntries, java.lang.String extraSettings,
118 java.io.File file, java.lang.String[] communityPermissions,
119 java.lang.String[] guestPermissions)
120 throws com.liferay.portal.PortalException,
121 com.liferay.portal.SystemException {
122 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
123
124 return dlFileEntryLocalService.addFileEntry(userId, folderId, name,
125 title, description, tagsEntries, extraSettings, file,
126 communityPermissions, guestPermissions);
127 }
128
129 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
130 long userId, long folderId, java.lang.String name,
131 java.lang.String title, java.lang.String description,
132 java.lang.String[] tagsEntries, java.lang.String extraSettings,
133 byte[] byteArray, java.lang.String[] communityPermissions,
134 java.lang.String[] guestPermissions)
135 throws com.liferay.portal.PortalException,
136 com.liferay.portal.SystemException {
137 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
138
139 return dlFileEntryLocalService.addFileEntry(userId, folderId, name,
140 title, description, tagsEntries, extraSettings, byteArray,
141 communityPermissions, guestPermissions);
142 }
143
144 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
145 long userId, long folderId, java.lang.String name,
146 java.lang.String title, java.lang.String description,
147 java.lang.String[] tagsEntries, java.lang.String extraSettings,
148 java.io.File file, java.lang.Boolean addCommunityPermissions,
149 java.lang.Boolean addGuestPermissions,
150 java.lang.String[] communityPermissions,
151 java.lang.String[] guestPermissions)
152 throws com.liferay.portal.PortalException,
153 com.liferay.portal.SystemException {
154 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
155
156 return dlFileEntryLocalService.addFileEntry(userId, folderId, name,
157 title, description, tagsEntries, extraSettings, file,
158 addCommunityPermissions, addGuestPermissions, communityPermissions,
159 guestPermissions);
160 }
161
162 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
163 long userId, long folderId, java.lang.String name,
164 java.lang.String title, java.lang.String description,
165 java.lang.String[] tagsEntries, java.lang.String extraSettings,
166 byte[] byteArray, java.lang.Boolean addCommunityPermissions,
167 java.lang.Boolean addGuestPermissions,
168 java.lang.String[] communityPermissions,
169 java.lang.String[] guestPermissions)
170 throws com.liferay.portal.PortalException,
171 com.liferay.portal.SystemException {
172 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
173
174 return dlFileEntryLocalService.addFileEntry(userId, folderId, name,
175 title, description, tagsEntries, extraSettings, byteArray,
176 addCommunityPermissions, addGuestPermissions, communityPermissions,
177 guestPermissions);
178 }
179
180 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
181 long userId, long folderId, java.lang.String name,
182 java.lang.String title, java.lang.String description,
183 java.lang.String[] tagsEntries, java.lang.String extraSettings,
184 java.io.InputStream is, long size,
185 java.lang.Boolean addCommunityPermissions,
186 java.lang.Boolean addGuestPermissions,
187 java.lang.String[] communityPermissions,
188 java.lang.String[] guestPermissions)
189 throws com.liferay.portal.PortalException,
190 com.liferay.portal.SystemException {
191 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
192
193 return dlFileEntryLocalService.addFileEntry(userId, folderId, name,
194 title, description, tagsEntries, extraSettings, is, size,
195 addCommunityPermissions, addGuestPermissions, communityPermissions,
196 guestPermissions);
197 }
198
199 public static void addFileEntryResources(long folderId,
200 java.lang.String name, boolean addCommunityPermissions,
201 boolean addGuestPermissions)
202 throws com.liferay.portal.PortalException,
203 com.liferay.portal.SystemException {
204 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
205 dlFileEntryLocalService.addFileEntryResources(folderId, name,
206 addCommunityPermissions, addGuestPermissions);
207 }
208
209 public static void addFileEntryResources(
210 com.liferay.portlet.documentlibrary.model.DLFolder folder,
211 com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
212 boolean addCommunityPermissions, boolean addGuestPermissions)
213 throws com.liferay.portal.PortalException,
214 com.liferay.portal.SystemException {
215 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
216 dlFileEntryLocalService.addFileEntryResources(folder, fileEntry,
217 addCommunityPermissions, addGuestPermissions);
218 }
219
220 public static void addFileEntryResources(long folderId,
221 java.lang.String name, java.lang.String[] communityPermissions,
222 java.lang.String[] guestPermissions)
223 throws com.liferay.portal.PortalException,
224 com.liferay.portal.SystemException {
225 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
226 dlFileEntryLocalService.addFileEntryResources(folderId, name,
227 communityPermissions, guestPermissions);
228 }
229
230 public static void addFileEntryResources(
231 com.liferay.portlet.documentlibrary.model.DLFolder folder,
232 com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
233 java.lang.String[] communityPermissions,
234 java.lang.String[] guestPermissions)
235 throws com.liferay.portal.PortalException,
236 com.liferay.portal.SystemException {
237 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
238 dlFileEntryLocalService.addFileEntryResources(folder, fileEntry,
239 communityPermissions, guestPermissions);
240 }
241
242 public static void deleteFileEntries(long folderId)
243 throws com.liferay.portal.PortalException,
244 com.liferay.portal.SystemException {
245 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
246 dlFileEntryLocalService.deleteFileEntries(folderId);
247 }
248
249 public static void deleteFileEntry(long folderId, java.lang.String name)
250 throws com.liferay.portal.PortalException,
251 com.liferay.portal.SystemException {
252 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
253 dlFileEntryLocalService.deleteFileEntry(folderId, name);
254 }
255
256 public static void deleteFileEntry(long folderId, java.lang.String name,
257 double version)
258 throws com.liferay.portal.PortalException,
259 com.liferay.portal.SystemException {
260 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
261 dlFileEntryLocalService.deleteFileEntry(folderId, name, version);
262 }
263
264 public static void deleteFileEntry(
265 com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry)
266 throws com.liferay.portal.PortalException,
267 com.liferay.portal.SystemException {
268 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
269 dlFileEntryLocalService.deleteFileEntry(fileEntry);
270 }
271
272 public static java.io.InputStream getFileAsStream(long companyId,
273 long userId, long folderId, java.lang.String name)
274 throws com.liferay.portal.PortalException,
275 com.liferay.portal.SystemException {
276 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
277
278 return dlFileEntryLocalService.getFileAsStream(companyId, userId,
279 folderId, name);
280 }
281
282 public static java.io.InputStream getFileAsStream(long companyId,
283 long userId, long folderId, java.lang.String name, double version)
284 throws com.liferay.portal.PortalException,
285 com.liferay.portal.SystemException {
286 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
287
288 return dlFileEntryLocalService.getFileAsStream(companyId, userId,
289 folderId, name, version);
290 }
291
292 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
293 long fileEntryId)
294 throws com.liferay.portal.PortalException,
295 com.liferay.portal.SystemException {
296 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
297
298 return dlFileEntryLocalService.getFileEntry(fileEntryId);
299 }
300
301 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
302 long folderId, java.lang.String name)
303 throws com.liferay.portal.PortalException,
304 com.liferay.portal.SystemException {
305 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
306
307 return dlFileEntryLocalService.getFileEntry(folderId, name);
308 }
309
310 public static java.util.List getFileEntries(long folderId)
311 throws com.liferay.portal.SystemException {
312 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
313
314 return dlFileEntryLocalService.getFileEntries(folderId);
315 }
316
317 public static java.util.List getFileEntries(long folderId, int begin,
318 int end) throws com.liferay.portal.SystemException {
319 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
320
321 return dlFileEntryLocalService.getFileEntries(folderId, begin, end);
322 }
323
324 public static java.util.List getFileEntries(long folderId, int begin,
325 int end, com.liferay.portal.kernel.util.OrderByComparator obc)
326 throws com.liferay.portal.SystemException {
327 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
328
329 return dlFileEntryLocalService.getFileEntries(folderId, begin, end, obc);
330 }
331
332 public static java.util.List getFileEntriesAndShortcuts(long folderId,
333 int begin, int end) throws com.liferay.portal.SystemException {
334 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
335
336 return dlFileEntryLocalService.getFileEntriesAndShortcuts(folderId,
337 begin, end);
338 }
339
340 public static java.util.List getFileEntriesAndShortcuts(
341 java.util.List folderIds, int begin, int end)
342 throws com.liferay.portal.SystemException {
343 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
344
345 return dlFileEntryLocalService.getFileEntriesAndShortcuts(folderIds,
346 begin, end);
347 }
348
349 public static int getFileEntriesAndShortcutsCount(long folderId)
350 throws com.liferay.portal.SystemException {
351 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
352
353 return dlFileEntryLocalService.getFileEntriesAndShortcutsCount(folderId);
354 }
355
356 public static int getFileEntriesAndShortcutsCount(java.util.List folderIds)
357 throws com.liferay.portal.SystemException {
358 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
359
360 return dlFileEntryLocalService.getFileEntriesAndShortcutsCount(folderIds);
361 }
362
363 public static int getFileEntriesCount(long folderId)
364 throws com.liferay.portal.SystemException {
365 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
366
367 return dlFileEntryLocalService.getFileEntriesCount(folderId);
368 }
369
370 public static int getFoldersFileEntriesCount(java.util.List folderIds)
371 throws com.liferay.portal.SystemException {
372 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
373
374 return dlFileEntryLocalService.getFoldersFileEntriesCount(folderIds);
375 }
376
377 public static java.util.List getGroupFileEntries(long groupId, int begin,
378 int end) throws com.liferay.portal.SystemException {
379 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
380
381 return dlFileEntryLocalService.getGroupFileEntries(groupId, begin, end);
382 }
383
384 public static java.util.List getGroupFileEntries(long groupId, int begin,
385 int end, com.liferay.portal.kernel.util.OrderByComparator obc)
386 throws com.liferay.portal.SystemException {
387 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
388
389 return dlFileEntryLocalService.getGroupFileEntries(groupId, begin, end,
390 obc);
391 }
392
393 public static java.util.List getGroupFileEntries(long groupId, long userId,
394 int begin, int end) throws com.liferay.portal.SystemException {
395 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
396
397 return dlFileEntryLocalService.getGroupFileEntries(groupId, userId,
398 begin, end);
399 }
400
401 public static java.util.List getGroupFileEntries(long groupId, long userId,
402 int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
403 throws com.liferay.portal.SystemException {
404 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
405
406 return dlFileEntryLocalService.getGroupFileEntries(groupId, userId,
407 begin, end, obc);
408 }
409
410 public static int getGroupFileEntriesCount(long groupId)
411 throws com.liferay.portal.SystemException {
412 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
413
414 return dlFileEntryLocalService.getGroupFileEntriesCount(groupId);
415 }
416
417 public static int getGroupFileEntriesCount(long groupId, long userId)
418 throws com.liferay.portal.SystemException {
419 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
420
421 return dlFileEntryLocalService.getGroupFileEntriesCount(groupId, userId);
422 }
423
424 public static java.util.List getNoAssetFileEntries()
425 throws com.liferay.portal.SystemException {
426 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
427
428 return dlFileEntryLocalService.getNoAssetFileEntries();
429 }
430
431 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
432 long userId, long folderId, long newFolderId, java.lang.String name,
433 java.lang.String sourceFileName, java.lang.String title,
434 java.lang.String description, java.lang.String[] tagsEntries,
435 java.lang.String extraSettings, java.io.File file)
436 throws com.liferay.portal.PortalException,
437 com.liferay.portal.SystemException {
438 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
439
440 return dlFileEntryLocalService.updateFileEntry(userId, folderId,
441 newFolderId, name, sourceFileName, title, description, tagsEntries,
442 extraSettings, file);
443 }
444
445 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
446 long userId, long folderId, long newFolderId, java.lang.String name,
447 java.lang.String sourceFileName, java.lang.String title,
448 java.lang.String description, java.lang.String[] tagsEntries,
449 java.lang.String extraSettings, byte[] byteArray)
450 throws com.liferay.portal.PortalException,
451 com.liferay.portal.SystemException {
452 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
453
454 return dlFileEntryLocalService.updateFileEntry(userId, folderId,
455 newFolderId, name, sourceFileName, title, description, tagsEntries,
456 extraSettings, byteArray);
457 }
458
459 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
460 long userId, long folderId, long newFolderId, java.lang.String name,
461 java.lang.String sourceFileName, java.lang.String title,
462 java.lang.String description, java.lang.String[] tagsEntries,
463 java.lang.String extraSettings, java.io.InputStream is, long size)
464 throws com.liferay.portal.PortalException,
465 com.liferay.portal.SystemException {
466 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
467
468 return dlFileEntryLocalService.updateFileEntry(userId, folderId,
469 newFolderId, name, sourceFileName, title, description, tagsEntries,
470 extraSettings, is, size);
471 }
472
473 public static void updateTagsAsset(long userId,
474 com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
475 java.lang.String[] tagsEntries)
476 throws com.liferay.portal.PortalException,
477 com.liferay.portal.SystemException {
478 DLFileEntryLocalService dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getService();
479 dlFileEntryLocalService.updateTagsAsset(userId, fileEntry, tagsEntries);
480 }
481 }