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.portlet.exportimport.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.model.Group liveGroup, boolean branchingPublic,
045                    boolean branchingPrivate, boolean remote,
046                    com.liferay.portal.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.model.Group liveGroup,
066                    com.liferay.portal.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.model.Group liveGroup,
074                    com.liferay.portal.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.model.Group liveGroup, boolean branchingPublic,
081                    boolean branchingPrivate,
082                    com.liferay.portal.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.model.Group stagingGroup, boolean branchingPublic,
091                    boolean branchingPrivate, java.lang.String remoteAddress,
092                    int remotePort, java.lang.String remotePathContext,
093                    boolean secureConnection, long remoteGroupId,
094                    com.liferay.portal.service.ServiceContext serviceContext)
095                    throws com.liferay.portal.kernel.exception.PortalException {
096                    getService()
097                            .enableRemoteStaging(userId, stagingGroup, branchingPublic,
098                            branchingPrivate, remoteAddress, remotePort, remotePathContext,
099                            secureConnection, remoteGroupId, serviceContext);
100            }
101    
102            /**
103            * Returns the OSGi service identifier.
104            *
105            * @return the OSGi service identifier
106            */
107            public static java.lang.String getOSGiServiceIdentifier() {
108                    return getService().getOSGiServiceIdentifier();
109            }
110    
111            public static com.liferay.portlet.exportimport.lar.MissingReferences publishStagingRequest(
112                    long userId, long stagingRequestId,
113                    com.liferay.portlet.exportimport.model.ExportImportConfiguration exportImportConfiguration)
114                    throws com.liferay.portal.kernel.exception.PortalException {
115                    return getService()
116                                       .publishStagingRequest(userId, stagingRequestId,
117                            exportImportConfiguration);
118            }
119    
120            /**
121            * @deprecated As of 7.0.0, with no direct replacement
122            */
123            @Deprecated
124            public static com.liferay.portlet.exportimport.lar.MissingReferences publishStagingRequest(
125                    long userId, long stagingRequestId, boolean privateLayout,
126                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap)
127                    throws com.liferay.portal.kernel.exception.PortalException {
128                    return getService()
129                                       .publishStagingRequest(userId, stagingRequestId,
130                            privateLayout, parameterMap);
131            }
132    
133            public static void updateStagingRequest(long userId, long stagingRequestId,
134                    java.lang.String fileName, byte[] bytes)
135                    throws com.liferay.portal.kernel.exception.PortalException {
136                    getService()
137                            .updateStagingRequest(userId, stagingRequestId, fileName, bytes);
138            }
139    
140            /**
141            * @deprecated As of 7.0.0, replaced by {@link #publishStagingRequest(long,
142            long, boolean, Map)}
143            */
144            @Deprecated
145            public static com.liferay.portlet.exportimport.lar.MissingReferences validateStagingRequest(
146                    long userId, long stagingRequestId, boolean privateLayout,
147                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap) {
148                    return getService()
149                                       .validateStagingRequest(userId, stagingRequestId,
150                            privateLayout, parameterMap);
151            }
152    
153            public static StagingLocalService getService() {
154                    if (_service == null) {
155                            _service = (StagingLocalService)PortalBeanLocatorUtil.locate(StagingLocalService.class.getName());
156    
157                            ReferenceRegistry.registerReference(StagingLocalServiceUtil.class,
158                                    "_service");
159                    }
160    
161                    return _service;
162            }
163    
164            private static StagingLocalService _service;
165    }