001    /**
002     * Copyright (c) 2000-present 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.exportimport.kernel.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    /**
023     * Provides the remote service utility for Staging. This utility wraps
024     * {@link com.liferay.portlet.exportimport.service.impl.StagingServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on a remote server. Methods of this service are expected to have security
027     * checks based on the propagated JAAS credentials because this service can be
028     * accessed remotely.
029     *
030     * @author Brian Wing Shun Chan
031     * @see StagingService
032     * @see com.liferay.portlet.exportimport.service.base.StagingServiceBaseImpl
033     * @see com.liferay.portlet.exportimport.service.impl.StagingServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class StagingServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.exportimport.service.impl.StagingServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * @deprecated As of 7.0.0, with no direct replacement
046            */
047            @Deprecated
048            public static com.liferay.exportimport.kernel.lar.MissingReferences publishStagingRequest(
049                    long stagingRequestId, boolean privateLayout,
050                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap)
051                    throws com.liferay.portal.kernel.exception.PortalException {
052                    return getService()
053                                       .publishStagingRequest(stagingRequestId, privateLayout,
054                            parameterMap);
055            }
056    
057            public static com.liferay.exportimport.kernel.lar.MissingReferences publishStagingRequest(
058                    long stagingRequestId,
059                    com.liferay.exportimport.kernel.model.ExportImportConfiguration exportImportConfiguration)
060                    throws com.liferay.portal.kernel.exception.PortalException {
061                    return getService()
062                                       .publishStagingRequest(stagingRequestId,
063                            exportImportConfiguration);
064            }
065    
066            /**
067            * @deprecated As of 7.0.0, replaced by {@link #publishStagingRequest(long,
068            boolean, Map)}
069            */
070            @Deprecated
071            public static com.liferay.exportimport.kernel.lar.MissingReferences validateStagingRequest(
072                    long stagingRequestId, boolean privateLayout,
073                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap)
074                    throws com.liferay.portal.kernel.exception.PortalException {
075                    return getService()
076                                       .validateStagingRequest(stagingRequestId, privateLayout,
077                            parameterMap);
078            }
079    
080            /**
081            * Returns the OSGi service identifier.
082            *
083            * @return the OSGi service identifier
084            */
085            public static java.lang.String getOSGiServiceIdentifier() {
086                    return getService().getOSGiServiceIdentifier();
087            }
088    
089            public static long createStagingRequest(long groupId,
090                    java.lang.String checksum)
091                    throws com.liferay.portal.kernel.exception.PortalException {
092                    return getService().createStagingRequest(groupId, checksum);
093            }
094    
095            public static void cleanUpStagingRequest(long stagingRequestId)
096                    throws com.liferay.portal.kernel.exception.PortalException {
097                    getService().cleanUpStagingRequest(stagingRequestId);
098            }
099    
100            public static void updateStagingRequest(long stagingRequestId,
101                    java.lang.String fileName, byte[] bytes)
102                    throws com.liferay.portal.kernel.exception.PortalException {
103                    getService().updateStagingRequest(stagingRequestId, fileName, bytes);
104            }
105    
106            public static StagingService getService() {
107                    if (_service == null) {
108                            _service = (StagingService)PortalBeanLocatorUtil.locate(StagingService.class.getName());
109    
110                            ReferenceRegistry.registerReference(StagingServiceUtil.class,
111                                    "_service");
112                    }
113    
114                    return _service;
115            }
116    
117            private static StagingService _service;
118    }