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 local service utility for Staging. This utility wraps
024     * {@link com.liferay.portlet.exportimport.service.impl.StagingLocalServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on the local server. Methods of this service will not have security checks
027     * based on the propagated JAAS credentials because this service can only be
028     * accessed from within the same VM.
029     *
030     * @author Brian Wing Shun Chan
031     * @see StagingLocalService
032     * @see com.liferay.portlet.exportimport.service.base.StagingLocalServiceBaseImpl
033     * @see com.liferay.portlet.exportimport.service.impl.StagingLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class StagingLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.exportimport.service.impl.StagingLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043            public static void checkDefaultLayoutSetBranches(long userId,
044                    com.liferay.portal.kernel.model.Group liveGroup,
045                    boolean branchingPublic, boolean branchingPrivate, boolean remote,
046                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
047                    throws com.liferay.portal.kernel.exception.PortalException {
048                    getService()
049                            .checkDefaultLayoutSetBranches(userId, liveGroup, branchingPublic,
050                            branchingPrivate, remote, serviceContext);
051            }
052    
053            public static void cleanUpStagingRequest(long stagingRequestId)
054                    throws com.liferay.portal.kernel.exception.PortalException {
055                    getService().cleanUpStagingRequest(stagingRequestId);
056            }
057    
058            public static long createStagingRequest(long userId, long groupId,
059                    java.lang.String checksum)
060                    throws com.liferay.portal.kernel.exception.PortalException {
061                    return getService().createStagingRequest(userId, groupId, checksum);
062            }
063    
064            public static void disableStaging(
065                    com.liferay.portal.kernel.model.Group liveGroup,
066                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
067                    throws com.liferay.portal.kernel.exception.PortalException {
068                    getService().disableStaging(liveGroup, serviceContext);
069            }
070    
071            public static void disableStaging(
072                    javax.portlet.PortletRequest portletRequest,
073                    com.liferay.portal.kernel.model.Group liveGroup,
074                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
075                    throws com.liferay.portal.kernel.exception.PortalException {
076                    getService().disableStaging(portletRequest, liveGroup, serviceContext);
077            }
078    
079            public static void enableLocalStaging(long userId,
080                    com.liferay.portal.kernel.model.Group liveGroup,
081                    boolean branchingPublic, boolean branchingPrivate,
082                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
083                    throws com.liferay.portal.kernel.exception.PortalException {
084                    getService()
085                            .enableLocalStaging(userId, liveGroup, branchingPublic,
086                            branchingPrivate, serviceContext);
087            }
088    
089            public static void enableRemoteStaging(long userId,
090                    com.liferay.portal.kernel.model.Group stagingGroup,
091                    boolean branchingPublic, boolean branchingPrivate,
092                    java.lang.String remoteAddress, int remotePort,
093                    java.lang.String remotePathContext, boolean secureConnection,
094                    long remoteGroupId,
095                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
096                    throws com.liferay.portal.kernel.exception.PortalException {
097                    getService()
098                            .enableRemoteStaging(userId, stagingGroup, branchingPublic,
099                            branchingPrivate, remoteAddress, remotePort, remotePathContext,
100                            secureConnection, remoteGroupId, serviceContext);
101            }
102    
103            /**
104            * Returns the OSGi service identifier.
105            *
106            * @return the OSGi service identifier
107            */
108            public static java.lang.String getOSGiServiceIdentifier() {
109                    return getService().getOSGiServiceIdentifier();
110            }
111    
112            public static com.liferay.exportimport.kernel.lar.MissingReferences publishStagingRequest(
113                    long userId, long stagingRequestId,
114                    com.liferay.exportimport.kernel.model.ExportImportConfiguration exportImportConfiguration)
115                    throws com.liferay.portal.kernel.exception.PortalException {
116                    return getService()
117                                       .publishStagingRequest(userId, stagingRequestId,
118                            exportImportConfiguration);
119            }
120    
121            /**
122            * @deprecated As of 7.0.0, with no direct replacement
123            */
124            @Deprecated
125            public static com.liferay.exportimport.kernel.lar.MissingReferences publishStagingRequest(
126                    long userId, long stagingRequestId, boolean privateLayout,
127                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap)
128                    throws com.liferay.portal.kernel.exception.PortalException {
129                    return getService()
130                                       .publishStagingRequest(userId, stagingRequestId,
131                            privateLayout, parameterMap);
132            }
133    
134            public static void updateStagingRequest(long userId, long stagingRequestId,
135                    java.lang.String fileName, byte[] bytes)
136                    throws com.liferay.portal.kernel.exception.PortalException {
137                    getService()
138                            .updateStagingRequest(userId, stagingRequestId, fileName, bytes);
139            }
140    
141            /**
142            * @deprecated As of 7.0.0, replaced by {@link #publishStagingRequest(long,
143            long, boolean, Map)}
144            */
145            @Deprecated
146            public static com.liferay.exportimport.kernel.lar.MissingReferences validateStagingRequest(
147                    long userId, long stagingRequestId, boolean privateLayout,
148                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap) {
149                    return getService()
150                                       .validateStagingRequest(userId, stagingRequestId,
151                            privateLayout, parameterMap);
152            }
153    
154            public static StagingLocalService getService() {
155                    if (_service == null) {
156                            _service = (StagingLocalService)PortalBeanLocatorUtil.locate(StagingLocalService.class.getName());
157    
158                            ReferenceRegistry.registerReference(StagingLocalServiceUtil.class,
159                                    "_service");
160                    }
161    
162                    return _service;
163            }
164    
165            private static StagingLocalService _service;
166    }