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