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.MethodCache;
019 import com.liferay.portal.kernel.util.ReferenceRegistry;
020
021
034 public class DLSyncServiceUtil {
035
040 public static com.liferay.portlet.documentlibrary.model.DLSyncUpdate getDLSyncUpdate(
041 long companyId, long repositoryId, java.util.Date lastAccessDate)
042 throws com.liferay.portal.kernel.exception.PortalException,
043 com.liferay.portal.kernel.exception.SystemException {
044 return getService()
045 .getDLSyncUpdate(companyId, repositoryId, lastAccessDate);
046 }
047
048 public static java.io.InputStream getFileDeltaAsStream(long fileEntryId,
049 java.lang.String sourceVersion, java.lang.String destinationVersion)
050 throws com.liferay.portal.kernel.exception.PortalException,
051 com.liferay.portal.kernel.exception.SystemException {
052 return getService()
053 .getFileDeltaAsStream(fileEntryId, sourceVersion,
054 destinationVersion);
055 }
056
057 public static com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry(
058 long fileEntryId, java.lang.String sourceFileName,
059 java.lang.String mimeType, java.lang.String title,
060 java.lang.String description, java.lang.String changeLog,
061 boolean majorVersion, java.io.InputStream deltaInputStream, long size,
062 com.liferay.portal.service.ServiceContext serviceContext)
063 throws com.liferay.portal.kernel.exception.PortalException,
064 com.liferay.portal.kernel.exception.SystemException {
065 return getService()
066 .updateFileEntry(fileEntryId, sourceFileName, mimeType,
067 title, description, changeLog, majorVersion, deltaInputStream,
068 size, serviceContext);
069 }
070
071 public static DLSyncService getService() {
072 if (_service == null) {
073 _service = (DLSyncService)PortalBeanLocatorUtil.locate(DLSyncService.class.getName());
074
075 ReferenceRegistry.registerReference(DLSyncServiceUtil.class,
076 "_service");
077 MethodCache.remove(DLSyncService.class);
078 }
079
080 return _service;
081 }
082
083 public void setService(DLSyncService service) {
084 MethodCache.remove(DLSyncService.class);
085
086 _service = service;
087
088 ReferenceRegistry.registerReference(DLSyncServiceUtil.class, "_service");
089 MethodCache.remove(DLSyncService.class);
090 }
091
092 private static DLSyncService _service;
093 }