001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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.SystemException {
043                    return getService()
044                                       .getDLSyncUpdate(companyId, repositoryId, lastAccessDate);
045            }
046    
047            public static java.io.InputStream getFileDeltaAsStream(long fileEntryId,
048                    java.lang.String sourceVersion, java.lang.String destinationVersion)
049                    throws com.liferay.portal.kernel.exception.PortalException,
050                            com.liferay.portal.kernel.exception.SystemException {
051                    return getService()
052                                       .getFileDeltaAsStream(fileEntryId, sourceVersion,
053                            destinationVersion);
054            }
055    
056            public static com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry(
057                    long fileEntryId, java.lang.String sourceFileName,
058                    java.lang.String mimeType, java.lang.String title,
059                    java.lang.String description, java.lang.String changeLog,
060                    boolean majorVersion, java.io.InputStream deltaInputStream, long size,
061                    com.liferay.portal.service.ServiceContext serviceContext)
062                    throws com.liferay.portal.kernel.exception.PortalException,
063                            com.liferay.portal.kernel.exception.SystemException {
064                    return getService()
065                                       .updateFileEntry(fileEntryId, sourceFileName, mimeType,
066                            title, description, changeLog, majorVersion, deltaInputStream,
067                            size, serviceContext);
068            }
069    
070            public static DLSyncService getService() {
071                    if (_service == null) {
072                            _service = (DLSyncService)PortalBeanLocatorUtil.locate(DLSyncService.class.getName());
073    
074                            ReferenceRegistry.registerReference(DLSyncServiceUtil.class,
075                                    "_service");
076                            MethodCache.remove(DLSyncService.class);
077                    }
078    
079                    return _service;
080            }
081    
082            public void setService(DLSyncService service) {
083                    MethodCache.remove(DLSyncService.class);
084    
085                    _service = service;
086    
087                    ReferenceRegistry.registerReference(DLSyncServiceUtil.class, "_service");
088                    MethodCache.remove(DLSyncService.class);
089            }
090    
091            private static DLSyncService _service;
092    }