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