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