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