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 public static java.io.InputStream getFileAsStream(long fileEntryId,
161 java.lang.String version)
162 throws com.liferay.portal.kernel.exception.PortalException {
163 return getService().getFileAsStream(fileEntryId, version);
164 }
165
166 public static java.io.InputStream getFileAsStream(long fileEntryId,
167 java.lang.String version, boolean incrementCounter)
168 throws com.liferay.portal.kernel.exception.PortalException {
169 return getService()
170 .getFileAsStream(fileEntryId, version, incrementCounter);
171 }
172
173 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
174 long groupId, long folderId, long fileEntryTypeId, int start, int end,
175 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
176 throws com.liferay.portal.kernel.exception.PortalException {
177 return getService()
178 .getFileEntries(groupId, folderId, fileEntryTypeId, start,
179 end, obc);
180 }
181
182 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
183 long groupId, long folderId, java.lang.String[] mimeTypes, int start,
184 int end,
185 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
186 throws com.liferay.portal.kernel.exception.PortalException {
187 return getService()
188 .getFileEntries(groupId, folderId, mimeTypes, start, end, obc);
189 }
190
191 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
192 long groupId, long folderId, int start, int end,
193 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
194 throws com.liferay.portal.kernel.exception.PortalException {
195 return getService().getFileEntries(groupId, folderId, start, end, obc);
196 }
197
198 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
199 long groupId, long folderId, int status, int start, int end,
200 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
201 throws com.liferay.portal.kernel.exception.PortalException {
202 return getService()
203 .getFileEntries(groupId, folderId, status, start, end, obc);
204 }
205
206 public static int getFileEntriesCount(long groupId, long folderId) {
207 return getService().getFileEntriesCount(groupId, folderId);
208 }
209
210 public static int getFileEntriesCount(long groupId, long folderId,
211 long fileEntryTypeId) {
212 return getService()
213 .getFileEntriesCount(groupId, folderId, fileEntryTypeId);
214 }
215
216 public static int getFileEntriesCount(long groupId, long folderId,
217 java.lang.String[] mimeTypes) {
218 return getService().getFileEntriesCount(groupId, folderId, mimeTypes);
219 }
220
221 public static int getFileEntriesCount(long groupId, long folderId,
222 int status) {
223 return getService().getFileEntriesCount(groupId, folderId, status);
224 }
225
226 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
227 long fileEntryId)
228 throws com.liferay.portal.kernel.exception.PortalException {
229 return getService().getFileEntry(fileEntryId);
230 }
231
232 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
233 long groupId, long folderId, java.lang.String title)
234 throws com.liferay.portal.kernel.exception.PortalException {
235 return getService().getFileEntry(groupId, folderId, title);
236 }
237
238 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
239 java.lang.String uuid, long groupId)
240 throws com.liferay.portal.kernel.exception.PortalException {
241 return getService().getFileEntryByUuidAndGroupId(uuid, groupId);
242 }
243
244 public static com.liferay.portal.kernel.lock.Lock getFileEntryLock(
245 long fileEntryId) {
246 return getService().getFileEntryLock(fileEntryId);
247 }
248
249 public static int getFoldersFileEntriesCount(long groupId,
250 java.util.List<java.lang.Long> folderIds, int status) {
251 return getService()
252 .getFoldersFileEntriesCount(groupId, folderIds, status);
253 }
254
255 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
256 long groupId, long userId, long repositoryId, long rootFolderId,
257 java.lang.String[] mimeTypes, int status, int start, int end,
258 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
259 throws com.liferay.portal.kernel.exception.PortalException {
260 return getService()
261 .getGroupFileEntries(groupId, userId, repositoryId,
262 rootFolderId, mimeTypes, status, start, end, obc);
263 }
264
265 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
266 long groupId, long userId, long rootFolderId,
267 java.lang.String[] mimeTypes, int status, int start, int end,
268 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
269 throws com.liferay.portal.kernel.exception.PortalException {
270 return getService()
271 .getGroupFileEntries(groupId, userId, rootFolderId,
272 mimeTypes, status, start, end, obc);
273 }
274
275 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
276 long groupId, long userId, long rootFolderId, 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, start,
281 end, obc);
282 }
283
284 public static int getGroupFileEntriesCount(long groupId, long userId,
285 long repositoryId, long rootFolderId, java.lang.String[] mimeTypes,
286 int status) throws com.liferay.portal.kernel.exception.PortalException {
287 return getService()
288 .getGroupFileEntriesCount(groupId, userId, repositoryId,
289 rootFolderId, mimeTypes, status);
290 }
291
292 public static int getGroupFileEntriesCount(long groupId, long userId,
293 long rootFolderId)
294 throws com.liferay.portal.kernel.exception.PortalException {
295 return getService()
296 .getGroupFileEntriesCount(groupId, userId, rootFolderId);
297 }
298
299 public static int getGroupFileEntriesCount(long groupId, long userId,
300 long rootFolderId, java.lang.String[] mimeTypes, int status)
301 throws com.liferay.portal.kernel.exception.PortalException {
302 return getService()
303 .getGroupFileEntriesCount(groupId, userId, rootFolderId,
304 mimeTypes, status);
305 }
306
307
312 public static java.lang.String getOSGiServiceIdentifier() {
313 return getService().getOSGiServiceIdentifier();
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 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
370 long fileEntryId, java.lang.String sourceFileName,
371 java.lang.String mimeType, java.lang.String title,
372 java.lang.String description, java.lang.String changeLog,
373 boolean majorVersion, long fileEntryTypeId,
374 java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.DDMFormValues> ddmFormValuesMap,
375 java.io.File file, java.io.InputStream is, long size,
376 com.liferay.portal.service.ServiceContext serviceContext)
377 throws com.liferay.portal.kernel.exception.PortalException {
378 return getService()
379 .updateFileEntry(fileEntryId, sourceFileName, mimeType,
380 title, description, changeLog, majorVersion, fileEntryTypeId,
381 ddmFormValuesMap, file, is, size, serviceContext);
382 }
383
384 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateStatus(
385 long userId, long fileVersionId, int status,
386 com.liferay.portal.service.ServiceContext serviceContext,
387 java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
388 throws com.liferay.portal.kernel.exception.PortalException {
389 return getService()
390 .updateStatus(userId, fileVersionId, status, serviceContext,
391 workflowContext);
392 }
393
394 public static boolean verifyFileEntryCheckOut(long fileEntryId,
395 java.lang.String lockUuid)
396 throws com.liferay.portal.kernel.exception.PortalException {
397 return getService().verifyFileEntryCheckOut(fileEntryId, lockUuid);
398 }
399
400 public static boolean verifyFileEntryLock(long fileEntryId,
401 java.lang.String lockUuid)
402 throws com.liferay.portal.kernel.exception.PortalException {
403 return getService().verifyFileEntryLock(fileEntryId, lockUuid);
404 }
405
406 public static DLFileEntryService getService() {
407 if (_service == null) {
408 _service = (DLFileEntryService)PortalBeanLocatorUtil.locate(DLFileEntryService.class.getName());
409
410 ReferenceRegistry.registerReference(DLFileEntryServiceUtil.class,
411 "_service");
412 }
413
414 return _service;
415 }
416
417 private static DLFileEntryService _service;
418 }