001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
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    /**
022     * The utility for the d l sync remote service. This utility wraps {@link com.liferay.portlet.documentlibrary.service.impl.DLSyncServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
023     *
024     * <p>
025     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see DLSyncService
030     * @see com.liferay.portlet.documentlibrary.service.base.DLSyncServiceBaseImpl
031     * @see com.liferay.portlet.documentlibrary.service.impl.DLSyncServiceImpl
032     * @generated
033     */
034    public class DLSyncServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLSyncServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
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    }