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    
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 userId, 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(userId, stagingRequestId,
054                            privateLayout, parameterMap);
055            }
056    
057            public static com.liferay.exportimport.kernel.lar.MissingReferences publishStagingRequest(
058                    long userId, long stagingRequestId,
059                    com.liferay.exportimport.kernel.model.ExportImportConfiguration exportImportConfiguration)
060                    throws com.liferay.portal.kernel.exception.PortalException {
061                    return getService()
062                                       .publishStagingRequest(userId, stagingRequestId,
063                            exportImportConfiguration);
064            }
065    
066            /**
067            * @deprecated As of 7.0.0, replaced by {@link #publishStagingRequest(long,
068            long, boolean, Map)}
069            */
070            @Deprecated
071            public static com.liferay.exportimport.kernel.lar.MissingReferences validateStagingRequest(
072                    long userId, long stagingRequestId, boolean privateLayout,
073                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap) {
074                    return getService()
075                                       .validateStagingRequest(userId, stagingRequestId,
076                            privateLayout, parameterMap);
077            }
078    
079            /**
080            * Returns the OSGi service identifier.
081            *
082            * @return the OSGi service identifier
083            */
084            public static java.lang.String getOSGiServiceIdentifier() {
085                    return getService().getOSGiServiceIdentifier();
086            }
087    
088            public static long createStagingRequest(long userId, long groupId,
089                    java.lang.String checksum)
090                    throws com.liferay.portal.kernel.exception.PortalException {
091                    return getService().createStagingRequest(userId, groupId, checksum);
092            }
093    
094            public static void checkDefaultLayoutSetBranches(long userId,
095                    com.liferay.portal.kernel.model.Group liveGroup,
096                    boolean branchingPublic, boolean branchingPrivate, boolean remote,
097                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
098                    throws com.liferay.portal.kernel.exception.PortalException {
099                    getService()
100                            .checkDefaultLayoutSetBranches(userId, liveGroup, branchingPublic,
101                            branchingPrivate, remote, serviceContext);
102            }
103    
104            public static void cleanUpStagingRequest(long stagingRequestId)
105                    throws com.liferay.portal.kernel.exception.PortalException {
106                    getService().cleanUpStagingRequest(stagingRequestId);
107            }
108    
109            public static void disableStaging(
110                    com.liferay.portal.kernel.model.Group liveGroup,
111                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
112                    throws com.liferay.portal.kernel.exception.PortalException {
113                    getService().disableStaging(liveGroup, serviceContext);
114            }
115    
116            public static void disableStaging(
117                    javax.portlet.PortletRequest portletRequest,
118                    com.liferay.portal.kernel.model.Group liveGroup,
119                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
120                    throws com.liferay.portal.kernel.exception.PortalException {
121                    getService().disableStaging(portletRequest, liveGroup, serviceContext);
122            }
123    
124            public static void enableLocalStaging(long userId,
125                    com.liferay.portal.kernel.model.Group liveGroup,
126                    boolean branchingPublic, boolean branchingPrivate,
127                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
128                    throws com.liferay.portal.kernel.exception.PortalException {
129                    getService()
130                            .enableLocalStaging(userId, liveGroup, branchingPublic,
131                            branchingPrivate, serviceContext);
132            }
133    
134            public static void enableRemoteStaging(long userId,
135                    com.liferay.portal.kernel.model.Group stagingGroup,
136                    boolean branchingPublic, boolean branchingPrivate,
137                    java.lang.String remoteAddress, int remotePort,
138                    java.lang.String remotePathContext, boolean secureConnection,
139                    long remoteGroupId,
140                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
141                    throws com.liferay.portal.kernel.exception.PortalException {
142                    getService()
143                            .enableRemoteStaging(userId, stagingGroup, branchingPublic,
144                            branchingPrivate, remoteAddress, remotePort, remotePathContext,
145                            secureConnection, remoteGroupId, serviceContext);
146            }
147    
148            public static void updateStagingRequest(long userId, long stagingRequestId,
149                    java.lang.String fileName, byte[] bytes)
150                    throws com.liferay.portal.kernel.exception.PortalException {
151                    getService()
152                            .updateStagingRequest(userId, stagingRequestId, fileName, bytes);
153            }
154    
155            public static StagingLocalService getService() {
156                    if (_service == null) {
157                            _service = (StagingLocalService)PortalBeanLocatorUtil.locate(StagingLocalService.class.getName());
158    
159                            ReferenceRegistry.registerReference(StagingLocalServiceUtil.class,
160                                    "_service");
161                    }
162    
163                    return _service;
164            }
165    
166            private static StagingLocalService _service;
167    }