001    /**
002     * Copyright (c) 2000-2013 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.portal.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.portal.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.portal.service.base.StagingLocalServiceBaseImpl
033     * @see com.liferay.portal.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.portal.service.impl.StagingLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Returns the Spring bean ID for this bean.
046            *
047            * @return the Spring bean ID for this bean
048            */
049            public static java.lang.String getBeanIdentifier() {
050                    return getService().getBeanIdentifier();
051            }
052    
053            /**
054            * Sets the Spring bean ID for this bean.
055            *
056            * @param beanIdentifier the Spring bean ID for this bean
057            */
058            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
059                    getService().setBeanIdentifier(beanIdentifier);
060            }
061    
062            public static void checkDefaultLayoutSetBranches(long userId,
063                    com.liferay.portal.model.Group liveGroup, boolean branchingPublic,
064                    boolean branchingPrivate, boolean remote,
065                    com.liferay.portal.service.ServiceContext serviceContext)
066                    throws com.liferay.portal.kernel.exception.PortalException,
067                            com.liferay.portal.kernel.exception.SystemException {
068                    getService()
069                            .checkDefaultLayoutSetBranches(userId, liveGroup, branchingPublic,
070                            branchingPrivate, remote, serviceContext);
071            }
072    
073            public static void cleanUpStagingRequest(long stagingRequestId)
074                    throws com.liferay.portal.kernel.exception.PortalException,
075                            com.liferay.portal.kernel.exception.SystemException {
076                    getService().cleanUpStagingRequest(stagingRequestId);
077            }
078    
079            public static long createStagingRequest(long userId, long groupId,
080                    java.lang.String checksum)
081                    throws com.liferay.portal.kernel.exception.PortalException,
082                            com.liferay.portal.kernel.exception.SystemException {
083                    return getService().createStagingRequest(userId, groupId, checksum);
084            }
085    
086            public static void disableStaging(
087                    com.liferay.portal.model.Group liveGroup,
088                    com.liferay.portal.service.ServiceContext serviceContext)
089                    throws com.liferay.portal.kernel.exception.PortalException,
090                            com.liferay.portal.kernel.exception.SystemException {
091                    getService().disableStaging(liveGroup, serviceContext);
092            }
093    
094            public static void disableStaging(
095                    javax.portlet.PortletRequest portletRequest,
096                    com.liferay.portal.model.Group liveGroup,
097                    com.liferay.portal.service.ServiceContext serviceContext)
098                    throws com.liferay.portal.kernel.exception.PortalException,
099                            com.liferay.portal.kernel.exception.SystemException {
100                    getService().disableStaging(portletRequest, liveGroup, serviceContext);
101            }
102    
103            public static void enableLocalStaging(long userId,
104                    com.liferay.portal.model.Group liveGroup, boolean branchingPublic,
105                    boolean branchingPrivate,
106                    com.liferay.portal.service.ServiceContext serviceContext)
107                    throws com.liferay.portal.kernel.exception.PortalException,
108                            com.liferay.portal.kernel.exception.SystemException {
109                    getService()
110                            .enableLocalStaging(userId, liveGroup, branchingPublic,
111                            branchingPrivate, serviceContext);
112            }
113    
114            public static void enableRemoteStaging(long userId,
115                    com.liferay.portal.model.Group liveGroup, boolean branchingPublic,
116                    boolean branchingPrivate, java.lang.String remoteAddress,
117                    int remotePort, java.lang.String remotePathContext,
118                    boolean secureConnection, long remoteGroupId,
119                    com.liferay.portal.service.ServiceContext serviceContext)
120                    throws com.liferay.portal.kernel.exception.PortalException,
121                            com.liferay.portal.kernel.exception.SystemException {
122                    getService()
123                            .enableRemoteStaging(userId, liveGroup, branchingPublic,
124                            branchingPrivate, remoteAddress, remotePort, remotePathContext,
125                            secureConnection, remoteGroupId, serviceContext);
126            }
127    
128            public static void publishStagingRequest(long userId,
129                    long stagingRequestId, boolean privateLayout,
130                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap)
131                    throws com.liferay.portal.kernel.exception.PortalException,
132                            com.liferay.portal.kernel.exception.SystemException {
133                    getService()
134                            .publishStagingRequest(userId, stagingRequestId, privateLayout,
135                            parameterMap);
136            }
137    
138            public static void updateStagingRequest(long userId, long stagingRequestId,
139                    java.lang.String fileName, byte[] bytes)
140                    throws com.liferay.portal.kernel.exception.PortalException,
141                            com.liferay.portal.kernel.exception.SystemException {
142                    getService()
143                            .updateStagingRequest(userId, stagingRequestId, fileName, bytes);
144            }
145    
146            public static com.liferay.portal.kernel.lar.MissingReferences validateStagingRequest(
147                    long userId, long stagingRequestId, boolean privateLayout,
148                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap)
149                    throws com.liferay.portal.kernel.exception.PortalException,
150                            com.liferay.portal.kernel.exception.SystemException {
151                    return getService()
152                                       .validateStagingRequest(userId, stagingRequestId,
153                            privateLayout, parameterMap);
154            }
155    
156            public static StagingLocalService getService() {
157                    if (_service == null) {
158                            _service = (StagingLocalService)PortalBeanLocatorUtil.locate(StagingLocalService.class.getName());
159    
160                            ReferenceRegistry.registerReference(StagingLocalServiceUtil.class,
161                                    "_service");
162                    }
163    
164                    return _service;
165            }
166    
167            /**
168             * @deprecated As of 6.2.0
169             */
170            public void setService(StagingLocalService service) {
171            }
172    
173            private static StagingLocalService _service;
174    }